OpenLayers search map wih Nominatim

571 views Asked by At

Good evening. On the website I'm developing I need to let the user search a place in a Open Layer map that i made like this

<script type="text/javascript">
        uploadMap = new OpenLayers.Map("uploadMap");
                var mapnik         = new OpenLayers.Layer.OSM();
                var fromProjection = new OpenLayers.Projection("EPSG:4326");   // Transform from WGS 1984
                var toProjection   = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection
                var position       = new OpenLayers.LonLat(3.41,5.52);
                var zoom           = 1; 

                uploadMap.addLayer(mapnik);
                uploadMap.setCenter(position, zoom );
                uploadMap.zoomToMaxExtent();

        </script>

to then save the place name and lat/long variables in my MySql database using PHP. What i can't figure out, is how to use a input type="text" to let the user searching on this map. I found about Nominatim but the response for geolocating is on XML and i don't know how to use it! How could I do? Thank you.

0

There are 0 answers