This page describes how to track View updates to render Field-Of-Views on the Reference Map.
Tracking Views means listening for changes in the number of views, or changes in the state of an individual View. To do that, use these signals :
When any of these events occur, Views should be refreshed on the map.
Use the Viewer's getFieldOfViews() function to get the list of MapObject instances that represent the Field-of-views of all Views.
/** * Update views on the map. */ function updateViews() { var mapObjects = viewer.getFieldOfViews(null/*all*/); renderMapObjects(mapObjects); } // Listen to view changes this.viewer.onViewStateChanged.add(updateViews); this.viewer.onViewOpened.add(updateViews); this.viewer.onViewClosed.add(updateViews); // Start with an update. // It may be the case that a view was already open prior to attaching our signal listener. updateViews();
See About MapObjects.