All Questions
Tagged with leaflet.draw mapbox
9
questions
1
vote
0
answers
1k
views
Allow point delete in mapbox draw mod
I am trying to rewrite a MapboxDraw.modes.draw_line_string.clickAnywhere function to allow deletion of a previous point with the SHIFT key in draw_line_string mode.
It works, but when it removes the ...
1
vote
1
answer
954
views
Finding Self-Intersections in Leaflet polygons using JSTS Library
I'm using Mapbox with Leaflet Draw, and I would like to avoid self-intersecting polygons.
I can already specify to not allow intersections while creating the draw control, but it only works when I ...
1
vote
0
answers
2k
views
Leaflet control buttons group
Leaflet controls are added vertically as following:
map.addControl(new L.NewMarkerControl());
map.addControl(new L.NewLineControl());
map.addControl(new L.NewPolygonControl());
map.addControl(new L....
1
vote
0
answers
263
views
Points snap back when editing polygons
We have a web app that uses MapBox.
In the Leaflet control we're drawing polygons in a feature group, laid over a basemap.
What we're seeing is that for certain polygons, when we try to edit the ...
2
votes
1
answer
2k
views
Editing a shapefile uploaded using leaflet.shapefile
I'm using Mapbox with Leaflet for drawing, editing and removing polygons etc. There might also be a case in which the user might have zipped shapefiles and want to use that directly, instead of ...
7
votes
2
answers
3k
views
Leaflet-Draw: Get polygon latLng in 'draw:editvertex' event
When a draw:editvertex event fires, how can I get information about the polygon which triggered it?
this.map.on('draw:editvertex', function (e) { debugger;
var layers = e.layers;
// I want to ...
1
vote
1
answer
2k
views
Create editable polygon and after editing it get the edited lat Lng in any event
Below is my code to create polygon , i want to make this editable so, I have passed " editable:true" option to map.
But still shape is not editable.
this.map = L.mapbox.map('map', null, {editable: ...
0
votes
1
answer
6k
views
Draw polygon on click of map using leaflet
Below is my code to draw polygon on map.Using this i am able to draw polygon but on click of map , it is enabling draw handler and on second click I am able to draw polygon.
Expected output -
On ...
0
votes
1
answer
302
views
Add custom icon on marker mapbox.js
Below is my draw marker code in which I want to add custom icon.
drawMarker: function() {
this.drawnItems.clearLayers();
this.drawHandler = new L.Draw.Marker(this.map,this.drawControl....