jQuery(document).ready(function($){ymaps.ready(init);function init(){var myMap=new ymaps.Map('map',{center:[65.266083,124.225563],zoom:5},{searchControlProvider:'yandex#search'}),MyIconContentLayout=ymaps.templateLayoutFactory.createClass('<div style= "background-color: rgba(255, 255, 255, .7); border-radius: 1rem; position: absolute; max-width: 200px; white-space: nowrap; padding: 5px 10px; left: 0; z-index: 1;">$[properties.iconContent]</div>'),hideMyIconContentLayout=ymaps.templateLayoutFactory.createClass('<div></div>'),objectManager=new ymaps.ObjectManager({clusterize:!0,gridSize:20,clusterDisableClickZoom:!0});objectManager.objects.options.set('iconLayout','default#imageWithContent');objectManager.objects.options.set('iconImageHref','https://tpykt.ru/wp-content/uploads/2022/06/frame-2.svg');objectManager.objects.options.set('iconImageSize',[50,50]);objectManager.objects.options.set('iconImageOffset',[-25,-50]);objectManager.objects.options.set('iconContentOffset',[45,5]);objectManager.objects.options.set('iconContentLayout',hideMyIconContentLayout);myMap.geoObjects.add(objectManager);$.ajax({url:"/wp-json/tpykt_itcenter/geodata.json"}).done(function(data){objectManager.add(data)});function onObjectEvent(e){var objectId=e.get('objectId');if(e.get('type')=='mouseenter'){objectManager.objects.setObjectOptions(objectId,{iconImageSize:[70,70],iconImageOffset:[-35,-70],iconContentOffset:[65,10],iconContentLayout:MyIconContentLayout})}else{objectManager.objects.setObjectOptions(objectId,{iconImageSize:[50,50],iconImageOffset:[-25,-50],iconContentOffset:[45,5],iconContentLayout:hideMyIconContentLayout})}}
objectManager.objects.events.add(['mouseenter','mouseleave'],onObjectEvent);$('.w-grid-item.it_centers').mouseenter(function(){let objectId=$(this).attr('data-id');objectManager.objects.setObjectOptions(objectId,{iconImageSize:[70,70],iconImageOffset:[-35,-70],iconContentOffset:[65,10],iconContentLayout:MyIconContentLayout});var coord=objectManager.objects.getById(objectId).geometry.coordinates;myMap.panTo(coord,{delay:1500})}).mouseleave(function(){let objectId=$(this).attr('data-id');objectManager.objects.setObjectOptions(objectId,{iconImageSize:[50,50],iconImageOffset:[-25,-50],iconContentOffset:[45,5],iconContentLayout:hideMyIconContentLayout})})}});jQuery(document).ready(function($){ymaps.ready(init);function init(){var myMap=new ymaps.Map('map1',{center:[62.040335,129.749768],zoom:13},{searchControlProvider:'yandex#search'}),MyIconContentLayout=ymaps.templateLayoutFactory.createClass('<div style=" background-color: rgba(255, 255, 255, .5); border-radius: 1rem; position: absolute; max-width: 200px; white-space: nowrap; padding: 5px 10px; left: 0;">$[properties.iconContent]</div>'),hideMyIconContentLayout=ymaps.templateLayoutFactory.createClass('<div style="visibility:hidden; background-color: rgba(255, 255, 255, .5); border-radius: 1rem; position: absolute; max-width: 200px; white-space: nowrap; padding: 5px 10px; left: 0;">$[properties.iconContent]</div>'),objectManager=new ymaps.ObjectManager({clusterize:!0,gridSize:64,clusterDisableClickZoom:!0});objectManager.objects.options.set('iconLayout','default#imageWithContent');objectManager.objects.options.set('iconImageHref','https://tpykt.ru/wp-content/uploads/2022/06/frame-2.svg');objectManager.objects.options.set('iconImageSize',[50,50]);objectManager.objects.options.set('iconImageOffset',[-25,-50]);objectManager.objects.options.set('iconContentOffset',[45,5]);objectManager.objects.options.set('iconContentLayout',hideMyIconContentLayout);myMap.geoObjects.add(objectManager);$.ajax({url:"/wp-json/contact_technopark/geodata.json"}).done(function(data){objectManager.add(data)});function onObjectEvent(e){var objectId=e.get('objectId');if(e.get('type')=='mouseenter'){objectManager.objects.setObjectOptions(objectId,{iconImageSize:[70,70],iconImageOffset:[-35,-70],iconContentOffset:[65,10],iconContentLayout:MyIconContentLayout})}else{objectManager.objects.setObjectOptions(objectId,{iconImageSize:[50,50],iconImageOffset:[-25,-50],iconContentOffset:[45,5],iconContentLayout:hideMyIconContentLayout})}}
objectManager.objects.events.add(['mouseenter','mouseleave'],onObjectEvent);$('.w-grid-item.contact_technopark').mouseenter(function(){let objectId=$(this).attr('data-id');objectManager.objects.setObjectOptions(objectId,{iconImageSize:[70,70],iconImageOffset:[-35,-70],iconContentOffset:[65,10],iconContentLayout:MyIconContentLayout});var coord=objectManager.objects.getById(objectId).geometry.coordinates;myMap.panTo(coord,{delay:1500})}).mouseleave(function(){let objectId=$(this).attr('data-id');objectManager.objects.setObjectOptions(objectId,{iconImageSize:[50,50],iconImageOffset:[-25,-50],iconContentOffset:[45,5],iconContentLayout:hideMyIconContentLayout})})}})