Web Development Information |
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
MORE RESOURCES: Unable to open RSS Feed $XMLfilename with error HTTP ERROR: 404, exiting |
RELATED ARTICLES
Why Your Brick-and-Mortar Biz Needs A Website The internet has taken over our lives with a vengeance, and has changed the way many of us do business. More and more consumers are now doing their shopping online and, unfortunately, some business owners have felt the pinch. The 5 Biggest Mistakes Almost All Web Designers Make Huge Mistake #1: Creating a Website with Flash -- Did you know in a recent study, top internet marketers discovered that having a website created with Flash, actually DECREASED the response from prospects and customers by as much as three-hundred-and-seventy percent?Here's why: Your prospects and customers are most likely visiting your website using all types of different computers, connection speeds and internet configuration settings.. What is Blogger.com? In the late 1990's three San Francisco based web developers came up with the idea of being able to share information about anything on the web. The terminology they used was called blog. Why a CSS Website Layout Will Make You Money Although CSS layouts have been around for years, they haven't become so commonplace until recently. This was basically due to limited browser support (especially from Netscape 4) - nowadays though, CSS 2. Business Website Building Do's and Don'ts First, using a lot of web graphics, flash, banners and pictures on your home page may make it look fancy or cool; but it will slow down the loading time extensively. And lets be real here, most people that look at your web page will leave if it doesn't load in 3 seconds or less. Direct Sales and Your Corporate Website - A Creative Marketing Plan that Works! Creatively marketing your corporate site takes time in the set up but you will learn that building your customers isn't about marketing your products but getting your name and reputation into the minds of internet customers.I have randomly chosen Watkins to design a marketing approach but you will see how to apply this concept to any direct sales company. Lead Generation How to -- 10 Tips On Generating More Internet Sales Leads Many millions of dollars are being wasted on promoting and sending traffic to ineffective lead generation websites. Here are my top 10 tips to make your site generate more leads for you and your company. Conceptualize, Build and Publish a Web site Conceptualize, Build and Publish a Web site - What's required to get startedAll of us knowingly or unknowingly, use a standard decision making process in our day-to-day lives. The very first step of this process is to decide whether TO DO or NOT TO DO. Learn What 98% of Targeted Visitors Do On Your Website Getting a Targeted Visitor to a website is a waste of time and money if you've got no idea what 98% of them do when they get there.I'm assuming that if you have a website selling products that your conversion rate is at least 2%. Content Management More and more businesses are recognizing the importance of content management when it comes to their websites. Website content is more important than ever before, and as the Internet matures and changes, it is likely be become even more important. So You Want To Have A Website So you want to have a website. You have gone on to the internet and surfed but you have no idea what developing a website involves. Linking Out is Good Many websites I come across don't have a single link to another website. Ask the webmaster why not, and the answer you get is simple enough: "If I link to other websites people might leave my site. 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. Building eCommerce Websites that Work - Part 3 An interesting eCommerce success factor that isn't precisely overlooked, but which is often thought about more in terms of being a way of feeding the search engine spiders has to do with providing content. In a very real sense the customer's job is to consume. Maintaining Your Business Website QUESTION: Should I build and maintain my business Web site myself or pay someone else to do the work for me? -- Wesley L.ANSWER:When you say, pay someone else to do the work for you, Wesley, I am going to assume that you are talking about hiring a professional Web site designer to do the work and not your next-door neighbor's teenage son. Web Content Strategy 101 Your content is what gets you in search engines, speaks to visitors, and ultimately decides the success or failure of your site. Meanwhile, your content has to be updated at least once a month if you want to get return visitors and search engine traffic. Are You Being Scammed By Your Web Design Company? This is a growing concern amongst many business owners. Does your web design company own you? This may be possible if you've allowed them to host your web site for you and also register your domain name for your company. Web Coach Tip: What You Should Know About DIY Web Sites Recently, a friend asked "What's the deal with those DIY companies that advertise "How to get a website with everything your business needs for under $20 bucks a month?". "How can they do that?" she said. Your Future Profit Is In The Stars You don't believe in astrology but you check your horoscope in the newspaper just for fun. Me too. 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. |
home | site map | contact us |