- Google Maps API에서 Leaflet + OpenStreetMap으로 전환 - 구마모토 지역 특화 타일 서버 Docker 컨테이너 추가 - PostgreSQL + PostGIS + Mapnik 스택으로 지도 타일 생성 - API 키 불필요한 오픈소스 지도 솔루션 구현 - 개발/프로덕션 환경 Docker Compose 설정 완료 - 빠른 로딩과 오프라인 지원 가능한 지도 서비스 주요 변경사항: - src/components/Map.tsx: Leaflet 기반으로 완전 재작성 - docker/map-server/: 구마모토 지역 타일 서버 구축 - docker-compose.yml, docker-compose.dev.yml: 지도 서버 연동 - package.json: leaflet, react-leaflet 의존성 추가
32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
<VirtualHost *:80>
|
|
ServerName kumamoto-tiles
|
|
DocumentRoot /var/www/html
|
|
|
|
# 타일 서빙을 위한 설정
|
|
<Directory "/var/www/html/tiles">
|
|
Options Indexes FollowSymLinks
|
|
AllowOverride None
|
|
Require all granted
|
|
|
|
# CORS 헤더 추가 (프론트엔드에서 접근 가능하도록)
|
|
Header always set Access-Control-Allow-Origin "*"
|
|
Header always set Access-Control-Allow-Methods "GET, OPTIONS"
|
|
Header always set Access-Control-Allow-Headers "Content-Type"
|
|
</Directory>
|
|
|
|
# 타일 캐싱 설정
|
|
<LocationMatch "\.(png|jpg|jpeg)$">
|
|
ExpiresActive On
|
|
ExpiresDefault "access plus 7 days"
|
|
Header append Cache-Control "public"
|
|
</LocationMatch>
|
|
|
|
# 타일 URL 리라이팅
|
|
RewriteEngine On
|
|
RewriteRule ^/tiles/([0-9]+)/([0-9]+)/([0-9]+)\.png$ /tiles/$1/$2/$3.png [L]
|
|
|
|
# 로그 설정
|
|
ErrorLog ${APACHE_LOG_DIR}/tiles_error.log
|
|
CustomLog ${APACHE_LOG_DIR}/tiles_access.log combined
|
|
</VirtualHost>
|