Hexagon Geospatial
MENU

Developers Knowledge Base

WebGIS enables powerful geospatial web applications and services that securely share your organization’s rich geospatial data, and provides tools to deeply examine spatial data and create value added products, on demand.
Showing results for 
Search instead for 
Do you mean 

Context Menu Plugin

by Technical Evangelist on ‎09-09-2015 06:48 AM - edited on ‎04-07-2017 08:03 AM by Technical Evangelist (728 Views)

Context Menu Overview

The Context Menu is one of the Geospatial Portal User Interface elements that provides handling custom actions and can be extended by providing the new ones.

Guide_context_menu_1.png

Context Menu Plugin Development

Methodology

The technologies adopted in the Geospatial Portal development include JavaScript and C#. The controls provided in Portal core are developed in a way that adopts both technologies and rely on custom implementation of ExtJS and Ajax Control Toolkit.


The Ajax Control Toolkit library is responsible for the communication between server (C#) and client (JS) side of the controls.

Be Careful
Although such way of development has been used for ages, the presented solution is not prospective and may be abandoned.

There is no warranty that further Portal releases will be depended upon the Ajax Control Toolkit.

Creating the control

The Context Menu Plugin class is just a container for the actual JavaScript implementation. It has to refer the TreeTools from Portal core, which provide the ContextMenuManager class.

The JavaScript control implements the actual context menu body, using ExtJS types and structures. The actual control prototype shall contain the appropriate MenuItems methods (for different types of content: Map Services, Map Layers and Legend Items) and may introduce the additional properties passed from server (C#) side.

 

 

The difference between such terms as Map Service, Map Layer and Legend Item may be noticed below:

Guide_context_menu_2.png

The Map Service is each data source connected to the Portal. Map Layer is a term describing the group of items from one Map Service displayed on the map forming one layer. One Map Service may have many Map Layers displayed on the map in the same time. The items grouped in the Map Layer are Legend Items. Legend Item refers to a single element and there can be one or more such items forming the actual Map Layer.

Overview