I have a simple code to display a map of Openstreetmaps via Openlayers based on latitude/longitude:
map = new OpenLayers.Map('#map');
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(geo.lng,geo.lat).transform( fromProjection, toProjection);
var zoom = 14;
map.addLayer(mapnik);
map.setCenter(position, zoom);
var markers = new OpenLayers.Layer.Markers( "Markers" );
markers.addMarker(new OpenLayers.Marker(position));
map.addLayer(markers);
What i now would like to do is displaying a map not based on lat/lng but just with an address, perhaps via OpenStreetMap nominatim. So i have the code above and an address string e.g. "country, state, city", without street/-nr. How do i point the map to that city?