0
다음 코드를 사용하여 일부 마커를 Google지도에 넣으려고합니다. 하지만 작동하지 않는 것 같습니다. 지도가 올바른 위치에 집중되어 있지만 마커를 볼 수 있습니다.Google지도 API 여러 마커
var points = [<asp:literal runat="server" id="litPoints"/>];
$(document).ready(function() {
var mapCenter = new google.maps.LatLng(<asp:literal runat="server" id="litMapCentre"/>);
var options = {
zoom:<asp:literal runat="server" id="litZoomLevel"/>,
center: mapCenter,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map($("#monitorMap")[0], options);
GetMap(map, points);
});
function GetMap(map, mappoints) {
var image=new google.maps.MarkerImage('../Images/map/iconr.png',
new google.maps.Size(20,32),
new google.maps.Point(0,0));
for(var i=1; i < points.length; i++) {
var m=points[i];
var mylatlng=new google.maps.LatLng(m[0], m[1]);
var marker=new google.maps.Marker({
position: mylatlng,
map: map,
icon: image});
}
}
최근 질문을 수락하십시오! – hsz