Mapbox-gl-js: Adding Layer in the MAP is removing street names. (codesandbox inside)

Created on 4 Jun 2019  路  2Comments  路  Source: mapbox/mapbox-gl-js

I'm trying to just add a circle in the middle of the map, however, I noticed that it is removing information about street names as soon as the data layer is added. I just want to keep the street names and all the information on the map.

I created a repository just to demonstrate this issue, any help would be very appreciated.

example in codesandbox.io

With layer: (streets name are being removed)
Screenshot 2019-06-04 at 00 25 52

Without:
Screenshot 2019-06-04 at 00 26 15

Most helpful comment

Hi @ReactGirl you're adding an image as a symbol layer which is colliding with the street labels underneath it. Consequently, the street labels are faded out and removed from the map since your image has a higher priority in the collision index. To fix this, you can update myLayer.layout to include "icon-ignore-placement": true which allows symbols that collide with your image to be placed normally.

All 2 comments

Hi @ReactGirl you're adding an image as a symbol layer which is colliding with the street labels underneath it. Consequently, the street labels are faded out and removed from the map since your image has a higher priority in the collision index. To fix this, you can update myLayer.layout to include "icon-ignore-placement": true which allows symbols that collide with your image to be placed normally.

Thank you very much!!!!!!!!!!

Was this page helpful?
0 / 5 - 0 ratings