[OpenLayers-Users] Reverse geocoding with Nominatim an OpenLayers

Stephen Woodbridge woodbri at swoodbridge.com
Fri Mar 4 22:33:14 EST 2011


Hi Hendrik,

I do not think there is a canned example of what you are asking.
The strategy for doing this would be to add a double click handler which 
would make an ajax request back to your server and your server would 
need to forward that request to the Nomination service, get the results 
and send it back to your ajax response handler. The response handler 
would then parse the results, create a pop-up and add the response 
content to the pop-up, and then add the pop-up to an appropriate layer. 
This implies that you have a layer specifically for add in the pop-up(s) to.

So break this down an look for examples that do:

1. double-click handlers
2. ajax request
3. framed-cloud pop-up

You will probably need to create a simple ajax handler on the server 
maybe a little PHP code.

Hope this helps,
   -Steve

On 3/4/2011 10:08 PM, Hendrik Oesterlin wrote:
> Hello,
>
> I did not find if it is possible to do a reverse geocoding request
> using OpenLayers and Nominatim / OSM.
>
> It would be enough if a (double-)click on the OSM slippy map opens a kind of
> marker giving the nominatim result.
>
> Or if at each rezooming/dragging of the slippy map an nominatim
> request is send and the response displayed in a frame.
>
> I did not find a appropriate example in http://openlayers.org/dev/examples/
>
> Thank you for some hint!
>
> Hendrik
> http://www.openstreetmap.org/user/Hendrik75
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list