Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load both 3.x and 4.x in the same project #223

Closed
Mevius021 opened this issue Apr 9, 2020 · 2 comments
Closed

load both 3.x and 4.x in the same project #223

Mevius021 opened this issue Apr 9, 2020 · 2 comments
Labels
FAQ Frequently asked questions

Comments

@Mevius021
Copy link

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,
  1. user open first map page. the 3.x api loaded. map one showed
  2. 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 only return an error when trying to load a different version of the JSAPI #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.
@tomwayson
Copy link
Member

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.

@tomwayson tomwayson changed the title load different version in vue project load both 3.x and 4.x in the same project May 21, 2020
@tomwayson tomwayson added the FAQ Frequently asked questions label May 21, 2020
@andygup
Copy link
Member

andygup commented Jan 5, 2021

Closing. We recommend all new projects use 4.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FAQ Frequently asked questions
Projects
None yet
Development

No branches or pull requests

3 participants