Next to your memory leak fix, I worked with angular-gm on a project :)
I saw that a reused map didn't "reset" the center and zoom, I tried to fix it by adding those two lines in angulargmMapController.js (next the line 131) :
Strangely, the above setZoom doesn't work while setCenter is ok. After digging, I saw that gmMapResize neither works with a reused map. The issue comes from angulargmMapController.js, here is the breaking line :
I guess it's better to use 'clearListeners' method for each event that needs to be cleared, so it won't break some core functions, what do you think ?
I also have another suggestion, on my project the map has a "full screen" button, on click I modify the container position, and I $broadcast the gmMapResize event.I needed to re-center the map and update some parameters, so I added this two event listeners the same way you did :
I've just noticed another side effect, if you use mapOptions, like scrollwheel, it won't be reset when the map is reused. I hope I'm not persecuting you too much :)
Hi @dylanfprice
Next to your memory leak fix, I worked with angular-gm on a project :)
I saw that a reused map didn't "reset" the center and zoom, I tried to fix it by adding those two lines in angulargmMapController.js (next the line 131) :
Strangely, the above setZoom doesn't work while setCenter is ok. After digging, I saw that gmMapResize neither works with a reused map. The issue comes from angulargmMapController.js, here is the breaking line :
I guess it's better to use 'clearListeners' method for each event that needs to be cleared, so it won't break some core functions, what do you think ?
I also have another suggestion, on my project the map has a "full screen" button, on click I modify the container position, and I $broadcast the gmMapResize event.I needed to re-center the map and update some parameters, so I added this two event listeners the same way you did :