전단지와 함께 Geojson 레이어를 표시하고 있습니다. 기본 마커 아이콘 크기를 변경하고 싶습니다.전단지 : geojson 레이어의 마커 아이콘 크기
Uncaught TypeError: Cannot read property 'popupAnchor' of undefined
모든 단서 : 페이지를로드 할 때
$.ajax({
type: "GET",
url: "data.json",
dataType: 'json',
success: function (response) {
geojsonLayer = L.geoJson(response, {
pointToLayer: function(featuer, latlng) {
var smallIcon = L.Icon.extend({
options: {
'iconSize': [10, 10]
}
});
var myIcon = new smallIcon();
return L.marker(latlng, {icon: smallIcon});
},
onEachFeature: onEachFeature
}).addTo(map);
}
});
그러나, 내가 자바 스크립트 오류가 있어요 : 여기
내가 해낸 코드?
당신은 아약스없이 시도? –
아니요. 내가 어떻게 할 수 있는지 잘 모르겠다. –