![]() |
| United States Map w/custom colors |
|
jamie
HostMySite Sales Rep
![]()
|
I was thinking of making a web-based US map for a school I do some coding for. The map would color-code each state based on the number of students living in that state that graduated from the school. Kinda like the CNN Democrat/Republican maps you see around election time.
Question: What's the best way to do this? I use ColdFusion with snippets of JavaScript; would this require Flash or something to that effect in order to be done easily? If possible I'd also want it to be dynamic in that I have a database listing all the states, and as new users 'sign in' and add their state to the list, it ups the numbers listed for each and changes the look of the map. I was thinking about using an Image Map, but I don't think that will work because I can't change the color of certain parts of the image. 50 smaller images isn't really an option either due to load times, complexity, etc, etc. |
||||||||||||
|
|
|||||||||||||
|
bobclingan
Forum Regular
|
My first thought would be to use Flash. You could create a webservice in ColdFusion that when given a state as the argument returns the number of students - just a color based off that number and then have a flash movie clip that sets its color based on that.
|
||||||||||||
|
|
|||||||||||||
|
jamie
HostMySite Sales Rep
![]()
|
Man, would be nice if I knew flash. |
||||||||||||||
|
|
|||||||||||||||
|
loftboy
Forum Regular
|
try, i thinks its www.maps4flash.com
|
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
Flash? Good lord, please don't. You're talking about a static, color-coded map! How about a dynamically created image or an image with Javascript for the color overlay? Either of these are a lot friendlier than Flash
|
||||||||||||
|
|
|||||||||||||
|
loftboy
Forum Regular
|
so since when is making a dynamic image and java friendlier than flash?
|
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
Javascript is completely unrelated to java
creating an image dynamically server-side is invisible from the client's perspective flash requires a plugin and is obtrusive, and is completely unnecessary for just creating what is, from the client's perspective, a static image. Check out world66 for a decent implementation: http://www.world66.com/myworld66/visitedStates |
||||||||||||
|
|
|||||||||||||
|
loftboy
Forum Regular
|
yeah especially since no one has the flash plug-in, how could that even be an option!!!!!!
pleazzzzzzzzzz that example is, well, kinda weak, not too mention it's much easier to do with flash than java. You can do it with cfm, php, .net whatever as well too, creating an image is nothing new nor nothing fancy. lets compare your llink to this one http://www.flashmaps.com/showcase/areaselector/samples/02/ |
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
OK, and your example is super cool. But what Jamie originally said is he wanted a color-coded map. What you've got is overkill and, for someone who doesn't know flash, probably far too difficult to make to be practical
Obviously if you use GD to make a PNG image you aren't going to be able to hilight and zoom in and whatever else. But since that was never part of the original request, I don't see how having those features is some sort of trump card The original post by bobclingan recommended doing the exact thing you could do with GD to make a flash movie. That's just pointless |
||||||||||||
|
|
|||||||||||||
|
loftboy
Forum Regular
|
you can do that samething as a colorcoded map a lot easier still with flash than you can with java. There are plenty of maps available for free to easily do it, just go to flashkit.com and im sure you can find something easy to use.
Most people have no idea how to do that server-side with java, especially jamie |
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
Please point out where I mentioned using Java
|
||||||||||||
|
|
|||||||||||||
|
loftboy
Forum Regular
|
ok you didnt say java but i assumed thats what you meant since you tried to knock down having to install a flash plugin like you were talking about a server-side solution (which would be java) and not a client side solution (which would be js) espescially since the flash player has a higher browser installed % then java, which makes your point rather mute.......
and if their java is turned of it just wont work, another reason not to use it. now if you were using java server-side, your points woulda had some value |
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
OK so I never mentioned Java, Javascript is easier than Flash, and a static image generated server-side is best/easiest of all. Case closed
|
||||||||||||
|
|
|||||||||||||
|
loftboy
Forum Regular
|
javascript maybe eaier than flash for u but not most people, i dont know why you are "case closed" this cause you still havent made your point.
you say "static image generated server-side is best/easiest of all" js is generated CLIENT-SIDE not server-side JAVA would do it server-side, do you have those mixed up???????? and that certainly isn't the easiest way to do it, not by along shot............. |
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
No, I really don't have anything mixed up. Look at my original post: "How about a dynamically created image or an image with Javascript for the color overlay"
I hilight the "or" because it represents a gramatical break between two different ideas, the same way I used a comma in my last post to separate different ideas. I am talking about using something like PHP+GD to generate an image server-side and send it to the client. I said this would be the best way, OR you could use Javascript(but it seems less ideal) |
||||||||||||
|
|
|||||||||||||
| United States Map w/custom colors |
|
||
|



