feat(config): Map-Parameter (Zoom, Center, etc.) in config.json ausgelagert
- minZoom, maxZoom, center, zoomOutCenter und basePath in config.json konfigurierbar gemacht - Kommentare zur Erklärung als _comment-Felder ergänzt - initializeMap.js und zoomAndCenterUtils.js angepasst, um Werte aus config.json zu lesen - OSM-Standards für Zoom-Stufen dokumentiert
This commit is contained in:
@@ -1,9 +1,32 @@
|
||||
{
|
||||
"//info": "tileSources: 'local' für offline, 'osm' für online",
|
||||
"_comment": [
|
||||
"tileSources: 'local' für offline, 'osm' für online",
|
||||
"center: Startmittelpunkt der Karte (lat, lng)",
|
||||
"zoomOutCenter: Zielkoordinaten für Herauszoomen (lat, lng)",
|
||||
"minZoom/maxZoom: erlaubte Zoomstufen pro Quelle"
|
||||
],
|
||||
"tileSources": {
|
||||
"local": "http://localhost/talas5/TileMap/mapTiles/{z}/{x}/{y}.png",
|
||||
"osm": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
"local": {
|
||||
"url": "http://localhost/talas5/TileMap/mapTiles/{z}/{x}/{y}.png",
|
||||
"_comment": "Offline-Kartenquelle (lokal)",
|
||||
"minZoom": 5,
|
||||
"maxZoom": 15
|
||||
},
|
||||
"osm": {
|
||||
"url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||
"_comment": "OpenStreetMap Online-Kartenquelle",
|
||||
"minZoom": 0,
|
||||
"maxZoom": 19
|
||||
}
|
||||
},
|
||||
"active": "osm",
|
||||
"basePath": "/talas5"
|
||||
"_comment_active": "Aktive Kartenquelle: 'local' oder 'osm'",
|
||||
"center": [53.111111, 8.4625],
|
||||
"_comment_center": "Startmittelpunkt der Karte (lat, lng)",
|
||||
|
||||
"zoomOutCenter": [51.41321407879154, 7.739617925303934],
|
||||
"_comment_zoomOutCenter": "Zielkoordinaten für Herauszoomen (lat, lng)",
|
||||
|
||||
"basePath": "/talas5",
|
||||
"_comment_basePath": "Basis-URL für API und Routing"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user