public final class Projection
A final class that extends Object and converts between the screen coordinates and longitude/latitude coordinates.
None.
None.
| Return type | Method name |
| LatLng | fromScreenLocation(Point point) |
| VisibleRegion | getVisibleRegion() |
| Point | toScreenLocation(LatLng latLng) |
Parameters:
| Parameter name | Parameter desc |
| point | Coordinates of a location on the screen, in pixels. |
Return:
| Return type | Parameter desc |
| LatLng | LatLng object, indicating the corresponding longitude and latitude. |
| Method |
| public VisibleRegion getVisibleRegion() |
| Obtains the visible region after conversion between the screen coordinates and longitude/latitude coordinates. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| VisibleRegion | Visible region. |
| Method |
| public Point toScreenLocation(LatLng latLng) |
| Converts longitude/latitude coordinates to screen coordinates. |
| You can call this method to obtain a location on the screen corresponding to a longitude and latitude. The location on the screen is specified in screen pixels (instead of display pixels) relative to the top left corner of the map (instead of the top left corner of the screen). |
Parameters:
| Parameter name | Parameter desc |
| latLng | Longitude and latitude of a location on the map. |
Return:
| Return type | Parameter desc |
| Point | Coordinates of a location on the screen, in pixels. |