Closed chrisDupuis closed 2 months ago
To test, modify the sample CustomMarker
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
MaplibreMap(
// CHD
styleString: getSpotsydeMapStyle(),
trackCameraPosition: true,
onMapCreated: _onMapCreated,
onMapLongClick: _onMapLongClickCallback,
onCameraIdle: _onCameraIdleCallback,
onStyleLoadedCallback: _onStyleLoadedCallback,
initialCameraPosition: const CameraPosition(target: LatLng(35.0, 135.0), zoom: 5),
iosLongClickDuration: const Duration(milliseconds: 200),
),
Stack(
children: _markers,
)
// IgnorePointer( // ignoring: false, // child: Stack( // children: _markers, // ))
The _markers should consume the mouse event
@chrisDupuis This is a known issue with PlatformViews
in general. Could be fixed by using the following library: https://pub.dev/packages/pointer_interceptor
Just wrap your button into a PointerInterceptor()
On Web (this is ok on iOs) I create a Stack with in first the Map then widget over the map. When I click (and drag) on widget the widget receive the events, but the map receive the events too and the map move as the cursor drag.
How to prevent that ?