0

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?

1

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 ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.