-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List of unsupported or not working style elements #339
Comments
Creating a list of supported options would be a a welcome pull request. It should be easy to grep
Would you be able and willing to take on any of the above tasks and provide pull requests? |
The Regarding the list of supported features, the |
Any idea how that line-offset could be implemented? |
Definitely not by using the |
I tried the following (main points briefly): In case 'line-offset' is defined for 'line' type layer, get the original coordinates with feature.getGeometry().getFlatCoordinates() and store them to offsetCoordinates with the calculated offset, then create a new RenderFeature with 'LineString' type and the offsetCoordinates and set that to the style with style.setGeometry. This works almost perfectly, but I get some strange quirks that on certain zoom levels the features get somehow mixed up so that some of the surrounding features are included in the style. The sources are MVT and all the quirks are clearly constrained to certain tiles. |
Styles get reused, currently without checking for |
Ok, thanks, I'll try to fix the style usage. Btw, for some reason I was not able to clone the geometry with the .clone() function which is available in openlayers geometry, but I don't know the ol-mapbox-style internals enough to understand the reason. |
It‘s because we‘re dealing with |
I had experimented with implementing this offset. Here is the code snippet I had if it helps const lineOffset = getValue(layer, 'paint', 'line-offset', zoom, f);
if (lineOffset) {
let newGeometry = feature.clone().getGeometry();
newGeometry.translate(dx,dy) // TODO : check how to get dx and dy from lineOffset
feature.setGeometry(newGeometry)
style.setGeometry(newGeometry);
styles[stylesLength] = style;
} |
I was not able to use the clone either on geometry or feature. Also, to my understanding the translate is usable only for straight lines. For lines that consists of multiple segments, the proper offset needs to be calculated separately for each - basically the new segment should be moving in the 90 degree direction from the original. I used this:
|
Hi,
When style rendered not as expected, it's hard to determine if its a bug in style/data or part of style is unsupported by ol-mapbox-style
It would be nice to have list of unsupported and not working elements from Mapbox Style Specification on the main page or in the docs. And when or if they will be supported. It also would be nice to have "strict" mode option enabling which would produce warnings or errors in console for unsupported elements
While trying to implement style for floor plan i found this elements not working:
I created simple example of same Mapbox Style rendered with ol-mapbox-style (top) and mapbox-gl (bottom):
https://codesandbox.io/s/ol-mapbox-style-missing-features-wrg51?file=/main.js
In this example:
Mapbox Style Specification links:
paint-line-line-pattern
paint-line-line-offset
fill-extrusion
layout-symbol-symbol-sort-key
The text was updated successfully, but these errors were encountered: