AnsweredAssumed Answered

WebScene Slide: from json error + ideas

Question asked by gasparovic on Jun 5, 2018



if you serialize the fully functioning instance of Slide via '.toJSON()' and then try to make a new instance via 'new Slide(json);' the application throws an error

[esri.core.Accessor] Accessor#set Invalid property value, value needs to be one of 'esri.geometry.Extent', 'esri.geometry.Multipoint', 'esri.geometry.Point', 'esri.geometry.Polyline', 'esri.geometry.Polygon', 'esri.geometry.Mesh', or a plain object that can auto-cast (having .type = 'extent', 'multipoint', 'point', 'polyline', 'polygon', 'mesh')

I believe it's related to the viewpoint property as it's missing the type.


Here is the sample on how to reproduce. 

Web scene - slide tour - 4.7 



Would be great if Slide.fromView method would have some options if the layer list is to be saved with the slide or not. 

The reason for this is for example my scenario. I'm building an application for multiple sites that have different layer compositions. I'm using Slide (it's really great) as a bookmarks and storing them in the local storage. The problem is, that the same user might want to have the same bookmarks but for different layer compositions (pretty much just an extent and viewpoint). But now with the Slide, the layers are applied and hence nothing is visible (especially ground layers are off). Hence if I had the option of storing the layers with the bookmark or not that I could present to the user, I'd know if to store the slide for all the sites or for the single site only.