views:

188

answers:

1

I wanted to create smth similar to this one Kansas county map where user would be able to click on the county (or even better cities of his/her interest...) and get some info. 1) How would that be possible using google mashups? 2) Is it possible in google mashup to display only one state, for example Kansas only?

A: 

There are a few ways that you can facilitate user interaction with your Google Map:

  • You can create markers that the user can click (or mouse-over) on to display additional information.
  • You can draw polygons on the map (perhaps outlining the counties on the state). Here is an example that draws the 2008 election results that way. The user can click (or mouse-over) to get an info window or a some custom web popup.

If you want to fix the view to only display one state you can set the zoom and center on your Google map appropriately to only show the map that you are interested in and then disable zoom and panning so the user will only ever see the view you want to show.

N.B. The user will still see neighboring states at the edge of the map. There is no way to excise just the state you want.

Cannonade
thanks Cannonade!!! for the polygon example, where you have given the election site... i cannot see how they did the polygon work inside the view source, do you have any good source? concern is where do i get the points for polygon to be drawn? thanks a lot!!!
kl
@kl No problem :)
Cannonade