PageSourceSearch

https://www.transn.ch/typo3conf/ext/site_builder/Resources/Public/JavaScript/google-transit.js?1636131955

js transn.ch collected 2026-10-02 11:17:41 UTC 1,275 bytes, 49 lines download raw bytes

1// JavaScript Document
2
3function initialize() {
4
5var defaultBounds = new google.maps.LatLngBounds(
6	new google.maps.LatLng(46.9930327,6.897514)
7	);
8
9var origin_input = document.getElementById('saddr');
10var destination_input = document.getElementById('daddr');
11
12
13var options = {
14	bounds: defaultBounds,
15	componentRestrictions: {country: ['ch']}
16};
17
18
19var autocomplete_origin = new google.maps.places.Autocomplete(origin_input, options);    
20var autocomplete_destination = new google.maps.places.Autocomplete(destination_input, options);
21	
22autocomplete_origin.addListener('place_changed', function() {
23    var place = autocomplete_origin.getPlace();
24    if (!place.geometry) {
25      console.log("Returned place contains no geometry");
26      return;
27    }
28	else{
29		//console.log(place.place_id);
30		jQuery('#depplid').val(place.place_id);
31	}
32});	
33
34autocomplete_destination.addListener('place_changed', function() {
35    var place = autocomplete_destination.getPlace();
36    if (!place.geometry) {
37      console.log("Returned place contains no geometry");
38      return;
39    }
40	else{
41		//console.log(place.place_id);
42		jQuery('#arrplid').val(place.place_id);
43	}
44});	
45	
46}
47
48google.maps.event.addDomListener(window, 'load', initialize);
49

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.