How to copy map to floatPane overlay in Google Maps API V3?

I have a class based on google.maps.OverlayView that implements a custom replacement for the standard InfoWindow.

You can see my custom overlays in action at http://www.qype.co.uk/uki/explore/category/883-eating-and-drinking

I need to be able to pan the map when the overlay does not fully match the visible area (standard behavior for InfoWindows), and I cannot figure out how to do this.

I tried something like this.map.panTo (this.getProjection (). FromDivPixelToLatLng (this.getProjection (). Center)), but it did not work as I expected, so I'm somewhat lost.

+3
source share
1 answer

I used this example because there is a panMap method that probably does exactly what you need.

http://gmaps-samples-v3.googlecode.com/svn/trunk/infowindow_custom/infowindow-custom.html

Hope this helps. The example looks very similar to your info window.

amuses

+2
source

Source: https://habr.com/ru/post/1761914/


All Articles