-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement new map marker clusterer #29885
Conversation
0619bc3
to
db740bd
Compare
d4f8440
to
1653075
Compare
Deployed dev-app for a0742c9 to: https://ng-dev-previews-comp--pr-angular-components-29885-dev-ufuii8oi.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
src/google-maps/deprecated-map-marker-clusterer/deprecated-map-marker-clusterer.spec.ts
Show resolved
Hide resolved
Deprecates the existing `MapMarkerClusterer`, because it's based on a deprecated library that doesn't support advanced markers. A new clusterer component will be introduced that supports both regular markers and advanced ones, and is based on the current marker library. BREAKING CHANGE: * The new @googlemaps/markerclusterer API should be imported instead of the old one. Read more at: https://github.com/googlemaps/js-markerclusterer * The `MapMarkerClusterer` class has been renamed to `DeprecatedMapMarkerClusterer`. * The `map-marker-clusterer` selector has been changed to `deprecated-map-marker-clusterer`.
@Component({ | ||
selector: 'google-map-demo', | ||
templateUrl: 'google-map-demo.html', | ||
standalone: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this will be the default when released, we can remove this line from the example
Adds a new `MapMarkerClusterer` component that is based on the most up-to-date clustering library, and supports both regular and advanced markers. Fixes angular#23695.
Since the clusterer's class and tag were renamed, we need to migrated existing users to the new name.
1653075
to
a0742c9
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The history of clustering in Google Maps is complicated, but the result is that our current
map-marker-clusterer
component is based on top of an unmaintained API. We haven't been able to switch to the new one without breaking changes, because it doesn't offer the same set of features as the old one. Furthermore, the current clusterer only supports theMarker
class which is deprecated, but not theAdvancedMarker
which is the recommended class to use for markers, whereas the new API supports both kinds of markers. These changes attempt to cover both existing users and users who want to use the new API by:map-marker-clusterer
todeprecated-map-marker-clusterer
.map-marker-clusterer
based on top of the new API.ng update
schematic to rename existing usages.Fixes #23695.