{ "title": "Схема генератора маршрутов MicroTrip.ru", "description": "Логика вопросов и рекомендаций для создания персонализированных маршрутов", "version": "1.0.0", "questions": [ { "id": "interests", "question": "Что вас больше привлекает?", "type": "single_choice", "options": [ { "id": "history", "label": "История и культура", "icon": "🏛️", "description": "Кремли, музеи, усадьбы" }, { "id": "nature", "label": "Природа и активность", "icon": "🌲", "description": "Заповедники, тропы, реки" }, { "id": "gastronomy", "label": "Гастрономия", "icon": "🍽️", "description": "Местная кухня, фермы, рынки" }, { "id": "relaxation", "label": "Уединение и отдых", "icon": "🧘", "description": "Спокойные места, виды, медитация" } ] }, { "id": "duration", "question": "Сколько времени у вас есть?", "type": "single_choice", "options": [ { "id": "1_day", "label": "1 день", "icon": "☀️", "description": "Выходной день" }, { "id": "2_days", "label": "2 дня", "icon": "🌅", "description": "Выходные" }, { "id": "3_days", "label": "3 дня", "icon": "🌟", "description": "Длинные выходные" } ] }, { "id": "budget", "question": "Какой у вас бюджет?", "type": "single_choice", "options": [ { "id": "budget", "label": "Эконом", "icon": "💰", "description": "До 3000₽ на человека" }, { "id": "medium", "label": "Средний", "icon": "💳", "description": "3000-8000₽ на человека" }, { "id": "premium", "label": "Премиум", "icon": "💎", "description": "От 8000₽ на человека" } ] }, { "id": "company", "question": "Кто поедет с вами?", "type": "single_choice", "options": [ { "id": "solo", "label": "Один", "icon": "👤", "description": "Сольное путешествие" }, { "id": "couple", "label": "Пара", "icon": "💑", "description": "Романтическое путешествие" }, { "id": "family", "label": "Семья", "icon": "👨👩👧👦", "description": "С детьми" }, { "id": "friends", "label": "Друзья", "icon": "👥", "description": "Компания друзей" } ] }, { "id": "transport", "question": "Как планируете добираться?", "type": "single_choice", "options": [ { "id": "car", "label": "На машине", "icon": "🚗", "description": "Свобода передвижения" }, { "id": "train", "label": "На электричке", "icon": "🚆", "description": "Экологично и быстро" }, { "id": "bus", "label": "На автобусе", "icon": "🚌", "description": "Экономично" } ] } ], "destinations": { "moscow_region": { "name": "Московская область", "color": "#2E5E4E", "locations": [ { "id": "zaraysk", "name": "Зарайск", "description": "Древний город с кремлем XVI века", "highlights": ["Зарайский кремль", "Музей-заповедник", "Бизон 22 000 лет"], "travel_time": "2.5 часа", "best_for": ["history", "culture", "family"], "budget_range": "budget", "duration": ["1_day", "2_days"], "transport": ["car", "train"], "image": "zaraysk-kremlin.jpg", "coordinates": {"lat": 54.7589, "lng": 38.8844} }, { "id": "prioksko_terrasny", "name": "Приокско-Террасный заповедник", "description": "Заповедник с зубрами и уникальной флорой", "highlights": ["Зубры", "Экологические тропы", "Природа"], "travel_time": "2 часа", "best_for": ["nature", "family", "relaxation"], "budget_range": "budget", "duration": ["1_day"], "transport": ["car"], "image": "prioksko-terrasny.jpg", "coordinates": {"lat": 54.9167, "lng": 37.5667} }, { "id": "polenovo", "name": "Поленово", "description": "Усадьба художника Василия Поленова", "highlights": ["Музей-усадьба", "Парк", "Река Ока"], "travel_time": "3 часа", "best_for": ["history", "culture", "relaxation"], "budget_range": "medium", "duration": ["1_day", "2_days"], "transport": ["car", "train"], "image": "polenovo.jpg", "coordinates": {"lat": 54.7500, "lng": 37.2500} } ] }, "tula_region": { "name": "Тульская область", "color": "#4A5D23", "locations": [ { "id": "tula", "name": "Тула", "description": "Город оружейников и самоваров", "highlights": ["Тульский кремль", "Музей оружия", "Музей самоваров"], "travel_time": "3 часа", "best_for": ["history", "culture", "family"], "budget_range": "budget", "duration": ["1_day", "2_days"], "transport": ["car", "train"], "image": "tula-kremlin.jpg", "coordinates": {"lat": 54.1961, "lng": 37.6182} } ] }, "kaluga_region": { "name": "Калужская область", "color": "#7FC7D4", "locations": [ { "id": "kaluga", "name": "Калуга", "description": "Колыбель космонавтики", "highlights": ["Музей космонавтики", "Старый город", "Парки"], "travel_time": "3.5 часа", "best_for": ["history", "culture", "family"], "budget_range": "medium", "duration": ["2_days", "3_days"], "transport": ["car", "train"], "image": "kaluga-cosmos.jpg", "coordinates": {"lat": 54.5293, "lng": 36.2754} } ] } }, "route_templates": { "history_1_day_budget": { "name": "Исторический день", "description": "Погружение в историю за один день", "destinations": ["zaraysk"], "schedule": [ {"time": "09:00", "activity": "Выезд из Москвы"}, {"time": "11:30", "activity": "Прибытие в Зарайск"}, {"time": "12:00", "activity": "Экскурсия по кремлю"}, {"time": "14:00", "activity": "Обед в местном кафе"}, {"time": "15:00", "activity": "Музей-заповедник"}, {"time": "17:00", "activity": "Прогулка по городу"}, {"time": "19:00", "activity": "Возвращение в Москву"} ], "tips": [ "Билеты в кремль лучше заказать заранее", "В музее есть интерактивные экспонаты для детей", "Фотографировать можно везде, кроме некоторых залов" ] }, "nature_1_day_budget": { "name": "Природный побег", "description": "День наедине с природой", "destinations": ["prioksko_terrasny"], "schedule": [ {"time": "08:00", "activity": "Выезд из Москвы"}, {"time": "10:00", "activity": "Прибытие в заповедник"}, {"time": "10:30", "activity": "Экскурсия по заповеднику"}, {"time": "12:30", "activity": "Пикник на природе"}, {"time": "14:00", "activity": "Экологическая тропа"}, {"time": "16:00", "activity": "Наблюдение за зубрами"}, {"time": "18:00", "activity": "Возвращение в Москву"} ], "tips": [ "Возьмите удобную обувь и одежду", "Пикник можно организовать в специальных местах", "Лучшее время для наблюдения за зубрами - утро" ] } }, "scoring": { "weights": { "interests": 0.3, "duration": 0.2, "budget": 0.2, "company": 0.15, "transport": 0.15 }, "threshold": 0.7 } } /** * Интерактивная карта ЦФО для MicroTrip.ru * Использует Яндекс.Карты API с кастомными стилями и анимациями */ class InteractiveMap { constructor(containerId, options = {}) { this.containerId = containerId; this.options = { center: [54.8, 37.6], // Центр ЦФО zoom: 7, ...options }; this.map = null; this.regions = {}; this.markers = []; this.activeRegion = null; this.init(); } async init() { try { // Загружаем Яндекс.Карты API await this.loadYandexMaps(); // Создаем карту this.createMap(); // Добавляем регионы this.addRegions(); // Добавляем локации this.addLocations(); // Инициализируем события this.bindEvents(); } catch (error) { console.error('Ошибка инициализации карты:', error); } } async loadYandexMaps() { return new Promise((resolve, reject) => { if (window.ymaps) { resolve(); return; } const script = document.createElement('script'); script.src = 'https://api-maps.yandex.ru/2.1/?apikey=YOUR_API_KEY&lang=ru_RU'; script.onload = () => resolve(); script.onerror = () => reject(new Error('Не удалось загрузить Яндекс.Карты')); document.head.appendChild(script); }); } createMap() { this.map = new ymaps.Map(this.containerId, { center: this.options.center, zoom: this.options.zoom, controls: ['zoomControl', 'fullscreenControl'], behaviors: ['drag', 'scrollZoom', 'multiTouch'] }); // Кастомные стили карты this.map.setType('yandex#map'); // Добавляем кастомные стили для природного вида const customStyle = { version: '1.0', features: { all: { stylers: { saturation: -0.3, lightness: 0.1 } }, water: { stylers: { color: '#7FC7D4' } }, green: { stylers: { color: '#2E5E4E' } } } }; this.map.setOptions({ customMapStyle: customStyle }); } addRegions() { // Московская область this.regions.moscow = new ymaps.Polygon([ [ [56.0, 36.0], [56.0, 39.0], [55.0, 39.0], [55.0, 38.0], [54.5, 38.0], [54.5, 36.0] ] ], { hintContent: 'Московская область', fillColor: '#2E5E4E', fillOpacity: 0.3, strokeColor: '#2E5E4E', strokeWidth: 2 }); // Тульская область this.regions.tula = new ymaps.Polygon([ [ [54.0, 36.0], [54.0, 39.0], [53.0, 39.0], [53.0, 37.0], [53.5, 37.0], [53.5, 36.0] ] ], { hintContent: 'Тульская область', fillColor: '#4A5D23', fillOpacity: 0.3, strokeColor: '#4A5D23', strokeWidth: 2 }); // Калужская область this.regions.kaluga = new ymaps.Polygon([ [ [55.0, 35.0], [55.0, 37.0], [54.0, 37.0], [54.0, 36.0], [54.5, 36.0], [54.5, 35.0] ] ], { hintContent: 'Калужская область', fillColor: '#7FC7D4', fillOpacity: 0.3, strokeColor: '#7FC7D4', strokeWidth: 2 }); // Добавляем регионы на карту Object.values(this.regions).forEach(region => { this.map.geoObjects.add(region); }); } addLocations() { const locations = [ { id: 'zaraysk', name: 'Зарайск', coordinates: [54.7589, 38.8844], region: 'moscow', description: 'Древний город с кремлем XVI века', travelTime: '2.5 часа из Москвы', highlights: ['Зарайский кремль', 'Музей-заповедник', 'Бизон 22 000 лет'], image: 'zaraysk-kremlin.jpg' }, { id: 'prioksko_terrasny', name: 'Приокско-Террасный заповедник', coordinates: [54.9167, 37.5667], region: 'moscow', description: 'Заповедник с зубрами и уникальной флорой', travelTime: '2 часа из Москвы', highlights: ['Зубры', 'Экологические тропы', 'Природа'], image: 'prioksko-terrasny.jpg' }, { id: 'polenovo', name: 'Поленово', coordinates: [54.7500, 37.2500], region: 'moscow', description: 'Усадьба художника Василия Поленова', travelTime: '3 часа из Москвы', highlights: ['Музей-усадьба', 'Парк', 'Река Ока'], image: 'polenovo.jpg' }, { id: 'tula', name: 'Тула', coordinates: [54.1961, 37.6182], region: 'tula', description: 'Город оружейников и самоваров', travelTime: '3 часа из Москвы', highlights: ['Тульский кремль', 'Музей оружия', 'Музей самоваров'], image: 'tula-kremlin.jpg' }, { id: 'kaluga', name: 'Калуга', coordinates: [54.5293, 36.2754], region: 'kaluga', description: 'Колыбель космонавтики', travelTime: '3.5 часа из Москвы', highlights: ['Музей космонавтики', 'Старый город', 'Парки'], image: 'kaluga-cosmos.jpg' } ]; locations.forEach(location => { this.addLocationMarker(location); }); } addLocationMarker(location) { // Создаем кастомный маркер const marker = new ymaps.Placemark(location.coordinates, { hintContent: location.name, balloonContent: this.createBalloonContent(location) }, { // Кастомная иконка маркера iconLayout: 'default#image', iconImageHref: 'data:image/svg+xml;base64,' + btoa(` `), iconImageSize: [32, 32], iconImageOffset: [-16, -16] }); // Добавляем анимацию пульсации this.addPulseAnimation(marker); this.markers.push(marker); this.map.geoObjects.add(marker); } createBalloonContent(location) { return `
${location.description}
Серпухов – город в 80 км от Москвы, 1ч 30мин по Симферопольскому шоссе. Достопримечательности: Серпуховский историко-художественный музей ("Малая Третьяковка" с картинами Репина, Левитана), Высоцкий монастырь (XIV век, с мощами святых), Владычный монастырь (XVI век, крепость), Соборная гора (виды на реку Нару), площадь Ленина (центр с фонтанами), Приокско-Террасный заповедник (зубры, озера), собор Николая Белого (XVIII век). Советы: Посетите источник у Высоцкого монастыря, комбинируйте с Тарусой, избегайте будней для меньшей толпы. Уникально: Кремль Серпухова был разобран в 1934 году для метро. Маршрут: Музей (1 ч) → Монастыри (1.5 ч) → Заповедник (1.5 ч). Загрузите фото в галерею.
1ч 30мин из Москвы + 4 ч впечатлений