Este exemplo cria um mapa do Google em HTML:
Example
<!DOCTYPE html> <html> <body> <h1>My First Google Map</h1> <div id="googleMap" style="width:100%;height:400px;"></div> <script> function myMap() { var mapProp= { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, }; var map = new google.maps.Map(document.getElementById("googleMap"),mapProp); } </script> <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&callback=myMap"></script> </body> </html>
Criar um mapa básico do Google
Example
<!DOCTYPE html> <html> <body> <h1>My First Google Map</h1> <div id="googleMap" style="width:100%;height:400px;"></div> <script> function myMap() { var mapProp= { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, }; var map = new google.maps.Map(document.getElementById("googleMap"),mapProp); } </script> <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&callback=myMap"></script> </body> </html>
O contêiner e o tamanho do mapa
<div id="googleMap" style="width:100%;height:400px"></div>
O artigo ajudou ?
SimNão
Oh my goodness! Impressive article dude! Thanks, However
I am having troubles with your RSS. I don’t know why I can’t subscribe to it.
Is there anyone else getting identical RSS issues?
Anybody who knows the solution can you kindly respond?
Thanks!!