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
Implement MB GL style sheets by mapping them to QGIS styles #87
Comments
|
I am looking forward to trying https://github.com/mnboos/mapbox-gl-style-to-qgis in this plugin. |
(@mnboos is working mo and Fr, so stepping in): Did you try to install the latest plugin code from branch 'develop' as instructed here https://github.com/geometalab/Vector-Tiles-Reader-QGIS-Plugin ? I think we're still having issues with labels being displayed up to 2 to 4 times because they are in the buffer "area" of 4 neighbouring tiles. Questions to @klokan:
|
Ironically exactly the same issue I have faced today (with no way to solve) in Leaflet.VectorGrid: qgis2web/qgis2web#566 (comment) It's why I added a "me too" to the request for a unique ID field, @klokan: openmaptiles/openmaptiles#303 (comment) And also why I mentioned it (out of context) in the Geoserver MBVT issue: |
mapbox-gl-leaflet is embedding mapbox-gl-js in leaflet - so rendering of vector tiles is done by GL JS there. So, yes, correct - Mapbox GL JS does not have a problem with redundant labels.
I thought QGIS can clip the data for the tile extent before styling. If clipped, the labels should be drawn just once as buffers are removed and never loaded in QGIS. QGIS is not clipping the styled drawn canvas like JavaScript clients - it is clipping the source data and styling them later on. Why not clip the source data?
I see Leaflet rendering vector tiles into individual raster canvases: If the labels are drawn in these canvases too - then each canvas should be drawn only from one vector tile. If the labels are added to DOM as positioned elements - then you must clip the data to the tile extent - and remove the buffers before you draw them. OpenLayers does not have the problem. UPDATE: Labelgun can help to solve the problem too probably - simply by ensuring no overlapping labels are visible on the map. Does QGIS have such option for styling - to avoid label overlap? BTW We are adding OSM-ID to the layers with labels in OpenMapTiles v3.7, which should be available latest by mid-Dec. |
Clipping tiles is a very expensive - and therefore time consuming - operation... |
You may clip by bbox just the point features, and not touch the polygons/lines, which are more expensive to process. |
Good idea. I did that already once. If this is done in the native decoder, we wouldn't even lose performance. |
Point clipping could be done always in my opinion. |
Yes - but don't clip in "Inspection Mode". |
Coming back to styling, especially of labels:
@mnboos: Can you look at this? |
Will do. |
@sfkeller text-transform (https://www.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-text-transform) is now implemented. Italic doesn't seem to be available even in Mapbox GL Style and is therefore not implemented in the mapboxgl2qgis converter. |
Oops, didn't see that. |
Ok, checked the style. Italic is only defined through the font. To make other fonts working, I'd have to download and install them. As this is intrusive and maybe not even safe, it's currently not supported by the converter. "layout": {
"text-font": [
"Open Sans Italic",
"Klokantech Noto Sans Italic",
"Klokantech Noto Sans CJK Regular"
],
"text-size": 14,
"text-field": "{name}",
"text-max-width": 5,
"text-rotation-alignment": "map",
"symbol-placement": "line",
"symbol-spacing": 350,
"text-letter-spacing": 0.2
} |
Sometimes font's have properties saying they are regular/serif, bold, italic, etc.? If yes, you at least could map this property to the fonts installed in QGIS? |
Italic is now supported. |
Implement style sheets that conform to the Mapbox Style Specification by mapping them to QGIS styles.
Rather big issue!
Could re-use parts of https://github.com/mapbox/mapbox-gl-native ?
The text was updated successfully, but these errors were encountered: