www.1001TopWords.com |
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 codeHere 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 and http://www.gmdir.com
|
RELATED ARTICLES
Tips to Protect Your Downloads or Products 1. Upload robots.txt file in to your root directory and include the folder name where you set your downloads. A Website Is Not Enough Your Objective Find the Purpose of Your New / Proposed Website Absolutely everything stems from the purpose of your website - selection of hosting, programming, graphic design, copywriting, internet marketing, autoresponder service, and e-commerce. So it's very important to establish the purpose of your business website first. The most common purposes for a business website are: Internet Marketing Website Promotion -The 7 Biggest Mistakes I See People Make With Websites! 1. Many people are not getting good or complete advice. Often for example people don't understand all the concepts of Internet Marketing and having a website so they simply pay to have a website developed. Often this website may look good but it falls far short in the area of being "search engine friendly". This is typically because many businesses that deal with the web are very one track focused. Developing A Website: 10 Tips For Getting Started 1. Be clear on your purpose. What Works and What not Works for Your Internet Business "Build it and they will come."--Filed of Dreams (1989) In Business? 10 Reasons Why You Need a Website -- Now! 1) Word of Mouth The single most powerful form of new business creation is word of mouth. Your past customers, friends, acquaintances and staff aren't likely to carry your brochure or even your business card everywhere they go. The can however carry your domain name, in their heads! Every time they have a conversation that leads to your kind of business they just quote your simple domain name. You've chosen a simple domain name of course, easily remembered, easily spelt and requiring no explanation. For that reason avoid hyphenated names. Selecting a Web Content Management Product So you want to take a look at a real Web Content Management (WCM) product. How do you go about evaluating all the different products and vendors? What should you be looking for in a WCM package? Is it better to build your own, buy or use Open Source? HTML Editors 101 - Smaller Is Better SiteSpinner 4 Steps to Selling More With Your Web Site Most web sites are more like stage sets than real buildings; they make a good impression and they look substantial at first, but when you open a door, you end up back stage in the dark. They don't generate large numbers of leads, help build relationships with prospects or generate the desired volume of sales. Your Website Should Be Selling It may come as some surprise to a traditionally off-line business that their website should be attracting new sales, or at least supporting the sales they have made. There is a common misconception that a website is more of a cost than an asset. When I ask companies why they would like a website the common answer is, "I don't know?" It seems to me that having a website is more of a reflex than something that is planned to help grow sales for the company. In other words, "Every business has one, I should too." Writing Effective ALT Text For Images Anyone who knows anything about web accessibility knows that images need alternative, or ALT, text assigned to them. This is because screen readers can't understand images, but rather read aloud the alternative text assigned to them. In Internet Explorer we can see this ALT text, simply by mousing over the image and looking at the yellow tooltip that appears. Other browsers (correctly) don't do this. The HTML for inserting ALT text is: How Did You Get Here? When marketing your website, it's important to know which of your efforts are producing results and which of them are a waste of time. Should You Design Your Own Website? If you're anything like most small business owners, you probably think that web site design is expensive - possibly too expensive for you to justify the expense. If that's the case, then it can be tempting to just design your small business web site yourself. You have a computer, complete with Microsoft Frontpage, you have a copy of Photoshop - why pay a web designer when you could just do it yourself? Allocating Your Web Site?s Budget Properly I had a client say something to me the other day that I thought was rather interesting. He mentioned that he almost considers SEO as a marketing expense even though its really a web expense. It was then that I realized that many people still do not consider what they do with their website as part of their marketing plan but as, well, just something else. 50 Ways To Use Your Website A website is the most versatile and cost-effective marketing tool on the market. It is also an investment. After all, you are building a shopfront. In a nutshell, you can use your website to: Enhance your professional image 1. Look professional and as BIG as large corporations. 2. Pre-sell yourself to new clients even before you meet them. 3. Supply a meaningful and intuitive address related to your type of service. It is easier to remember www.marketingcues.com rather than a long ISP email address such as www.yourInternetServiceProvidername.com/~marketingcues. 4. Provide a permanent address with up-to-date contact details and opening hours. You can change Internet Service Provider or move physical premises and your customers will always find you and your marketing efforts are not lost. What Business Owners MUST Know BEFORE They Commit To Having A Web Site Q1.Why would I need a web site?A1. Unlocking the Power of Your Website! Why do some web sites reap huge benefits while others just get lost in the shuffle? Do some web masters have a secret that most of us have overlooked? Actually, there is a secret to unlocking the power of your web site and it has to do with words. When communicating via the web, words truly make all the difference. And the only way to get the most out of your website is carefully choosing what you have to say and how you say it. The Evolution Of Search There have been many significant changes to the face of search over the last several years with engines becoming more intelligent than ever before. Today's users expect mainly fast, easy, relevant and satisfactory search results. In response to this search engines have responded by giving users more control over search results than ever through the emergence of alternative search engines. You Cant Just Build A Website And Hope It Works! Like any area of business your website needs some effort from you if its going to be successful. You'd be foolish to just build any old website and hope it works. Yet this approach, or rather lack of approach, is still widespread on the internet. Businesses still dont seem to understand what the internet can do to benefit them and their customers. They just dont get it. |
© Athifea Distribution LLC - 2013 |