ionic-team / capacitor-plugins

Official plugins for Capacitor ⚡️
529 stars 592 forks source link

[@capacitor/google-maps] Marker Clusterer Customization #1603

Open RobSchilderr opened 1 year ago

RobSchilderr commented 1 year ago

Feature Request

Plugin

@capacitor/google-maps

Description

Enhancement request: Allow for cluster marker customization

Platform(s)

Android and iOS

Preferred Solution

Either enableClustering method to accept an optional parameter for a custom renderer, or a setClustererRenderer method in which parameters can be passed to customize the cluster marker

Additional Context

For the API: CustomMarkerClusteringDemoActivity

RobSchilderr commented 1 year ago

I know there is this "renderer" for Javascript but not sure if this is what we look for: https://googlemaps.github.io/js-markerclusterer/interfaces/MarkerClustererOptions.html#renderer

I know there is this for iOS: https://developers.google.com/maps/documentation/ios-sdk/utility/marker-clustering#customize-marker-clustering

Hope this helps.

brodenbrett commented 1 year ago

Seconding this. The ability to customize the cluster icons is very necessary for branded apps.

RobSchilderr commented 1 year ago

From the Discord server, Dallas said:

Sure! I've looked into this, and it seems like it would be a great feature. Unfortunately, Google has not done us any favors here, and the API is different across all 3 platforms, so from my research, there likely isn't a way for us to be able to provide a single, unified API without spending significant engineering time to solve that problem first. So, because of that very high effort level, it's probably not something we can do in the near-term. 😦

So the solution is to do this with native code in your own project for now, until there is bandwith in the team I guess. Here is a link to the full discussion on Discord if you would like to know more.