ionic-team / ionic-team/capacitor-google-maps

`removeMarkers()`: where does the `id` come from?

Open
#10 0 comments 1 reaction 0 assignees View on GitHub
triage
Dominant language
TypeScript
Stars
32
Forks
47
PR merge metrics
No merged PRs in 30d

Description

## 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()`](https://capacitorjs.com/docs/apis/google-maps#removemarkers) expects an array of strings called `ids`. What id's? Is it the `string` returned by [`addMarker`](https://capacitorjs.com/docs/apis/google-maps#addmarkers)?

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.