We are trying to implement the map in our application(Asp.net core 5) with your latest JS library ("https://js.arcgis.com/4.26/"). But every time we are facing an issue with this library getting the below errors.1. (index):31 Error: multipleDefine2. Uncaught TypeError: KMLLayer is not a constructor
For Reference, we are using the code from the below sandboxSANDBOX LINK: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=layers-kml
@sajalpal In case you haven't already found a solution:
I had a hunch that this had something to do with my page/view references conflicting js. By doing the following, sdk 4.27 is now working.
The way I got around was to comment out this section of the shared Asp.net Core App _layout.cshtml view
<script src="~/lib/jquery/dist/jquery.min.js"></script><script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script><script src="~/js/site.js" asp-append-version="true"></script>@RenderSection("Scripts", required: false)
As it appears to conflict with any arcgis sdk of higher than 4.15. My app is now displaying sdk 4.27 without the 'not a constructor' error
Hi @sajalpal did you find a solution to this. I am facing the same issue with a Asp.net core project. My ArcGIS code works with sdk 4.15 but as soon as i reference any sdk above 4.15 it returns the ...not a constructor error. It is as if it does not read the require tags
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.