1(function($){ 2 Drupal.behaviors.locationmap = { 3 attach: function(context, settings) { 4 var target_point = new google.maps.LatLng(Drupal.settings.locationmap.lat, Drupal.settings.locationmap.lng); 5 6 var mapOptions = { 7 zoom: parseInt(Drupal.settings.locationmap.zoom), 8 center: target_point, 9 mapTypeId: eval(Drupal.settings.locationmap.type), 10 mapTypeControl: true, 11 scrollwheel: Boolean(Drupal.settings.locationmap.scroll) 12 }; 13 14 var map = new google.maps.Map(document.getElementById("locationmap_map"), mapOptions); 15 16 var markerOptions = { 17 position: target_point, 18 draggable: Drupal.settings.locationmap.admin, 19 map: map 20 }; 21 22 var marker = new google.maps.Marker(markerOptions); 23 24 var infowindow = new google.maps.InfoWindow({ 25 content: Drupal.settings.locationmap.info 26 }); 27 28 google.maps.event.addListener(marker, 'click', function() { 29 infowindow.open(map, marker); 30 }); 31 if (Drupal.settings.locationmap.popinfo) { 32 infowindow.open(map, marker); 33 } 34 35 // Allow fine tuning of the marker position in admin mode. 36 if (Drupal.settings.locationmap.admin) { 37 38 google.maps.event.addListener(marker, 'dragend', function(event) { 39 $('#edit-locationmap-lat').val(event.latLng.lat()); 40 $('#edit-locationmap-lng').val(event.latLng.lng()); 41 }); 42 43 google.maps.event.addListener(map, 'zoom_changed', function(event) { 44 $('#edit-locationmap-zoom').val(map.getZoom()); 45 }); 46 } 47 } 48 }; 49})(jQuery);
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.