Stay organized with collections
Save and categorize content based on your preferences.
public final class
Projection
extends Object
A projection is used to translate between on screen location and geographic coordinates on the
surface of the Earth (LatLng). Screen location is in screen pixels (not display pixels)
with respect to the top left corner of the map (and not necessarily of the whole screen).
Returns the geographic location that corresponds to a screen location. The screen location is
specified in screen pixels (not display pixels) relative to the top left of the map (not the
top left of the whole screen).
The LatLng corresponding to the point on the screen, or null if
the ray through the given screen point does not intersect the ground plane (this might be
the case if the map is heavily tilted).
Returns a screen location that corresponds to a geographical coordinate (LatLng). The
screen location is in screen pixels (not display pixels) relative to the top left of the map
(not of the whole screen).
Parameters
location
A LatLng on the map to convert to a screen location.
Returns
A Point representing the screen location in screen pixels.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eProjection\u003c/code\u003e class translates between on-screen locations (in screen pixels) and geographic coordinates (\u003ca href=\"/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng\"\u003eLatLng\u003c/a\u003e).\u003c/p\u003e\n"],["\u003cp\u003eYou can use \u003ccode\u003efromScreenLocation()\u003c/code\u003e to get the geographic location (LatLng) that corresponds to a given screen location (Point).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etoScreenLocation()\u003c/code\u003e method provides the screen location (Point) for a specified geographic coordinate (LatLng).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetVisibleRegion()\u003c/code\u003e returns the projection of the current viewing frustum, which can be used for converting between screen coordinates and geographic coordinates.\u003c/p\u003e\n"]]],[],null,["public final class **Projection** extends Object \nA projection is used to translate between on screen location and geographic coordinates on the\nsurface of the Earth ([LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng)). Screen location is in screen pixels (not display pixels)\nwith respect to the top left corner of the map (and not necessarily of the whole screen). \n\nPublic Method Summary\n\n|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng) | [fromScreenLocation](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/Projection#fromScreenLocation(android.graphics.Point))(Point point) Returns the geographic location that corresponds to a screen location. |\n| [VisibleRegion](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/VisibleRegion) | [getVisibleRegion](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/Projection#getVisibleRegion())() Gets a projection of the viewing frustum for converting between screen coordinates and geo-latitude/longitude coordinates. |\n| Point | [toScreenLocation](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/Projection#toScreenLocation(com.google.android.libraries.maps.model.LatLng))([LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng) location) Returns a screen location that corresponds to a geographical coordinate ([LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng)). |\n\nInherited Method Summary \nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods \n\npublic [LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng)\n**fromScreenLocation**\n(Point point) \nReturns the geographic location that corresponds to a screen location. The screen location is\nspecified in screen pixels (not display pixels) relative to the top left of the map (not the\ntop left of the whole screen). \n\nParameters\n\n| point | A [Point](https://developer.android.com/reference/android/graphics/Point.html) on the screen in screen pixels. |\n|-------|----------------------------------------------------------------------------------------------------------------|\n\nReturns\n\n- The [LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng) corresponding to the `point` on the screen, or `null` if the ray through the given screen point does not intersect the ground plane (this might be the case if the map is heavily tilted). \n\npublic [VisibleRegion](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/VisibleRegion)\n**getVisibleRegion**\n() \nGets a projection of the viewing frustum for converting between screen coordinates and\ngeo-latitude/longitude coordinates. \n\nReturns\n\n- The projection of the viewing frustum in its current state. \n\npublic Point\n**toScreenLocation**\n([LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng) location) \nReturns a screen location that corresponds to a geographical coordinate ([LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng)). The\nscreen location is in screen pixels (not display pixels) relative to the top left of the map\n(not of the whole screen). \n\nParameters\n\n| location | A [LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng) on the map to convert to a screen location. |\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n\nReturns\n\n- A [Point](https://developer.android.com/reference/android/graphics/Point.html) representing the screen location in screen pixels."]]