Needs review
Project:
Leaflet Widget for Geofield
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2019 at 10:19 UTC
Updated:
16 Oct 2020 at 19:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ayalon commentedIt's intentionally because neither WKT nor GeoJSON support circles. So there is no clue of drawing a cicle if it cannot be saved correctly to the geofield.
Comment #3
martijn de witI think there is a misunderstanding. It's about the drawCircleMarker tool. Not drawing circles, but an other kind of marker.
https://www.npmjs.com/package/@geoman-io/leaflet-geoman-free#leaflet-geo...
Comment #4
martijn de witHere is a patch for 2.Alpha 2 release.
Comment #5
itamair commentedActually also the "Adds button to draw circle markers" is not supported in GeoJson/Geofield and it would be translated as a simple marker (as the "drawMarker" option).
The #4 patch introduces useless duplications on both "drawCircleMarker" default value and element settings ... so it is not needed (on the present 8.x-2.x-dev)..
The here attached #5 just reverts its un-needed code lines (that introduce duplications) and fixes typos in the "unsupported by GeoJSON" notice ...
Comment #6
vlooi vlerke commented@Martijn, Thanks for the patch. It helped me getting rid of that annoying drawcircleMarker by enabling me to un-tick it in the UI
I can now un select "Adds button to draw circle markers." in mange form display
Without your patch the DrawCircleMarker is set to true by default and you cant disable it.
Its that annoying circle icon that you see even if you turn all buttons in the form display off.
Thanks
Comment #7
scott.whittaker commentedThe patch in #4 works for me. The patch in #5 breaks my maps.
Also I appreciate the label warning that circle and circle marker are not supported by GeoJSON, but I'm not sure disabling the checkbox is the right call. Circle markers are saved as POINT data in GeoJSON, the same as marker pins. For my application I prefer the circle marker to dropping a pin, so I'd prefer to keep that as an option.
Circles with variable radius don't really work though, so I potentially support disabling them.
Comment #8
guncha25 commentedAdding patch for 2.x-alpha1
Comment #9
itamair commentedThis module has been embedded and enhanced in the Leaflet module (2.0) itself: https://www.drupal.org/project/leaflet_widget/issues/3160066
I would rather patch Leaflet on this ...