feat(google-maps): Adding a streetview component #26255
Labels
area: google-maps
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P4
A relatively minor issue that is not relevant to core functions
Feature Description
Thanks for the awesome
google-maps
package! It abstracts away most of the gmaps logic that we heavily make use of in our apps.But we're still missing one more functionality, namely an ng-like wrapper around the streetview panorama.
An ideal
map-streetview
component could go something like this:The (optional)
@Input() map
would be the map that allows binding to external panoramas.The (optional)
@Input overlays
would support native gmaps overlays but ideally also this package'smap-marker
s.The
@Output
s would be consistent with the standard streetview events.See section below for more details.
Use Case
In order to mirror
map-marker
s onto the panorama:we have to resort to the native JS API where we take advantage of the fact that
google.maps.Marker
instances get be bound to agoogle.maps.StreetViewPanorama
via.setMap
.When the map markers are dragged, we can listen to the position changes and update the streetview markers' positions accordingly:
But since we're using
map-markers
(and not the nativegoogle.maps.Marker
s), we have to access the underlying native markers, pass them onto the native streetview and deal with "component" lifecycles manually.Summing up, it'd be neat to have a
map-streetview
component.If it were to support custom overlays such as native markers (or any of the components in this package that implement
google.maps.OverlayView
), all the better!Thoughts?
The text was updated successfully, but these errors were encountered: