Welcome back.
We created the list cluster items that contains 14 cluster items.
Now let's create the manager.
The cluster manager.
This cluster manager handles clustering and rendering of marker.
So let me create a new file.
Or you can at the end of this file you can create the composable.
But I prefer using a separate files name this remember cluster manager select file click okay.
And let's start building our composable.
This function returns a cluster manager of type cluster.
This function creates and remembers a cluster manager instance that handles marker clustering logic
for Google Maps.
Returns a cluster manager, the core clustering manager for Google Maps utility library and the cluster
item.
This is generic type using your custom interface implementation.
Let's start with the implementation context equals to local Context dot current.
And this gets the Android context.
Using composes local context needed because cluster manager requires a context.
Then return because we need to return a cluster manager.
Need to create a cluster manager instance using remember cluster manager.
It's of type cluster item.
Pass the context null and then apply alt plus.
Enter to Reimport.
Remember.
And you can set the configuration or any additional cluster manager configuration.
Okay now let's use this function.
So inside my activity my main activity use.
Remember cluster manager.
And here we go alt plus enter to modify the Remember Cluster manager.
And let me set it from IO dot master coding dot maps.
Okay.
So this function is remember cluster manager that handles clustering and rendering of Mark.