✨ MAJOR FEATURES: • Auto-zoom intelligence với smart bounds fitting • Enhanced 3D GPS markers với pulsing effects • Professional route display với 6-layer rendering • Status-based parking icons với availability indicators • Production-ready build optimizations 🗺️ AUTO-ZOOM FEATURES: • Smart bounds fitting cho GPS + selected parking • Adaptive padding (50px) cho visual balance • Max zoom control (level 16) để tránh quá gần • Dynamic centering khi không có selection 🎨 ENHANCED VISUALS: • 3D GPS marker với multi-layer pulse effects • Advanced parking icons với status colors • Selection highlighting với animation • Dimming system cho non-selected items 🛣️ ROUTE SYSTEM: • OpenRouteService API integration • Multi-layer route rendering (glow, shadow, main, animated) • Real-time distance & duration calculation • Visual route info trong popup 📱 PRODUCTION READY: • SSR safe với dynamic imports • Build errors resolved • Global deployment via Vercel • Optimized performance 🌍 DEPLOYMENT: • Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app • Bundle size: 22.8 kB optimized • Global CDN distribution • HTTPS enabled 💾 VERSION CONTROL: • MapView-v2.0.tsx backup created • MAPVIEW_VERSIONS.md documentation • Full version history tracking
90 lines
2.8 KiB
Bash
Executable File
90 lines
2.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Download OSM data for Vietnam/Southeast Asia
|
|
# This script downloads OpenStreetMap data files for use with Valhalla
|
|
|
|
set -e
|
|
|
|
# Create custom_files directory if it doesn't exist
|
|
mkdir -p custom_files
|
|
|
|
echo "🗺️ Downloading OpenStreetMap data for Vietnam..."
|
|
|
|
# Download Vietnam OSM data from Geofabrik
|
|
VIETNAM_URL="https://download.geofabrik.de/asia/vietnam-latest.osm.pbf"
|
|
VIETNAM_FILE="custom_files/vietnam-latest.osm.pbf"
|
|
|
|
if [ ! -f "$VIETNAM_FILE" ]; then
|
|
echo "📥 Downloading Vietnam OSM data..."
|
|
wget -O "$VIETNAM_FILE" "$VIETNAM_URL"
|
|
echo "✅ Downloaded Vietnam OSM data"
|
|
else
|
|
echo "📁 Vietnam OSM data already exists"
|
|
fi
|
|
|
|
# Optional: Download other regional data
|
|
read -p "Do you want to download additional regional data? (y/N): " download_more
|
|
|
|
if [[ $download_more =~ ^[Yy]$ ]]; then
|
|
echo "Available regions:"
|
|
echo "1. Southeast Asia (larger file, ~2GB)"
|
|
echo "2. Cambodia"
|
|
echo "3. Laos"
|
|
echo "4. Thailand"
|
|
echo "5. Myanmar"
|
|
|
|
read -p "Select region (1-5): " region_choice
|
|
|
|
case $region_choice in
|
|
1)
|
|
REGION_URL="https://download.geofabrik.de/asia/southeast-asia-latest.osm.pbf"
|
|
REGION_FILE="custom_files/southeast-asia-latest.osm.pbf"
|
|
;;
|
|
2)
|
|
REGION_URL="https://download.geofabrik.de/asia/cambodia-latest.osm.pbf"
|
|
REGION_FILE="custom_files/cambodia-latest.osm.pbf"
|
|
;;
|
|
3)
|
|
REGION_URL="https://download.geofabrik.de/asia/laos-latest.osm.pbf"
|
|
REGION_FILE="custom_files/laos-latest.osm.pbf"
|
|
;;
|
|
4)
|
|
REGION_URL="https://download.geofabrik.de/asia/thailand-latest.osm.pbf"
|
|
REGION_FILE="custom_files/thailand-latest.osm.pbf"
|
|
;;
|
|
5)
|
|
REGION_URL="https://download.geofabrik.de/asia/myanmar-latest.osm.pbf"
|
|
REGION_FILE="custom_files/myanmar-latest.osm.pbf"
|
|
;;
|
|
*)
|
|
echo "Invalid selection"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
if [ ! -f "$REGION_FILE" ]; then
|
|
echo "📥 Downloading additional regional data..."
|
|
wget -O "$REGION_FILE" "$REGION_URL"
|
|
echo "✅ Downloaded additional regional data"
|
|
else
|
|
echo "📁 Regional data already exists"
|
|
fi
|
|
fi
|
|
|
|
echo ""
|
|
echo "🎉 OSM data download complete!"
|
|
echo "📁 Files saved to: custom_files/"
|
|
ls -lh custom_files/
|
|
|
|
echo ""
|
|
echo "🚀 Next steps:"
|
|
echo "1. Run: docker-compose up -d valhalla"
|
|
echo "2. Wait for data processing to complete (may take 10-30 minutes)"
|
|
echo "3. Test: curl http://localhost:8002/status"
|
|
|
|
echo ""
|
|
echo "💡 Tips:"
|
|
echo "- Larger OSM files take longer to process but provide better coverage"
|
|
echo "- Vietnam data (~100MB) is sufficient for most Vietnamese locations"
|
|
echo "- Southeast Asia data (~2GB) covers the entire region"
|