3

I am new to web dev. coding. I managed to scrape together some code for a simple web GIS app. using ArcGIS Javascript API version 3.xx. The ArcGIS JSAPI app has some simple functionality like a click event that return some value back from the layers. There is an existing Angular(version 7) app running in our environment that I inherited from my other colleagues, with different modules inside of the src-->app folder already.

Can I just simply create another module inside the src-->app folder of the Angular app, maybe called it "gis-map", and copy and paste the html/js code from the ArcGIS JSAPI app into the gis-map.component.html, " ".ts, " ".css?

Will this approach work?

And could I expand that later on, to add a Angular click event on the map layers and get back the result?

1 Answer 1

0

This is likely to cause all sorts of future pain, it's much better to start with the esri v4 JavaScript API, especially if you require integration with other sections of your angular app. The v4 packages can be added using:

npm install @arcgis/core

Then there are some good tutorials on the esri website for building an angular map component.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.