isamplesorg / isamples_webui

Web interface to iSB and iSC APIs

Home Page:https://isamplesorg.github.io/isamples_webui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor the "Viewer Change" dialog functionality in Cesium

datadavev opened this issue · comments

Viewer Change in the Cesium view provides the option to navigate to a few specific locations or specific latitude, longitude.

Instead of a static list, we should provide the user an opportunity to save a view nd be able to return to the view at a later time. The basic process for achieving this will be:

  1. Get the camera state from cesium (e.g. api/spatial.js at 350)
  2. Save the camera state in browser local storage
  3. At a later time or a new browser session, retrieve the camera state from local storage and navigate to the specified view (e.g. api/spatial.js at 327).

Notes:

  • The user may want to store multiple views, so perhaps the camera state should be stored in a dict with user friendly labels as the key and the camera state object as the values.
  • A user may choose to not allow local storage (it's an optional security setting)
  • The camera state is just the view in Cesium, it is separate from any query the user may have issued.