Os pongo el codigo.
Cita:
Y las coordenadas exactas son:<script type="text/javascript">
var geocoder;
var map;
var query = "Jaén";
function initialize() {
geocoder = new google.maps.Geocoder();
var myOptions = {
zoom:8,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map_canva s"), myOptions);
codeAddress();
}
function codeAddress() {
var address = query;
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
</script>
var geocoder;
var map;
var query = "Jaén";
function initialize() {
geocoder = new google.maps.Geocoder();
var myOptions = {
zoom:8,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map_canva s"), myOptions);
codeAddress();
}
function codeAddress() {
var address = query;
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
</script>
Cita:
Que quiero centrar la catedral por ejemplo.(37.76504934472781, -3.7900686264038086)
Y no se que cambiar para que sea vea por defecto esas coordenadas nada mas carges la pagina.
Gracias de antemano.