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/

cleaning help near Mundelein ..
In The News:

A phone phishing attack compromised Harvard's alumni and donor database, marking the second security incident at the university in recent months.
AutoFlight's zero-carbon floating vertiport uses solar power to charge eVTOL aircraft while supporting emergency response, tourism, and marine energy maintenance.
A new phone return scam targets recent buyers with fake carrier calls. Learn how criminals steal devices and steps to protect yourself from this fraud.
New Anthropic research reveals how AI reward hacking leads to dangerous behaviors, including models giving harmful advice like drinking bleach to users seeking help.
The Fox News AI Newsletter gives readers the latest AI technology advancements, covering the challenges and opportunities AI presents.
Holiday email scams, including non-delivery fraud and gift card schemes, spike in November and December, costing victims hundreds of millions, the FBI says.
Holiday visits offer the perfect opportunity to help older parents with technology updates, scam protection and basic troubleshooting skills for safer digital experiences.
Swiss scientists create grain-sized robot that surgeons control with magnets to deliver medicine precisely through blood vessels in medical breakthrough.
Researchers exploited WhatsApp's API vulnerability to scrape 3.5 billion phone numbers. Learn how this massive data breach happened and protect yourself.
Travel companies share passenger data with third parties during holidays, but travelers can protect themselves by removing data from broker sites and using aliases.
Xpeng's humanoid robot moves so realistically that crowds believed it was fake, marking a major advancement in robotics technology ahead of 2026 commercial launch.
Researchers discover phishing scam using invisible characters to evade email security, with protection tips including password managers and two-factor authentication.
iPhone and Android users can reduce battery drain and data usage by restricting Background App Refresh to Wi-Fi connections instead of mobile networks.
Scammers nearly stole an Apple account by exploiting the support system with authentic-looking tickets and phone calls, users can protect themselves with safety steps.
FoloToy restored sales of its AI teddy bear Kumma after a weeklong suspension following safety group findings of risky and inappropriate responses to children.
Threat intelligence firm Synthient uncovers one of the largest password exposures ever, prompting immediate security recommendations.
Viral video shared by Elon Musk shows Tesla's Optimus humanoid robots performing tasks from cooking to construction, garnering over 58.5 million views on social media.
Chinese hackers used Anthropic's Claude AI to launch autonomous cyberattacks on 30 organizations worldwide, marking a major shift in cybersecurity threats.
Apple's new Sleep Score feature gives you a rating for your nightly rest quality. Learn how to set it up on your Apple Watch and iPhone today.
Essential phone settings to enable before losing your device, including Find My network, location services and security features for iPhone and Android.
The Fox News AI Newsletter gives readers the latest AI technology advancements, covering the challenges and opportunities AI presents.
Cybersecurity research shows weak passwords remain a major threat, with simple patterns and number sequences putting millions of accounts at risk.
New Android malware BankBot YNRK silences phones, steals banking data and drains crypto wallets automatically. Learn how this advanced threat works.
FDA approves first human trial for Paradromics' brain-computer interface that could restore speech for paralyzed patients through neural technology.
New phishing platform QRR targets Microsoft 365 users across 1,000 domains in 90 countries. Learn how to spot fake login pages and protect your accounts.

Developing A Website: 10 Tips For Getting Started

1. Be clear on your purpose.Building a website can be... Read More

Trinkets, Lockets And Empty Pockets

It never ceases to amaze me how many people set-up... Read More

Allocating Your Web Site?s Budget Properly

I had a client say something to me the other... Read More

Database Driven Web Site - Do You Need It?

Many of site owners still don't realize all advantages of... Read More

Warning: The Truth About Having a Web Site!

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

Web Sites ? Should I Learn or not?

A common dilemma most small and medium businesses face when... Read More

I Did It: Six Months to a Successful Website

For years now I've been looking to start my own... Read More

High Quality Website at Low Cost

Although designing a great web site is an important part... Read More

Does Your Business Really Need A Website?

Website, website, website, everyone says you need one. But do... Read More

Building eCommerce Websites that Work - Part 3

An interesting eCommerce success factor that isn't precisely overlooked, but... 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

Tips for Building a Great Business Website

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

You Need a Website!

No matter the size of your business, having a web... Read More

7 Tips to Make Your Order Page Work Harder

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

Increase Hits to Help Increase Your Business

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

Achieving Differentiation With Your Website

Internet Marketing is not a miracle marketing strategy ? competition... Read More

Make Your Own Website - General Website Design Tips

Wow, we`ve already taken a domain and chosen a web... Read More

Make Your Artist Website Sell!

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

Conceptualize, Build and Publish a Web site

Conceptualize, Build and Publish a Web site - What's required... Read More

What Your Customers Say About YOUR Site! Part 1

The following is a list of patterns that many visitors... Read More

Website Survival Guide

In the big, wide online world there are millions of... Read More

A Network Of Web Sites Is Not Enough!

The big thing these days is your ability to capture... Read More

Build or Buy a CMS?

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

Web Accessibility Myths

With more and more countries around the world passing laws... Read More

Study Your Sites Performance Via Hit Tracking

Knowledge is power.And undoubtedly, it is the key to making... Read More

reliable maid service Wilmette ..