에 마커로 ESRI 모양을 변경, 나는 특정 줌 레벨에 따라 일반 마커 아이콘으로 ESRI 모양/다각형을 변경하기 위해 노력하고있어리플릿 JS는 - 내가 <a href="http://leafletjs.com/index.html" rel="nofollow noreferrer">Leaflet JS</a>와 <a href="https://github.com/calvinmetcalf/leaflet.shapefile" rel="nofollow noreferrer">leaflet.shapefile</a> 플러그인을 사용하고 특정 줌 레벨
다각형 형상으로 확대 된 사용자 인 경우 : 플러그인 나 그때 달성하려는 어떤 플러그인 처리 팜플렛 JS
var properties = new L.Shapefile('data/Test.zip', { style: propertyStyle, onEachFeature: propertyOnEachFeature })
에 레이어로서 추가되는 우리의 웹 서버, 상 ZipFile를 업로드 할 수 있도록 그러나 사용자가 줌 레벨 10 이상으로 확대하면 마커가 대신 표시되어야합니다. hape/polygon은 매우 작고 거의 보이지 않습니다.
및 출력 부분을 확대하는 것은 쉽게로 이루어졌다 : 나는 L.Marker 또는 어떤 올바른 접근 방식이 될 것으로 L.ShapeFile을 변경하는 방법을 잘 모릅니다 그러나
map.on('zoomend', function() {
if (map.getZoom() <10){
if (map.hasLayer(properties)) {
map.removeLayer(properties);
} else {
console.log("no property layer active");
}
}
if (map.getZoom() >= 10){
if (map.hasLayer(properties)){
console.log("property layer already added");
} else {
map.addLayer(properties);
}
}
}
.
도움과 조언에 감사드립니다.
UPDATE
대답 'IvanSanchez'나를 내가 찾던 정확히였다 제공.
L.Deflate({minSize: 20}).addTo(map);
감사합니다. IvanSanchez, 이것이 내가 찾고 있었던 것입니다. 매력처럼 작동합니다. – user6450463
안녕 이반, 위의 질문에서 내 후속을 볼 수있을 것이라고, 내 질문은 여기에 : http://stackoverflow.com/questions/40489828/leaflet-js-leaflet-deflate-changing-default- 마커 - 아이콘 - 사용자 정의 아이콘, 미리 감사드립니다 – user6450463