PageSourceSearch

https://www.tophotel.cz/scripts/maps.js?t=index&c=hotel_a

js tophotel.cz collected 2026-10-03 19:10:56 UTC 6,551 bytes, 231 lines download raw bytes

1<!-- <_php_global_featured_dimensions -->
2<!-- _php_global_featured_dimensions> -->
3var infowindow;
4var directionDisplay;
5var directionsService = new google.maps.DirectionsService();
6var map;
7var panorama;
8var _myLatlng;
9var _SVLatlng;
10var _SVheading;
11var _SVzoom;
12var _SVpitch;
13var markersArray = [];
14
15function initialize(hotel_zoom, hotel_lat, hotel_lon, hotel_logo, hotel_name, hotel_address, hotel_zip_code, hotel_city, hotel_country, hotel_phone, hotel_email, qr_image, qr_sentence, StreetViewHide, StreetViewShow, SVheading, SVpitch, SVzoom, SVlat, SVlon, url_segment, pw, ph)
16{
17	var pointerHotel = '/files/img'+url_segment+'/map-pointer-hotel.png';
18	var bookassist_styles = [{
19		featureType: "poi",
20		stylers: [
21			{ visibility: "off" }	
22		]
23	},{
24		featureType: "poi.park",
25		stylers: [
26			{ visibility: "on" }
27		]   
28	},{
29		featureType: "poi.medical",
30		stylers: [
31			{ visibility: "on" }
32		]   
33	},{
34		featureType: "poi.sports_complex",
35		stylers: [
36			{ visibility: "on" }
37		]   
38	},
39	{
40		featureType: "water",
41		stylers: [
42			{ "visibility": "on" }
43		]
44	},
45	{
46		featureType: "administrative",
47		stylers: [
48			{ "visibility": "on" }
49		]
50	}
51	];
52	
53	var DirectionsMarkerOption = {
54		clickable: false, 
55		visible: false
56	};
57
58	var myLatlng = new google.maps.LatLng(hotel_lat,hotel_lon);
59	var SVLatlng = new google.maps.LatLng(SVlat,SVlon);
60	directionsDisplay = new google.maps.DirectionsRenderer({ markerOptions: DirectionsMarkerOption });
61	var myOptions = {
62		zoom: hotel_zoom,
63		center: myLatlng,
64		mapTypeId: google.maps.MapTypeId.ROADMAP,
65		zoomControl: true,
66		zoomControlOptions: {
67			style: google.maps.ZoomControlStyle.SMALL,
68			position: google.maps.ControlPosition.RIGHT_CENTER
69		},
70		panControl: false,
71		mapTypeControl: false,
72		// mapTypeControlOptions:
73		// {
74		//	position: google.maps.ControlPosition.RIGHT_CENTER
75		// },
76		scrollwheel: false,
77		streetViewControl: false
78	}
79	map = new google.maps.Map(document.getElementById("sb-map"), myOptions);
80	map.setOptions({styles: bookassist_styles});
81	directionsDisplay.setMap(map);
82	directionsDisplay.setPanel(document.getElementById("sb-directions-panel"));
83
84	//var bookassistMapType = new google.maps.StyledMapType(bookassist_styles);
85	//map.mapTypes.set('bestfromgoogle', bookassistMapType);
86	//map.setMapTypeId('bestfromgoogle');
87
88	//var image = pointerHotel;
89	var image = new google.maps.MarkerImage(pointerHotel, null, null, null, new google.maps.Size(pw,ph));
90	var content = '<table cellspacing="20" cellpadding="0" width="300" class="sb-maps-data"><tr><td><img src="' + pointerHotel + '" alt="' + hotel_name + '" align="left" width="40" height="40" /></td><td><h4>' + hotel_name + '</h4>'+hotel_address+'<br>'+hotel_city+' '+hotel_zip_code+'<br />Tel.: '+hotel_phone+'<br /><a href="mailto:'+hotel_email+'">'+hotel_email+'</a><br /></td></tr></table>';
91	var marker = createHotelMarker(hotel_name, myLatlng, hotel_lat, hotel_lon, image, content, qr_image, SVheading, SVzoom, SVpitch, SVLatlng);
92	//alert(marker);
93
94	// We get the map's default panorama and set up some defaults.
95	// Note that we don't yet set it visible.
96	panorama = map.getStreetView();
97	panorama.setPosition(SVLatlng);
98	panorama.setPov({
99		heading: SVheading,
100		zoom: SVzoom,
101		pitch: SVpitch
102	});
103	_SVLatlng = SVLatlng;
104	_myLatlng = myLatlng;
105	_SVheading = SVheading;
106	_SVzoom = SVzoom;
107	_SVpitch = SVpitch;
108	panorama.setOptions({
109		addressControlOptions: {
110			position: google.maps.ControlPosition.LEFT_CENTER
111		},
112		linksControl: false,
113		panControl: false,
114		zoomControlOptions: {
115			position: google.maps.ControlPosition.RIGHT_CENTER,
116			style: google.maps.ZoomControlStyle.SMALL
117		},
118		enableCloseButton: false
119	});
120	google.maps.event.addDomListener(window, 'resize', function() {map.setCenter(myLatlng);});
121}
122
123function toggleStreetView()
124{
125	var toggle = panorama.getVisible();
126	if (toggle == false)
127	{
128		panorama.setPosition(_SVLatlng);
129		panorama.setPov({
130			heading: _SVheading,
131			zoom: _SVzoom,
132			pitch: _SVpitch
133		});
134		panorama.setVisible(true);
135		$('.fa-street-view').parent().html('<i class="fa fa-fw fa-street-view text-primary"></i>
135' + HideStreetView);
136	}
137	else
138	{
139		panorama.setVisible(false);
140		$('.fa-street-view').parent().html('<i class="fa fa-fw fa-street-view text-primary"></i>' + ShowStreetView);
141	}
142	$.scrollTo('#sb-top', 800);
143}
144
145function createHotelMarker(name, myLatlng, hotel_lat, hotel_lon, icon, content, qr_image, SVheading, SVzoom, SVpitch, SVLatlng)
146{
147	var marker0 = new google.maps.Marker({position: myLatlng, map: map, icon: icon});
148	//Click en el icono del hotel desde DENTRO del mapa
149	google.maps.event.addListener(marker0, "click", function()
150	{
151		if (infowindow) infowindow.close();
152		infowindow = new google.maps.InfoWindow({content: content});
153		infowindow.open(map, marker0);
154	});
155	}
156
157function getRoute(d, h, m, l)
158{
159	//alert(d +'\n'+ h +'\n'+ m +'\n'+ l);
160	var start = d;
161	var end = h;
162	var language = l;
163	//alert (start);
164
165	if(m == "w")
166	{
167		travelM = google.maps.DirectionsTravelMode.WALKING
168	}
169	else if(m=="d")
170	{
171		travelM = google.maps.DirectionsTravelMode.DRIVING
172	} else {
173		travelM = google.maps.DirectionsTravelMode.TRANSIT
174	}
175	
176	var request = {
177		origin: start, 
178		destination: end,
179		travelMode: travelM,
180		language: language
181	};
182	
183	directionsService.route(request, function(response, status)
184	{
185		if (status == google.maps.DirectionsStatus.OK)
186		{
187			directionsDisplay.setDirections(response);
188			
189			window.guardaRoute = {d:d,h:h,m:m,l:l};
190			$('#sb-map-icons-route').show();
191			
192			panorama.setVisible(false);
193			$('.fa-street-view').parent().html('<i class="fa fa-fw fa-street-view text-primary"></i>' + ShowStreetView);
194
195			setTimeout(function(){
196				$.scrollTo('#sb-top', 800);
197				defineDirectionsEvents();
198			}, 500);
199		}
200		else
201		{
202			alert("\nERROR:\nPlease, specify correct origin and destination points.\n")
203		}
204	});
205	panorama.setVisible(false);
206}
207
208function hideStreetView(){
209	panorama.setVisible(false);
210	$('.fa-street-view').parent().html('<i class="fa fa-fw fa-street-view text-primary"></i>' + ShowStreetView);
211}
212
213function cambiaModo(mode)
214{
215	var opciones = window.guardaRoute;
216	//alert(opciones);
217	getRoute(opciones.d,opciones.h,mode,opciones.l);	
218}
219
220function defineDirectionsEvents(){
221	$("#sb-directions-panel td").click(function(){
222		hideStreetView();
223		$.scrollTo('#sb-top', 500);
224	});
225}
226
227function inprimeMapa()
228{
229	var opciones = window.guardaRoute;
230	void(window.open('http://maps.google.com/maps?f=d&hl='+opciones.l+'&saddr='+opciones.d+'&daddr='+opciones.h+'&om=1&pw=2&dirflg='+opciones.m,'width=800,height=600,scrollbars=yes'));
231}

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.