I guess I am a few little steps away from my solution :)

I try to make a request on mapquestapi.com with the parameters lon and lat
of my Position.....

// GET POS_DATA
    var poiRequestURL =
'http://open.mapquestapi.com/nominatim/v1/reverse?format=json&json_callback=renderExampleThreeResults';

    poiRequestURL += "&lat=" + lat + "&lon=" + lon;
    searchType = 'latlong';

if I call the URL with the parameters manually over a webBrowser (firefox) I
receive a file called reverse with all informations like Road, City, Country
etc. in json format

but HOW I CAN FIRE THE URL request through my JavaScript and after I fired
it up, I need to handle the response.........

to handle the response I thought about the function...

function Results(response) {
        var jsonObj;
        
         if(response){

                 //JSON Objekt
                 jsonObj = new OpenLayers.Format.JSON();
                 var result = jsonObj.read(response[obj]);

alert("Street:"+result.address.road+" City:"+result.address.city);

can anyone help please?!?
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-get-Cityname-from-Coords-Lon-Lat-tp5661482p5670507.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to