barryhunter / classygmaps

Rip-off of Classic Google Maps, get a mostly functional version of Classic Maps, implemented with the Maps API
26 stars 14 forks source link

Automatically generate directions from "to" operator #24

Open frankyfranky opened 9 years ago

frankyfranky commented 9 years ago

In classic Google Maps I could type: toronto to hamilton or 1 front street to university of toronto and the word "to" would automatically be interpreted to give directions from the one place to the other.

Thanks for spearheading this project

barryhunter commented 9 years ago

Unfortunately this isnt a easy fix. The main complication is the word 'to' can appear in addresses, so needs special handling to deal with that. To be honest that might be a bit beyond my capablities.

The other complication is language support, of course different languages use a different word. Although if stick to english might be ok.

I'm inclined to say could directly support 'to:' as the operator, shouldnt be amigious, but "to" on its own might be more trickly.

frankyfranky commented 9 years ago

Ok thanks for replying. It doesn't have to be 'to', it could be some other operator that is easy to type and recognize. What about this symbol: >

GausR commented 9 years ago

Me too, I miss very much this easy way to look up a route. By searching for the topic I found your project and conversation here.

As far as I remember, here in the German classic maps.google.de I had to type:

from:Stuttgart to:Berlin

It had to contain the two key words as well as the colons and also no spaces were allowed before and after the colons. It did not work with German expressions (von:Stuttgart nach:Berlin).

Using this, it was also possible to put the complete address:

from:Königstr. 1 Stuttgart to:Unter den Linden 99 Berlin

Do you think it would be possible by using these two keys "from:" and "to:"?

Greetings from near Stuttgart Gabor

barryhunter commented 9 years ago

Yes, supporting to: (ie with the colon) is pretty easy. Its dealing with languages, or trying to figure it out when its just a word 'to' or eg nach)

Anyway thats now done: http://gokml.net/maps?q=from:K%C3%B6nigstr.%201%20Stuttgart%20to:Unter%20den%20Linden%2099%20Berlin

GausR commented 9 years ago

Great! Thanks. That was fast. Where is the like button?

1) Now I remember following behaviour: After one had typed "from:" into the search field, the auto search and complete started over and ignored the "from:". It based its search on whatever was typed after the "from:" and completed it. It was even possible to choose the start point from the drop down suggestions, keeping the "from:" in place. Then, typing the "to:", it froze the start point and it did the auto search and complete for the destination.

2) I think this one was not even featured by the original: "from:hamburg via:berlin to:stuttgart" does not yet do the expected, but I think it could be implemented?

Maybe even these ones:

"from:hamburg via:berlin via:münchen to:stuttgart" for several stopovers in this order or "from:hamburg to:stuttgart via:münchen via:berlin via:hannover" for several stopovers, route to be optimized. For route optimization request also a keyword could be used.

barryhunter commented 9 years ago

Just use multiple "to:" http://gokml.net/maps?q=from:hamburg%20to:berlin%20to:stuttgart (tahts how Classic Google Maps did it)

although right now classygmaps only has one via point (theoretically can have upto 8)

... as for autocomplete. that a whole different ball game.

Thats the crazy thing here, trying to recreate something took Google many years to develop. From scratch. So far with just one developer :)

Lost-soul commented 9 years ago

Hi great job you are doing tks.... with the "To" operator in Google classic i would but something like To:NR6 6SU, To:NR14 6NH, To:PE34 4RU, To:PE15 0AX, etc. the "To" was separated from the address by the semi colon and the end of the address was finished by a comma before the next "To" i understand that you are extremely busy, put could you please look at this, so that it would be possible to have around 10 addresses stacked like this.... i know don't want much, but this would benefit a lot of people.. thank you for taking the time