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}
}
};
}