Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I wanted to clarify and make sure I wasn't missing something (i was surprised that I haven't seen a post on this already!)
There's currently no way to 'get directions' to a particular location mapped via openlayers, correct? Anyone have any tricks they use to implement something workable?
Comments
Comment #1
spgd01 CreditAttribution: spgd01 commentedWe can't be the only ones who want to put Driving Directions into an openlayers map. Does anyone know how to do this. I am using the "get directions module" but i would like to have the functionality all in one map.
Comment #2
ifrikComment #3
bdevore CreditAttribution: bdevore commentedHere's my rather manual solution for directions.
I adding the geofield two additional times in my view, and formatting the output as latitude and longitude respectively. Then I rewrite the results in a global text layer with tokens to add http://maps.google.com/maps?q=[name_of_token]&f=dIt's a little more manual than I'd like and I had to fiddle with the way I was building the statement a couple of times to get the "&f=d" to attach at the end so google knows I want directions to this latitude and longitude.This last text layer gets hidden and included as a token in the final Global text area, which is set as the description field under data source in the Format: OpenLayers Data Overlay | SettingsScratch that. Seems like the rewrite is just pulling the first record rather than by row, so I'm getting all duplicates. I'll post if I find a workaround...
...Okay, the culprit seemed to be "exclude from display" leaving the elements displayed and using them as tokens seemed to work as expected. So the above works, but is fussier than it should be.
Comment #4
dmsmidtAnybody got a good solution?
For now I just link to the external Google maps site: http://maps.google.com/maps?saddr={start_address}&daddr={destination_address}