PageSourceSearch

https://www.doctor03.ru/local/components/smclinic/page.builder/js/b-addresses.js?17171229462333

js doctor03.ru collected 2026-10-08 11:29:46 UTC 2,333 bytes, 54 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function(){
2    window.ymap.init(
3        [
4            [
5                '#map',
6                function(ymap){
7                    let myCol = new ymaps.GeoObjectCollection();
8
9                    for(var i = 0; i < mapPoints.length; i++){
10
11                        let pm = new ymaps.Placemark(
12                            mapPoints[i].coords,
13                            mapPoints[i].options[0],
14                            mapPoints[i].options[1]
15                        );
16
17                        myCol.add(pm);
18                    }
19
20                    ymap.controls.remove('searchControl');
21                    ymap.controls.remove('trafficControl');
22                    ymap.controls.remove('typeSelector');
23                    ymap.controls.remove('fullscreenControl');
24                    ymap.controls.remove('rulerControl');
25                    ymap.controls.remove('geolocationControl');
26                    ymap.behaviors.disable('scrollZoom');
27
28                    ymap.geoObjects.add(myCol);
29
30                    ymap.setBounds(myCol.getBounds());
31                    //ymap.setZoom(15);
32                    let items = document.querySelectorAll('.b-addresses__button');
33                    items.forEach((el) => {
34                        el.addEventListener('click', (e) => {
35                            let id = e.target.dataset.id;
36                            ymaps
37                                .geoQuery(ymap.geoObjects)
38                                .each(function(pm) {
39                                    if(~id.indexOf(pm.properties.get('id'))){
40                                        pm.options.set('visible', true);
41                                    } else {
42                                        pm.options.set('visible', false);
43                                    }
44                                });
45                            ymap.setBounds(ymaps
46                                .geoQuery(ymap.geoObjects)
47                                .search('options.visible = true').getBounds(), {checkZoomRange: true, zoomMargin:100}).then(function(){ if(ymap.getZoom() > 15) ymap.setZoom(15);});
48                        })
49                    })
50                }
51            ]
52        ]
53    );
54})

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.