Leaflet Widget Point

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
chrsnlsn's picture

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

AttachmentSize
leaflet-widget-point.png284.77 KB

Comments

Hi Chris,I could see there

blattmann's picture

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

chrsnlsn's picture

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.

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: