Esri / esri-loader

A tiny library to help load ArcGIS API for JavaScript modules in non-Dojo applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Mevius021 opened this issue · comments

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 #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.

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.

commented

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