Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe project adds a Vaadin component for Google Maps advanced markers, adds map operations for those markers, updates Google Maps package versions, and adds two demos for advanced markers and clustering. ChangesAdvanced markers
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
|
|
Code duplication |


Adds
GoogleMapAdvancedMarker, a marker based on Google's Advanced Markers (AdvancedMarkerElement), the replacement for the deprecatedgoogle.maps.Markerused byGoogleMapMarker. As decided in the issue, both kinds of markers coexist andGoogleMapMarkeris unchanged.API
GoogleMapMarker: constructors, position, caption, draggable, icon (URL,MarkerIconorSymbol), label, info window, and the click, right click (also touch-and-hold on touch devices) and drag end listeners, with their own event classes.setPinBackground,setPinBorderColor,setPinGlyphColorandsetPinScaleto customize the default pin.GoogleMap.addMarker(GoogleMapAdvancedMarker)andGoogleMap.removeMarker(GoogleMapAdvancedMarker).setVisible(false)hides the marker (withGoogleMapMarkerit has no effect after the marker is created).Not available, as Advanced Markers have no equivalent: animation, optimization, icon sprites, a label together with an icon, and the font and CSS class of a label. Documented in the class.
Map ID
Advanced Markers require the map to have a Map ID (
GoogleMap.setMapId(...)). Without it the marker is silently not shown, and a map's Map ID can't be changed once it's created, so anIllegalStateExceptionwith a clear message is thrown when the marker is attached to a map without Map ID (or byaddMarker, if the map is already shown, without adding the marker).Dependencies
@flowingcode/google-mapupdated to 3.10.1, which addsgoogle-map-advanced-marker.@googlemaps/markerclustererupdated from 2.0.8 to 2.6.2, the version the web component requires. With it, cluster icons are drawn as advanced markers on maps with a Map ID; maps without a Map ID keep the legacy cluster icons (Marker clustering fails on maps without a Map ID google-map#56). Custom renderers are used unchanged.Other changes
2.7.0-SNAPSHOT, as this is a new feature (@since 2.7.0in the new API).commons-demoupgraded to 5.5.0 in thev25profile: with 5.2.0 the development bundle fails to build when the frontend dependencies change (unresolvedlit-elementimport). Upgrading Vaadin in that profile is left for a separate PR.Close #121
Summary by CodeRabbit