[Google Maps] Directions: User location in From position

A marker on a map offers a Directions link. The link opens to Get Directions from a point-A origin to a point-B destination. The point-B is filled-in with the marker location. The point-A is empty.

I'm looking for a way to set the point-A with the user's current location. With one of the plugin add-ons we can ask the user to provide their location via their device. So I'm trying to cut the step where they need to enter their current location when we already have it.

Yes, people occasionally want to know how to get from some Other location A to point B. I'd like to solve this challenge as presented.

I'm hoping a developer can provide guidance on where code can be tweaked to pass the retrieved location to the Google Maps API. Ideally that might later become a new addon.

We can already create a "You are Here" marker on the map using the user's location. So the data is available and it's being sent to Google. I just haven't looked into the code to see exactly where the values are located, and then into the API to see where they should be loaded..

Thanks.

  • Konstantinos Xenos

    Hi Tony G ,

    Currently the way the plugin works is sending everything to point B you're correct on that. This is because of the various addons that you might have ended enabling pointing to various different location markers on your map so it can't automatically adjust which is 'From' and which is 'To'.

    One workaround ( and actually the way that it was meant to be worked ) is to:
    1] Click on the directions you want to start
    2] Click on the swap button to move them from B to A
    3] Click on the directions you want to go to

    I do understand the need of easier navigation that you mention though, so you could create this as a Feature request if you like to maybe for example create a Directions From and Directions To separate buttons so we can take a further look and provide an update in the future!

    Regards,
    Konstantinos

  • Tony G

    Xenos - ?????????! << ( that was efharistó but it looks like this UI doesn't speak Greek LOL)
    That's a clever solution and I will use it myself when travelling. :slight_smile:

    This is for a realty website, a house is for sale. In this scenario we have one marker, the house, and I was hoping for a very simple way to lead potential buyers directly from where they are to where we want them to go. (Dropping bread crumbs for them to follow to make it easy for them to spend their money.... :slight_smile: )

    Visitors to this kind of site are average consumers looking to buy a house. I don't think the average user is sophisticated enough to quickly work through that solution of swapping A and B. So while a good solution, I don't feel it's the right one for this specific application.

    I won't ask for an enhancement because honestly I don't use this plugin a lot and I believe there are other priorities. But I think every business would want this functionality so others may vote for it.

    If you do take on this challenge, I think this would be done outside the normal Directions functionality. Whenever we open an app (Google Maps, Waze, etc), turn on our location, and search for a destination, most of them default to offering directions from our current location to that end point. It's understood that "we are here and we are thinking about going there". Perhaps there is another approach to this where a single marker is present plus the user location. Rather than filling in points A and B into the existing Directions mechanism, I'd think there could be a separate option available that would immediately retrieve and display directions info, perhaps in a separate table, without the user needing to request the info within the map itself.

    Initially I think if this is done, that fastest route by car would be a logical, default, first approach to routing. But directions are subject to the mode of transportation, preferences about tollways, fastest route, current traffic / time of travel, and other details. If people actually do want this feature I fear the simplest solution would not immediately beloved by all. Every new solution presents its own new set of feature requests...

    Regards.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.