Questions tagged [leaflet.draw]
Vector drawing and editing plugin for Leaflet
leaflet.draw
343
questions
3
votes
1
answer
2k
views
Display Polyline length in feet using Leaflet.Draw toolbar
I am creating a map that the user will be able to draw lines on using the Leaflet.Draw toolbar. I would like the running distance of the line to be displayed in feet/miles instead of the default yards/...
1
vote
0
answers
257
views
How to use out side leaflet.draw control with leaflet.snap?
First of all I would like to thank you all for amazing libraries like leaflet/leaflet.draw and leaflet.snap.
What I want to do is outside leaflet.draw control with supporting leaflet snap. This is ...
2
votes
2
answers
636
views
angular-leaflet : draw control: GeoJSON of Circle and Point are same. How to differentiate?
I suppose to save the drawn shapes and on-demand it should load into the map. When I draw point and circle it gives same geoJSON. Type of both the shapes are point. I can't able to differentiate the ...
0
votes
1
answer
666
views
How do I flush out previous layers created by leaflet draw tool without refreshing page?
I want to give access to a leaflet draw toolbar via a toggle style menu link so a user can draw one rectangle at a time (actually these will be inserted into a database). What I managed so far is user ...
2
votes
2
answers
2k
views
Leaflet draw loses shapes after drawing
I'm using leaflet to show a map and the leaflet-draw plugin to draw shapes on this map.
I have the code below (see plunker) which allows to draw shapes. But as soon the shape is finished, it ...
2
votes
0
answers
162
views
move a whole featuregroup around (with all rectangles drawn) on the page map in leaflet
I am using leaflet.draw to draw rectangles on an image/map, as seen in the link below:
http://leafletjs.com/2013/02/20/guest-post-draw.html
I am able to use the edit button to move individual ones ...
3
votes
1
answer
7k
views
How to edit loaded geoJson with Leaflet
I want to retrieve polygon data from a database, then edit it. I can retrieve the polygons (stored as geojson), but cannot make them editable. How can I do this?
var drawnItems = new L....
0
votes
1
answer
466
views
Polygon from LeafletDraw to GeoJSON
This is my first attempt working with javascript and GeoJSON by using leaflet.
So far, I got the desired map and the leaflet.draw plugin working in the way that I can draw a shape and it appears 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....
1
vote
0
answers
2k
views
How to restrict shapes to simple polygons in leaflet.draw?
I'm using leaflet.draw to draw polygons on a map. Even though in the options for polygon I set
allowIntersection: false, // Restricts shapes to simple polygons
I'm still able to draw self-...
0
votes
1
answer
351
views
Why I get this error with angular and leaflet
I set in separated files different components, but when I aggregate a search input, I get this error in local:
angular.js:13424 Error: Map container not found.
and in plunker:
angular.js:13424Error:...
1
vote
1
answer
2k
views
Leaflet showing radius as drawing circle
I was asked to see if I could using leaflet draw a circle and as I'm drawing it show what the current expanding radius is. Either as a tooltip or write it to a page label. I noticed the circle option ...
1
vote
3
answers
3k
views
Node.js Leaflet error
Please help!! I know I'm missing something very simple but I'm new to all this and I read lots of different post and tutorial and can't get whats wrong.
I initiate a new project on Ubuntu 14.04
...
1
vote
1
answer
2k
views
How to create a heatmap with numbers using Leaflet map?
I wish to create a heatmap like follows, with the number changes at different zoom level - the number can appear in a mouse-hover window instead of directly showing on the map:
http://www.trulia....
2
votes
1
answer
1k
views
Leaflet.draw geojson layer edit
As you see in this fiddle , I have a polygon like this:
var data = [{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[2.504410743713379,44.28253972334941]...