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/

one time home cleaning Highland Park ..
In The News:

Privacy risks are hiding in plain sight, as your personal data is likely being collected, tracked, and sold without your knowledge.
VenHub, a fully autonomous, AI-powered smart store just opened at the LAX/Metro Transit Center in Los Angeles.
A woman's Facebook account takeover reveals dangerous social engineering tactics and provides lessons on recovery, avoiding scams and enacting stronger security measures.
Shanghai engineers are using 432 walking robots to relocate a complex, preserving Shikumen architecture while creating space for a modern underground hub and cultural center.
Major healthcare data analytics firm Episource had a cybersecurity incident exposing 5 million patients' medical records and personal information in recent breach.
A new sophisticated PayPal scam sends legitimate-looking emails from official PayPal addresses, using phone numbers instead of links to convince victims to download remote access tools.
Fox News' AI Newsletter brings you the latest on this rapidly evolving technology.
The innovative Kara Pod device extracts moisture from air to create mineral-rich water and brew coffee, featuring UV sterilization and compatibility with Nespresso pods.
Gov. Hochul unveiled New York's nuclear power plant project to power a million homes, which faces permit challenges while promising jobs and a cleaner energy future.
SAFE introduces Aerie, an underground luxury bunker combining high-end living with advanced security, wellness amenities and interactive walls simulating panoramic views.
A Facebook scammer posing as Elon Musk tricked a victim with promises of a Tesla and $250,000, requesting gift cards that become untraceable once the codes are shared.
Experience hands-free golfing with the Robera Neo smart caddie that uses AI to follow you, navigate obstacles and carry your clubs with GPS course mapping.
Cybersecurity alert: 16 billion passwords exposed in massive credential database affecting major platforms. Protect your accounts with password managers
The innovative BeBot robot uses electric power to remove pollution from shorelines, covering 20-30 times more area than manual collection while preserving wildlife.
A new ClickFix campaign targets macOS users with fake Spectrum support sites, tricking victims with CAPTCHA failures to paste commands that install information-stealing malware.
AI-powered autonomous trucks from Plus Automation are being tested across the U.S., Europe and Asia to solve logistics challenges while facing regulatory hurdles and labor concerns.
Your health information might feel private and secure with your doctor, but the reality is far more complicated. Data brokers collect a wide range of sensitive health data, from diagnoses and prescription details to personal identifiers, and sell this data to marketers, insurers, and other third parties.
Kepler Robotics has officially introduced its Forerunner K2 "Bumblebee" humanoid robot at the SAIC-GM automotive plant in Shanghai, marking a significant moment in the real-world deployment of advanced robotics.
Scammers never seem to be running out of new ways to try and get their hands on your money – and lately, they've been getting sophisticated.
Thirty people were injured and killed, though the exact number remains currently unknown, when a suicide bomber blew himself up in a Damascus church.
Unexpected password reset alerts signal potential hacking attempts or phishing scams. Learn how to respond and establish stronger security measures for your accounts.
A historic electric airplane flight landed at JFK with passengers, marking a milestone as Beta Technologies demonstrates the practicality and efficiency of electric air travel.
The Chaos ransomware group breached Optima Tax Relief in a double-extortion attack, stealing sensitive customer case files and corporate documents with personal information.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
The first human brain-computer interface by Paradromics was completed in 20 minutes, featuring microelectrodes to help paralyzed individuals control computers with thoughts.

Developing A Login System With PHP And MySQL

Most interactive websites nowadays would require a user to log... Read More

Develop a Solid Website Presence

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

What ROI You Should Expect From Your Web Site

Is Your Web Site an Expense or an Investment?Why don't... Read More

Have You Got Your Ear To The Ground Or Your Head In The Sand?

What happened on your website yesterday? What about last week... Read More

If Its Done Its Done for: Make Your Website Part of Your Business before You Build

Web sites are an Ongoing Part of Business.All too many... Read More

Search Engines and Customers Want Focused Web Site Content

How do you decide on the content, products and or... Read More

The Problem with Paypal On Your Web Page

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

Build It and They Will Come

Build it and they will come is not always true;... Read More

Should You Design Your Own Website?

If you're anything like most small business owners, you probably... Read More

In Business? 10 Reasons Why You Need a Website -- Now!

1) Word of Mouth The single most powerful form of... Read More

Flash Deadly Sins (That Can Kill Your Web Business)

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

How To Start Your Own Website

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

Non-Profits: Successful Online Strategies

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

How To Write More Powerful Online Text

Although there are significant differences among the various types of... Read More

Make Your Communication Come Alive

Design and layout can make your communication come alive and... Read More

Launch Your Own Website Today - Its Easier Than You Think!

Thousands of people are now making a living online and... Read More

Planning Your Website for Success

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

7 Ways to Gain a Professional Online Reputation

A professional online reputation is essential to the flourishing of... Read More

17 Tips to Plan a Website

Everyone wants one.Everyone wishes they knew how to make one.SOME... Read More

WYSIWYG Versus Coding: HTML With A Purpose

After years of working with entrepreneurs who developed their first... Read More

Give Your Business a Cash Infusion

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

What Hosting Companies Dont Tell You, Could Hurt You?

Did you know that hosting companies overcrowd their servers despite... Read More

The 5 Biggest Mistakes Almost All Web Designers Make

Huge Mistake #1: Creating a Website with Flash -- Did... Read More

Your Website Reflects Your Business

Some left shoes are in isle 5, while the right... Read More

Autoresponders Make You Look Like A Pro

People like to get immediate responses to requests. Autoresponders are... Read More

licensed cleaning services Park Ridge ..