Jump to content

Recommended Posts

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!

 

Link to comment
https://forums.phpfreaks.com/topic/112812-php-draw-map-of-us-states/
Share on other sites

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.