Geometry input by user

Events happening in the community are now at Drupal community events on www.drupal.org.
miaumiaume's picture

Hello,

I was happy as I found this group! I have some question to the community.

I want to let user draw his geometry (rectangle) on the map and get the bounding box from the map. He can delete/edit the geometry without reloading the site. Then he can submit the geometry. It's better to have more possibilities for input geometry like WKT, Geojson, KML.

My idea was to use Webform module, but it doesn't support Geofield...
Is it possible to create such thing with some geo modules or should I make a custom module?

Thank you for support!

Comments

If you install Openlayers

Sinan Erdem's picture

If you install Openlayers module, it has a geofield widget which allows the user to input either a point, line or a shape.

Similarly, Leaflet also has some input widgets. Here are two of them:

http://drupal.org/project/leaflet_widget
http://drupal.org/sandbox/Chi/1796796

Thank you very much for you

miaumiaume's picture

Thank you very much for you advice!
I know this geofield widget. I tried the leaflet widget too but unfortunately it didn't solve my problem. I can draw geometry only if I EDIT the content. I would have a map where the anonymous user can make an input (drawing like in google maps or like a webform).

I think there is a very simple solution but i can't figure out how...

If you can give a user the

Sinan Erdem's picture

If you can give a user the permission to create a new content, then a user can create a new content and can use the widget to enter the location data.

For that, you can add a geofield to an existing content type.

It is unfortunately not the

miaumiaume's picture

I don't know if I understand you right but it is unfortunately not the thing what I need. The input information should be in the Webform as part of Ubercart checkout pane which I can submit (admin should get this information in the db) But I don't see the geometry tools at the node...Can I change it? Where can I give this permission? Thank you very much for the support!

It was my mistake! I choose

miaumiaume's picture

It was my mistake! I choose the wrong Openlayers map to display. So with the Geofield INPUT Map it works. The user can draw features on the map without editing the node! But I can't find where user can delete the feature? I enabled "Allow shape modification" in the map settings...
How are these features stored?
Can I grab it with Geocoder anyway?
Any help will be appreciated!

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

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