Page 1 of 1

How can I convert Latitude and Longitude into a street address?

Posted: Mon Aug 12, 2013 5:04 am
by adam griffin

I am trying to make a map component upon load it shows the users location and give them directions to another point. I am able to get the user latitude and longitude as well as the other latitude and longitude. I just need to convert the latitude and longitude coords into an address. I have follow this http://docs.appery.io/tutorials/build... but i am stuck. Can someone please help?

This is my code so far -

initialize();

var ToLat = localStorage.getItem('UserLatitude');
var ToLong = localStorage.getItem('User_Longititude');
var To = ToLat + " "+ ToLong;

var FromLat = localStorage.getItem('MyLat');
var FromLong = localStorage.getItem('MyLong');
var From = FromLat +" "+ FromLong;

var sourceAddress = From;
var destinationAddress = To;
var map = Appery("directionsMap").gmap;
displayDirections(sourceAddress, destinationAddress, map);


How can I convert Latitude and Longitude into a street address?

Posted: Mon Aug 12, 2013 5:15 am
by maxkatz

Use this API to convert latitude/longitude to address: https://developers.google.com/maps/do...


How can I convert Latitude and Longitude into a street address?

Posted: Mon Aug 12, 2013 5:40 am
by adam griffin

Im not sure how to set that up, Can you guide me?


How can I convert Latitude and Longitude into a street address?

Posted: Mon Aug 12, 2013 5:42 am
by adam griffin

I understand what it is doing but I am not sure how to set the api service in Appery.


How can I convert Latitude and Longitude into a street address?

Posted: Mon Aug 12, 2013 5:46 am
by Oleg Danchenkov

How can I convert Latitude and Longitude into a street address?

Posted: Mon Aug 12, 2013 6:59 am
by adam griffin

I think I got the api correct now, thank you

But is there something wrong with my code, every time i place it the app stops running

var ToLat = localStorage.getItem('UserLatitude');
var ToLong = localStorage.getItem('User_Longititude');
var FromLat = localStorage.getItem('MyLat');
var FromLong = localStorage.getItem('MyLong');

var tempFrom = new google.maps.LatLng(Fromlat, FromLong);
var tempTo = new google.maps.LatLng(ToLat, ToLong);

localStorage.setItem('To_LatLng', tempFrom);
localStorage.setItem('From_LatLng', tempTo);


How can I convert Latitude and Longitude into a street address?

Posted: Mon Aug 12, 2013 7:04 am
by adam griffin

Nevermind, I found my mistake


How can I convert Latitude and Longitude into a street address?

Posted: Tue Sep 10, 2013 2:20 am
by eventsfb dott kom

You could use Google Geocoding API V3. Feel free to look at my blog for a Javascript example converting coordinates to address.


How can I convert Latitude and Longitude into a street address?

Posted: Sun Dec 08, 2013 4:33 am
by lights_out

I'm a little confused here. How/where do I put the code into the REST service? what paramaters should I use? what should the mapping look like? I'm prety inexperienced, but any help is very appreciated.


How can I convert Latitude and Longitude into a street address?

Posted: Sun Dec 08, 2013 4:59 am
by maxkatz

If you are new to building mobile apps, please try some of the beginner tutorials, they will help you get started: http://docs.appery.io/tutorials.