Skip to content

fix(android): prevent native info window from appearing on custom mar… - #175

Open
tethridge wants to merge 1 commit into
software-mansion:mainfrom
tethridge:bugfix/174-prevent-native-info-window
Open

tethridge wants to merge 1 commit into
software-mansion:mainfrom
tethridge:bugfix/174-prevent-native-info-window

Conversation

@tethridge

Copy link
Copy Markdown

…ker tap

MarkerComposable and onClusterItemClick both returned onMarkerClick == null from their onClick lambdas. In maps-compose, returning false means the click is not consumed and the default info window is shown. Since onMarkerClick == null evaluates to false whenever a handler is set, the info window always appeared when using customMarkerContent — the opposite of the intended behavior.

Return true unconditionally in both the MarkerComposable and clustering paths so the click is consumed and the native info window is suppressed. Custom marker content owns the full visual representation and has no use for the native overlay. The standard Marker path (no custom content) is unchanged.

Fixes #174

…ker tap

MarkerComposable and onClusterItemClick both returned `onMarkerClick == null`
from their onClick lambdas. In maps-compose, returning false means the click
is not consumed and the default info window is shown. Since `onMarkerClick == null`
evaluates to false whenever a handler is set, the info window always appeared
when using customMarkerContent — the opposite of the intended behavior.

Return true unconditionally in both the MarkerComposable and clustering paths
so the click is consumed and the native info window is suppressed. Custom
marker content owns the full visual representation and has no use for the
native overlay. The standard Marker path (no custom content) is unchanged.

Fixes software-mansion#174

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native info window appears for custom MarkerComposable when onMarkerClick is set

1 participant