1var my_google_map = {}; 2var my_google_geo = {}; 3function googlemap_init(key, id_name, addr_name) { 4 var latlng = new google.maps.LatLng(41, 133); 5 var opts = { 6 zoom: 15, 7 mapTypeId: google.maps.MapTypeId.ROADMAP, 8 center: latlng 9 }; 10 my_google_map[key] = new google.maps.Map(document.getElementById(id_name), opts); 11 12 my_google_geo[key] = new google.maps.Geocoder(); 13 var req = { 14 address: addr_name 15 }; 16 my_google_geo[key].geocode(req, geoResultCallback(key)); 17} 18 19 20function geoResultCallback(key) { 21 return function(result, status) { 22 if (status != google.maps.GeocoderStatus.OK) { 23 // alert(status); 24 return; 25 } 26 var latlng = result[0].geometry.location; 27 my_google_map[key].setCenter(latlng); 28 var marker = new google.maps.Marker({position: latlng, map: my_google_map[key], title: latlng.toString(), draggable: true}); 29 google.maps.event.addListener(marker, 'dragend', function(event) { 30 marker.setTitle(event.latLng.toString()); 31 }); 32 } 33}
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.