PageSourceSearch

https://di-center.ru/local/templates/dicenter/assets/js/map.js?17600724681788

js di-center.ru collected 2026-10-04 00:14:08 UTC 1,788 bytes, 62 lines download raw bytes

1var myMap;
2$(document).ready(function() {
3	$('.contacts-list').delegate('.contacts-list__item', 'click', function() {
4		var coordinates = $('[data-clinic][data-id="' + $(this).data('id') + '"]').data("coords");
5		myMap.setCenter(coordinates.split(','), 13, {duration: 300});
6		//myMap.panTo(coordinates.split(','));
7		if ($(window).width() < 769 && $("#map").length) {
8			$('html, body').animate({
9				scrollTop: $("#map").offset().top
10			}, 500);
11		}
12	});
13
14	$('.contacts-header__back').click(function() {
15		$('.contacts-panel__nav').removeClass('hidden');
16		$('.contacts-panel__content').removeClass('active').find('.contacts-details__item.active').removeClass('active');
17		$(window).trigger('resize');
18	});
19
20	var contactsItem = function(that) {
21		var itemIndex = $(that).index();
22		$('.contacts-panel__nav').addClass('hidden');
23		$('.contacts-panel__content').addClass('active').find('.contacts-details__item').eq(itemIndex).addClass('active');
24		$(window).trigger('resize');
25	};
26
27	if ($('.js-map').length) {
28		var MapCenter = [51.540041, 46.004441],
29			$getCenter = $('input[name="center"]');
30		if ($getCenter.length) {
31			$getCenter = $getCenter.val().split(',');
32			if ($getCenter.length == 2) {
33				MapCenter = $getCenter;
34			}
35		}
36		ymaps.ready(init);
37	}
38
39	function init() {
40		myMap = new ymaps.Map("map", {
41			center: MapCenter,
42			zoom: 13,
43			controls: ['fullscreenControl', 'zoomControl'],
44		}, {
45			searchControlProvider: 'yandex#search'
46		});
47		$('[data-clinic]').each(function() {
48			var $el = $(this)[0].attributes;
49
50			let coords = $el["data-coords"].value.split(',');
51			myMap.geoObjects.add(new ymaps.GeoObject({
52				geometry: {
53					type: "Point",
54					coordinates: coords,
55				}
56			}, {
57				preset: 'islands#blueStretchyIcon',
58				draggable: true
59			}));
60		});
61	}
62});

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.