Select to view content in your preferred language

Using multiple versions of 4.x esri api

581
1
06-02-2021 03:13 PM
EricHermoso
Emerging Contributor

We are currently using 4.3 esri api version in our application and we want to use certain functionalities that 4.18 offers. But when request certain services from 4.18 we get an error. If we remove the line of code "<script src="https://js.arcgis.com/4.3/"></script>" it works fine.

How can we have both version running together?

Here is a link to our code. https://jsfiddle.net/dx57pyk9/6/

0 Kudos
1 Reply
mdonnelly
Esri Contributor

Hi Eric,

My feeling is that having 2 different version of the same api will likely lead to clashes when trying to resolve function, package and variable names. 

You 'might' be able to create different packages within your code that are scoped to use a particular version of the api but that would rely on you separating out code. Even then I would still be worried about resolution problems in the global scope.

Regards,
Mark
0 Kudos