According to Wikipedia, geocoding is the process of finding associated geographic coordinates (often expressed as latitude and longitude) from other geographic data, such as street addresses, or zip codes (postal codes).
This demo takes an address, geocodes it and uses the returned coordinates and address information to put a marker on the map with an InfoBubble containing the address information.
Geocode another address
Geocode this Geocoding status:JavaScript Demo Source: mxn-geocoder.js
var mapstraction; var geocoder; var address; function initialize() { mapstraction = new mxn.Mapstraction('map','ovi'); mapstraction.setCenterAndZoom(new mxn.LatLonPoint(0,0), 1); geocoder = new mxn.Geocoder('ovi', geocode_return, error_callback); address = "Schönhauser Allee 180, Berlin, Germany"; geocoder.geocode(address); } function error_callback(status) { geocode_status = document.getElementById("geocode_status"); geocode_status.innerHTML = status; } function geocode_return(location) { var infoBubble; var components = []; geocode_status = document.getElementById("geocode_status"); geocode_status.innerHTML = "geocoding succeeded"; // display the map centered on a latitude and longitude (Google zoom levels) mapstraction.setCenterAndZoom(location.point, 15); mapstraction.addControls({ pan: true, zoom: 'small', map_type: true }); // create a marker positioned at a lat/lon geocode_marker = new mxn.Marker(location.point); if (location.street) { components.push(location.street); } if (location.locality) { components.push(location.locality); } if (location.postcode) { components.push(location.postcode); } if (location.region) { components.push(location.region); } if (location.country) { components.push(location.country); } var bubble = components.join(', '); geocode_marker.setInfoBubble(bubble); // display marker mapstraction.addMarker(geocode_marker); // open the marker geocode_marker.openBubble(); } function do_geocode() { address = document.getElementById("address").value; geocoder.geocode(address); }