Posted by chrsnlsn on July 8, 2014 at 9:33pm
Hey I recently created a module for creating a leaflet geofield input that just captures a single point.
I needed it for a mobile app and something in leaflet Draw was breaking on mobile so I basically just took the Leaflet Widget module and removed all the draw stuff and added a crosshairs over the map then the center point of the map is captured when the form is submitted.
I'm wondering if this is worth sharing as another module?
Attaching a screenshot of what the input looks like.
Module on github
https://github.com/chrsnlsn/leaflet-widget-point
Attachment | Size |
---|---|
leaflet-widget-point.png | 284.77 KB |
Comments
Hi Chris,I could see there
Hi Chris,
I could see there being a fairly common use case for this, but I would worry if you diverged too much from the Leaflet module. How do you think it would work with updates?
I've never contributed a module, but I gather that this would not be a recommended approach.
Unfortunately I can't offer a suggestion, other than perhaps as a sandbox project or a public Git repo.
Perhaps better would be to identify what the problem with Leaflet was, and offer a patch for it, and then perhaps offer the crosshairs as an add-on module. This would be better than to recreate Leaflet.
Oh it doesn't replace any
Oh it doesn't replace any current modules it requires the leaflet module, geofield module, and geophp. I threw it up on github if you want to see how the widget works with geofield to collect a point. it's nice for mobile because it requires very little interaction from the user besides scrolling the map.
have you checked
have you checked https://www.drupal.org/project/leaflet_widget ?
http://kutlukod.com