Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="map" class="pull-right"></div>
- <script src="https://maps.googleapis.com/maps/api/js?key=??????=places&callback=initMap"
- async defer></script>
- function initMap(){
- // Definição do ponte de inicialização do mapa
- var myLatLng = new google.maps.LatLng(-5.843470, -36.619855);
- // Definição das configurações visuais do mapa
- var mapOptions = {
- zoom: 8,
- center: myLatLng,
- styles: [
- {
- featureType: 'road',
- elementType: 'all',
- stylers:[{visibility: 'off'}]
- },
- {
- featureType: 'water',
- elementType: 'all',
- stylers:[{color: '#ffffff'}]
- },
- {
- featureType: 'landscape',
- elementType: 'all',
- stylers:[{color: '#ffffff'}]
- }
- ]
- }
- // Instanciando o mapa com as configurações defidas dentro de uma div cujo id está especificado na instrução
- var map = new google.maps.Map(document.getElementById('map'),mapOptions);
- var geocoder = new google.maps.Geocoder;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement