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/

spotless home service Lake Forest ..
In The News:

A Columbia University breach exposed names, Social Security numbers and academic records of nearly 869,000 people, with notifications beginning in August.
Rental car drivers use AI-powered apps like Proofr to protect themselves from unfair damage fees as major companies deploy automated inspection tools.
Fox News' AI newsletter brings you the latest on technology advancements around artificial intelligence.
OnTrac data breach between April 13-15, 2025, exposed personal information of over 40,000 people including Social Security numbers and medical records.
A woman named Wika announces her engagement to an AI chatbot sparking worldwide debate about virtual relationships and technology.
The notorious people search site National Public Data relaunches despite a previous breach affecting 3 billion individuals, raising fresh privacy concerns.
Revolutionary TRAUMAGEL gel controls life-threatening bleeding from gunshot wounds and traumatic injuries, helping first responders prevent prehospital deaths.
Protect your home network by enabling proper encryption, creating strong passwords, checking connected devices and using VPN and antivirus software.
The Navy's solar-powered Skydweller drone flew nonstop for 73 hours in Mississippi, proving renewable energy can power long-endurance military missions.
Moving and downsizing expose seniors to identity theft and scams as data brokers collect real estate records and personal information to sell to criminals.
ShengShu's Vidar technology revolutionizes humanoid robot training by using AI-generated synthetic video, reducing required training data from hours to just 20 minutes.
Apple's older Mac computers face security risks without regular updates, but 10 essential tips including FileVault encryption and strong passwords can keep aging Macs protected.
Self-driving trucks from PlusAI could reshape freight transportation by 2027, addressing driver shortages and reducing logistics costs for businesses.
Solar farms are turning to sheep instead of mowers to cut grass under solar panels, lowering costs, reducing emissions and creating new income for farmers.
Fraudsters posing as local officials are making fake calls about missed jury duty, demanding payments in a rising scheme that exploits fear of arrest.
Honeywell Aerospace engineers developed a "surface alert system" that gives pilots two aural warnings when they are 15 and 30 seconds away from a collision on the runway.
Anonymous researcher has scraped public Spotify accounts of politicians and celebrities, highlighting major privacy risks in default platform settings.
AI chatbot toys marketed as screen-free playmates could undermine children's empathy and critical thinking skills, according to pediatric specialists.
TransUnion confirms a major data breach affecting 4.4 million U.S. consumers after hackers exploited third-party Salesforce apps to steal personal info.
Scammers use fake DocuSign emails claiming Apple Pay charges to steal personal information using fraudulent phone numbers and fake receipts.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Farmers Insurance confirms data breach affecting over 1.1 million customers nationwide, exposing customer info including addresses.
The iconic Mary Kay pink Cadillac goes electric with the Cadillac Optiq, available only to the company's top 1% of sales force performers.
Cybercriminals abuse trusted Intel driver to gain kernel access and shut down Windows Defender, enabling undetected malware deployment since July 2025.
Using email aliases for online shopping and subscriptions can protect your privacy by preventing companies from linking your activity across websites.

Build or Buy a CMS?

Creating a content management system either from scratch,... Read More

Develop a Solid Website Presence

Starting an internet business can be confusing to non-veterans. The... Read More

Make Your Artist Website Sell!

SummaryHere's the scoop on what you must know when designing... Read More

How Your Own Website Helps Your Small Business Grow

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

Web Accessibility: The Basics

What is web accessibility & why is it important?Web accessibility... Read More

Web accessibility for screen magnifier users

The needs of screen magnifier users are overlooked when implementing... Read More

How Did You Get Here?

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

Web Designer? You Dont Need No Stinkin Web Designer!

RIVERSIDE, CA August 4, 2004 ?- "Historically, small business owners... Read More

3 Ways To Increase Your Websites Conversion rate

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

Better Web Site ROI: Efficient Online Business with SEO, PPC, Split Testing, and Forums

If you're looking for better web site ROI, chances are,... Read More

Making the Most of Your Website: Start with the Basics

One of my most salient memories from when I sold... Read More

3 Essential Tools Every Website Designer and Marketer Needs

Appealing to others is really important when you have a... Read More

Improve Conversion Rates ? Effective Content

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

Tips for Building a Great Business Website

A website is lifeline of internet home business. In order... Read More

7 Reasons YOU Need a Website

1) A marketing necessityI still hear it said from time... Read More

Web Site Optimization: How To Speed Up Your Web Site By Minimizing Your GIF and PNG Image Bit-Depth

Are bloated images slowing down your web site and causing... Read More

Are You Being Scammed By Your Web Design Company?

This is a growing concern amongst many business owners. Does... Read More

3 Reasons Why You Need URL Rewriting Module To Enchance Your Web

URL rewriting are major needs for your sites that produce... Read More

Are You Overlooking the Benefits of Using Sub-Domains within Your Web-hosting account?

One of the most useful features offered by some web... Read More

A Beginners Guide to Server Side Includes

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

Websites for Writers ? Why You Need One and How to Get Started Today

It may seem like the publishing industry's equivalent of Beanie... Read More

Ten Quick Tests To Check Your Website For Accessibility

The Disability Discrimination Act says that websites must be made... Read More

Planning Your Website for Success

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

The Internet Road Map

1) Data CaptureOne easy way to collect e-mail addresses and... Read More

Give Your Business a Cash Infusion

Whether you have your own business already, or are looking... Read More

weekly home cleaning Mundelein ..