내 응용 프로그램에서 this link을 따라갔습니다. 차례로, 내 장치에 공백이 생기고 .Map
이 표시되지 않습니다.json으로 마커를로드
코드 :
<script type="text/javascript">
$(function() {
$('#map_canvas').gmap().bind('init', function() {
$.getJSON('http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx?latitude=&longitude=', function(data) {
$.each(data.Status.Shoplist, function(i, m) {
$('#map_canvas').gmap('addMarker', { 'position': new google.maps.LatLng(m.lat, m.lng)});
});
});
});
});
</script>
JSON :
{"Status" :{ "Shoplist":[ { "id" : "1", "Name" : "ee", "phone" : "", "fax" : "", "latitude" : "xxxxxx", "longitude" : "yyyyyyy" } , { "id" : "3", "Name" : "hhh", "phone" : "", "fax" : "", "latitude" : "xxxx", "longitude" : "yyyyy" } ,..... } ]}}