Markers in symbol layer disappear in a span of zoom even with icon-allow-overlap
mapbox-gl-js version: 3.12.0 (and verified on 3.7.0 as well).
browser: Safari 18.5
Steps to Trigger Behavior
- We render markers using a GeoJSON-source defined as below, with symbol-layers defined as below: Source:
name: 'properties',
def: {
type: 'geojson',
data: {type: 'FeatureCollection', features: []},
promoteId: 'id',
tolerance: 0.005
}
Marker layer:
{
id: 'properties-layer',
type: 'symbol',
source: 'properties',
'layout': {
'icon-image': ['case', ['to-boolean', ['get', 'aspect_color']], ['concat', ['get', 'aspect_color'], '_property_marker'], 'property_marker'], // reference the image
'icon-anchor': 'center',
'icon-offset': [0, 0],
'icon-allow-overlap': true,
'icon-ignore-placement': true,
'icon-size': 1.5
},
filter: ["!", ["has", "is_saved"]],
events: {
click: onItemClick
},
before_id: 'z-index-mid'
},
Line layer (that remains visible):
{
id: 'properties-layer-boundaries',
type: 'line',
source: 'properties',
paint: {
'line-color': ['match', ['get', 'aspect_color'], 'pink', '#E861B9', 'lime', '#94CC00', 'green', '#00A12E', 'orange', '#FF8F00', 'red', '#FE2B09', 'yellow', '#FFC403', 'purple', '#A616AC', 'turqoise', '#06B0A4', '#0064BF'],
'line-width': ['case', ['boolean', ['feature-state', 'selected'], false], 2, 1]
},
group_key: 'core'
},
No zoom-configuration is set on source or layer.
When zooming the map in/out - the markers disappear. There seems to a non-reliable correlation with the satellite-style (mapbox/satellite-v9) vs others, but this is not something I can reliably state.
See a video-screen recording below.
Link to Demonstration
https://youtu.be/5TBOQjHjaWQ
Expected Behavior
I would expect the markers, given the configuration of the symbol layer, to be constantly visible. Strangely enough, the layer with boundaries is rendered from the same source but stays consistently visible.
Actual Behavior
When zooming the map in and out, in a span roughly equal to a scale-distance of 1.0 (as in - between ~13.6 and ~14.9) the markers just disappear, and then reappear once the map is zoomed either in or out beyond the span.
Hi @buffpojken , can you provide a JSBin or similar that reproduces the issue? Thanks!
Sorry, should have done that straight away - I'll see if I can whip one together during the weekend!
I can confirm that I'm seeing this exact issue too with a symbol layer.