google-maps-documentation

MapCanvasProjection interface

google.maps.MapCanvasProjection interface

This object is made available to the OverlayView from within the draw method. It is not guaranteed to be initialized until draw is called.

Methods
fromContainerPixelToLatLng
fromContainerPixelToLatLng(pixel[, nowrap])
Parameters: 
  • pixelPoint optional
  • nowrapboolean optional
Return Value:  LatLng optional
Computes the geographical coordinates from pixel coordinates in the map's container.
fromDivPixelToLatLng
fromDivPixelToLatLng(pixel[, nowrap])
Parameters: 
  • pixelPoint optional
  • nowrapboolean optional
Return Value:  LatLng optional
Computes the geographical coordinates from pixel coordinates in the div that holds the draggable map.
fromLatLngToContainerPixel
fromLatLngToContainerPixel(latLng)
Parameters: 
Return Value:  Point optional
Computes the pixel coordinates of the given geographical location in the map's container element.
fromLatLngToDivPixel
fromLatLngToDivPixel(latLng)
Parameters: 
Return Value:  Point optional
Computes the pixel coordinates of the given geographical location in the DOM element that holds the draggable map.
getWorldWidth
getWorldWidth()
Parameters:  None
Return Value:  number
The width of the world in pixels in the current zoom level. For projections with a heading angle of either 90 or 270 degrees, this corresponds to the pixel span in the Y-axis.