When I create a polyline and add it to the map, it will disappear if the map is moved. If I add a polygon or annotation, it remains on the map if the map is moved:
const polyline = new mapkit.PolylineOverlay(path, {
style: new mapkit.Style({
lineWidth: 5,
strokeColor: '#007AFF',
lineJoin: 'round',
lineCap: 'round'
})
})
map.addOverlay(polyline)
// disappears if the map moves or zoom changes
const polygon = new mapkit.PolygonOverlay(shapes, {
style: new mapkit.Style({
fillRule: 'evenodd'
}),
enabled: false
})
map.addOverlay(polygon)
// remains on map when map moves or zoom changes
Why is it inconsistent? How can I make the polyline stay until I explicitly remove it?