2013-12-19 2 views
-1

Google지도 통합이 처음입니다.Google지도에서 동적 HTML 콘텐츠/이미지 표시

Google지도에 마커를 추가하려면 다음 코드가 필요합니다.

this.map.addMarker(this.createMarker(infoName, new window.google.maps.LatLng(data.MapdataRecord[i].Latitude, data.MapdataRecord[i].Longitude), 'icon_hosp.png')); 

위의 코드에서 우리는 마커 이미지로 병원 아이콘을 표시하지만, 이제 요구 사항이 변경되어 여기에 동적 콘텐츠를 표시해야합니다.

숫자가있는 이미지/아이콘과 같은 것입니다. 이 숫자는 동적입니다. Reuirement는지도에서 이러한 마커를 추가하는 방법

enter image description here

아래로입니다. 당신의 도움에 대한

감사합니다 :)

답변

0
onload google map make an array for your dyanamic icon. 
while adding these marker on gmap.Add them 
$.each(data.MapdataRecord,function(i,k){ 
this.map.addMarker(this.createMarker(infoName, new window.google.maps.LatLng(k.Latitude,  k.Longitude), Use Array of ICon)); 
}); 
관련 문제