var Cofee= Leaflet.icon({
iconUrl: '/img/Coffee.png',
shadowUrl: '/img/pale-shadow.png',
iconSize: [34, 49],
shadowSize: [49, 49],
iconAnchor: [5, 62],
shadowAnchor: [4, 62],
popupAnchor: [12, -30]
});
var Store= Leaflet.icon({
iconUrl: '/img/Store.png',
shadowUrl: '/img/pale-shadow.png',
iconSize: [34, 49],
shadowSize: [49, 49],
iconAnchor: [5, 62],
shadowAnchor: [4, 62],
popupAnchor: [12, -30]
});
..
..
..
this.Getlatlng(currentlatlng, 9000).then(data => {
for (var key in data) {
Leaflet.marker(data[key].location, { icon: data[key].category })
.addTo(this.map).bindPopup('
'+data[key].caption+'
');markers.push([data[key].location.lat,data[key].location.lng]);
}
Подробнее здесь: https://stackoverflow.com/questions/521 ... -of-marker
Мобильная версия