AnsweredAssumed Answered

Switching View 2D to 3D with Feature Layer persists graphics

Question asked by JKingesriaustralia-com-au-esridist Employee on Sep 17, 2018
Latest reply on Sep 20, 2018 by JKingesriaustralia-com-au-esridist

Hey Guys,


I'm wondering if the following is a bug?


We have an app in which we have a single Map object, which is used to drive two views, one 2D and one 3D. We followed the sample on switching between 2D and 3D (Switch view from 2D to 3D | ArcGIS API for JavaScript 4.8 ), as our app only ever displays one view or the other.


The situation I have come across is this; if I add an in-memory Feature Layer, with a custom graphic source, to my Map in the 2D view. Then I switch to the 3D view, but before I do so, I remove that layer from the map before the 3D view becomes the active view. The graphics from the Feature Layer still persist in the map within the 3D view, even though the map.layers.items is zero and there are no view graphics etc. It actually happens if we add the Feature Layer whilst the 3D view is active too, then switch to the 2D view and then back to the 3D view and then remove that layer.


I've taken the 2D/3D switch sample and changed it to demonstrate the issue: Switch view from 2D to 3D - 4.8 - Feature Layer Issue? 


Is there something else we should be doing? or is this likely a bug?


We are experiencing it at 4.6, however, the sample above is at 4.8.