Loading Arcgis 3.25 and 4.8 at the same time

303
5
08-15-2018 03:16 PM
juanDavid
New Contributor II

Hello, actually I have a very big app using 4.8 but now I need some functionality from 3.25 and I'm trying to load both at the same time but failed.

Here's a Sample of what I'm trying to do.

Arcgis problem 

I extracted the code from this video:

How to void your ArcGIS API for JavaScript Warranty! - YouTube 

Tags (3)
0 Kudos
5 Replies
ReneRubalcava
Frequent Contributor II

You need to set up your dojoConfig like in the video, before the CDN script tag. You have it after the CDN script tag, so it doesn't get picked up.

  <script>
    window.dojoConfig = {
      async: true,
      packages: [
        {
          name: "esri4",
          location: "https://js.arcgis.com/4.8/esri"
        }
      ],
      has: {
          "dojo-preload-i18n-Api": false
      }
    }
  </script>
  <script src="https://js.arcgis.com/3.25/"></script>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

This way you can reference 3x and 4x correctly.

Here is the demo from the video.

JS Bin - Collaborative JavaScript Debugging 

There are limitations, but you can do some stuff.

juanDavid
New Contributor II

The sample is actually not working.

0 Kudos
ReneRubalcava
Frequent Contributor II

I just loaded it, seems to be working ok. I have a 3x map on top and a 4x 3d map on the bottom.

RobertScheitlin__GISP
MVP Esteemed Contributor

Works for me too.

0 Kudos
RoelGarcia
New Contributor III

This solution does not work with API  > 4.6.

I like to find a solution to use 3.21 / 3.28 and 4.11 in the same application... please share information if you know a solution.

0 Kudos