load both 3.x and 4.x in the same project
Mevius021 opened this issue · comments
Mevius021 commented
Expected behavior
- i'm using esri-loader in a vue project. i have two pages use either 3.x version or 4.x version of arcgis api for javascript.
What i'd like to achieve is something like this,
- user open first map page. the 3.x api loaded. map one showed
- user jump to second map page. the 4.x api loaded. map two showed
Actual behavior
- for step2, the 4.x api would never loaded. i have tried loadScript and setDefaultOptions.
- errors like the page is still using the 3.x version JS files from the first page.
i have read #28 , not quite understand why we want to throw a error after switching the version. Or there might be already a solution to switch versions. Thank you for the reply.
Tom Wayson commented
The only way I know to use both v4.x and v3.x in the same app is to but the part of your app that uses one of them in an iframe.
Andy commented
Closing. We recommend all new projects use 4.x.