PageSourceSearch

http://ufaadvokat.ru/t/v1141/images/js/map_page.js

js ufaadvokat.ru collected 2026-10-04 23:39:15 UTC 2,759 bytes, 88 lines download raw bytes

1(function() {
2
3	function coords(str) {
4		return str.split(',');
5	}
6
7	function init(options) {
8		options.center = coords(options.center);
9
10		$.each(options.data, function(key, item) {
11			item.coords = coords(item.coords);
12		});
13
14		if (options.type == 1) {
15
16			google.maps.event.addDomListener(window, 'load', function() {
17				
18				var map = new google.maps.Map(document.getElementById(options.id), {
19					zoom: parseInt(options.zoom),
20					scrollwheel: false,
21					center: new google.maps.LatLng(options.center[0], options.center[1])
22				});
23				
24				var style1 = [{"featureType":"landscape","stylers":[{"hue":"#FFA800"},{"saturation":0},{"lightness":0},{"gamma":1}]},{"featureType":"road.highway","stylers":[{"hue":"#53FF00"},{"saturation":-73},{"lightness":40},{"gamma":1}]},{"featureType":"road.arterial","stylers":[{"hue":"#FBFF00"},{"saturation":0},{"lightness":0},{"gamma":1}]},{"featureType":"road.local","stylers":[{"hue":"#00FFFD"},{"saturation":0},{"lightness":30},{"gamma":1}]},{"featureType":"water","stylers":[{"hue":"#00BFFF"},{"saturation":6},{"lightness":8},{"gamma":1}]},{"featureType":"poi","stylers":[{"hue":"#679714"},{"saturation":33.4},{"lightness":-25.4},{"gamma":1}]}];
25				
26				map.setOptions({styles: style1});
27
28				$.each(options.data, function(key, item) {
29
30					var marker = new google.maps.Marker({
31						position: new google.maps.LatLng(item.coords[0], item.coords[1]),
32						map: map,
33						title: item.name
34					});
35
36					var infowindow = new google.maps.InfoWindow({
37						content: '<div class="baloon-content">' +
38									'<h3 style="margin: 0; padding-bottom: 3px;">' + item.name + '</h3>' +
39									item.desc +
40								 '</div>'
41					});
42
43					google.maps.event.addListener(marker, 'click', function() {
44						infowindow.open(map, marker);
45					});
46
47				});
48			});
49
50		} else {
51
52			ymaps.ready(function() {
53
54				var map = new ymaps.Map(options.id, {
55					center: options.center,
56					zoom: parseInt(options.zoom),
57					behaviors: ['drag', 'rightMouseButtonMagnifier'],
58				});
59
60				map.controls.add(
61					new ymaps.control.ZoomControl()
62				);
63
64				var MyBalloonContentLayoutClass = ymaps.templateLayoutFactory.createClass(
65					'<div class="baloon-content" style="padding: 10px 20px;">' +
66						'<h3 style="margin: 0;">$[properties.name]</h3>' +
67						'$[properties.desc]' +
68					'</div>'
69				);
70
71				var myCollection = new ymaps.GeoObjectCollection();
72
73				$.each(options.data, function(key, item) {
74					myCollection.add(new ymaps.Placemark(
75						item.coords,
76						item, 
77						{balloonContentLayout: MyBalloonContentLayoutClass}
78					));
79				});
80
81				map.geoObjects.add(myCollection);
82
83			});
84		}
85	}
86
87	window.mjsMap = init;
88})();

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.