1jQuery( document ).ready(function($) { 2 function initialize() { 3 var mapCanvas = document.getElementById('map-canvas'); 4 var address = $('#address').val(); 5 6 var geocoder = new google.maps.Geocoder(); 7 geocoder.geocode({ 8 'address': address 9 }, function(results, status) { 10 11 console.log(results); 12 if (status == google.maps.GeocoderStatus.OK) { 13 14 var myOptions = { 15 zoom: 10, 16 center: new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()-0.2), 17 mapTypeId: google.maps.MapTypeId.ROADMAP, 18 disableDefaultUI: true, 19 scrollwheel: false, 20 } 21 22 map = new google.maps.Map(mapCanvas, myOptions); 23 24 map.set('styles', [ 25 { 26 "featureType": "administrative", 27 "elementType": "labels.text.fill", 28 "stylers": [ 29 { 30 "color": "#444444" 31 } 32 ] 33 }, 34 { 35 "featureType": "landscape", 36 "elementType": "all", 37 "stylers": [ 38 { 39 "color": "#f2f2f2" 40 } 41 ] 42 }, 43 { 44 "featureType": "poi", 45 "elementType": "all", 46 "stylers": [ 47 { 48 "visibility": "off" 49 } 50 ] 51 }, 52 { 53 "featureType": "road", 54 "elementType": "all", 55 "stylers": [ 56 { 57 "saturation": -100 58 }, 59 { 60 "lightness": 45 61 } 62 ] 63 }, 64 { 65 "featureType": "road.highway", 66 "elementType": "all", 67 "stylers": [ 68 { 69 "visibility": "simplified" 70 } 71 ] 72 }, 73 { 74 "featureType": "road.arterial", 75 "elementType": "labels.icon", 76 "stylers": [ 77 { 78 "visibility": "off" 79 } 80 ] 81 }, 82 { 83 "featureType": "transit", 84 "elementType": "all", 85 "stylers": [ 86 { 87 "visibility": "off" 88 } 89 ] 90 }, 91 { 92 "featureType": "water", 93 "elementType": "all", 94 "stylers": [ 95 { 96 "color": "#c7c7c7" 97 }, 98 { 99 "visibility": "on" 100 } 101 ] 102 } 103 ]); 104 105 var marker = new google.maps.Marker({ 106 map: map, 107 position: results[0].geometry.location, 108 icon: $('#styles').val()+'/img/marker-parkhotel.png' 109 }); 110 marker.info = new google.maps.InfoWindow({ 111 content: '<div style="text-align:center;"><img style="padding: 10px 0; max-width: 150px; height: auto;" src="'+$('#styles').val()+'/img/logo-mobile.svg"><br/>'+address+'</div>' 112 }); 113 114 google.maps.event.addListener(marker, 'click', function() { 115 marker.info.open(map, marker); 116 }); 117 } 118 }); 119 120 } 121 google.maps.event.addDomListener(window, 'load', initialize); 122});
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.