bug(google-maps): missing setZoom()
See original GitHub issueIs this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
the setZoom()
method is missing in the new angular google-maps
component.
Reproduction
use "@angular/google-maps": "14.0.4",
Expected Behavior
being able to change the zoom of the map as follow
@ViewChild('googleMap', { static: true }) googleMap: GoogleMap
setZoom(zoom: number) {
this.googleMap.setZoom(zoom)
}
<google-map
#googleMap
width="100%"
height="100%"
[options]="options"
>
</google-map>
Actual Behavior
Property ‘setZoom’ does not exist on type ‘GoogleMap’. Did you mean ‘getZoom’?
Environment
- Angular: v14.0.6
- CDK/Material: 14.0.4
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Google maps setZoom not working correctly - Stack Overflow
The problem is sometimes the zoom in the map doesn't reflect the value I provide, although I'm printing out the zoom level via...
Read more >SetZoom Error - Google Groups
the setZoom from my GeoAddress function the error is gone. Thing is I need ... Your resetGeo() function calls initialize() which will create...
Read more >Geocoding Service | Maps JavaScript API - Google Developers
You access the Google Maps API geocoding service within your code via the google.maps ... The Geocoder.geocode() method initiates a request to the...
Read more >Zoom to fit in Views not working on Google Map - Drupal
The zoom level set in the Google Maps Settings in Views is being used. ... setZoom() (line 228) in geolocation-api.jssolved solved the zoom ......
Read more >panTo() before setZoom() changes LatLng [35819961]
example bug code: google.maps.event.addListener(curMarker, 'click', function() { curMarker.setIcon("images/a-marker.png"); var panLoc = new google.maps.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @amysorto I would like to work on this issue if no one else is already using it. Thanks!
Seems like we are using this function already so this seems like it won’t be difficult to add: https://github.com/angular/components/blob/main/src/google-maps/google-map/google-map.ts#L290