Skip to content

[Bug]: MarkerView pointerEvents="none" still block MapView #4219

@alexgilbertDG

Description

@alexgilbertDG

Mapbox Version

default

React Native Version

0.81.5

Platform

Android, iOS

@rnmapbox/maps version

10.3.0

Standalone component to reproduce

import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
MarkerView
} from '@rnmapbox/maps';
import { Text } from "react-native";

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <MarkerView pointerEvents="none" coordinate={[-74.00597, 40.71427]}>
<Text>Marker</Text>
</MarkerView>
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce

MarkerView still block touch events so we can't move on map if we initialize the event on the MarkerView

Expected behavior

MapView should still receive events and move with the touch events.

Notes / preliminary analysis

I got complex markers with images and my end goal is to make the map more fluid and not block pinch and touch events when it starts on a marker. Maybe a global options that make touch events pass through everything on the MapView will make more sense, but being able to toggle this on each MarkerView will be more complete.

Additional links and references

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions