Skip to content

Conversation

@StevenRenaux
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
Deprecations? no
Documentation? yes
License MIT

Description

Adds a Map::clear*() method to all map elements (such as markers, circles, polylines, etc.) in Map.php.

Motivation

In my use case, map elements—especially markers—need to be dynamically adapted depending on the map zoom level.

For example:

At a low zoom level, markers may be clustered

At a higher zoom level, clusters are replaced by individual points

In this scenario, the simplest and most reliable approach is to remove all existing elements and rebuild them from scratch whenever the zoom changes.

@StevenRenaux StevenRenaux requested a review from Kocal as a code owner December 20, 2025 23:13
@carsonbot carsonbot added Status: Needs Review Needs to be reviewed Documentation Improvements or additions to documentation Feature New Feature Map labels Dec 20, 2025
@StevenRenaux StevenRenaux changed the title [Map] Add clear method on Elements [Map] Add Map::clear*() method on Elements Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation Feature New Feature Map Status: Needs Review Needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants