Disabling a toolbar item in ember-leaftlet-draw


#1

I simply want to disable some buttons in the toolbar of leaflet draw.I did find the following code which seems like what im looking for but can’t seem to make it work in ember.js

var drawControl = new L.Control.Draw({ draw: { polygon: false, marker: false }, edit: { featureGroup: editableLayers, edit: false } });

Here’s my template.hbs

{{#leaflet-map onLoad=(action ‘initMap’) onClick=(route-action ‘getLatLng’) lat=lat lng=lng zoom=zoom class=‘leaflet_map’}} {{draw-control position=“topright” showDrawingLayer=‘true’}} {{/leaflet-map}}


#2

Turns out i was looking for a complex soln when there was an easier one.I just changed the Css of the buttons in the toolbar to display:none

.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker , .leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle , { display: none; }