Searching option

Good morning,

I am a new user of the OSM community.

I recently added to my website map of OSM (website developed just for the intranet is not public).

I wanted to understand if there is the possibility of incorporating the option of searching for an address on the map, that is, the classic text field where you type an address and then click on “Search”.

Thank you all in advance!



You can use Nominatim, querying public instances or installing your own.

Hello muralito,

thanks for your response, but I was looking for a solution to be able to plug in this code:

<script src=""></script>

<script type="text/javascript">
	// Start position for the map (hardcoded here for simplicity,
	// but maybe you want to get this from the URL params)
            var lat=46.08680;
            var lon=11.20168;
            var zoom=16;

	var map; //complex object of type OpenLayers.Map

	function init() {
		map = new OpenLayers.Map ("map", {
				new OpenLayers.Control.Navigation(),
				new OpenLayers.Control.PanZoomBar(),
                                    new OpenLayers.Control.ScaleLine(),
                                    new OpenLayers.Control.Permalink('permalink'),
                                    new OpenLayers.Control.MousePosition(),
				new OpenLayers.Control.LayerSwitcher(),
				new OpenLayers.Control.Attribution()],
			maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
			maxResolution: 156543.0399,
			numZoomLevels: 19,
			units: 'm',
			projection: new OpenLayers.Projection("EPSG:900913"),
			displayProjection: new OpenLayers.Projection("EPSG:4326")
		} );

		// Define the map layer
		// Here we use a predefined layer that will be kept up to date with URL changes
		layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
		layerCycleMap = new OpenLayers.Layer.OSM.CycleMap("CycleMap");
		layerMarkers = new OpenLayers.Layer.Markers("Markers");
		// Add the Layer with the GPX Track
		var lgpx = new OpenLayers.Layer.Vector("Descrizione del layer", {
			strategies: [new OpenLayers.Strategy.Fixed()],
			protocol: new OpenLayers.Protocol.HTTP({
				url: "traccia.gpx",
				format: new OpenLayers.Format.GPX()
			style: {strokeColor: "green", strokeWidth: 5, strokeOpacity: 0.5},
			projection: new OpenLayers.Projection("EPSG:4326")

		var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
		map.setCenter(lonLat, zoom);

		var size = new OpenLayers.Size(21, 25);
		var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
		var icon = new OpenLayers.Icon('',size,offset);
		layerMarkers.addMarker(new OpenLayers.Marker(lonLat,icon));

But I think that is not possible, right?

You’re forced to install a server with Nominatim.

Let me know


Best regards.


Hello Daniele,

have a look at in general,

and maybe at
Have a loom whether you can disable tha routing feature there if you don’t need it.