Closed (fixed)
Project:
Route Elevation
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2014 at 16:37 UTC
Updated:
6 Dec 2014 at 05:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
artsakenos commentedDear Denise, you're in the right place. I developed the module OSM Route, at this moment it is in the full project review queue, which purpose is to build and store a static route starting from two (or more) georeferenced contents. It works with any Geofield entity, so, depending on your address type you can directly use it or retrieve it with geocode from another field like tools.
Comment #2
denisev commentedThat is very good news, thank you for posting. I tried to follow the instructions on the page and the readme file, but I can not get it to work so far. I would not be surprised having misunderstood the instructions, since I am still in the awkward beginner phase and get things mixed up often.
My goal would be that a user can enter start and end point address of the path he wants to see generated on a map (and later maybe in-between points).
So in the POI content type I have 2 fields = two addresses (their geocoded versions) where the user shall enter start and end point address of the path.
I thought there has to be more than one set of coordinates for a path to be drawn.
In the module settings under "Coordinates field" how does the module get more than one set of coordinates to draw the path?
I made the 2 content types
1. Content type name: "Revent" (POI)
Fields
--------
Field name: From
Field type: Postal address
Widget: Dynamic address form
Field name: field_geo_location_from
Field type: Geofield
Widget: Geocode from another field
2. Content type name: "Itinerary test content type"
Fields
---------
Field name: field_poi_entity_reference
Field type: Entity Reference
Widget: Do not show a widget
Field name: field_path
Field type: Geofield
Widget: GeoJSON
My settings in the itinerary_test_content_type
------------------------------------------------------------------
For field_poi_entity_reference "Entity selection"
- "simple with optional filter by bundle"
Under "Target bundles" I selected
- "Revent"
My settings for the module admin/config/services/osm_route
---------------------------------------------------------------------------------------
Content type with the itinerary:
"Itinerary test content type"
Georeferenced content field :
"field_poi_entity_reference"
Coordinates field:
"field_geo_location_from"
Name of the field where to save the calculated path:
"field path"
I also get following error
"Notice: Use of undefined constant osm_route_YOURNAVIGATION_URL - assumed 'osm_route_YOURNAVIGATION_URL'
in osm_route_admin_settings() (line 55 of sites\all\modules\osm_route\osm_route.admin.inc)."
Comment #3
artsakenos commentedFirst of all download from git the last version of the module, i performed a huge refactoring lately and several fixes, including the issue you suggested, the name of the constant was wrong.
Then you try the module again. Your configuration seems right. Just remember that OSM Route build a path starting from many POIs selected from a multivalue field (in your case you will select thr content with the from and the content with the to address). I attach you a image as a reference. As you can see I select many field which will be used to store a route on a geofield path in the next field. That one will be then used to show the route on the map widget.
I leave the issue open, please comment again if you have further doubts or you can't make the module work :)
A.
Comment #4
denisev commentedIt is working with separate nodes, cool :)
I am trying two more things:
1. For user input to have a clickable map instead of only the address field -
this should not make any difference - "any" Geofield should work as waypoint/address input for you module, right?
2. Instead of two separate nodes, I am trying to have all in one node: the address input (clickable map Geofield) comes from a field collection type field and is its own entity, which I reference with an entity ref field in the same node. Also the Geofield for the path is added to the bunch.
So far no luck with this. The Path field is not populated and following error is visible:
"Notice: Undefined index: und in osm_route_node_presave() (line 85 of sites\all\modules\osm_route\osm_route.module).
Warning: Invalid argument supplied for foreach() in osm_route_osm_route_poi_nodes_alter() (line 57 of sites\all\modules\osm_route\osm_route.module)."
Do you think above two scenarios should work in general with your module?
Comment #5
artsakenos commentedGood. Anyway, I'm updating README and project page taking into account your suggestions, have a look after the weekend.
Yes, you're right. Geofield is just the type of the content. You can fill the data both handwriting or with more advanced widgets such openlayers (which I suggest you to install), allowing you to select waypoints with one click. Please note that one waypoint can be multivalue, containing multiple waypoints, which will be connected by Osm route.
Waypoints must be stored in a different node, so that the "Itinerary" is not referencing itself or something inside itself while this is still not stored. Even using field collections.
I think I got what you're trying to obtain as result, but this module has been developed considering websites that need to reuse their waypoints; this is why these are stored in a separated content.
I couldn't reproduce the error, but I think it someway depends on the settings we were talking about in the previous comment.
About your needs you can do this way:
You create your addresses in a separated content type as Osm route needs. And you reference them from the main content. Then you can create your from and to field on fly with the references_dialog module (have a look!).
Cheers
Comment #6
artsakenos commentedThank you Denisev for your suggestions,
they help me to improve module and module description.