Can I use arcGIS JS API 3.28 and 4.11 at the same project?

419
5
05-22-2019 01:39 PM
RoelGarcia
New Contributor III

We have a huge application in 3.21 version and we want to add 4.11 functionality to different Map, is that possible?

5 Replies
VictorTey
Esri Contributor

Are they isolated e.g 2 different map?  can you isolate the css (not sure if they will conflict)?

0 Kudos
ReneRubalcava
Frequent Contributor II

Is there particular functionality you want from 4 to use in 3?

This still works, but of course there are limits. In order for something like this to work, the AMD loaders of Dojo need to be the same version, and each release of 3x and 4x is synced.

https://codepen.io/odoe/pen/mYXGgX?editors=1000

The web workers won't load, but it will fall back to the main thread so the API still works, you just get warnings.

RoelGarcia
New Contributor III

Hi Rene,

First, thank you so much for that example, I only have one issue with that code, I am trying to load a web map by Id, the map is loaded but it does not display any visible layers..

I got this console error:

if you know how fix that issue please let me know.

Thank you.

Roel

0 Kudos
TateM
by
New Contributor III

I was wondering about the same thing of using both versions in the same application/map view. 

In 4.x there is a view.on("drag", function(event) { // prevents panning with the mouse drag event event.stopPropagation(); });

That is useful when it comes to Mobile and touchscreen devices, preventing users to slipping when scrolling up or down the page to different sections.  I don't see that in 3.x API

0 Kudos
RoelGarcia
New Contributor III

Any Idea on that console error?

0 Kudos