O exemplo a seguir adiciona um marcador simples a um mapa em Uluru, no centro da Austrália:
function initMap() {
var myLatLng = {lat: -25.363, lng: 131.044};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: myLatLng
});
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Hello World!'
});
}
<div id="map"></div>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
}
<!-- Replace the value of the key parameter with your own API key. --> <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCkUOdZ5y7hMm0yrcCQoCvLwzdM6M8s5qk&callback=initMap"> </script>
function initMap() {
var myLatLng = {lat: -25.363, lng: 131.044};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: myLatLng
});
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Hello World!'
});
}
O mapa esta funcionando, so tenho esse problema. Não consigo trocar o ícone.
--
Você recebeu esta mensagem porque está inscrito na Lista "GOPHP" em Grupos do Google.
Para Postar: go...@googlegroups.com
Para Sair do Grupo: gophp-unsubscribe@googlegroups.com
Link: http://groups.google.com/group/gophp?hl=pt-BR
---
Você recebeu essa mensagem porque está inscrito no grupo "GOPHP" dos Grupos do Google.
Para cancelar inscrição nesse grupo e parar de receber e-mails dele, envie um e-mail para gophp+unsubscribe@googlegroups.com.
Para mais opções, acesse https://groups.google.com/d/optout.
jamario
/ Analista de sistemas
jamario...@gmail.com / +55(62)91500295