Skip to content

Commit

Permalink
Merge pull request #68 from etalab/vector-tiles
Browse files Browse the repository at this point in the history
Passage aux tuiles vectorielles Etalab (dérivées d'OpenMapTiles)
  • Loading branch information
jdesboeufs committed May 16, 2019
2 parents 08b5a74 + 4e09e16 commit 3a08cef
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions static/js/index.js
Expand Up @@ -61,29 +61,7 @@ var styles = {
}
]
},
vector: {
"version": 8,
"glyphs": "https://openmaptiles.geo.data.gouv.fr/fonts/{fontstack}/{range}.pbf",
"sources": {
"raster-tiles": {
"type": "raster",
"tiles": [
"https://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",
"https://b.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",
"https://c.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"
],
"tileSize": 256,
"attribution": 'donn&eacute;es &copy; <a href="//osm.org/copyright">OpenStreetMap</a>/ODbL - rendu <a href="//openstreetmap.fr">OSM France</a>'
}
},
"layers": [
{
"id": "simple-tiles",
"type": "raster",
"source": "raster-tiles"
}
]
}
vector: 'https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json'
}

var nom_fichier_section = null;
Expand Down Expand Up @@ -202,7 +180,7 @@ var unmutatedParcellesLayer = {
type: 'fill',
paint: {
'fill-color': unmutatedColor,
'fill-opacity': 0.2
'fill-opacity': 0.05
}
}
var unmutatedParcellesContoursLayer = {
Expand Down Expand Up @@ -268,7 +246,7 @@ function resetSourcesData(sources) {

function fit(geojson) {
var bbox = turf.bbox(geojson)
map.fitBounds(bbox, { padding: 20, animate: false })
map.fitBounds(bbox, { padding: 20, animate: true })
}

function onMouseMove(event, source) {
Expand Down

0 comments on commit 3a08cef

Please sign in to comment.