Closed bongobongo closed 4 years ago
I’m having a, perhaps, related problem…
With vector tiles from map box and map box-gl-leaflet, the country labels do not line up with the GeoJSON polygons of the countries. It’s really a pain, as my project has come to a standstill.
Mark Lawton www.markslawton.com http://www.markslawton.com/
If I asked a question above, please respond. Thank You!
On Nov 18, 2020, at 3:52 AM, bongobongo notifications@github.com wrote:
I'm using mbtiles from openmaptiles with tileserver.php, and this mapbox-gl-leaflet. Map (vector tiles) is showing and working for the different zoom levels, but I'm getting this error in the browser console: Error: Source layer "aerodrome_label" does not exist on source "openmaptiles" as specified by style layer "airport-label-major"
and there is no label displayed for airport and no icon for the airport show on the map.
In the style-cdn.json file I find this relevant information: { "id": "airport-label-major", "type": "symbol", "source": "openmaptiles", "source-layer": "aerodrome_label", "minzoom": 10, "filter": [ "all", [ "has", "iata" ] ], "layout": { "icon-image": "airport_11", "icon-size": 1, "text-anchor": "top", "text-field": "{name:latin}\n{name:nonlatin}", "text-font": [ "Klokantech Noto Sans Regular" ], "text-max-width": 9, "text-offset": [ 0, 0.6 ], "text-optional": true, "text-padding": 2, "text-size": 12, "visibility": "visible" }, "paint": { "text-color": "#666", "text-halo-blur": 0.5, "text-halo-color": "#ffffff", "text-halo-width": 1 } },
Does anyone know what I have to do to get rid of the error, as well as showing the name and icon for the airports?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mapbox/mapbox-gl-leaflet/issues/132, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANMQVONCLKOX7L73ABRTVP3SQOYOLANCNFSM4TZ3WYIA.
markslawton: To me the problems seem unrelated. The labels that show on my vector map - show up where they should be displayed - that includes the names for the countries.
Please just delete this thread. The issue has nothing to do with mapbox-gl-leaflet, and not even mapbox-gl-js. According to an answer from people over at mapbox-gl-js it is an issue with the vector tiles and style from openmaptiles: https://github.com/mapbox/mapbox-gl-js/issues/10120
thanks, john, for posting the latest version. it seems to have solved my problem with the labels not aligning with the polygons. huge help!
do you have any idea how to get the labels to stop wrapping around (outside the map bounds).
i have spent hours and hours trying all the suggestions I’ve found on the web, and still the labels persist.
any ideas?
I'm using mbtiles from openmaptiles with tileserver.php, and this mapbox-gl-leaflet. Vector tiles and all other files are on my computer. Map (vector tiles) is showing and working for the different zoom levels, but I'm getting this error in the browser console: Error: Source layer "aerodrome_label" does not exist on source "openmaptiles" as specified by style layer "airport-label-major"
and there is no label displayed for airport and no icon for the airport show on the map.
I have attached a copy of the output from the browser console.
Does anyone know what I have to do to get rid of the error, as well as showing the name and icon for the airports?
In the style-cdn.json file I find this relevant information: { "id": "airport-label-major", "type": "symbol", "source": "openmaptiles", "source-layer": "aerodrome_label", "minzoom": 10, "filter": [ "all", [ "has", "iata" ] ], "layout": { "icon-image": "airport_11", "icon-size": 1, "text-anchor": "top", "text-field": "{name:latin}\n{name:nonlatin}", "text-font": [ "Klokantech Noto Sans Regular" ], "text-max-width": 9, "text-offset": [ 0, 0.6 ], "text-optional": true, "text-padding": 2, "text-size": 12, "visibility": "visible" }, "paint": { "text-color": "#666", "text-halo-blur": 0.5, "text-halo-color": "#ffffff", "text-halo-width": 1 } },