I have registered an Api to insert a Google map but I do not upload the map on the web.
I get the error in the console:
InvalidValueError: initialise is not a function.
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyAbAymW3TTBTkQ-vDS-8r3nvBxVnWlfqcY&sensor=false®ion=ES&callback=initialise"></script>
<script type="text/javascript">
function initialise() {
var coordenadas = new google.maps.LatLng(38.959777, -3.886762);
var colores = [{
featureType: "all",
elementType: "all",
stylers: [
{saturation: -100},
{lightness:0},
{invert_lightness:false}
]
}];
var opciones = {
zoom: 16,
center: coordenadas,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var mapa = new google.maps.Map(document.getElementById('mi-mapa'), opciones);
var estilo = new google.maps.StyledMapType(colores); mapa.mapTypes.set('mapa-bn', estilo); mapa.setMapTypeId('mapa-bn');
var marcador = new google.maps.Marker({
position: coordenadas,
map: mapa,
title: 'Empresa',
icon: 'images/logo.png'
});
}
google.maps.event.addDomListener(window, 'load', initialise);
</script>
the map appears and then disappears in less than a second.