BlueSkyIS Posted July 1, 2008 Share Posted July 1, 2008 Hello, I would like to allow the user to select which US states they have been to and have those states highlighted on a gif image of the United States, so other visitors can see where that user has been. My preference is to create the GIF on the fly (when the user saves their profile record) and display it as needed. Does anyone have experience with anything like this? I would like to avoid having to integrate a GIS or use Google maps in any way. I just want an image of US states with some colored in and the rest empty. Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/112812-php-draw-map-of-us-states/ Share on other sites More sharing options...
ratcateme Posted July 1, 2008 Share Posted July 1, 2008 i don't know how experienced you are but you could create a image using GD http://nz2.php.net/gd from a picture of every state. open the the image and copy it to the correct place on your map. you could also change the color of different states that would be like highlighting them. this would properly take a lot of time thought but when i user saves there profile you could generate then image save it then display it when the page is called without having to generate it again. Scott. Quote Link to comment https://forums.phpfreaks.com/topic/112812-php-draw-map-of-us-states/#findComment-579434 Share on other sites More sharing options...
.josh Posted July 1, 2008 Share Posted July 1, 2008 I think probably what I would do is use flash to make a map. Make each state an object. Have php pass an array or a string of 1's and 0's to the flash object, 1 being on, 0 being off. Have flash display each state object as "lit up" or not, based on the 1's and 0's. I mean, you're map is just a bunch of lines right? The great thing about flash is that it's vector based, so it's really small. Your entire map would be smaller than even a single one of your gif files. Plus, the calculations would be done on the client, so no suffering on load times. Quote Link to comment https://forums.phpfreaks.com/topic/112812-php-draw-map-of-us-states/#findComment-579453 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.