Architecture suggestions for multiple maps?

03-27-2015 08:01 AM
Occasional Contributor


We have an existing application using Runtime for SDK, and I'm doing some research on how to migrate to the .NET Runtime. Our application uses MVVM.

These are the requirements:

- Multiple maps, as documents, as in Visual Studio

- All maps contains the same layers and Graphics

- Visibility of categories of objects should be able to toggle individually per map (Display all vehicles of type x, all alarms of type y) - through checkboxes made available for the user.

- Selecting an object in a list should select it in the map, and make it visible

Current Runtime for WPF implementation:

- Viewmodels are added to a "MapManager"

- Geometry is retreived from the item itself (IMapItem.GetGeometry)

- A new Graphic is created per map, and graphics duplicated x number of maps

- Updates to geometry is updated in all maps

- PropertyObservers listen to IMapItem.IsSelected to synchronize selection

- Custom renderers have been implemented to return symbol based in IsSelected attribute, or IsVisible set for item category

- Whenever a new map is created, it is added to mapManager, and then added to the UI (and graphics are duplicated)

If I can have one map, and multiple map views, that would be great. Seems there would then be an issue with setting visibility of different categories, as it would then be the same renderer/layer/graphics represented in each map. I may be able to use the same graphics in all maps (assuming there are no restrictions against that, but there doesn't seem to be). Changing visibility of layers would disable the ability to display selected graphics. Since there are no public events being raised related to Graphics.IsSelected, I'm not quite sure to reflect selection back to the MapItem, unless MapItem derives from Graphic.

Any suggestions to how to proceed?

Tags (2)
0 Kudos
0 Replies