[GIS] Positioning leaflet divIcon when adjusting size using css

cssiconleaflet

I am using the L.divIcon when using iconSize:null which is causing iconAnchor:[0,0] to not be recognized,my code looks like this:

  var divIcon =L.divIcon({
    className:'current-location-icon',
    html:'<i class="fa fa-location-arrow fa-2x"></i>',
    iconAnchor:[0,0],
    iconSize:null,
    popupAnchor:[0,0]
});

How can I ensure that the icon is visible exactly at [0,0] when adjusting size using CSS?

Best Answer

You could just add another standard marker to see the correct location: http://jsfiddle.net/expedio/my565p1m/ If the location of your divIcon is ok, remove the standard marker again ;)