I would appreciate some help with google maps zooming. I attached a little graphic that should show what I am wanting to do.
I have a track on a google map. Now I want to zoom into the map, so that I only see the track with a bit of margin around the box that includes the track. I know all the Lat/Lon combination from the track.
My question is now which function can I use to zoom into the googlemap so that the map is magnified and I only see the part of the map where the track is.
Any help is highly appreciated.
Thanks a lot in advance.
Kind regards
René
Found the library and and added it. So far so good. By any chance, do you have some sample code for me so that I can see how the syntax works. I am not that experienced that it is fully intuitive.
Dim LatLngBoundsBuilder1 As LatLngBoundsBuilder
LatLngBoundsBuilder1.Initialize
'here you include all your postition information to this object:
'here a loop for all of your points
dim Dim Point As LatLng
Point.Initialize(37.772323, -122.214897)
LatLngBoundsBuilder1.Include(Point)
'end loop
Dim llBounds As LatLngBounds
llBounds = LatLngBoundsBuilder1.Build
GoogleMapsExtras1.AnimateToBounds2(GoogleMap1,llBounds,1920,1000,190)
Dim LatLngBoundsBuilder1 As LatLngBoundsBuilder
LatLngBoundsBuilder1.Initialize
'here you include all your postition information to this object:
'here a loop for all of your points
dim Dim Point As LatLng
Point.Initialize(37.772323, -122.214897)
LatLngBoundsBuilder1.Include(Point)
'end loop
Dim llBounds As LatLngBounds
llBounds = LatLngBoundsBuilder1.Build
GoogleMapsExtras1.AnimateToBounds2(GoogleMap1,llBounds,1920,1000,190)
How many points does the function need to work properly. Do you think 4 points are enough in order to describe the corners of the rectangle with the track inside.
What means the 1920,1000,190 in the AnimateToBounds2 function?
Hi
Not sure what you mean. I searched for it yesterday but didn't find any good examples. And sometimes I really struggle to understand the examples or language used for explanation. As I mentioned before. I am not an expert. Just someone who likes creating little tools mainly for myself. The stuff here is great and the work behind all of this is absolutely unbelievable. We done to all of you. It allows even people like me to come up with nice apps.
I will have another look for the documentation. Best wishes Rene