Skip to content

Allow to return arbitrary OverlayView from the MarkerClusterer.renderer.render #1135

@rtcpw

Description

@rtcpw

The Renderer interface is declared as:

export interface Renderer {
    /**
     * Turn a {@link Cluster} into a `Marker`.
     *
     * Below is a simple example to create a marker with the number of markers in the cluster as a label.
     *
     * ```typescript
     * return new google.maps.Marker({
     *   position,
     *   label: String(markers.length),
     * });
     * ```
     */
    render(cluster: Cluster, stats: ClusterStats, map: google.maps.Map): Marker;
}

Please add the ability to return arbitrary OverlayView from the render function. The Marker type that render currently expects is deprecated. The render function needs to be updated to support the AdvancedMarkerElement, but it should also support arbitrary OverlayView as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage meI really want to be triaged.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions