Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. <div id="map" class="pull-right"></div>
  2.  
  3. <script src="https://maps.googleapis.com/maps/api/js?key=??????=places&callback=initMap"
  4. async defer></script>
  5.  
  6. function initMap(){
  7. // Definição do ponte de inicialização do mapa
  8. var myLatLng = new google.maps.LatLng(-5.843470, -36.619855);
  9.  
  10. // Definição das configurações visuais do mapa
  11. var mapOptions = {
  12. zoom: 8,
  13. center: myLatLng,
  14. styles: [
  15. {
  16. featureType: 'road',
  17. elementType: 'all',
  18. stylers:[{visibility: 'off'}]
  19. },
  20. {
  21. featureType: 'water',
  22. elementType: 'all',
  23. stylers:[{color: '#ffffff'}]
  24. },
  25. {
  26. featureType: 'landscape',
  27. elementType: 'all',
  28. stylers:[{color: '#ffffff'}]
  29. }
  30. ]
  31. }
  32.  
  33. // Instanciando o mapa com as configurações defidas dentro de uma div cujo id está especificado na instrução
  34. var map = new google.maps.Map(document.getElementById('map'),mapOptions);
  35. var geocoder = new google.maps.Geocoder;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement