Skip to content

Commit

Permalink
Revert "chore: update layer name of features.pmtiles style"
Browse files Browse the repository at this point in the history
This reverts commit 35b7576.
  • Loading branch information
claustres committed Nov 4, 2024
1 parent 1549901 commit dbc5b09
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file added OpenMapTiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion demo/leaflet-geojson.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function run () {
function update() {
const selectedGeometry = document.getElementById('selectedGeometry').value
// Style and filter according to displayed geometry type
layer.paintRules = (selectedGeometry !== 'None' ? pmtiles.leaflet_style(Styles[selectedGeometry], 'layer').paintRules : [])
layer.paintRules = (selectedGeometry !== 'None' ? pmtiles.leaflet_style(Styles[selectedGeometry], 'features').paintRules : [])
layer.paintRules = layer.paintRules.map(rule => {
const originalFilter = rule.filter
return Object.assign({}, rule, { filter: (z,f) => (selectedGeometry !== 'Any' ? selectedGeometry === pmtiles.getGeometryType(f) : originalFilter ? originalFilter(z,f) : true) })
Expand Down

0 comments on commit dbc5b09

Please sign in to comment.