Custom marker id using @capacitor/google-maps

Hi, recently started migrating an old @ionic-native/google-maps Angular project to @capacitor/google-maps, came onto a huge headache. Can’t figure out how to add custom id’s to markers. This is the reference code on how it worked using @ionic-native/google-maps package.

private nestToMarkerOptions(nest: Nest): MarkerOptions {
        const brandID = nest.brand && nest.brand.id && +nest.brand.id < 9 ? nest.brand.id : 6;
        const zoomedOutIconURL = this.imagePreloader.get('assets/images/map/nests-'+ brandID +'/device-zoomed-out.png');
        return {
            position: new LatLng(nest.location.lat, nest.location.lng),
            icon: this.markerIcon(nest),
            nestId: nest.id,
            closeUpIcon: this.markerIcon(nest),
            zoomedOutIcon: {
                flat: true,
                url: zoomedOutIconURL,
                size: {width: 26, height: 26}
            }
        };
    }

Assuming you are referring to nestId in your code. Looking at the Marker interface, it doesn’t appear to be an option in the Capacitor plugin.

As a workaround, maybe associate your id with the id returned from addMarker in your own list/array?