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/

bathroom cleaning service Northbrook ..
In The News:

ETA sharing on Apple Maps and Google Maps keeps contacts updated automatically while you drive safely. Learn step-by-step instructions for iPhone and Android.
Data removal from brokers protects against AI-powered scams and deepfake threats in 2026. Learn how data brokers sell your personal information to scammers.
Learn how to act against cybercriminals in 2026 with essential security steps like two-factor authentication, software updates and credit freezing.
Choose between OpenAI releasing Sora text-to-video model, the AI race heating up, or Waymo driverless cars launching in cities across the country
Learn how to set up Google Maps and Apple Maps on your phone to automatically remember where you parked. Step-by-step instructions for enabling location services and parking detection.
Phishing scammers use rnicrosoft.com domain to impersonate Microsoft by replacing "m" with "rn" in typosquatting attacks that steal login credentials.
OpenAI announces new teen safety rules for ChatGPT users under 18, blocking romantic roleplay and requiring extra caution on body image topics.
A 2025 data breach at fintech company 700Credit exposes personal information of more than 5.8 million people through compromised third-party integration partner.
Retailers lose $76.5 billion annually to return fraud as nearly 10% of U.S. retail returns involve fraudulent activity, with $850 billion in returns expected in 2025.
ShinyHunters claims responsibility for stealing 94GB of Pornhub user data affecting over 200 million records and demands Bitcoin ransom.
ChatGPT 2025 now connects to Apple Music, Canva, Expedia, TripAdvisor and OpenTable through built-in apps that help users create playlists, design graphics and more.
Apple releases emergency patches for two zero-day vulnerabilities actively exploited in attacks. iPhone and iPad users urged to update immediately.
DoorDash launches Zesty, an AI-powered social app that recommends restaurants through conversational search, now testing in San Francisco and New York.
Cybersecurity firm Infoblox reveals that over 90 percent of parked domains now redirect visitors to scams and malware, making simple typos extremely dangerous.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
GPT-5.2 is now live for all ChatGPT users with improved coding, writing and image interpretation, with Kurt Knutsson offering his review.
New iPhone replacement scam uses pressure tactics and fake carrier calls to steal devices from buyers. Criminals claim shipping errors and demand urgent returns.
Amazon Ring's new facial recognition feature sparks privacy controversy as Electronic Frontier Foundation critics argue the AI upgrade expands surveillance risks.
New Android banking trojan Sturnus steals credentials, reads encrypted messages and controls devices.
Denmark's 3D-printed student village proves automation builds 36 apartments faster than traditional methods. Skovsporet project shows housing future.
Discover Android's new Sound Notifications feature that alerts you to smoke alarms, doorbells, and baby cries even when wearing headphones.
New SantaStealer malware reportedly threatens holiday shoppers with password theft. This Christmas-themed info-stealer targets browsers and crypto wallets.
The Christmas season brings a surge in Netflix phishing scams targeting shoppers with fake emails. Stacey P received convincing scam but verified account first.
San Francisco Giants invite Jamie Grohsong to throw ceremonial first pitch at Oracle Park after he learned to play baseball with a bionic hand following an injury.
FBI warns cybercriminals are stealing family photos from social media to create fake proof of life images in virtual kidnapping scams targeting victims.

Five Reasons You Have to Stop Your Web Site

That's right. Your method, behavior and strategy you are now... 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

Do You And Your Website Have Credibility?

I recently received an unsolicited e-mail from some company offering... Read More

PHP Redirect

A PHP Redirect automatically transfers a web user from one... Read More

How Worldly is Your World Wide Web?

The growth in Internet usage around the world is astounding... Read More

Six Basic Reasons Why Visitors Stay On Your Web Site

1. The first page appears quickly.It's a good way to... Read More

Non-Profits: Successful Online Strategies

More and more non-profit organizations are developing websites to help... Read More

Your Website Should Be Selling

It may come as some surprise to a traditionally off-line... Read More

Make Your Web Site Stand Out

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

Five Steps to Create Your Software Product with Outsourcing

Many executives and investors are skeptical that software products can... Read More

Web Designer? You Dont Need No Stinkin Web Designer!

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

A Website Is Not Enough

Your ObjectiveYour small business needs an appealing and professional website... Read More

Guidelines for Web Page Optimization

Below, I have listed 8 simple steps that you can... Read More

5 Tips For A Better Website

Having an eye catching website is great, but are you... Read More

Setting Up A CGI Script On Your Web Site

Before you set up any scripts you will need some... Read More

9 Simple Steps to Create a Background Tiled Image Branded with Your Name

You have seen those web pages where they have the... Read More

4 Marketing Tips for Resourceful Webmasters!

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

How to Get a Knock Out Website!

The first step in setting up an online business...Starting an... Read More

Marketing Your Business Online

As a business you can't afford to ignore the Internet... Read More

Get a Website!, Register Your Domain!: To Website or Not to Website?

If you're fairly new to the Internet scene, you may... 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

Five Essential Questions to Answer Before Creating Your First (or second...or third) Website

Right after the thought, "I need a website," people usually... Read More

Selling Your Site: Outsource or Homemade?

To the starting internet entrepreneur, there is nothing more discouraging... Read More

Why to Have a Website for Your Company

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

Using Mini Websites - Powerful Way to Direct Marketing

Mini Websites are the most powerful and cost effective solution... Read More

insured cleaning company Wilmette ..