Skip to content

Commit

Permalink
fix(map): fix label cropping and use online provided mapbox style
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetanBloch committed Aug 15, 2021
1 parent af03a65 commit 72e298d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions public/map.js
Expand Up @@ -17,13 +17,13 @@ const go = () => {
}),
attributions:
'<a href="https://geoservices.ign.fr/documentation/geoservices/vecteur-tuile.html">&copy; IGN</a>',
declutter: false,
declutter: true,
});

const fetchStyle = async () => {
let plan = await fetch(
`ign/standard.json`
// `https://wxs.ign.fr/${ignKey}/static/vectorTiles/styles/PLAN.IGN/standard.json`
// `ign/standard.json`
`https://wxs.ign.fr/${ignKey}/static/vectorTiles/styles/PLAN.IGN/standard.json`
);
const style = await plan.json();
const setStyle = async () => {
Expand All @@ -40,6 +40,8 @@ const go = () => {
const map = new ol.Map({
layers: [
new ol.layer.GeoportalWMTS({
// layer: 'GEOGRAPHICALGRIDSYSTEMS.MAPS',
// layer: 'OI.OrthoimageCoverage',
layer: 'ORTHOIMAGERY.ORTHOPHOTOS',
}),
],
Expand Down

0 comments on commit 72e298d

Please sign in to comment.