Closed (won't fix)
Project:
Location
Version:
5.x-3.0-rc1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2008 at 18:52 UTC
Updated:
12 Nov 2011 at 01:30 UTC
It would be a very very useful feature to have the possibility to activate on demand the tracking of the gmap driving directions (with its variables: locale, travelMode, avoidHighway, etc.) on the map for nodes with multiple locations.
a dream? :-)
Comments
Comment #1
d.sibaud commentedfrom the first location inserted to the last, passing trough the intermediates locations.........
Comment #2
Andrew_Mallis@drupal.org commentedWe need to do just that right now to create a walking tour of San Fransisco. There'd be lots of other applications too, like creating an itinerary for garage sale locations.
Comment #3
d.sibaud commentedsound great, if I can give an hand, at your service ;-)
Comment #4
mizerydearia commentedI stumbled upon http://googlemapsapi.blogspot.com/2007/05/driving-directions-support-add...
Have GMap directions been implemented in any Drupal module yet?
Comment #5
yesct commentedwow. I dont think so. I'm going to mark this one postponed.
Comment #6
garbo commentedHi all,
I think I have the first half of the solution to creating a driving instructions system.
please have a look at: http://www.archimeer.nl/routes
-Drupal 6
-CCK
-Vieuws
-Gmap
-Location
Here's a website about architecture in a region in the Netherlands. There's a node type called "object" which contains all the information about an architectural object (it's address and location in lat/long degrees and some information about who designed it, what style, pictures etc.).
With the Gmap module and views these are displayed on the map.
Below the you find a small form with which you can select objects in te order that you want tem to appear on your routes. This form is created by writing special templates for views. After clicking the button "bereken route" (eng: calculate the route) a javascript (self written, based on google's example scripts) is executed that queries the google api and returns a new map, in place of the old, with the route printed on.
This all works!
My aim now is that visitors can save their routes into a special nodetype (let's call it "bike_route") so it can be shared with other visitors.
I'm thinking that I should get the Node ID's of the selected objects and paste them in the correct order (as the visitor has chosen) in a simple text field, or an array of textfields of a node of the nodetype bike_route. But I don't know how to achieve that.
If anybody has any suggestions for me, or if anybody has any questions about what I just presented, I would be very interested.
Comment #7
garbo commentedactivating this thread again.
Comment #8
garbo commentedHi, I've improved the driving directins feature on www.archimeer.nl/nieuw/fietsroute
Now the driving directions are saved as nodes!
The node-type "fietsroute" has a node-reference field in it that references the nodes that hold the locations along the route (architectural points of interest for this website)
Let me know what you think of this solution. Questions and remarks are more then welcome.
Comment #9
tohia commentedComment #10
tohia commentedThat's simply brilliant garbo. Does it use location module to store the location data, or a custom content type?
Comment #11
garbo commented@tohia
It uses the location module to store the locations of the architecture object nodes. It uses a node (node-type: "route") to store the chosen objects along a route in a node-reference field.
The route is calculated on page-load by the Google Maps API.
Comment #12
greenskunkAwesome job @garbo !
To help you I found some bugs:
Home » fietsroute » GreenSkunk from America
fietsroute links to fietsroute instead of nieuw/fietsroute
Comment #13
d.sibaud commentedViva Garbo, kool implementation, will you share this solution?
Comment #14
nemchenk commentedI'm trying to do exactly the same thing now - a walking tour of Bristol. garbo, any chance you could explain in more detail how you've done your site? With code examples?? :)
Many thanks in advance!
Comment #15
nemchenk commentedI'm very close to getting this working -- I've got the GDirections object loading and can display the directions in a DIV. Can't seem to get the GPolyline to display on my view-generated map however :(
Also, I've got more than 25 waypoints, so will need to figure out how to "batch" the loadFromWaypoints() requests...
Any tips appreciated!
http://explore.englandspastforeveryone.org.uk/taxonomy/items/1027
Comment #16
nemchenk commentedAlmost working now, thanks to http://drupal.org/node/150939#comment-1285426 . The basic problem is that gmap and gdirections can take a while to initialize, so the trick is to set up callbacks for when they are ready
Comment #17
nemchenk commentedRight, all done :D The basic idea is:
1) Get Views to produce a GMap
2) Use the Footer of the view (PHP Code filter) to print out some custom HTML and JS: the DIV to hold directions, the script which will process the GMap after Views is finished with it
3) Make sure you only get started on the map object after it has been initialised by setting an action handler
4) Compile an array of waypoints. You might need to split the array if you have >25 waypoints
5) For each batch of 25, create a new GDirections object and load the waypoints into it
6) Hide the markers afterwards
7) Re-center and re-zoom the map
http://explore.englandspastforeveryone.org.uk/taxonomy/items/1027
Comment #18
Naturalist commentedGarbo,
I sent you a email with questions!
Comment #19
summit commentedHi, What about this module: http://drupal.org/project/gdriving
It's on D6, but isn't almost everything that nowadays...
greetings,
Martijn
Comment #20
Naturalist commentedDoes it do multiple locations?
Comment #21
summit commentedI don't know ask the module owner :)
Comment #22
Naturalist commentedThe topic was in reference to multiple locations. If you don't know why did you mention it?
Comment #23
summit commentedBecause this module may be does already what you want, sorry, no time to go into it more.
Thought to mention it because of the question about Driving Direction.
greetings, Martijn
Comment #24
nemchenk commentedWhy not use the same as this: http://explore.englandspastforeveryone.org.uk/taxonomy/items/1027 ?
Comment #25
summit commentedDima,
Can You provide the code how you did this please?
Thanks a lot in advance for considering this.
greetings,
Martijn
Comment #26
nemchenk commentedHi Martijn,
Well, the outline of the process is in #17. First you need to set up a working GMap view, and sort the items in the view into the order you want them in your directions.
Next, you use the Footer of this view to spit out some HTML and the Javascript which will use the GMap API to manipulate the GMap generated by the view. My one is set to the PHP Code filter, and spits out:
As you can see, it is creating the fieldset and div for the directions, and adding Drupal's own collapse.js to make the fieldset work.
Then it is adding my own gmap_trail.js, which actually does the work of changing the Views-generated GMap into a walking trail. You can download this file from
http://explore.englandspastforeveryone.org.uk//sites/explore.englandspas...
Let me know if this makes more sense, or if you need more help with the explanations of what is happening on that page :)
Comment #27
summit commentedHi Dima,
This is for D5, does it also work on D6 Location? Would be great, because I am on D6 with my site :)
greetings, Martijn
Comment #28
nemchenk commentedMartjin, #26 is on D6.17 :]
Comment #29
Naturalist commentedYou know it doesn't do multiple stops that is why your also inquiring about this. Isn't that right?
Comment #30
nemchenk commented@Naturalist: what doesn't do multiple stops? What are "multiple stops"? My example clearly shows ~45 locations all strung together with walking directions -- isn't that "multiple stops"? Sorry, Naturalist, I'm not following what you are saying, or to whom.
@Martjin: had your email and lost it -- resend?
Comment #31
Naturalist commented#19
Summit - June 21, 2010 - 05:15
Hi, What about this module: http://drupal.org/project/gdriving
It's on D6, but isn't almost everything that nowadays...
greetings,
Martijn
Naturalist - June 21, 2010 - 18:56
Does it do multiple locations?
Summit - June 22, 2010 - 07:05
I don't know ask the module owner :)
hence
You know it doesn't do multiple stops that is why your also inquiring about this. Isn't that right?
The post was directed towards Summit no one else.
I think it improper to suggest something unless you clearly know it will do what a person wants. Since the topic is "Using Gmap Driving Direction with multiple locations" and the person doesn't know if it does multiple locations why did they suggest it? Grrr.
Marjin can send me a email through account anytime. I would appreciate it.
Comment #32
yesct commentedI dont think Summit was out of line to suggest another solution, even if that solution is not a perfect fit for a situation. This is a pretty common thing to do. A simple reply of "That wont work for me; I need multiple stops." is an OK response. Lets move on.
Comment #33
nemchenk commented@Naturalist:
"The post was directed towards Summit no one else."
Fair enough, but since it immediately followed my post, I assumed you were asking me. In future, a short "@user" before your post could help prevent such misunderstandings.
Comment #34
summit commented@Naturalist Hi, sorry to suggesting gdriving I wanted to help, now I installed it, and indeed it doesn't do multiple stops, but may be the module maintainer will put it in for you, I don't know about that. Sorry to post this not working solution..but I only wanted to help.
@Dmitri Will send you my email again :)
EDIT: Dmitri got a out of office reply :), will send you a contact pm.
greetings, Martijn
Comment #35
Naturalist commentedI was only trying to point out that in some situations a for sure suggestion is more appropriate. That is all. Nothing personal by no means. Have a wonderful weekend!
Comment #36
chaloalvarezj commentedSubscribing.. (to check functionality later)
Comment #37
mototribe commentedsubscribe
Comment #38
ankur commentedFrom the discussion above, it looks like there's a way to accomplish this without adding new code to this module. Also, I'm going to rule this as being beyond the scope of this module.