Comments (10)
It looks like the returned value is an array even if the label is defined as a single string field (i.e. without a function like to-string
).
["get", "<attributeName>"]
Moreover, there are a lot of other functions available, like length
, match
, any
, etc.
from ol-mapbox-style.
Have you tried this with latest master? #86 added support for these expressions, so your styles should work now.
from ol-mapbox-style.
That's great news.
Sadly I could not try the latest master as both npm i ol-mapbox-style@latest
and npm i
in a freshly cloned repo fails with
./util/has_lib.sh: line 31: pkg-config: command not found
on macOS.
from ol-mapbox-style.
Sorry, I meant npm i boundlessgeo/ol-mapbox-style
not npm i ol-mapbox-style@latest
.
from ol-mapbox-style.
That's the canvas
dev dependency. Try npm install --production ol-mapbox-style@beta
.
from ol-mapbox-style.
After installing pkg-config
and cairo
w/ Homebrew both install methods work just fine.
However, I'm back to square one, as I get the same error even with [email protected]
.
from ol-mapbox-style.
Can you share a validated style document that triggers the error?
from ol-mapbox-style.
Sure thing - style.json.zip.
Validates fine against mapbox-gl-style-spec
v12.0.0.
from ol-mapbox-style.
Thanks @aberenyi. I just pushed d605f0d and released v3.0.0-beta.9. The problem was that we tried to convert expressions to expressions.
Can you please verify that things work now and report back?
from ol-mapbox-style.
Works like a charm - many thanks @ahocevar!
from ol-mapbox-style.
Related Issues (20)
- Mapbox streets-v12 style trys to load invalid fonts HOT 1
- Slow performance HOT 5
- addMapboxLayer does not update mapbox-layers and render
- Add a removeMapboxLayer function HOT 1
- Optimize OpenLayers layer visibility
- olms broken with ArcGIS Basemap layers in v10.3.4 HOT 7
- [Questions] "Can only apply to VectorLayer or VectorTileLayer" HOT 2
- updateMapboxLayer ineffective HOT 3
- Use the pbf vector slice published by geoserver HOT 2
- The newly added layer cannot be queried. HOT 1
- Modify layer style
- re-applying a "symbol" style causes icon-offset to flip
- Is there a possibility to use raster source with ol-mapbox-style HOT 4
- Hillshade uses incorrect resolution when determining slope angles HOT 3
- Cannot add mapbox layer if source was not referenced before HOT 6
- Resolve a Mapbox layer to an OL Style HOT 3
- Refreshing symbols HOT 7
- Change attribution HOT 1
- VectorTile layers with source `minZoom` 0 not visible when view is zoomed out HOT 1
- Rendering very slow when there are many text labels HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ol-mapbox-style.