Search results
Results from the WOW.Com Content Network
I'm trying to do what seemed to be an easy thing but has resulted in some confusion. I'm trying to have a link going to Google Maps with the destination address pre-filled and the from address to inherit the user's current location. From what someone else had instructed, if I used 'current location' as the 'from address', it'd do everything for me.
The route to the pre-defined destination is then calculated using the Directions service with a modified options parameter - notably in this instance to hide the default markers. The reason for hiding the markers is because they do not expose any events and thus we cannot bind any listeners to them so we add our own.
Although the current answers are great, none of them did quite what I was looking for, I wanted to open the maps app only, add a name for each of the source location and destination, using the geo URI scheme wouldn't work for me at all and the maps web link didn't have labels so I came up with this solution, which is essentially an amalgamation of the other solutions and comments made here ...
In May 2017 Google announced the Google Maps URLs API that allows to construct universal cross-platform links. Now you can open Google maps on web, Android or iOS using the same URL string in form: Now you can open Google maps on web, Android or iOS using the same URL string in form:
1. Remember, in Google Cloud Platform you'll need to enable "Directions API" to get it to work. Google Cloud Platform > APIs & Services > Library > Search in the box for "Directions API" and then Enable. – Rose.
4. Working with the Google map API and routes or directions. I would like it such that when a user clicks a marker the route from the user's current location to that marker would render. I have been studying the Google maps API documentation direction services example here. Here is my attempt at adapting that.
How to draw route direction from current location to destination which (latitude and longitude), i have code as below: import android.os.Bundle; import com.actionbarsherlock.app.SherlockActivity;
I am using angular google maps in my angular Web App. I want to show directions from user's current location to a marker containing sub locations. In my web app the marker has multiple sub locations identified using lat and lng. So when user clicks on these sub locations, directions has to be shown from the user's current location.
The currently accepted answer ends up adding an additional history entry in browsers at the moment as Google Maps redirects to a different URL format. To avoid that extra entry in the browser's history, use the official Maps API url :
What i'm trying to do is set an address as destination and as the origin (starting point) I would like to put the current location of the device, but i cannot find anything on line that works with the iframe, all i found is to key current location as origin, but it doesn't seem to work, i also tried my location, current address and as i'm in ...