Hi, i'm getting an error, the console is complaining about multipleDefine in init.js
It looks like an issue is with JQuery. I'm embedding my map on a 3rd party supplier form builder, they are using JQuery too: https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js
How can i stop this conflict? I don't have any control over the 3rd party code. Can i tell esri jsapi to wait on the 3rd party version of jquery to download and use that instead?
Take a look at some of these discussions:
Dojo conflict with datatables.js (Multipledefine) - ArcGIS API for JS 4.x
https://community.esri.com/message/783723-re-multipledefine-error-in-dojoloader
Hi Ken, i have checked those posts, the second one seems more relevant...
I have implemented the solution, the good news is that the multipleDefine error has gone, but i still get the scriptError, which points to the arcgis version of JQuery.
var map;
console.log("jQuery.fn.jquery: " + jQuery.fn.jquery);
dojoConfig: {
aliases: [
['jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js' ]
]
}
require([
"jquery",
"esri/map",
"esri/geometry/Extent",
"esri/SpatialReference",
"esri/dijit/Search"
],
function(
$,
Map,
Extent,
SpatialReference,
Search
) {
Error Screenshot: