May I ask how to resize markers in layer when zoom in?
var map = L.map('map', {
center: [23.364739, 115.187951],
zoom: 11,
minZoom: 11,
maxZoom: 18,
});
var ar_icon = L.Icon.extend({
});
var ar_icon_1 = new ar_icon({iconUrl: '../_image/arrows/line_ar_0.png', iconSize: [11, 11]});
var ar_icon_2 = new ar_icon({iconUrl: '../_image/arrows/line_ar_1.png', iconSize: [22, 22]});
var all_testptLayer = new L.GeoJSON.AJAX("../data/test_geojson.php", {
pointToLayer: function (feature, latlng) {.
if (feature.properties.num < 0.5)
return L.marker(latlng, {icon: ar_icon_1});
else if (feature.properties.num < 1.0)
return L.marker(latlng, {icon: ar_icon_2});
}
}
all_testptLayer.addTo(map);
map.on('zoomend', function() {
var currentZoom = map.getZoom();
if (currentZoom>12) {
// what should I do here to access all markers in the all_testptLayer and change the size of all markers to double in size?
}
});