tags:

views:

33

answers:

1

Plz any one help me to get the address of the lat/log location. Actually i want the user

location address. I have tried more but i am not able to solve this problem if any on have idea please help me.

I am a beginner in iPhone so please give brief explanation.

A: 

I assume you mean in the browser (not a native application), since you have tagged this question as javascript. You do it via an asynchronous callback:

//Function that does something once the device has a location
//May be called repeatedly
function handler(location) {
  var longitude = location.coords.longitude;
  var latitude = location.coords.latitude;
  var accuracy = location.coords.accuracy

  //Do something with them
}

//Register the handler and tell the phone to start finding a location
navigator.geolocation.getCurrentPosition(handler);

It is all part of the HTML5 geolocation stuff, there is a draft here.

Louis Gerbarg