help(google-maps): Can't get circle radius after radiusChanged
See original GitHub issueWhat are you trying to do?
Get the circle radius after radiuous change
What troubleshooting steps have you tried?
First approach .html
<map-circle
(radiusChanged) = circleRedim()
[center]="center"
[options] = circleOptions >
</map-circle>
.ts
circleRedim(){ //<-void
console.log(?) //<- I would like to log the new circle radius
}
Second approach
.html
<map-circle #circleRef
[center]="center"
[options] = circleOptions >
</map-circle>
.ts
@ViewChild('circleRef') circleRef: google.maps.Circle;
ngAfterViewInit() {
console.log(this.circleRef); //<- circle ref isn't an istance of google.maps.Circle
}
circleref is an ElementRef
In some way I would like to access to the Circle istance so I could manage the event radius_changed
google.maps.event.addListener(circle, 'radius_changed', function() {
console.log(circle.getRadius());
});
Thanks in advance
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Can't get circle radius after circleRedim in angular2 google ...
I found a solution here <map-circle (radiusChanged) = radiusChanged() [center]="center" [options] = circleOptions > </map-circle> ...
Read more >How Do I Show a Radius On Google Maps? - Atlist
Step 1: Locate your place on the Google Maps. Pinpoint the location you want to draw a circle around on Google Maps. I'll...
Read more >Zoom in when radius is changed in editable circle
Hi, I need to zoom in when radius is reduced and zoom out when radius is increased in editable circles using Google maps...
Read more >2 Easy Ways to Draw a Radius on a Map
You can simply click on the Draw a Circle button and then start drawing a radius on its map. With this feature, you...
Read more >Places Library | Maps JavaScript API - Google Developers
a location and a radius ; the former takes a google.maps.LatLng object, and the latter takes a simple integer, representing the circle's radius...
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
Thanks!, it works like a charm!
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.