I am using google map for showing locations.
My requirement is that each and every location is labelled with numbers.
Currently using this code ,
for (var i = 0; i < data.length; i++){
var image = new google.maps.MarkerImage(
'{{STATIC_URL}}img/icon-pin'+(i+1)+'.png',
new google.maps.Size(68, 49),
new google.maps.Point(0,0),
new google.maps.Point(19, 49));
var marker = new google.maps.Marker({
position: new google.maps.LatLng(data[i].lat, data[i].lon),
map: map,
icon:image,
});
}
Here with respect to i , new image is fetched from img folder like ,
i=0
image will be img/icon-pin1.png
i=1
image will be img/icon-pin2.png
I know it is not proper way to placing numbered markers in map.
My custom marker is like,
How can i add numbers to this image, while inserting marker.
Expected result,