You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importReact,{useState}from"react";import{Button,Text,Image,ScrollView,View}from"react-native";importMapboxfrom"@rnmapbox/maps";// import markerGold from "./marker-gold.png";Mapbox.setAccessToken("...");exportdefaultfunctionMap(){const[followUserLocation,setFollowUserLocation]=useState(false);const[selectedFeature,setSelectedFeature]=useState();const[bounds,setBounds]=useState({ne: [0,0],sw: [0,0]});constfeatureCollection={type: "FeatureCollection",features: [{type: "Feature",id: "1",properties: {icon: "example",description:
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",},geometry: {type: "Point",coordinates: [10,50]},},],};/** Close Popup if open, open popup on marker press. */constonMarkerPress=(e)=>{if(selectedFeature){setSelectedFeature(undefined);return;}constfeature=e?.features[0];setSelectedFeature(feature);};/** Update map bounds after moving the viewport. */constonMapIdle=(regionFeature)=>{setBounds(regionFeature.properties.bounds);};return(<Viewstyle={{flex: 1,height: "100%",width: "100%"}}><Mapbox.MapViewstyle={{alignSelf: "stretch",flex: 1}}logoEnabled={true}compassEnabled={true}compassViewPosition={1}onMapIdle={onMapIdle}onPress={onMarkerPress}><Mapbox.CamerazoomLevel={0}followUserLocation={followUserLocation}followZoomLevel={14}followUserMode="normal"/><Mapbox.UserLocationshowsUserHeadingIndicator={true}animated={true}/> // <Mapbox.Images images={{ markerGold }} /><Mapbox.ShapeSourceid="mapMarkersSource"shape={featureCollection}onPress={onMarkerPress}><Mapbox.SymbolLayerid="mapMarkersLayer"style={{iconAllowOverlap: true,iconAnchor: "bottom",iconImage: "markerGold",iconSize: 0.5,}}/></Mapbox.ShapeSource>{selectedFeature&&(<Mapbox.MarkerViewcoordinate={selectedFeature.geometry.coordinates}><ScrollViewstyle={{backgroundColor: "white",display: "flex",flex: 1,maxHeight: 200,maxWidth: 200,padding: 10,}}><Textstyle={{fontSize: 14}}>{selectedFeature.properties.description}</Text></ScrollView></Mapbox.MarkerView>)}</Mapbox.MapView></View>);}
Observed behavior and steps to reproduce
MapBox intercepts the interaction and the scrolling of the ScrollView does not work.
Bildschirmaufnahme.2024-11-19.um.17.05.55.mov
Expected behavior
MapBox does not intercept the interactions and the scrolling of the ScrollView works.
Notes / preliminary analysis
No response
Additional links and references
No response
The text was updated successfully, but these errors were encountered:
Mapbox Implementation
Mapbox
Mapbox Version
default
React Native Version
0.74.5
Platform
iOS, Android
@rnmapbox/maps
version10.1.33
Standalone component to reproduce
Observed behavior and steps to reproduce
MapBox intercepts the interaction and the scrolling of the ScrollView does not work.
Bildschirmaufnahme.2024-11-19.um.17.05.55.mov
Expected behavior
MapBox does not intercept the interactions and the scrolling of the ScrollView works.
Notes / preliminary analysis
No response
Additional links and references
No response
The text was updated successfully, but these errors were encountered: