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/

recurring housekeeping Wilmette ...
In The News:

A phishing email disguised as an Evite fooled a man even after he emailed his friend to verify it, revealing how compromised Gmail accounts aid scams.
Microsoft's AI diagnostic system identified 83% of complex medical cases in a study, more than doubling the 36% accuracy of generalist doctors.
Account takeover threats go beyond stolen passwords as criminals exploit session cookies, SIM swaps and MFA fatigue to bypass your login security.
SpaceX is reportedly pursuing access to 80,000 cell sites to turn Starlink into a major wireless carrier rivaling Verizon, AT&T and T-Mobile.
Tech advocacy groups warn that foreign nationals at AI companies like OpenAI and Google pose a national security threat amid a lack of federal oversight.
Singapore researchers built the world's first touchscreen woven into clothing, surviving 50 machine washes while displaying images and responding to touch.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
A startup founder woke to $449 in unexpected OpenAI and Anthropic charges after stolen API keys were exploited during the "Black October" cyber wave.
Educational Testing Service hackers stole millions of California student records, but families who moved out of state years ago may also be affected.
Apple's iPhone Duo screens are cracking near the hinge just days after its $1,999 launch, and iFixit's CT scans may reveal what's going wrong.
Travel expert Katy Nastro says 50,000 American Airlines AAdvantage miles vanished from her account after someone redeemed them without permission.
Google AI Overviews can't be permanently turned off, but adding -AI to your searches and using the built-in Web filter can help bypass AI summaries.
Attaxion researchers found 30 fake Texas campaign merchandise stores traced to just two sellers hawking gear for competing Republicans and Democrats.
GM plans to debut eyes-off driving in the Cadillac Escalade IQ by 2028, but safety testing reveals how long distracted drivers take to regain control.
Data brokers assign labels predicting your health, finances and religion based on browsing and purchases, then sell those profiles to businesses.
Elon Musk says he'll give one SpaceX share to every kid in America in 2027, but key details about eligibility and distribution remain unclear.
ClearSpace UK's robotic spacecraft with giant claws will chase down dead satellites at 17,000 mph, with a 2029 launch from Scotland planned.
A fake Social Security statement phishing email uses the SSA logo and a convincing layout, but the sender's domain instantly exposes the scam.
A clean credit report doesn't mean your identity is safe. Six ways criminals can steal from you without triggering a credit monitoring alert.
Carolyn Marvin, a 78-year-old retired professor, was arrested after blocking an Uber Eats delivery robot on a Philadelphia sidewalk for months.
The Midnight Mimosa malware campaign hides inside cheap Android phone firmware, giving attackers powerful access before owners even turn devices on.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
Meta's Muse AI was built to manage tasks, but users are developing romantic AI relationships and even calling the AI companion their girlfriend.
A Minnesota murder suspect's notebook listed 11 people search websites, raising urgent questions about data broker opt-out and online privacy risks.
Google Universal Cart tracks price drops, surfaces promo codes and uses Google Wallet to match your best credit card rewards before checkout.

Planning Your Website for Success

Most people know they need a website in order to... Read More

The Problem with Paypal On Your Web Page

When I set up my website I felt paypal was... Read More

HTML Editors - How to Choose the Right One for Building Your Websites

There are lots of HTML editors on the market, however,... Read More

4 Marketing Tips for Resourceful Webmasters!

The internet is a sea of knowledge. Getting your information... Read More

How Your Own Website Helps Your Small Business Grow

What do you mean, you don't have a website for... Read More

What and How to choose the Right Keywords for Mega Traffic

Keywords in Search Engine Optimizing and Search Engine Marketing are... Read More

Flash Deadly Sins (That Can Kill Your Web Business)

Looks like every client wants a Flash site these days... Read More

How Improving Your Sites Usability Can Increase Your Buyers by 40% and Boost Each Order By 10%!

With all of the factors involved in designing and building... Read More

What is Blogger.com?

In the late 1990's three San Francisco based web developers... 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

Create Huge Income From Your Web Site - 10 Easy Ways

The cost of setting up a web site is dirt... Read More

Increase Hits to Help Increase Your Business

In this day and age most businesses consider having their... Read More

The Top Ten Benefits of Having a Web Site

Do you need a web site? Are you considering getting... Read More

How Did You Get Here?

When marketing your website, it's important to know which of... Read More

Establishing Your Web Presence

Part of the success of most home-based businesses is their... Read More

Top 5 Webmaster Tools You Can Pick Up For Pennies

1. SiteSpinner V2 - On Sale www.deprice.com/sitespinner.htmSiteSpinner is a user-friendly... Read More

How To Start Your Own Website

I'm one of those people that always wanted a website,... Read More

Developing A Login System With PHP And MySQL

Most interactive websites nowadays would require a user to log... 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

Track Your Visitors, Using PHP

There are many different traffic analysis tools, ranging from simple... Read More

The Two Most Common Mistakes That Scare Away Web Visitors

Can you imagine the hypocrisy of spending thousands of dollars,... Read More

7 Tips to Make Your Order Page Work Harder

So your prospect, Mary, is sitting at the computer reading... Read More

You Don?t Have to be Amazon.com to Achieve 12% Conversion Rates!

That's right. According to a recent study by Nielsen/NetRatings, Amazon.com... Read More

Improve Web Sales Figures Forever And Ever Amen!

"How do I improve web site sales figures?" The CEO... Read More

How to Increase Sales with Automation Improvements

How popular is online shopping? And is there room for... Read More

best value cleaning service Arlington Heights ...