Skip to main content

All Questions

Tagged with
1 vote
0 answers
72 views

Leaflet draw polygon is rendering/drawn wrongly shifting bit away from selected position in Angular 17 with ssr enabled

We are using angular 17 and we have used leaflet and leaflet draw JavaScript plugin to plot the map and want to draw polygons, rectangle over it and get the boundary co-ordinates of the same. But when ...
Yogesh Shankar Naik's user avatar
1 vote
0 answers
349 views

Find Point in polygon javascript

I found this solution in php : Find Point in polygon PHP I change it in javascript if (is_in_polygon(points_polygon, vertices_x, vertices_y, longitude_x, latitude_y)){ console.log("Is in ...
alice 's user avatar
  • 41
0 votes
1 answer
3k views

Custom color of draw polygon on leaflet map

I am drawing polygon on leaflet map this.polygonDrawer = new L.Draw.Polygon(this.map); How can i customize color of this polygon? Like i want red color polygon should draw so where i can give ...
Hunzla Ali's user avatar
1 vote
1 answer
2k views

Leaflet draw polygon on load map

I have this polygon coordinates let polygon = [ [ 51.40545845031738, 35.706447104954194 ], [ 51.390438079833984, 35.70568044469603 ], [ 51....
Mahdi Bashirpour's user avatar
2 votes
1 answer
879 views

How can I identify layers which contain polygons

Good day, I have two function getGeofences() and getTraces() getGeofences() will add to the map the polygons and getTraces() will add to the map the markers and polylines. both contain FGgpx....
martin10's user avatar
  • 199
1 vote
0 answers
871 views

Why L.polygon works in a way but not in another

Good day, I am sorry if my question could be basic but I think I do have a problem to convert a string to an array. I am trying to add a polygon to a map (or to a layer). I extracted some polygon ...
martin10's user avatar
  • 199
0 votes
1 answer
1k views

How can I add polygons extracted from MyQL

I can draw a polygon and save it into a MySQL database. (If someone need to now how, just ask). I also can send a SELECT request to my database and show the saved polygons. Here is what my database ...
martin10's user avatar
  • 199
0 votes
1 answer
2k views

unable to dispaly polygon on the map using Leaflet draw plugin

I am trying to use draw plugin from here http://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html#l-draw and tried using it locally as shown below <html> <head> <...
dhana lakshmi's user avatar
1 vote
0 answers
987 views

Adding custom vertices to a Leftlet LineString / Polyline

I have a normal Leaflet Draw page here, when I'm not in editing mode I would like to have custom vertex icon in some of the vertices that will also respond to click events, showing a popup. I looked ...
NickPR's user avatar
  • 574
1 vote
3 answers
6k views

rotate polygon around point in leaflet map

I have an issue, in my leaflet map I've created a triangle from polygon: var polygon = L.polygon([ [parseFloat(decimal_lat),parseFloat(decimal_lon)], [parseFloat(decimal_lat) + 1, ...
Petr Bečka's user avatar