Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removeMarkers(): where does the id come from? #10

Open
frederikheld opened this issue Jun 2, 2024 · 0 comments
Open

removeMarkers(): where does the id come from? #10

frederikheld opened this issue Jun 2, 2024 · 0 comments
Labels

Comments

@frederikheld
Copy link

frederikheld commented Jun 2, 2024

Bug Report

Not necessarily a bug, but not properly documented

Plugin(s)

@capacitor/google-maps@next

Capacitor Version

6.0.0

Platform(s)

JS

Current Behavior

removeMarkers() expects an array of strings called ids. What id's? Is it the string returned by addMarker?

The docs are very low effort (unfortunately not only on this plugin). Please add at least a short sentence that describes the purpose and workings of each function.

Expected Behavior

I can understand how to remove markers by reading the docs.

Code Reproduction

Reproduction: forget how the inner workings of this plugin are. Pretend that you've never used it before. Try to figure out how to remove markers by reading the docs.

Other Technical Details

I don't think that having Marker objects that do not have an id and the id strings separately is a bad idea because you need to keep a reference to both to have a full representation of a marker.

I would suggest to add the id to the Marker object to have one object with all the data needed to represent a marker.

Additional Context

@ionitron-bot ionitron-bot bot added the triage label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant