Select to view content in your preferred language

multipleDefine error

3582
2
12-20-2019 05:44 AM
ScottWilson2
Emerging Contributor

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? 

Tags (1)
0 Kudos
2 Replies
ScottWilson2
Emerging Contributor

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:

0 Kudos