django-leaflet-geojson icon indicating copy to clipboard operation
django-leaflet-geojson copied to clipboard

How do I set the options on map creation?

Open fccoelho opened this issue 11 years ago • 1 comments

More documentation is needed to help customize the map.

fccoelho avatar Jan 26 '14 22:01 fccoelho

Yes, indeed, but more documentation is available on django-leaflet project page though.

The map object will be already initialized, but you could still do this :

   // as stated in django-leaflet readme
   window.addEventListener("map:init", function (e) {
        var map = e.detail.map;
        map.setOptions( {...} );
        ...
    }, false);

Tell me if you encounter problems setting options after map initialization. Maybe it's too late for some options to be taken into account. In this case, please open an issue (with the name of the options) in django-leaflet directly :)

Thanks ! Good luck !

leplatrem avatar Jan 27 '14 19:01 leplatrem