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.
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