Skip to content

feat: add collision behavior support for Advanced Markers - #143

Open
lorenc-tomasz wants to merge 5 commits into
pinpong:devfrom
lorenc-tomasz:feat/advanced-markers
Open

lorenc-tomasz wants to merge 5 commits into
pinpong:devfrom
lorenc-tomasz:feat/advanced-markers

Conversation

@lorenc-tomasz

@lorenc-tomasz lorenc-tomasz commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Pull request

Please ensure this PR targets the dev branch and follows the project conventions.
CI already runs linting, formatting, and build checks automatically.


Before submitting

  • This PR targets the dev branch (not main)
  • Commit messages follow the semantic-release format
  • No debug logs or sensitive data included

Summary

Adds Map ID plumbing and collision behavior support for Advanced Markers on Android and iOS while preserving the existing SVG-based marker API.

  • Adds optional initialProps.mapId configuration.
  • Adds optional RNMarker.advanced configuration.
  • Adds the extensible RNMarker.advancedOptions configuration object.
  • Adds advancedOptions.collisionBehavior.
  • Supports all three Google Maps collision behaviors.
  • Uses required as the default collision behavior.
  • Reports an INVALID_ARGUMENT map error when an Advanced Marker is requested without a map ID.
  • Reports an INVALID_ARGUMENT map error when advancedOptions is provided without advanced: true.
  • Falls back to a standard marker when the configured map does not expose the Advanced Markers capability.
  • Adds the onMapCapabilitiesChange callback for runtime capability updates.
  • Adds dedicated Map ID and Advanced Markers examples.

The existing iconSvg pipeline is reused. Native pin customization is not included.


Type of change

  • Feature
  • Fix
  • Refactor
  • Internal / CI
  • Documentation

Scope

  • Android
  • iOS
  • JS
  • Example App
  • Docs

Related

N/A


Additional notes

mapId remains optional for regular maps and standard markers.

A map ID is required when marker.advanced is true. When advanced is false or omitted, the existing standard marker implementation is used.

Collision behavior can be configured through:

{
  advanced: true,
  advancedOptions: {
    collisionBehavior: 'required-and-hides-optional',
  },
}

@lorenc-tomasz lorenc-tomasz changed the title Feat/advanced markers feat: add advanced markers support Aug 29, 2026
@lorenc-tomasz
lorenc-tomasz changed the base branch from main to dev August 29, 2026 18:33
@lorenc-tomasz
lorenc-tomasz force-pushed the feat/advanced-markers branch from c98ecde to b7163d3 Compare August 30, 2026 10:56
@lorenc-tomasz lorenc-tomasz changed the title feat: add advanced markers support feat: add map ID and advanced markers support Aug 30, 2026
@lorenc-tomasz
lorenc-tomasz force-pushed the feat/advanced-markers branch 2 times, most recently from 89fabf9 to 2c15bd2 Compare August 30, 2026 16:20
@lorenc-tomasz lorenc-tomasz changed the title feat: add map ID and advanced markers support feat: add Advanced Markers support Aug 30, 2026
@lorenc-tomasz lorenc-tomasz changed the title feat: add Advanced Markers support feat: add collision behavior support for Advanced Markers Aug 30, 2026
@lorenc-tomasz
lorenc-tomasz force-pushed the feat/advanced-markers branch from 2c15bd2 to 6da5551 Compare August 30, 2026 17:32
@lorenc-tomasz
lorenc-tomasz marked this pull request as ready for review August 31, 2026 06:22
@lorenc-tomasz

Copy link
Copy Markdown
Collaborator Author

Hi,
@pinpong What do you think about adding that to library? :)

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.

2 participants