Merged in feature/MAPG-126-add-attribution-for-leaflet-map (pull request #98)
MAPG-126 add configurable attribution for Leaflet maps
This commit is contained in:
commit
81a3079a1a
@ -6,3 +6,4 @@ DB_NAME=mapguesser
|
|||||||
GOOGLE_MAPS_SERVER_API_KEY=your_google_maps_server_api_key
|
GOOGLE_MAPS_SERVER_API_KEY=your_google_maps_server_api_key
|
||||||
GOOGLE_MAPS_JS_API_KEY=your_google_maps_js_api_key
|
GOOGLE_MAPS_JS_API_KEY=your_google_maps_js_api_key
|
||||||
LEAFLET_TILESERVER_URL=a_leaflet_compatible_tileserver_url
|
LEAFLET_TILESERVER_URL=a_leaflet_compatible_tileserver_url
|
||||||
|
LEAFLET_TILESERVER_ATTRIBUTION=attribution_to_be_shown_for_tiles
|
||||||
|
@ -351,7 +351,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
MapEditor.map = L.map('map', {
|
MapEditor.map = L.map('map', {
|
||||||
attributionControl: false,
|
|
||||||
zoomControl: false
|
zoomControl: false
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -371,6 +370,7 @@
|
|||||||
var highResData = Util.getHighResData();
|
var highResData = Util.getHighResData();
|
||||||
|
|
||||||
L.tileLayer(tileUrl, {
|
L.tileLayer(tileUrl, {
|
||||||
|
attribution: tileAttribution,
|
||||||
subdomains: '1234',
|
subdomains: '1234',
|
||||||
ppi: highResData.ppi,
|
ppi: highResData.ppi,
|
||||||
tileSize: highResData.tileSize,
|
tileSize: highResData.tileSize,
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var tileUrl = '<?= $_ENV['LEAFLET_TILESERVER_URL'] ?>';
|
var tileUrl = '<?= $_ENV['LEAFLET_TILESERVER_URL'] ?>';
|
||||||
|
var tileAttribution = '<?= $_ENV['LEAFLET_TILESERVER_ATTRIBUTION'] ?>';
|
||||||
var mapId = <?= $mapId ?>;
|
var mapId = <?= $mapId ?>;
|
||||||
var mapBounds = <?= json_encode($bounds) ?>;
|
var mapBounds = <?= json_encode($bounds) ?>;
|
||||||
var places = <?= json_encode($places, JSON_FORCE_OBJECT) ?>;
|
var places = <?= json_encode($places, JSON_FORCE_OBJECT) ?>;
|
||||||
|
Loading…
Reference in New Issue
Block a user