1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | var map_1_map, map_2_map, map_1_polygon, map_2_polygon;
// Первая карта function map_1_add_polygon() { map_1_polygon = new ymaps.Polygon([], {}, { editorDrawingCursor: 'crosshair', editorMaxPoints: 10, fillColor: '#077ff7', fillOpacity: 0.5, strokeColor: '#077ff7', strokeOpacity: 0.9, strokeWidth: 1 }); map_1.geoObjects.add(map_1_polygon); map_1_polygon.editor.startDrawing(); } function map_1_init() { map_1 = new ymaps.Map('map_1', { controls: ['zoomControl', 'searchControl', 'typeSelector', 'fullscreenControl'], center: [55.7522200,37.6155600], zoom: 16 }); map_1_add_polygon(); } ymaps.ready(map_1_init);
// Вторая карта function map_2_add_polygon() { map_2_polygon = new ymaps.Polygon([], {}, { editorDrawingCursor: 'crosshair', editorMaxPoints: 10, fillColor: '#077ff7', fillOpacity: 0.5, strokeColor: '#077ff7', strokeOpacity: 0.9, strokeWidth: 1 }); map_2.geoObjects.add(map_2_polygon); map_2_polygon.editor.startDrawing(); } function map_2_init() { map_2 = new ymaps.Map('map_2', { controls: ['zoomControl', 'searchControl', 'typeSelector', 'fullscreenControl'], center: [55.7522200,37.6155600], zoom: 16 }); map_2_add_polygon(); } ymaps.ready(map_2_init); |