1 //window.onload = function(){ 2 $(document).ready(function(){ 3 4 var mapa = $('#mapa'); 5 var mapa_contenido = mapa.html(); 6 var mapa_zoom = parseInt(mapa.attr('data-zoom')); 7 var mapa_lat = parseFloat(mapa.attr('data-lat')); 8 var mapa_lng = parseFloat(mapa.attr('data-lng')); 9 10 var myLatLng = {lat: mapa_lat, lng: mapa_lng}; 11 12 var options = { 13 zoom: mapa_zoom 14 , center: myLatLng 15 , mapTypeId: 'roadmap' //satellite 16 }; 17 18 var map = new google.maps.Map(document.getElementById('mapa'), options); 19 20 var markers = { 21 '1':{'lat':mapa_lat,'lon':mapa_lng,'titulo':mapa.attr('data-titulo'),'contenido':mapa_contenido,'icon':mapa.attr('data-icono')} 22 }; 23 24 var popup; 25 var marker = new Array(); 26 27 for(var i in markers){ 28 marker[i] = new google.maps.Marker({ 29 position: {lat: markers[i].lat, lng: markers[i].lon} 30 , map: map 31 , title: markers[i].titulo 32 , icon: markers[i].icon 33 //, cursor: 'default' 34 //, draggable: true 35 , contenido : markers[i].contenido 36 }); 37 38 marker[i].addListener('click', function(){ 39 if(!popup){ 40 popup = new google.maps.InfoWindow(); 41 } 42 popup.setContent(this.contenido); 43 popup.open(map, this); 44 }); 45 } 46 47 //console.log(marker); 48 49 new google.maps.event.trigger(marker[1], 'click'); 50 //}; 51 }) 52 53
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.