How to Draw Icons or Images on a Mapserver Generated Map

In this example I have used the map of the Itasca demo of the Mapserver. I have done only small changes to the map file. The Itasca demo has (into the html file) the parameters of the path where to store the images:

IMAGEPATH "set in index.html" IMAGEURL "set in index.html"

I have changed them as fixed path

IMAGEPATH "/tmp/ms_tmp/" IMAGEURL "/ms_tmp/"

Than I have set as STATUS ON several layers for a better map.

The Database

The positions and the images paths that have to be shown on the map are stored into a table of a database in MySql. I have created a new database named "mapexample" and a new table "weather":

CREATE TABLE weather (

id bigint(20) NOT NULL auto_increment,

imagepath varchar(255) default NULL,

x double(16,4) default NULL,

y double(16,4) default NULL,

PRIMARY KEY (id)

)

and than I have inserted into the table the positions of the weather images and the path of every icon:

INSERT INTO `weather` VALUES (1, '/data/weather/icons/sunny.gif', 478107.0000, 5250301.0000); INSERT INTO `weather` VALUES (2, ''/data/weather/icons/cloudy.gif', 408107.0000, 5220301.0000); INSERT INTO `weather` VALUES (3, ''/data/weather/icons/storm.gif', 468107.0000, 5270301.0000); INSERT INTO `weather` VALUES (4, ''/data/weather/icons/variable.gif', 408107.0000, 5310301.0000);

It is not necessary for the images to be stored into a directory visible from the web, because are taken directly by the script and then merged with the map.

The PHPMapscript code Here is the code I have used for generating the map: ">

More info: http://www.parsec.it/tutorials/

Roberto Colonello owns and operates http://www.parsec.it/tutorials/ and http://www.parsec.it/tutorials/

Tinley Park executive chauffeured services .. Lockport Chicago limo O’Hare
In The News:

The CyberGuy provides tips to protect yourself from criminals who use various methods to make unauthorized transactions using your account information.
New drone technology maps land and water with stunning accuracy, giving researchers and conservationists a new way to understand our planet.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
X hit with massive data breach with 200 million records leaked, including emails. Tech expert Kurt “CyberGuy" Knutsson offers seven tips to help protect yourself.
Atlas robot by Boston Dynamics amazes tech expert Kurt “CyberGuy" Knutsson with its breakdancing moves.
Tech expert Kurt “CyberGuy" Knutsson talks about how Google kept Android SafetyCore details quiet until it scanned users' photos.
Hydrogen trucks debut in Georgia, sparking debates on costs and green freight gains. Kurt “CyberGuy" Knutsson comments on this promising chapter in green logistics evolution.
Tech expert Kurt “CyberGuy" Knutsson says ChatGPT learns from chats, but you should avoid sharing sensitive information to protect your privacy.
Beyond Aero's BYA-1: Hydrogen-electric jet with zero emissions, reduced costs, 2030 launch. Kurt “CyberGuy" Knutsson discusses a potential game changer in the evolution of air travel.
Kurt "CyberGuy" Knutsson explains how you can creatively repurpose your old unused Android devices, which are full of potential and hidden value.
Mech the super-humanoid robot can lift up to 132 pounds and is designed to tackle stressful and repetitive tasks that often lead to workplace injuries.
Double-clicking is something we all do, often without giving it a second thought. But it could be giving hackers permission to do something dangerous.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Kurt the CyberGuy offers some of his easy expert tips to free up storage space on your Android if your device is running short on storage.
You can reset your internet router remotely if you're not home when your power goes out. Kurt "CyberGuy" Knutsson explains how this can be done.
The EO Canopy is a self-sustaining, solar-powered camping platform designed to provide all the comforts of home while completely off the grid.
Experts say hackers who used to focus on Windows operating systems are increasingly targeting Apple IDs as part of a new phishing campaign.
Unitree, a Chinese robotics company that developed a backflipping robot, has now introduced a humanoid robot capable of doing a side flip.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
According to the FBI, cybercriminals are sending extortion letters, threatening to release victims' sensitive information unless a ransom is paid.
FireSat is a satellite project designed to detect and track wildfires early, aiming to detect a fire that's the size of a classroom within 20 minutes.
Tech expert Kurt “CyberGuy" Knutsson reports that researchers have uncovered a Chrome vulnerability used in a cyber espionage campaign.
Preserving voicemails securely on Android: Tech expert Kurt “CyberGuy" Knutsson reveals easy methods to keep memories alive forever.
This phishing kit bypasses 2FA via session hijacking and real-time credential theft. Kurt “CyberGuy" Knutsson offers four ways to stay safe from Astaroth phishing attacks.
Tech expert Kurt “CyberGuy" Knutsson discusses Joby Aviation and Virgin Atlantic planning to launch 200-mph U.K. air taxis linking airports and cities.

Ecommerce for Beginners

Like most average persons, I wanted some extra money to... Read More

4 Rock Solid Reasons For Building Your Own Website

What is the point of having a website, you may... Read More

Email Addresses in Web Pages

You want to give your site's visitors a way to... Read More

Creating Compelling Content , Write It and They Will Come

In a previous ezinearticles.com article,"I Need real visitors, Not Search... Read More

Let Marketing Manage Your Website Content

The definition of the phrase "Content Management" depends on what... Read More

The Number 1 Reason Most Websites Fail

Failure, just like success, is measured differently by each and... Read More

3 Ways To Increase Your Websites Conversion rate

Everywhere you look these days, people are telling you that... Read More

Creating Dynamic Website Content with PHP - MySQL

Fresh website content for your visitors can be of real... Read More

The Problem with Automated Accessibility Testing Tools

An automated accessibility tool is a piece of software which... Read More

Introductory PHP For Non-Programmers

When you started reading this sentence you assumed lo acabar?a... Read More

7 Questions to Understand Your Customer Better

Customer service questionnaires can help your clients better understand their... Read More

Content Management ? The New Standard in Web Design

The evolution of web development parallels the model of technology... Read More

Top 7 Tips for Building an Antique Car Website

Like wine cars get more attractive to collectors as years... Read More

Make Your Communication Come Alive

Design and layout can make your communication come alive and... Read More

Why Do I Need A Web Site?

Even though the Internet has been around for a long... Read More

The Evolution Of Search

There have been many significant changes to the face of... Read More

Get to Know People through Websites

Web sites are not just places to sell things; they... Read More

You May Be Losing Valuable Traffic - And Not Even Know It!

Here's something you may never have thought of before:If I... Read More

In Business? 10 Reasons Why You Need a Website -- Now!

1) Word of Mouth The single most powerful form of... Read More

Increase Your Affiliate Earnings with a Smart Webmaster Plan

Affiliate programs are a great way to earn an income... Read More

Why Your Brick-and-Mortar Biz Needs A Website

The internet has taken over our lives with a vengeance,... Read More

Top 7 Reasons Why Your Business Needs a Website

A website provides invaluable advantages for businesses who have one.7... Read More

If You Build It, They Will Come?

Building a new website can be a lengthy task. From... Read More

Art, Artists and the Web: Part 4--What to Do After a Website is Designed

What to do if you are an artist after you... Read More

The Road to Better Results

A lot has changed in the way sites are optimized... Read More

limo Chicago Hickory Hills ..