Comments (12)
@lukasmartinelli I think you can create a pull request against https://github.com/mapbox/mapbox-gl-style-spec. I'll take care of the formal requirements once you have submitted it. Just reference the pull request here.
from ol-mapbox-style.
@orangemug I still didn't find time to do this, but it's still high on my list.
from ol-mapbox-style.
Are you talking about e.g. https://github.com/mapbox/mapbox-gl-style-spec/blob/mb-pages/reference/v8.json? In general, I like the idea. I'm just wondering what would be the best way to implement it. Ideally, unsupported features would just be commented out, but JSON does not allow comments. On the other hand, if unsupported features are removed from the spec, it will be harder to add them back later. Do you have any thoughts on this?
from ol-mapbox-style.
Are you talking about e.g. https://github.com/mapbox/mapbox-gl-style-spec/blob/mb-pages/reference/v8.json?
Yes.
In general, I like the idea. I'm just wondering what would be the best way to implement it. Ideally, unsupported features would just be commented out, but JSON does not allow comments. On the other hand, if unsupported features are removed from the spec, it will be harder to add them back later. Do you have any thoughts on this?
Perhaps fork and add ol-mapbox-style the sdk-support
field. This way we only annotate properties that are supported and do not delete/add anything to the spec.
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
from ol-mapbox-style.
So you mean something like
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0",
"ol-mapbox-style: "1.0.0"
}
}
I agree that doing this is the cleanest way. If you agree, before creating a fork, I'd create an upstream ticket with the suggestion - maybe it can even be added there.
from ol-mapbox-style.
I agree that doing this is the cleanest way. If you agree, before creating a fork, I'd create an upstream ticket with the suggestion - maybe it can even be added there.
Good idea, try that. I think the chances are not so big but upstream would be the best way.
from ol-mapbox-style.
Hey @ahocevar did you get anywhere with this? I noticed in mapbox/mapbox-gl-js#4170 (comment) you were planning to work on it.
Also congrats on the improvements to ol-mapbox-style
I've been updating the dependency in https://github.com/maputnik/editor over the months and the map styles are starting to look really good.
from ol-mapbox-style.
Thanks for the response @ahocevar. I really want to get OpenLayers properly supported in Maputnik so anything I can do to help just shout. We've still got a little bit of work to do Maputnik side also, see https://github.com/maputnik/editor/issues?q=is%3Aissue+is%3Aopen+label%3Aopenlayers
Note: I had a look into this over the weekend, I was thinking visual regression type tests might be quite nice. Basically some GeoJSON + styling for each style rule that's in the Mapbox GL style spec.
from ol-mapbox-style.
Note: I had a look into this over the weekend, I was thinking visual regression type tests might be quite nice. Basically some GeoJSON + styling for each style rule that's in the Mapbox GL style spec.
@ahocevar I'm going to give this a go, see where I can get to. I've started over at https://maparatus.github.io/ol-mapbox-style-spec/ I'm going to build a bunch of test styles to see the visual differences between ol-mapbox-style
/maplibre-gl
later on maybe we could build this into some automated visual regression tests.
from ol-mapbox-style.
There are some interesting quirks, for example here I'd argue that ol
/ol-mapbox-style
does a better job (OpenLayers is on the right)
I'm currently unsure if the style-spec come with a caveat for OpenLayers
from ol-mapbox-style.
I've update https://maparatus.github.io/ol-mapbox-style-spec/ with a bunch more examples. Some notable differences
background
- we currently set CSS on the background<div/>
however the background should move with the camera. This isn't noticeable at the moment because we only setbackground-color
(I tried addingbackground-pattern
and noticed this).*-pitch-*
- OpenLayers doesn't have pitch so we can exclude theseraster-*
- most of these should be possible with the approach outlined here #1055
from ol-mapbox-style.
Here is how the maplibre compatibility support is going so far, results are in the ol-mapbox-style-spec repo and the spec is at ./src/spec
. That page also contains PR and issue links to this repo for various features missing/buggy.
Any feedback welcome (and encouraged)
Key for the results:
- β Not supported: not yet supported
- ποΈ Fallback:
fill-extrusion
emulates the 2D part of that spec for example - β Supported: has same behaviour as maplibre to a large enough extent to considered supported
Results:
- β source_raster_dem.redFactor
- β source_raster_dem.blueFactor
- β source_raster_dem.greenFactor
- β source_raster_dem.baseShift
- β layer.type.values.fill
- β layer.type.values.line
- β layer.type.values.symbol
- β layer.type.values.circle
- β layer.type.values.heatmap
- ποΈ layer.type.values.fill-extrusion
- β layer.type.values.raster
- β layer.type.values.hillshade
- β layer.type.values.background
- β layout_background.visibility
- β layout_fill.fill-sort-key
- β layout_fill.visibility
- β layout_circle.circle-sort-key
- β layout_circle.visibility
- β layout_heatmap.visibility
- ποΈ layout_fill-extrusion.visibility
- β layout_line.line-cap
- β layout_line.line-join
- β layout_line.line-miter-limit
- β layout_line.line-round-limit
- β layout_line.line-sort-key
- β layout_line.visibility
- β layout_symbol.symbol-placement
- β layout_symbol.symbol-spacing
- β layout_symbol.symbol-avoid-edges
- β layout_symbol.symbol-sort-key
- β layout_symbol.symbol-z-order
- β layout_symbol.icon-allow-overlap
- β layout_symbol.icon-overlap
- β layout_symbol.icon-ignore-placement
- β layout_symbol.icon-optional
- β layout_symbol.icon-rotation-alignment
- β layout_symbol.icon-size
- β layout_symbol.icon-text-fit
- β layout_symbol.icon-text-fit-padding
- β layout_symbol.icon-image
- β layout_symbol.icon-rotate
- β layout_symbol.icon-padding
- β layout_symbol.icon-keep-upright
- β layout_symbol.icon-offset
- β layout_symbol.icon-anchor
- β layout_symbol.icon-pitch-alignment
- β layout_symbol.text-pitch-alignment
- β layout_symbol.text-rotation-alignment
- β layout_symbol.text-field
- β layout_symbol.text-font
- β layout_symbol.text-size
- β layout_symbol.text-max-width
- β layout_symbol.text-line-height
- β layout_symbol.text-letter-spacing
- β layout_symbol.text-justify
- β layout_symbol.text-radial-offset
- β layout_symbol.text-variable-anchor
- β layout_symbol.text-variable-anchor-offset
- β layout_symbol.text-anchor
- β layout_symbol.text-max-angle
- β layout_symbol.text-writing-mode
- β layout_symbol.text-rotate
- β layout_symbol.text-padding
- β layout_symbol.text-keep-upright
- β layout_symbol.text-transform
- β layout_symbol.text-offset
- β layout_symbol.text-allow-overlap
- β layout_symbol.text-overlap
- β layout_symbol.text-ignore-placement
- β layout_symbol.text-optional
- β layout_symbol.visibility
- β layout_raster.visibility
- β layout_hillshade.visibility
- β light.anchor
- β light.position
- β light.color
- β light.intensity
- β terrain.source
- β terrain.exaggeration
- β paint_fill.fill-antialias
- β paint_fill.fill-opacity
- β paint_fill.fill-color
- β paint_fill.fill-outline-color
- β paint_fill.fill-translate
- β paint_fill.fill-translate-anchor
- β paint_fill.fill-pattern
- ποΈ paint_fill-extrusion.fill-extrusion-opacity
- ποΈ paint_fill-extrusion.fill-extrusion-color
- β paint_fill-extrusion.fill-extrusion-translate
- β paint_fill-extrusion.fill-extrusion-translate-anchor
- ποΈ paint_fill-extrusion.fill-extrusion-pattern
- β paint_fill-extrusion.fill-extrusion-height
- β paint_fill-extrusion.fill-extrusion-base
- β paint_fill-extrusion.fill-extrusion-vertical-gradient
- β paint_line.line-opacity
- β paint_line.line-color
- β paint_line.line-translate
- β paint_line.line-translate-anchor
- β paint_line.line-width
- β paint_line.line-gap-width
- β paint_line.line-offset
- β paint_line.line-blur
- β paint_line.line-dasharray
- β paint_line.line-pattern
- β paint_line.line-gradient
- β paint_circle.circle-radius
- β paint_circle.circle-color
- β paint_circle.circle-blur
- β paint_circle.circle-opacity
- β paint_circle.circle-translate
- β paint_circle.circle-translate-anchor
- β paint_circle.circle-pitch-scale
- β paint_circle.circle-pitch-alignment
- β paint_circle.circle-stroke-width
- β paint_circle.circle-stroke-color
- β paint_circle.circle-stroke-opacity
- β paint_heatmap.heatmap-radius
- β paint_heatmap.heatmap-weight
- β paint_heatmap.heatmap-intensity
- β paint_heatmap.heatmap-color
- β paint_heatmap.heatmap-opacity
- β paint_symbol.icon-opacity
- β paint_symbol.icon-color
- β paint_symbol.icon-halo-color
- β paint_symbol.icon-halo-width
- β paint_symbol.icon-halo-blur
- β paint_symbol.icon-translate
- β paint_symbol.icon-translate-anchor
- β paint_symbol.text-opacity
- β paint_symbol.text-color
- β paint_symbol.text-halo-color
- β paint_symbol.text-halo-width
- β paint_symbol.text-halo-blur
- β paint_symbol.text-translate
- β paint_symbol.text-translate-anchor
- β paint_raster.raster-opacity
- β paint_raster.raster-hue-rotate
- β paint_raster.raster-brightness-min
- β paint_raster.raster-brightness-max
- β paint_raster.raster-saturation
- β paint_raster.raster-contrast
- β paint_raster.raster-resampling
- β paint_raster.raster-fade-duration
- β paint_hillshade.hillshade-illumination-direction
- β paint_hillshade.hillshade-illumination-anchor
- β paint_hillshade.hillshade-exaggeration
- β paint_hillshade.hillshade-shadow-color
- β paint_hillshade.hillshade-highlight-color
- β paint_hillshade.hillshade-accent-color
- β paint_background.background-color
- β paint_background.background-pattern
- β paint_background.background-opacity
from ol-mapbox-style.
Related Issues (20)
- Mapbox streets-v12 style trys to load invalid fonts HOT 1
- Make source available in transformRequest HOT 2
- Guessing of access token parameter may lead to bad requests HOT 1
- Requests to third-party server for fonts HOT 8
- issue with standalone example using recent versions of olms (METERS_PER_UNIT error) HOT 1
- applyBackground issue HOT 3
- line-pattern webgl HOT 3
- Provide a default URL template for fonts when 'ol:webfonts' not available HOT 1
- Issue rendering fill layers above symbol layers HOT 2
- ε θ½½mapboxglηζ ·εΌζΆζζ¬ζ ηΎζΎη€ΊιδΉ± HOT 1
- Maybe a bug in stylefunction HOT 2
- Vector tile layer with MVT format clip circle style HOT 6
- color2 is null loading outdoor-v2 HOT 1
- Example of using a styled Esri vector tiles basemap (but not as the whole map) HOT 1
- Text-Allow-Overlap and Declutter issues. HOT 6
- Incorrect Tiles being requested for projections other than Web Mercator (EPSG:3857) HOT 2
- render vector tiles offline, or render vector tiles to raster for later offline use? HOT 3
- Applying style to VectorTile layer HOT 2
- Displaying symbols from sprites HOT 6
- 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.