1ymaps.ready(init); 2 3 function init() { 4 if( document.getElementById("map-ege") !=null ){ 5 let center = [55.531127, 38.874756]; 6 let zoom = 14; 7 8 if( mapCenter ){ 9 center = mapCenter; 10 } 11 if( mapZoom ){ 12 zoom = mapZoom; 13 } 14 var myMap = new ymaps.Map('map-ege', { 15 center: center, 16 controls: [], 17 zoom: zoom, 18 balloonPanelMaxMapArea: 0, 19 draggable: "false", 20 }); 21 22 for( var i = 0, e = places_coordinates.length; i < e; i++ ){ 23 24 var place_coords = places_coordinates[i]; 25 var baloon_content = '<div class="c-map-window">'+ 26 '<div class="c-map-window__title">'+ 27 places_data[i][0]+ 28 '</div>'+ 29 '</div>'; 30 31 var placemark = new ymaps.Placemark(place_coords, { 32 balloonContent: "", 33 34 }, { 35 36 iconLayout: 'default#image', 37 iconImageHref: '/static/img/map-marker.svg', 38 iconImageSize: [39, 44], 39 iconImageOffset: [-20, -44], 40 hideIconOnBalloonOpen: false, 41 idx: i 42 }) 43 44 myMap.geoObjects.add(placemark); 45 46 placemark.events.add('click', function (e) { 47 var th_idx = e.get('target').options.get('idx'); 48 49 $('.partners-map-pp').removeClass('hide'); 50 $('.partners-map-pp-text').text(places_data[th_idx][0]); 51 $('.partners-map-pp-title').text(places_data[th_idx][1]); 52 $('.partners-map-pp-phone_v').text(places_data[th_idx][2]); 53 $('.egemap-link a').attr('href', places_data[th_idx][3]); 54 55 }) 56 57 placemark.events.add('click', function (e) { 58 myMap.geoObjects.each(function (geoObject) { 59 if (geoObject instanceof ymaps.Placemark) { 60 geoObject.options.set('iconImageHref', '/static/img/map-marker.svg') 61 geoObject.options.set('iconImageSize', [39, 44]) 62 geoObject.options.set('iconImageOffset', [-20, -44]) 63 } 64 }) 65 e.get('target').options.set('iconImageHref', '/static/img/map_marker_blue.svg') 66 e.get('target').options.set('iconImageSize', [63, 72]) 67 e.get('target').options.set('iconImageOffset', [-31, -72]) 68 if( $(window).outerWidth() > 1023 ){ 69 myMap.panTo(e.get('target').geometry.getCoordinates(), { useMapMargin: true }) 70 } 71 72 }) 73 74 if( i == 0 ){ 75 placemark.events.fire('click', { 76 77 }); 78 } 79 80 } 81 82 $('.partners-map-pp-cross').click(function(){ 83 $('.partners-map-pp').addClass('hide'); 84 }) 85 } 86 87 } 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.