Rikudo Pain
Rikudo Pain

Reputation: 461

Django Leaflet disable zoom control

I use Django 2.0 to draw maps and add Control Zoom Bar Everything work fine, but now I have 2 zoom control. According to the leaflet tutorial ( I use django-leaflet) I should disable default leaflet zoom control using zoomControl: false but somehow I cant find it where to configure it using Django-leaflet I Tried

var map = new L.Map.djangoMap('map', { zoomControl:false });

but still it returns in an error, In Settings for LEAFLET_CONFIG there's only MAX_ZOOM and MIN_ZOOM. Any Idea how to do it? Thanks in advance.

Upvotes: 1

Views: 535

Answers (1)

Rikudo Pain
Rikudo Pain

Reputation: 461

Found it, I Achieved it by removing the zoomControl via removeControl using this code right before I called the zoom_bar control :

map.removeControl(map.zoomControl);

Upvotes: 0

Related Questions