0

안녕하세요 저는 Google지도 API를 사용하여 앱을 프로그래밍하는 데 익숙하지 않고 단일 위치를 보여주는지도를 만들 수 있지만 여러 위치를 매핑하는 방법을 구현할 때 혼란 스럽습니다. (하드 코딩 된 위치가 아닙니다.)여러 위치 Android

내 앱에는 위도가 포함 된 Arraylists와 경도가 포함 된 Arraylists가 있습니다.

이 목록에서 geopints를 어떻게 만들 수 있습니까?

덕분에 매우 가정

답변

0

당신은 latitudeslongitudes에 저장 NumberOfPoints 위치를 가지고있다. 다음 할 수있는 :

for(int pointIndex=0; pointIndex<NumberOfPoints; pointIndex++){ 
    GeoPoint point = new GeoPoint(latitudes[pointIndex],longitudes[pointIndex]); 
    OverlayItem overlayitem = new OverlayItem(point, "title", "snipet"); 
    youOverlayClassHolder.addOverlay(overlayitem); 
    mapOverlays.add(itemizedoverlay); 
} 

Here이 정확히 무엇을 찾고가는 좋은 튜토리얼입니다 (2 부 확인 : 추가 오버레이 항목)

+0

참으로 내 응용 프로그램은 내가 밖으로 일한이 튜토리얼에 기반 geopoints의 목록을 가지고 있지만 overlayitems의 목록에 geopoints의 목록을 추가하기 위해 고심하고있는 im –