Select to view content in your preferred language

Zoom Buttons don't work in Angular Map Component

2485
13
03-14-2024 11:52 AM
ShaneBuscher1
Regular Contributor

I have a very simple Angular application containing a map component. The map renders fine, but the nothing happens when clicking either zoom button. The app is so simple I'm at a loss as to why the zoom buttons aren't working. @AndyGup would you have any pointers? Unfortunately my sample app is too large to upload here. 

13 Replies
LeeTaEthni
Emerging Contributor

neither of these work for me. 
I am curious if the issue is coming from the fact that the new zoom buttons are actually calcite-button components and angular does't know what to do with them? Do we need to install calcite and register those custom components?

0 Kudos
AndyGup
Esri Regular Contributor

The button click not working was an Angular bug that's been fixed in zone.js version 0.14.5, so you'll need to upgrade to use the "@latest" version that your Angular install supports. If you aren't able to update zone.js, then the workaround  isto disable zone.js monkey patching as documented here: https://github.com/Esri/jsapi-resources/tree/main/core-samples/jsapi-angular-cli#known-issues.

0 Kudos
AlagappanA
New Contributor

Hi @AndyGup , We tried all the steps given in https://github.com/Esri/jsapi-resources/tree/main/core-samples/jsapi-angular-cli#known-issues

We installed zone.js 0.14.5 version, then tried latest 0.14.10 version, then tried the workaround to disable monkey patching of DOM click event

Buttons on the map still didn't work. Any suggestions please ?

0 Kudos
AndyGup
Esri Regular Contributor

@AlagappanA  please provide a minimum reproducible app, here are the instructions: https://developers.arcgis.com/javascript/latest/troubleshooting/#minimal-reproducible-application. The Angular sample is a great starting place:  https://github.com/Esri/jsapi-resources/tree/main/core-samples/jsapi-angular-cli.

0 Kudos