Follows script with mouse scrolling options, zoom, among other options:
<script type="text/javascript" src="https://maps.google.com/maps/api/js"></script>
<script>
//Chamar mapa
function initialize() {
// Create a map object, and include the MapTypeId to add
// to the map type control.
var latlng = new google.maps.LatLng(-27.230399, -52.028978);
var myOptions = {
zoom: 15,
center: latlng, //localizacao do ponteiro, definida acima na var latlng.
scrollwheel: false, //desativar scroll
mapTypeControl: false, //desativa opcao de escolha de mapa
panControl: false, //desativa movimentacao no mapa
//zoomControl: false, //desativa zomm no mapa
};
var map = new google.maps.Map(document.getElementById("mapa_localiza"), //mapa_localiza é o id o quale usado na div a baixo para chamar o mapa.
myOptions);
//define o ponteiro
var image = '<?php print base_url(); ?>web-files/site/img/marker.png';
var beachMarker = new google.maps.Marker({
position: latlng,
map: map,
icon: image
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<div id="mapa_contato">
<div id="mapa_localiza" style="height: 26em; width: 100%; float: left;"></div><!--CHAMA O MAPA, define altura do mesmo-->
</div>
In the Zoom field, you can set the initial zoom.
In the var
image you can set the map cursor.
Thank you, include in the project and worked perfectly!
– Willian Tártaro