javascript - How would I position a marker at the bottom of the map in Google Maps v2? -
I have a webpage that
I have just released an update so that the contact details appear in an info window coming from the marker. After the marker is centered, due to the small size of the info window, the map may fit in the marker and information window until the bottom of the frame.
If there is an easy way to set up this offset so that the marker map appears at the bottom of the window and there is no pan in it?
Thank you.
You can properly center the map before adding the marker:
< Pre> var someZoom = 13; Var center = new GLatLng (37.4419, -122.14 9); Map.setCenter (center, some zoom);
Zoom is also optional. You can zoom in on whatever you can to:
map.setCenter (center);
If you want to focus on a particular pixel, instead of the latitude / LAG, you can use this to convert the function:
< Code> ContainerPixelToLatLng (Pixel: GPoint)
I think you should spend half an hour and review the docs:. I read detailed documentation while working on my website: www.trailbehind.com
Comments
Post a Comment