Setup Javascript API on Visual Studio 2019

268
1
07-30-2020 01:11 PM
JorgeMaldonado
New Contributor

I am using Visual Studio 2019 with ASP.NET Core to develop a web application. I need to add a component where it shows a map. I thought of using the ArcGIS JavaScript API. However, I am not able to display the map when following the instructions of the first tutorial to display a simple map. Note that I am using the Views (.cshtml files) to diplay it. When creating a .html file, it works, the map is displayed correctly, but not for the .cshtml. Is there a specific way to setup this API when working with ASP.NET?

Also, I saw there is also an ArcGIS Pro SDK, which works with ASP.NET, will it also helps me achieve my goal??

The main functionality of my application must be to display a map, and inside that map, show different kmz/kml files.

Thanks in advance

0 Kudos
1 Reply
Noah-Sager
Esri Regular Contributor

I did some googling about cshtml and JavaScript apps. It seems cshtml and html and not compatible.

cshtml vs. html | The ASP.NET Forums 

Tutorial: Call an ASP.NET Core web API with JavaScript | Microsoft Docs 

We also offer a .NET SDK, which may be more in line with what you are looking for.

ArcGIS Runtime SDK for .NET (latest) | ArcGIS for Developers 

If not, I know we have other developers in this community who use the JS API with .NET applications, so hopefully they can add their experience here as well.

0 Kudos