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/

detailed home cleaning Park Ridge ..
In The News:

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.
OpenTable now uses AI to track your dining habits and share insights with restaurants. Learn what data they collect and how to protect your privacy.
Google's discontinued Nest thermostats still secretly upload home data to company servers despite losing smart features, raising serious privacy concerns.
New Android malware NGate steals NFC payment codes in real-time, allowing criminals to withdraw cash from ATMs without your card. Learn protection tips.
DoorDash confirms data breach exposing customer names, emails, addresses after social engineering attack. Learn how to protect yourself from scams.
Concerned about Google's AI scanning your Gmail? Learn how to disable Gemini features that access your emails, Drive files and Chat messages for privacy.
Google warns Android users about dangerous fake VPN apps hiding malware that steals passwords, banking details and personal data from phones and tablets.
Apple's digital passport feature lets iPhone users breeze through TSA checkpoints this holiday season using Digital ID technology at 250+ airports.

7 Reasons Why Your Small Business Needs A Web Site

Many small businesses have the misconception that their business can... Read More

Enhance Your Website With A Yahoo-Style Directory

Does your website have a links/resources page?Do you exchange reciprocal... Read More

Trinkets, Lockets And Empty Pockets

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

Why a CSS Website Layout Will Make You Money

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

The Most Important Aspect of Writing Web Copy

There is an ongoing debate about web copy. Some say... Read More

Website Content & Usability

Writing for the web is totally different to writing for... Read More

Planning Your Website for Success

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

Duplication vs. Individualism

How can we add Word Rich Content to our Websites... Read More

Why You Need a Website

You hear a great deal about the Internet these days... Read More

Top 7 Tips for Building an Antique Car Website

Like wine cars get more attractive to collectors as years... Read More

1 Simple Solution to All Internet Marketers about Their Website Design Needs

It is an undeniable fact that not everybody is keen... Read More

Building eCommerce Websites that Work - Part 2

Succeeding with an eCommerce website is a dream for many... Read More

Three Way Linking - Webmaster Strategy

Three way linking and concerns.For many years SEO experts were... Read More

Ebooks for Webmasters

Internet has opened a whole new world for web developers... Read More

The Disability Discrimination Act (DDA) & Web Accessibility

There's been widespread speculation about the new legislation being introduced... Read More

So You Want To Have A Website

So you want to have a website. You have gone... Read More

3 Essential Tools Every Website Designer and Marketer Needs

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

Website Globalization

Globalize Your WebsiteThe Internet has unlocked a wide array of... Read More

Set Up Your Website in Minutes ? For Free

There was a time not long ago when setting up... Read More

Ten Ways NOT to Set Up a Website-based Service Business

1. As the first step, "Hire a web designer."First create... Read More

Having a Domain Name And Web Site Gives Your Business The Key To The Door

Just like all things in life, the ways to run... Read More

Why Every Small Business Owner Needs Two Websites

Every small business owner knows that they need a website,... Read More

Preventing Repeat Form Submission Using PHP Sessions

We've all seen those messages on some websites warning not... Read More

You Cant Just Build A Website And Hope It Works!

Like any area of business your website needs some effort... Read More

Track Your Visitors, Using PHP

There are many different traffic analysis tools, ranging from simple... Read More

express cleaning service Des Plaines ..