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/

after renovation cleaning Glenview ..
In The News:

Foreign-owned apps secretly harvest personal data from seniors, making them prime targets for scams. Learn how to protect your privacy and stop data brokers today.
Sens. Josh Hawley and Richard Blumenthal introduce bipartisan GUARD Act to protect minors from AI chatbots through mandatory age verification and disclosure requirements.
Ghost-tapping scammers exploit wireless technology to drain accounts through small transactions, but RFID-blocking wallets and transaction alerts can protect you.
French pilot project demonstrates wireless charging roads that can deliver over 300 kilowatts of power to EVs while driving, potentially eliminating range anxiety.
YouTube's Ghost Network spreads information-stealing malware through thousands of fake videos offering cracked software, using compromised accounts and fake engagement.
Protect your privacy by disabling your smart TV microphone. Most TVs have hidden mics that listen even when voice commands are off. Learn quick steps to stop unwanted audio capture.
SessionReaper vulnerability hits Magento and Adobe Commerce stores, compromising 250+ sites in one day. Hackers steal data and hijack shopping sessions.
Master essential parental controls and digital safety tools to protect your kids online. Learn screen time limits, location settings and privacy controls every parent needs.
Cybersecurity expert shares six essential steps to protect against dark web threats, including data removal services, password managers and antivirus software.
NVIDIA GPU space mission could revolutionize cloud services by enabling orbital data centers that make apps, games and AI tools faster and more efficient.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Microsoft warns Windows 10 users face serious security risks as 90% of ransomware attacks target unsupported systems. Learn why upgrading to Windows 11 is crucial.
Nike unveils Project Amplify, revolutionary motorized shoes developed with Dephy that add powered assistance to every step for runners and walkers.
Cybersecurity experts warn about one of the largest credential compilations ever found, urging users to check "Have I Been Pwned" and change passwords immediately.
Quick iPhone and Android battery optimization techniques help your device stay powered all day by turning off hidden features that secretly drain power in the background.
Kodiak Driver autonomous truck achieves perfect 98 safety score, matching top human fleets in groundbreaking AI evaluation by Nauto's VERA system.
New 401k catch-up contribution rules in 2026 will change taxes for high earners over 50. Learn how scammers exploit these changes and protect your retirement savings.
Kurt Knutsson's guide covers social media privacy protection through location settings, account privacy controls and two-factor authentication to prevent scams and data breaches.
Revolutionary retinal implant restores central vision in 80% of patients with advanced macular degeneration, offering hope where treatments once only slowed blindness.
Learn how to use passkeys on Windows and Mac computers without cameras or fingerprint readers. Discover secure authentication methods that replace passwords.
Tesla's FSD v14.1.2 update reintroduces Mad Max mode, enabling higher speeds and more frequent lane changes than the standard Hurry profile setting.
A phishing email scam targeting American Express customers shows how cybercriminals use fake urgent messages to steal personal and financial information.
Facebook's new Meta AI feature analyzes your camera roll photos to create polished collages automatically, but requires cloud processing and raises privacy concerns.
A New Jersey teenager filed a major lawsuit against AI/Robotics Venture Strategy 3 Ltd. over ClothOff, an AI tool that created fake nude images from her social media photos.
Microsoft reports Storm-2657 cybercriminals sent phishing emails to 6,000 addresses at 25 universities to steal payroll credentials and redirect funds.

Achieving Differentiation With Your Website

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

Websites: You Get What You Pay For!

So you finally decided to invest in a web presence... Read More

Make Your Artist Website Sell!

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

Benefits Of Making Your Website Accessible To Disabled Users ? Part 2: The Business Case

The Disability Discrimination Act states that service providers must not... Read More

Ten Major Tips to Develop a Multilingual Web Site to Work

If you are living in a country that its native... Read More

How to Promote Your Law Firm Website On the Internet for Maximum Profit

Making maximum profit from your law firm website is important,... Read More

Revealing the Firefox Secret Used by Top Web Developers and Power-Browsers

Profiles are one of the best kept secrets around regarding... Read More

Setting Up Your First Website

Q. Hey, Cathy: I'm just setting up a website. What... Read More

50 Ways To Use Your Website

A website is the most versatile and cost-effective marketing tool... Read More

2 Key Ways to Make Your Site a Success

If one more business owner tells me their website sucks... Read More

Why a CSS Website Layout Will Make You Money

Although CSS layouts have been around for years, they haven't... Read More

What is The Google Toolbar?

No matter what browser you may want to use, you... Read More

6 Steps To Your Own Website

A lot of people these days are interested in getting... Read More

Top 10 Webmaster Challenges

Webmasters deal with a myriad of complex design challenges every... Read More

5 Essential Traits Of A Home Business Website

So you've decided to start an online work at home... Read More

Server Stats ? Analyzing Traffic To Your Site

Analyzing traffic to a site is a key factor in... Read More

35% Revenue Increase? from Your Website!

2 Golden Rules for an Engaging Website35% of visitors fail... Read More

Effective Webdesign

D.zigns dzignerwebs The Basics Before starting on... Read More

Web Content Strategy 101

Your content is what gets you in search engines, speaks... Read More

Make Your Own Website - General Website Design Tips

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

How to Make Your Own Free Website in 8.5 Minutes or Less

Designing and creating your own website does not have to... Read More

5 Sure Fire Ways To Send Visitors Away For Good

So your traffic is going through the roof yeah? It's... Read More

Freelance Programming is Easy to Manage

There are several reverse bid freelance sites out there. Beyond... 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

Web Site Promotion: How To Advertise Your Website For Profits

Making money with your web site is the dream and... Read More

no-contract cleaning service Lincolnshire ..