Answer the question
In order to leave comments, you need to log in
Why is the marker not displayed as an image in 2GIS?
I'm trying to set a marker with a picture like this in the documentation (only the picture is a link there, but I have a static one in the folder)
Why doesn't it work?
var map;
DG.then(function () {
map = DG.map('map', {
center: [55.016595, 82.948391],
zoom: 17,
zoomControl: false,
minZoom: 11,
fullscreenControl: false
});
myDivIcon = DG.divIcon({
iconUrl: './img/marker.svg',
iconSize: [45, 70],
// className: "marker-custom",
// html: '<img class="marker-img" src="img/marker.svg">'
});
DG.marker([55.016595, 82.948391], {
icon: myDivIcon
}).addTo(map);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question