[JSAPI 4.8 vs 4.7] Popup empty after switching map

998
3
Jump to solution
07-10-2018 12:32 PM
QiZhao
by
New Contributor III

I'm updating my app to use latest v4.8 JSAPI, while I found a potential bug of the API. In my application, user can switch different webmaps without refresh the page. However, after switching the webmap once, the popup window of the webmap become empty.

This issue does not exist in v4.7 API.

The issue only happens after changing "map" of a "view".

//change map
view.map = new WebMap({
  portalItem: {
    id: "f2e9b762544945f390ca4ac3671cfa72"
  }
});‍‍‍‍‍‍‍‍‍‍‍‍

If I create the view with WebMap in constructor, everything works fine. See the code below.

//do not change map
view = new MapView({
  container: "viewDiv"
  map: new WebMap({
    portalItem: {
      id: "f2e9b762544945f390ca4ac3671cfa72"
    }
  }),
});‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Here is a running example:

https://codepen.io/anon/pen/RBwqjz

Steps to repeat the issue with this example:

  1. Wait for the page fully loaded
  2. Click "Switch Map" button
  3. Wait for the new Web Map fully loaded
  4. Click any graphics of the Web Map
  5. The first popup should look fine
  6. Close the popup
  7. Click any graphics, then the popup will be all empty
0 Kudos
1 Solution

Accepted Solutions
QiZhao
by
New Contributor III

This issue has been fixed in v4.9 API. Thanks.

View solution in original post

0 Kudos
3 Replies
ReneRubalcava
Frequent Contributor

Just to verify, this is happening for me in Edge and Firefox on Windows. But Chrome is ok. Is that the same for you?

QiZhao
by
New Contributor III

Hi Rene,

Thanks for your quick reply. Below are the browsers in which I saw the issue:

  1. Chrome v67.0.8896.99 64-bit
  2. Chrome v66.0.3359.170 64-bit
  3. Microsoft Edge v42.17134.1.0
  4. Firefox v61.0.1
  5. Firefox v60.0.2

All the browsers mentioned above are in Windows 10 v1803 x64.

Let me know if you need additional info. Thanks.

0 Kudos
QiZhao
by
New Contributor III

This issue has been fixed in v4.9 API. Thanks.

0 Kudos