Código PHP:
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA6qzgSSm0egPQROXxDuDW1xTl8I7B_YiuCXBy32mPGgT4tdYsnBSElxWzlji4kY5lqmQFN-UrHQF7iQ" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var map = null;
var geocoder = null;
function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
//map.setCenter(new GLatLng(37.4419, -122.1419), 13);
map.addControl(new GSmallMapControl());
//map.addControl(new GMapTypeControl());
geocoder = new GClientGeocoder();
showAddress('Av calbeto 14, VIELHA, Lleida, Spain, ');
//showAddress('Avinguda garona 17 local 2, VIELHA, 25530, Lleida, Spain ');
}
}
function showAddress2(address) {
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (!point) {
alert(address + " not found");
} else {
map.setCenter(point, 15);
/*var marker = new GMarker(point);
map.addOverlay(marker);*/
//marker.openInfoWindowHtml(address);
}
}
);
}
}
function showAddress(address) {
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (!point) {
//alert(address + " not found");
showAddress2('vielha, 25530, Lleida, Spain ');
//showAddress2('VIELHA, 25530, Lleida, Spain ');
} else {
map.setCenter(point, 15);
var marker = new GMarker(point);
map.addOverlay(marker);
//marker.openInfoWindowHtml(address);
}
}
);
}
}
//]]>
</script>
pero en otro me sale un error de script en la linea
showAddress('Av calbeto 14, VIELHA, Lleida, Spain, ');
he puesto bien al key y todo