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/

limo service at o'hare Carpentersville .. Lockport Chicago limo O’Hare
In The News:

Tech expert Kurt “CyberGuy" Knutsson says a tech support scam used a fake Windows Defender pop-up, tricking the victim to call and download software.
Tech expert Kurt “CyberGuy" Knutsson reveals ways to restore accidentally deleted text messages on your Android phone.
A new study says outdoor security camera apps are among the biggest collectors of user data, including phone numbers, payment details and precise location.
In iOS 18.2 and later, Apple's Mail app enhances email management by automatically sorting messages into distinct categories to help find emails faster.
A virtual private network (VPN) allows computer and smartphone users to mask an IP and create a secure, encrypted connection between a device and the internet.
Android 15's latest feature, Private Space, is like a private vault helping to keep your personal or sensitive apps away from prying eyes.
Cybercriminals have more ways than ever to target teenagers; here are some of the most widespread scams and tricks to watch in order to keep your loved ones safe.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
A humanoid robot named CUE6 has got game. The basketball-playing robot, produced by Toyota, claimed a Guinness World Record for longest shot.
With electronic signatures becoming more common, Kurt the CyberGuy explains how to produce your digital John Hancock for online documents.
Kurt the CyberGuy walks through steps he recommends immediately taking after getting new electronics — like phones or TVs — as gifts this holiday season.
When speaking becomes physically challenging, you can preserve your unique voice using Apple's Personal Voice and Live Speech technology.
Google Maps is deleting location history soon. Tech expert Kurt “CyberGuy" Knutsson shows you how to back it up before it's gone.
iOS 18.2 lets AirTag owners securely share item locations with trusted individuals. Tech expert Kurt “CyberGuy" Knutsson examines the powerful new feature.
The FBI is warning timeshare owners of a telemarketing scam tied to a Mexican drug cartel. Tech expert Kurt “CyberGuy" Knutsson provides steps to stay safe.
Protecting your home network includes securing your router, just like your phone or laptop. Kurt “CyberGuy" Knutsson reveals six ways to protect your Wi-Fi router from hackers.
Kurt “CyberGuy" Knutsson: ConnectOnCall breach leaks sensitive data of 910,000+ patients.
Rising elder scams: How to recognize them and protect yourself and your loved ones. Tech expert Kurt “CyberGuy" Knutsson helps you outsmart the scammers.
There are common habits and oversights that could leave your financial information vulnerable to cybercriminals, according to Kurt the CyberGuy.
Counting calories just got easier with The Drop, the world's first automated nutrition tracker using advanced computer vision and artificial intelligence.
A virtual private network can help ensure your information remains security and your privacy remains intact. Kurt the CyberGuy explains.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Artificial intelligence-based cameras are giving air defense operators unprecedented capabilities in monitoring and protecting airspace.
Apple's iOS 18.1 Inactivity Reboot automatically reboots your iPhone if it hasn't been used or unlocked for more than three days, providing better data protection.
An inventor designed rooftop solar panels for a Tesla that draws solar energy while the car is parked, adding travel mileage without plugging in.

12 Essential Tips to a Professional Business Website

1. Choose a big enough font size. A size 12... Read More

Nonsense! Why Do I Need a Website?

"I don't sell anything online, I don't advertise online, in... Read More

How to Draw Icons or Images on a Mapserver Generated Map

In this example I have used the map of the... Read More

Maximizing ROI via Web Site Traffic Analysis

We are clearly well past the innocent "golden age" of... Read More

Internet Marketing Website Promotion -The 7 Biggest Mistakes I See People Make With Websites!

1. Many people are not getting good or complete advice.... Read More

Link Trades That Waste Your Time

Never has competition been so difficult in the Internet world.... Read More

Build a Web Site that Works...Even for a Safari Hobby!

My life's greatest passion is a safari hobby. And what... Read More

4 Steps to Selling More With Your Web Site

Most web sites are more like stage sets than real... Read More

Business Website Building Do?s and Don?ts

First, using a lot of web graphics, flash, banners and... Read More

Eight Deadly Web Site Mistakes and How to Avoid Them

Creating and maintaining an effective presence on the Web has... Read More

A Beginners Guide to Server Side Includes

An Introduction to Server Side IncludesBeginner? That's OK!While much has... Read More

How To Evaluate Your Web Sites Performance

Setting up a website is the very first step of... Read More

Why Do I Need A Web Site?

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

Improve Conversion Rates ? Effective Content

Your site is fast and getting traffic, but conversion rates... Read More

Using Psychology Easily on Your Website to Make More Sales!

Psychology is a long word which everyone thinks, "no, that's... Read More

Website Imperatives and Solutions

When you take a look at the most visited sites... Read More

Why to Have a Website for Your Company

After having decided to start a business, the next thing... Read More

Building eCommerce Websites that Work - Part 3

An interesting eCommerce success factor that isn't precisely overlooked, but... Read More

Make Your Web Site Stand Out

When visitors add your web site to their Favorites or... Read More

7 Questions to Understand Your Customer Better

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

Top 7 Reasons Why Your Business Needs a Website

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

Warning: The Truth About Having a Web Site!

If you don't have a web site yet, are thinking... Read More

Get Your Business on the Web

I can't think of any business alive today that couldn't... Read More

Why Your Brick-and-Mortar Biz Needs A Website

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

How to Handle Web Surfers Who Disabled JavaScript

There are hundreds of millions of Web surfers today. Each... Read More

Fox River Grove limo rentals ..