Skip to content
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

Fails to render distances with raster based maps #11

Closed
steveneal opened this issue Nov 8, 2019 · 2 comments
Closed

Fails to render distances with raster based maps #11

steveneal opened this issue Nov 8, 2019 · 2 comments
Labels
invalid This doesn't seem right

Comments

@steveneal
Copy link

The distances measured are not displayed when using a tile based map:

Screenshot 2019-11-08 at 14 03 41

The map style in the screenshot, is configured as follows:

      map.setStyle({
           "version": 8,
           "sources": {
               "nasa-tiles": {
                   "type": "raster",
                   "tiles": [
                       "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}.jpg"
                   ],
                   "tileSize": 256
               }
           },
           "layers": [{
               "id": "nasa-tiles",
               "type": "raster",
               "source": "nasa-tiles",
               "minzoom": 0,
               "maxzoom": 22
           }]
       });
@korywka
Copy link
Owner

korywka commented Nov 8, 2019

Your style doesn't have fonts:

https://codesandbox.io/s/recursing-jepsen-zsxdy?fontsize=14

Error: layers.controls-layer-symbol.layout.text-field: use of "text-field" requires a style "glyphs" property

https://docs.mapbox.com/mapbox-gl-js/style-spec/#root-glyphs

I suggest you to add a new layer (addLayer) on top of mapbox style, with raster source (addSource), not to define the whole new style.

Something like this one: mapbox/mapbox-gl-js#3496

@korywka korywka closed this as completed Nov 8, 2019
@steveneal
Copy link
Author

Thanks for your feedback. I'll look into your suggestion.

@korywka korywka added the invalid This doesn't seem right label Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants