I need to get the user location in android but i get the wrong location, I am in London and the location i see in the emulator is US. I created an API key and followed the steps from the following link https://developers.google.com/maps/documentation/android-sdk/start#the_maps_activity_java_file
but i still have the same problem, the wrong latitude and longitude. Can anyone help on this please?
Thanks!
In emulator change lat and lan. Inside location
Hello my fellow coders,
I am trying to retrieve GeoCoordinates from an Android Google Maps SEND Intent (as dispatched when selecting to share a selected location) and even after searching around and trying various approaches for hours now I can't seem to get anywhere. However, all I seem to get from the Intent seems to be a text/plain content like this:
Franziskaner Wirtshaus & Biergarten - Trudering-Riem, München
https://some/shortened/maps/link
I tried (amongst others) several approaches from:
Get GeoCodes from Android Google Maps App (Not applicable since it opens a new activity)
How can I find the latitude and longitude from address? (Geocoder and Geocoding REST API from Google - no suitable results)
None of the above solutions yields any usable results.
Is there a reliable way to get GPS coordinates from something a user selected in Google Maps on Android at all?
Thanks in advance for your help,
Alex
I don't know if this app helps you. you can copy coordinates to clipboard or open it with other third party maps
cheers
I know that this question was asked before, I want to display my current location in a google map.So, I tried to follow the steps in this tutorial Getting Started With Google Maps for Android: Basics
In step 3: Configuring the Map, I had this error:
I add this line because android asked me to call requires permission which may be rejected by user:code should explicitly chek to see if permission is available
Thanks.
Instead of passing this pass getActivity()
I am new to android and even newer to Skobbler sdk
I am trying to access the current location but it taking me to berlin
I am using the code below :
mapView.getMapSettings().setCurrentPositionShown(true);
Use getCurrentGPSPosition on SKMapSurfaceView to get the current position (either matched to the road network or not).
Check also the documentation: http://developer.skobbler.ro/docs/android/com/skobbler/ngx/map/SKMapSurfaceView.html#getCurrentGPSPosition(boolean)
Alternatively you can listed to position update via SKCurrentPositionListener
I'm building a mobile-version of a website, trying to have one-click link to launch Google Maps with driving directions to the business, from the user's current location. I have it working fine for the iPhone, but when testing on Android, it views 'Current%20Location' and tries to find a business called 'Current Location'. Here is my current code:
Get Directions
I need a universal string to search from the current location, and can't find a definitive answer anywhere online.
Thanks in advance for any help!
I am doing the same thing and now have it working on Android. I don't have an iPhone so I have no way of testing on that. You should leave the saddr parameter blank in the URL, and Google Maps will then prefill it with the user's current location. Also, use + signs instead of spaces in the destination address. Here's the corrected URL:
http://maps.google.com/maps?saddr=&daddr=123+Street+Rd,Cityville,MD,21098
Use the google gps api to get the currentlocation and pass it to maps. Even better I think there's an action to open the built-in maps application asking it to route from current location to your address.
This article on location services should help http://developer.android.com/guide/topics/location/index.html
If you're trying to do it fully through the web, I think the user has to enable location services on the google webpage for it to work.
Also, check out this javascript library that provides a platform neutral api for gps services on most devices http://code.google.com/p/geo-location-javascript/
Google Maps with directions from current location
https://maps.google.com/maps?saddr=&daddr=35.658157,139.697174&sensor=TRUE
https://maps.google.com/maps?saddr=&daddr= PLUS
"location's_latitude" PLUS
"," PLUS
"location's_longitude" PLUS
"&sensor=TRUE" // for getting your current location
Probably the most accurate way using lat and long
<span class="addressAt">
<a href="http://maps.google.com/maps?f=d&hl=en®ion=US&doflg=ptm&geocode=&saddr=&daddr=41.75553,-88.322048" target="_blank">213 S River St
Aurora, IL</a>
</span>
This is the only way to get an accurate "my location" on the google maps mobile site. Replace the coordinates(41.75553,-88.322048) with your locations coords. All other ways just wrote in my location as the start address without actually getting the real time location.