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/

high-end home cleaning Morton Grove ..
In The News:

Aigen's Element robot uses solar power and AI to provide farmers with a sustainable alternative to herbicides, working efficiently in cotton and soy fields.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Cybercriminals accessed Medicare data of more than 100,000 Americans by creating fraudulent accounts, prompting CMS to deactivate accounts and issue new Medicare cards.
China's battery swap technology from CATL lets electric vehicle owners exchange batteries in under two minutes, with plans to expand to 1,000 stations across 31 Chinese cities by 2025.
Analysts at Silent Push have uncovered a widespread scam that uses counterfeit retail websites to steal the credit card information of online shoppers.
Chrome users need to update their browsers immediately as Google addresses a critical vulnerability that hackers are actively exploiting. Additional security measures are recommended.
A study found teens glance at phones for dangerous two-second intervals while driving, using devices primarily for entertainment, texting and navigation despite crash risks.
Security researchers uncovered a flaw in Windows 11 that allows attackers to disable Secure Boot using Microsoft-signed tools, requiring manual updates to protect against bootkits.
Carnegie Mellon's noninvasive brain technology allows users to move robotic fingers by thinking about the motion, offering new possibilities for people with motor impairments.
Multi-factor authentication (MFA) adds an extra layer of protection to your accounts. Instead of relying only on a password, MFA requires you to verify your identity using two or more methods.
Scientists from Duke, Harvard, and the University of Otago have unveiled a game-changing tool called DunedinPACNI. It uses a single AI brain scan to reveal how fast a person is biologically aging.
A disturbing wave of fake agent phone scams is sweeping across the United States, catching people off guard and draining their savings.
Emojis aren't just playful add-ons; they're powerful tools for building stronger connections in our increasingly digital world.
Google has taken a major step toward the future of clean energy by partnering with Commonwealth Fusion Systems (CFS), an MIT spin-out working to build one of the world’s first commercial fusion reactors.
If you create and share art online, you might have seen messages warning that Facebook's parent company, Meta, claims the right to use or even sell anything you post, whether it's pictures, poems, or artwork.
Cybercriminals hit Qantas in a major data breach that exposed information from up to six million customers.
Having reliable, loud, and timely emergency alerts on your phone or device is important because when severe weather strikes, every second counts.
Here's how your daily brew is becoming the foundation for greener buildings.
Artificial intelligence (AI) and large language models (LLMs), such as ChatGPT, are transforming how we learn. But what does this mean for AI and learning retention?
Modern AI data centers use much more electricity than traditional cloud servers. In many cases, the existing power grid cannot keep up. One innovative solution is gaining traction: repurposed EV batteries for AI data centers.
Microsoft 365 and Outlook users are being targeted by a tactic that injects fake billing alerts directly into their calendars.
Researchers are now showing us that old smartphones as data centers could be the next big thing in sustainable tech.
Scientists have created micro-robots for sinus infection treatment that can enter the nasal cavity, eliminate bacteria directly at the source, and exit without harming surrounding tissue.
Let's examine how your data is collected in everyday life, who is buying and selling it, what happens to it afterward, and, most importantly, what you can do to protect yourself.
Researchers at the University of Sheffield in the U.K. developed small robots called "Pipebots" that can travel inside water pipes to find and potentially repair leaks, all without any excavation.

How One Word Or Even One Letter Can Boost Conversion Rates By Over 400%!

Recently I was reviewing the keyword specific conversion rate data... Read More

Functions and Subroutines in ASP

Functions and Subroutines in ASP If you read... Read More

Getting One-way Inbound Links: the 5 Major Strategies

With search engines putting a damper on direct reciprocal links,... Read More

Website Conversion Rate: More Keywords Equals More Sales

Your website conversion rate should concern you. This simply refers... Read More

What Business Owners MUST Know BEFORE They Commit To Having A Web Site

Q1.Why would I need a web site? A1.- Improve my... Read More

Top 10 Webmaster Challenges

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

Flash Deadly Sins (That Can Kill Your Web Business)

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

50 Ways To Use Your Website

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

3 Ways To Increase Your Websites Conversion rate

Everywhere you look these days, people are telling you that... Read More

How to Listen on the Web

When building a relationship, listening is more important than talking.A... Read More

Web Success Secret - Keep Your Visitors Interested

Visitors to your site come looking for information or solutions... Read More

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

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

The 2 Most Common Web Site Mistakes

When we review the sites of potential clients, there are... Read More

The Dos and Donts of Launching a Small Business Website

Launching a new small business website is often a long... Read More

Improve Conversion Rates ? Load Times

Your site is getting traffic, but conversion rates are horrible.... Read More

Guidelines for Web Page Optimization

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

Disability Discrimination Act (DDA) & Web Accessibility

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

You Dont Know Which One

I still remember it very clear ... It was almost... Read More

Building Websites with Directory Generator

Directory Generator, a product from Armand Morin and Marc Quarles,... Read More

Build a Strong Foundation for Creating Your First Online Identity ? Notes for Beginners

If you are looking for creating your online presence you... Read More

10 Tips For Running A Profitable Web Site

1. Address your targeted audience on your business site. Example:... Read More

7 Reasons Why Your Small Business Needs A Web Site

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

Building a Web Site Requires the Right Software to Eliminate Headaches and Keep Money in Your Pocket

When most people build a web site, they think one... Read More

Web Coach Tip: What You Should Know About DIY Web Sites

Recently, a friend asked "What's the deal with those DIY... Read More

The Power Is In The Pipes: How To Get Maximum Leverage From Your Website

What is the most important part of your online business?Many... Read More

spring cleaning service Buffalo Grove ..