On Apr 22, 9:01 am, Bill <[email protected]> wrote:
> I'm new to JavaScript and Google Maps, but managed to cobble together
> a series of maps for that do about 90 percent of what I want to do.
>
> The maps are here:http://bilware.net/BullyMap/BullyMap.html
>
> What I want users to be able to do is:
>
> 1) Choose a map (this works)
> 1a) Click on a district to see info details for that district (this
> works)
> 2) Alternatively, choose a specific district from a dropdown box (this
> works)
> 2a) Have the map display only the chosen district (this works)
> 2b) Have the map automatically center and zoom in on the chosen
> district
>
> It's this last part I can't figure out. I can use map.setZoom to
> resize to an appropriate fixed zoom level, but I can't figure out how
> to re-orient the center. It looks like fitBounds should do the trick,
> but I can't figure out how to work it or setCenter into the function
> successfully.

I can think of two options:
1. store your preferred center and zoom level or bounds in a column in
the FusionTable, query for it and use it when you display the map.
2. query the fusion table for the geometry column associated with the
district being displayed, parse the kml, find the bounds of that
polygon and use that as an argument to fitBounds.

You could also vote for this issue:
http://code.google.com/p/fusion-tables/issues/detail?id=298

or create an enhancement request to let you do that (but that may not
happen quickly).

  -- Larry

>
> The fact is, I'm a coding novice who relies on a lot of trial and
> error using the snippets I find online. However, I can't seem to find
> anything that quite matches what I'm attempting. And with this project
> set to go live pretty soon, I need to turn to the experts out there.
>
> Appreciate any help.
>
> -BW

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to