Closed orelHAnyvision closed 1 year ago
Im trying to create a polygon out of some given coordinates when I zoom out lines randomly disappear
Polygon should keep its shape on zoom in/out
<Map interactiveLayerIds={['lineLayer']} ref={mapRef as any} initialViewState={{ ...defaultCoordinates, zoom: 10, pitch: 40 }} mapStyle='mapbox://styles/mapbox/streets-v9' mapboxAccessToken='XXX' attributionControl={false} > <NavigationControl position='bottom-right' showCompass={false} visualizePitch /> <GeolocateControl /> <FullscreenControl position='bottom-right' /> {markers.map(marker => ( <Marker longitude={marker.location[0]} latitude={marker.location[1]}> </Marker> ))} <Source id='devicesPolygon' type='geojson' data={ { type: 'Feature', geometry: { type: 'Polygon', coordinates: [ [ [-0.2784185766806502, 51.42160464725217], [0.19152843529769825, 51.64685837948534], [-0.15773135757368095, 51.27696693652959] ] ] } } as any } tolerance={0.00001} > <Layer id='lineLayer' type='line' layout={{ 'line-cap': 'round', 'line-join': 'round' }} paint={{ 'line-color': 'red', 'line-width': 4 }} /> </Source> </Map>
No response
This library does not draw anything. You need to report any rendering issue to the mapbox-gl repo.
Description
Im trying to create a polygon out of some given coordinates when I zoom out lines randomly disappear
Expected Behavior
Polygon should keep its shape on zoom in/out
Steps to Reproduce
Environment
Logs
No response