Skip to content
Snippets Groups Projects
Commit 16cb9542 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix: change map default layers with osm_grandlyon

parent c0c91727
No related branches found
No related tags found
1 merge request!11Recette
......@@ -113,10 +113,25 @@ export class MapComponent implements OnChanges {
width: 256,
height: 256,
};
const carteLayer = tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 20,
// Init WMS service with param from data.grandlyon.com
const carteLayer = new TileLayer.WMS('https://openstreetmap.data.grandlyon.com/wms', {
crs: CRS.EPSG3857,
transparent: true,
format: 'image/png',
attribution: 'Map data © OpenStreetMap contributors',
version: '1.3.0',
maxZoom: 20,
});
carteLayer.wmsParams = {
format: 'image/png',
transparent: true,
version: '1.3.0',
layers: 'osm_grandlyon',
service: 'WMS',
request: 'GetMap',
width: 256,
height: 256,
};
// Center is set on townhall
// Zoom is blocked on 11 to prevent people to zoom out from metropole
this.mapOptions = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment