Stay organized with collections Save and categorize content based on your preferences.
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).
clone()
boolean voidfinalize()
final Class<?>getClass()
inthashCode()
final voidnotify()
final voidnotifyAll()
StringtoString()
final voidwait(long arg0, int arg1)
final voidwait(long arg0)
final voidwait()
Public Methods public LatLng fromScreenLocation (Point point)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).
Parameters point APoint
on the screen in screen pixels. Must not be null
. Returns
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).Gets a projection of the viewing frustum for converting between screen coordinates and geo-latitude/longitude coordinates.
ReturnsReturns 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).
LatLng
on the map to convert to a screen location. Must not be null
. Returns
Point
representing the screen location in screen pixels.Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["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 2024-10-31 UTC."],[[["`Projection` translates between screen locations (in pixels) and geographic coordinates (`LatLng`) on a map."],["It provides methods to convert screen points to `LatLng` and vice versa."],["`Projection` allows access to the visible region of the map, useful for determining the geographic bounds currently displayed."],["Screen coordinates are relative to the top-left corner of the map, not necessarily the entire screen."]]],["The `Projection` class translates between screen locations and geographic coordinates. It offers three key methods: `fromScreenLocation` converts a screen `Point` to a `LatLng` geographic location. `getVisibleRegion` provides the viewing frustum for coordinate conversion. `toScreenLocation` converts a `LatLng` geographic coordinate to a screen `Point`. These methods use screen pixels relative to the map's top left, not the entire screen. In addition there are the inherited methods that come with the `Object` class.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4