Projection
投影是用來在螢幕位置和地球表面的地理座標 (LatLng
) 之間進行轉譯。螢幕位置是以地圖左上角的螢幕像素 (而非顯示像素) 為單位,不一定是整個螢幕。
繼承方法摘要
來自類別
java.lang.Object
布林值
|
equals(物件 arg0)
|
最終等級<?>
|
getClass()
|
int
|
hashCode()
|
最後
void
|
notify()
|
最後
void
|
notifyAll()
|
字串
|
toString()
|
最後
void
|
wait(long arg0, int arg1)
|
最後
void
|
wait(Long arg0)
|
最後
void
|
wait()
|
公用方法
公用
LatLng
fromScreenLocation
(點點)
傳回與畫面位置對應的地理位置。螢幕位置的指定單位是相對於地圖左上方的螢幕像素 (非顯示像素),而不是整個螢幕的左上方。
傳回
- 對應到螢幕上
point
的 LatLng
,如果特定螢幕點上的灰色不會與地面平面交錯,則 null
(如果地圖嚴重傾斜,就可能發生這種情況)。
public
VisibleRegion
getVisibleRegion
()
取得用於轉換螢幕座標和地理經緯度座標的檢視畫面投影。
public
Point
toScreenLocation
(LatLng 位置)
傳回與地理座標 (LatLng
) 對應的螢幕位置。螢幕位置是以地圖左上角 (而非整個螢幕) 為單位的螢幕像素 (而非顯示像素)。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-06-16 (世界標準時間)。
[null,null,["上次更新時間:2025-06-16 (世界標準時間)。"],[[["The `Projection` class translates between on-screen locations (in screen pixels) and geographic coordinates ([LatLng](/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/LatLng))."],["You can use `fromScreenLocation()` to get the geographic location (LatLng) that corresponds to a given screen location (Point)."],["The `toScreenLocation()` method provides the screen location (Point) for a specified geographic coordinate (LatLng)."],["`getVisibleRegion()` returns the projection of the current viewing frustum, which can be used for converting between screen coordinates and geographic coordinates."]]],[]]