Transcript
Administrator and Developer Guide
Geocortex Viewer for Silverlight 1.9
Copyright © 2013 Latitude Geographics Group Ltd.
All Rights Reserved. Printed in Canada
The information contained in this document is the exclusive property of Latitude Geographics Group Ltd. This work is protected under Canadian and US copyright law and copyright laws of the given countries of origin and applicable international laws, treaties, and/or conventions. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying or recording, or by any information storage or retrieval system, except as expressly permitted in writing by Latitude Geographics Group Ltd. All requests should be sent to Attention: Contracts Manager, Latitude Geographics Group Ltd, 200 - 1117 Wharf Street, Victoria, British Columbia V8W 1T7. This information is subject to change without notice. US Government Restricted Rights The Software and documentation are provided with restricted rights. Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer Software clause at DFARS 252.227-7013, or subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.22719, as applicable. The Contractor/Manufacturer is Latitude Geographics Group Ltd., 200 - 1117 Wharf Street Victoria, British Columbia V8W 1T7.
Geocortex and Latitude Geographics are registered trademarks of Latitude Geographics Group Ltd. in the United States and Canada, and are trademarks in other jurisdictions around the world. Esri, the Esri globe logo, ArcGIS, @esri.com, and esri.com are trademarks, service marks, or registered marks of Esri in the United States, the European Community, or certain other jurisdictions. Trademarks are provided under license from Esri. Microsoft and the Windows logo are registered trademarks of Microsoft Corporation. Other companies and products mentioned herein are trademarks or registered trademarks of their respective trademark owners.
Contents 1 Welcome 1.1 About the Geocortex Viewer for Silverlight
1 1
1.1.1 About This Guide
1
1.1.2 Disclaimer
1
1.1.3 Release Schedule
1
2 Requirements
2
2.1 Browser Requirements
2
2.2 Server Requirements
2
2.3 ArcGIS Server Requirements
3
2.4 Developer Requirements
3
3 Download Software 3.1 Download and Extract the Installation Package
4 4
3.1.1 Create a Support Account
4
3.1.2 Contents of the Installation Package
4
4 Installation
6
4.1 Installation Options
6
4.2 Install Using a Template
6
4.3 Install Manually 4.4 Launch Viewer
5 Upgrade 5.1 Upgrade
6 Architecture 6.1 Foundational Technologies
9 10
10 10
13 13
6.1.1 Microsoft Silverlight V4
13
6.1.2 Prism
13
6.1.3 ArcGIS API for Microsoft Silverlight/WPF
13
6.1.4 Geocortex Essentials Silverlight API
14
6.2 Design Principles
14
6.2.1 Configurable
14
6.2.2 Customizable
14
6.2.3 Prism Framework
14
6.2.4 Prism Modules, Views, Commands, and Events
14
6.3 Basic Components
15
6.3.1 Modules
15
6.3.2 Views
16
6.3.3 Shell
16
6.3.4 Regions
16
6.3.5 Library
17
|i
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
6.3.6 Globals
7 About Viewer Configuration
18
18
7.1 Manager vs XML Configuration
18
7.2 Configuration Files
19
7.2.1 About the Viewer.xml File
19
7.2.2 About the Viewer.Defaults.xml File
21
7.3 Startup Files and the Startup Sequence
22
7.3.1 Viewer.html
22
7.3.2 Viewer.Settings.xml
22
7.3.3 The Splash Screen and Launch Page
24
7.3.4 Specify the Viewer Configuration to Display
25
7.3.5 Startup Sequence
26
7.4 List of Predefined Silverlight Viewer Regions
8 Configure Start Up and the Interface
28
29
8.1 URL Parameters
29
8.2 Change Words on the Launch Page
30
8.2.1 Change Your Organization Name Here Graphic
30
8.2.2 Change Launch Button Text
31
8.3 Configure the Home panel
32
8.4 Change the Look and Feel
34
8.5 Change Viewer Information
37
8.6 Configure the I Want To Menu
38
8.7 Configure the Toolbar
41
8.8 Change the Behavior of Tools
47
8.9 Configure the Layer List
49
8.10 Set the Visibility of Layer Labels
51
8.11 Configure Map Widgets
52
8.12 Configure the Map Module
57
8.13 Menus
62
8.13.1 Items
63
8.14 Themes
63
8.15 Configure the Scale Range of Base Maps
64
9 Configure Modules
66
9.1 About Module Configuration
66
9.2 Enable or Disable Modules
67
9.3 Advanced Editing Module
68
9.4 Advanced Map Controls Module
69
9.5 Authentication Dialog Module
69
9.6 Banner Module
69
9.7 Base Map Control Module
70
9.8 Base Map Cache Module
71
ii | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.9 Bookmark Module
71
9.10 Callouts Module
71
9.11 Coordinate Tool Module
72
9.12 DatumTransform Module
73
9.13 Editing Module
74
9.14 Export Map Module
75
9.15 Extract Module
76
9.16 Feature Actions Module
76
9.17 Geocoding Module
77
9.17.1 Reverse Geocoding
79
9.17.2 Batch Geocoding
81
9.18 GeoRSS Module
83
9.19 Global Search Module
83
9.20 Graphics Layer Search Module
83
9.21 Help Module
83
9.22 Identify Module
85
9.23 Info Module
86
9.24 Instant Search Module
89
9.25 I Want To Menu Module
89
9.26 JavaScript Module
90
9.27 Layer Catalog Module
90
9.28 Layer Drawing Order Module
91
9.29 Layer List Module
91
9.30 Layer Search Module
95
9.31 Map Module
95
9.32 Map Tips Module
97
9.33 Markup Module
98
9.34 Measurement Module
99
9.35 Open Csv Module
100
9.36 Open Shapefile Module
100
9.37 Optimizer Integration Module
101
9.38 Overview Map Module
101
9.39 Print Templates Module
102
9.40 Progress Indicator Module
102
9.41 Query Builder Module
102
9.42 Reporting Module
105
9.43 Results Module
105
9.44 SaveOpenProject Module
105
9.45 Scale Bar Module
106
9.46 Scale Dependent Base Maps
106
9.47 Scale Slider Module
107
9.48 Selection Module
107
| iii
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
9.49 Shell Module
110
9.50 Site Module
112
9.51 Symbolization Module
112
9.52 Time Slider Module
114
9.53 Toolbar Module
116
9.54 URL Integration Module
117
9.55 User Layer Addition Module
117
9.56 Xaml Shell Module
117
9.57 Web Map Integration Module
118
9.58 Watermark Module
119
9.59 Workflow Module
119
10 Configure Features
120
10.1 Add User Layers
120
10.1.1 Configure the Add User Layers Feature 10.1.2 Configure Map Service Providers for User-Added Layers
10.2 Data Extraction 10.2.1 Set up Data Extraction
10.3 GeoRSS
122 123
128 128
136
10.3.1 About GeoRSS
136
10.3.2 Configure GeoRSS
139
10.4 Configure Map Tips
141
10.5 Configure Feature Description Hyperlinks
143
10.6 Layer Themes
143
10.6.1 About Layer Themes
143
10.6.2 Add a Layer Theme
146
10.6.3 Configure Layer Themes
147
10.7 Add Third-Party Maps
148
10.7.1 Add Existing Web Maps
148
10.7.2 About the Pictometry Extension
149
10.7.3 Viewer/Pictometry Integration
150
10.7.4 Connect to Pictometry
10.8 Help Framework
154
157
10.8.1 Help Topics/Help Manager
157
10.8.2 Invoking Help
158
10.8.3 Context-Sensitive Help
158
10.8.4 Help Module
158
10.8.5 HTML Help System
160
10.9 Include Geocoding Services in Global Search
160
10.10 Edit Attributes on the Map
161
10.11 Export Georeference Data
162
10.12 Advanced Editing Extension
163
iv | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.12.1 About the Advanced Editing Extension
163
10.12.2 Deploy the Advanced Editing Extension
164
10.12.3 Configure Layers for Editing
167
10.12.4 Disable Advanced Editing
169
10.13 Manage Service Outages
11 Configure ArcGIS Server Features
170
171
11.1 Attachments
171
11.2 Coded Value Domains
172
11.3 Subtypes
172
12 Configure Workflow
173
12.1 Configure Workflow
173
12.2 Workflow Container Configuration
175
12.2.1 Set up
175
12.2.2 Examples of Workflow Containers
176
13 Advanced Configuration 13.1 Configure XML Elements
177 177
13.1.1
XML Root Element
177
13.1.2
178
13.1.3
178
13.1.4
180
13.1.5
181
13.1.6
182
13.2 XML File Inheritance
183
13.3 Inheritance Operations
184
13.3.1 Globals
185
13.3.2 Libraries
185
13.3.3 Modules
185
13.4 Integrate Optimizer
185
14 Custom Development
186
14.1 Key Concepts
186
14.1.1 Modules
186
14.1.2 Views
187
14.1.3 Commands
187
14.2 Developer Quickstart
189
14.3 MultiView Control
189
14.4 Customize the Feature Details Dialog
192
14.4.1 Register a Custom View
195
14.5 JavaScript Integration Module
195
14.6 Composite Delegate Commands
196
14.6.1 Enumerations
197
|v
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
14.6.2 Override Default Behavior
198
14.6.3 Augment/Replace Existing Commands
198
14.7 Global Search
198
14.7.1 Interactions
199
14.7.2 Auto Complete
199
14.7.3 Search Provider Interface
199
14.7.4 Interface Methods and Properties
201
14.7.5 Register a Search Provider with Search Manager
202
15 Reference
204
15.1 Command Reference
204
15.1.1 CallOutCommands
204
15.1.2 EditingCommands
205
15.1.3 ExportCommands
205
15.1.4 ExportMapCommands
206
15.1.5 ExtractCommands
207
15.1.6 FeatureCommands
207
15.1.7 FeatureSetManagerCommands
208
15.1.8 FileCommands
211
15.1.9 FilterBuilder Commands
211
15.1.10 GeographyCommands
211
15.1.11 HelpCommands
212
15.1.12 IdentifyCommands
212
15.1.13 InfoCommands
214
15.1.14 LayerCatalogCommands
214
15.1.15 LayerDrawingOrderCommands
214
15.1.16 LayerListCommands
214
15.1.17 LayerThemeCommands
215
15.1.18 LogCommands
215
15.1.19 MapCommands
216
15.1.20 MapTipCommands
219
15.1.21 MarkupCommands
220
15.1.22 MeasurementCommands
221
15.1.23 OptimizerCommands
222
15.1.24 PrintTemplatesCommands
222
15.1.25 ProjectCommands
222
15.1.26 ReportingCommands
223
15.1.27 ResultsListCommands
223
15.1.28 SearchCommands
225
15.1.29 SelectionCommands
225
15.1.30 ShellCommands
226
15.1.31 SymbolCommands
228
vi | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
15.1.32 ThirdPartyMapIntegration Commands
228
15.1.33 ToolbarCommands
229
15.1.34 ViewCommands
230
15.1.35 VisualStatusCommands
231
15.1.36 WorkflowCommands
15.2 Event Reference
231
232
15.2.1 AuthenticationEvents
233
15.2.2 EditingEvents
233
15.2.3 FeatureEvents
234
15.2.4 FeatureSetManagerEvents
234
15.2.5 LayerThemeEvents
235
15.2.6 MapEvents
236
15.2.7 MarkupEvents
238
15.2.8 NamedEventAttribute
238
15.2.9 ProjectProgressEvent
238
15.2.10 QueryEvents
239
15.2.11 SearchProgressEvent
239
15.2.12 SiteEvents
239
15.2.13 ToolEvents
240
15.2.14 ThirdPartyMapIntegration
241
15.2.15 UIEvent
241
15.2.16 WorkflowEvents
241
16 Getting Help
243
16.1 Help and Resources
243
16.1.1 Resource Centers
243
16.1.2 Geocortex Essentials Discussion Forum
243
16.1.3 Support: Email
243
16.1.4 Send Log Files
243
16.2 Related Documents
244
16.3 Provide Feedback on Documentation
245
17 Glossary
245
| vii
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
1
1.1
Welcome About the Geocortex Viewer for Silverlight Welcome to the Geocortex Viewer for Silverlight 1.9 Administrator and Developer Guide. The Geocortex Viewer for Silverlight is a web mapping and GIS application that is both configurable and extensible. You can run the Viewer out of the box and adapt it to work with existing map services within minutes. Alternatively, you can configure the Viewer using several built-in options or extend it using custom development. The Viewer is based on Microsoft Silverlight, ArcGIS API for Microsoft Silverlight, and the Geocortex Essentials Silverlight API.
1.1.1
About This Guide The Administrator and Developer Guide explains how to install, configure, and add custom code to the Geocortex Viewer for Silverlight. This guide can be found in the installation package available on the Downloads tab of the Geocortex Support Center http://support.geocortex.com. Other resources: Help and Resources on page 243 Related Documents on page 244
1.1.2
Disclaimer The Geocortex Viewer for Silverlight works with other licensed software products. You are responsible for ensuring that all the required software licenses are in place and appropriate for your chosen system configuration. Any software installation involves some risk to your system. Make sure you back up all software and data before you install any Geocortex Viewer for Silverlight components. Please refer to your Geocortex Viewer for Silverlight software license agreement for information about limitations on liability and other legal considerations.
1.1.3
Release Schedule Although Geocortex Viewer for Silverlight was developed to be used with Geocortex Essentials and Esri’s ArcGIS API for Silverlight, the Viewer has its own development and release schedule, which is related to, but independent of, the release schedule for Geocortex Essentials.
1 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
2 Requirements
2
2.1
Requirements Browser Requirements The Geocortex Viewer for Silverlight runs on all major browsers. To run the Viewer, a browser must have the Microsoft Silverlight plug-in installed. In most circumstances, if the browser does not have the Silverlight plug-in installed when the Viewer is launched, the user is prompted to install it. The plug-in is available as a free download from Microsoft.
Silverlight plug-in requirement Software
Minimum Version
Microsoft Silverlight plug-in
2.2
4
Server Requirements There are two ways to deploy the Geocortex Viewer for Silverlight—using Geocortex Essentials, or manually: l
Using Geocortex Essentials: This method integrates the Silverlight Viewer with Essentials Manager, so you can use Manager to add viewers to your sites and configure common viewer settings.
l
Manual installation: This method is for expert users who want access to all the Viewer's configurable options, and control over where the Viewer is located. Manual installation requires an understanding of web servers. It also requires that you edit the XML files manually.
For more information about the two methods, see Installation Options on page 6.
Requirements for Manual Installations The Geocortex Viewer for Silverlight works with any web server capable of serving static content over HTTP, such as Apache Tomcat or Internet Information Services (IIS) on Windows.
Requirements for Managed Installations If you want to be able to use Geocortex Essentials Manager to manage your Silverlight viewers, you must install and deploy the Viewer following the procedure described in Install Using a Template on page 6. This procedure deploys the Viewer to IIS on the server running Essentials. In this case, the server must meet the requirements for hosting Essentials. For more information on Essentials' requirements, refer to the Geocortex Essentials Installation Guide. Managed installations of the Silverlight Viewer require Essentials 3.4 or later. We recommend Geocortex Essentials version 3.14 or later. The Viewer runs with reduced functionality on older versions of Essentials.
Versions of Windows and IIS supported by Geocortex Essentials Supported Versions of Windows Windows Server 2012
Version of IIS IIS 8.0
|2
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Supported Versions of Windows
2.3
Version of IIS
Windows 8 (Pro and Enterprise)
IIS 8.0
Windows Server 2008 R2
IIS 7.5
Windows 7 (Pro, Enterprise, and Ultimate)
IIS 7.5
Windows Server 2008
IIS 7.0
Windows Vista (Home Premium, Business, Enterprise, and Ultimate)
IIS 7.0
Windows Server 2003
IIS 6.0
Windows XP (Professional x64 only)
IIS 6.0
ArcGIS Server Requirements The Geocortex Viewer for Silverlight works with: l
ArcGIS Server 9.3
l
ArcGIS Server 9.3.1
l
ArcGIS Server 10.0 (including service packs)
l
ArcGIS Server 10.1 ArcGIS Server 10 or later is required for editing. ArcGIS Server 10.1 is required for dynamic symbolization.
2.4
Developer Requirements The table below lists the third-party software that is required if you are going to extend the Silverlight Viewer. Install this software before you install the Viewer.
Requirements for extending the Geocortex Viewer for Silverlight Software
Microsoft Visual Studio
Minimum Version 2010
Notes
You can use Web Developer Express to extend the Silverlight Viewer. A free edition of Web Developer Express is available for download from Microsoft that can be used to create Viewer extensions.
Microsoft Silverlight 4 Tools for Visual Studio 2010
4
Microsoft Expression
4
Add-on and pre-requisite files for Visual Studio 2010 to develop Silverlight 4 applications.
Blend
An application design tool for Silverlight applications. Optional if you plan to program extensions to the Geocortex Viewer for Silverlight.
Microsoft Expression Blend SDK
4
The Expression Blend Software Development Kit (SDK) for Silverlight
3 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
3 Download Software
Software
Minimum Version
Notes
4 contains redistributable components that you need for building Expression Blend 4 applications.
3
3.1
Download Software Download and Extract the Installation Package The Geocortex Viewer for Silverlight is available for download from the Geocortex Support Center (http://support.geocortex.com/).
3.1.1
Create a Support Account To access the Support Center, you need an account. If you do not have an account, there is a link on the main Support page with instructions on how to set up an account. Once you have requested an account, you will be sent an acknowledgement email. When your account has been approved, you will receive separate emails with a temporary password and information on how access the forums and personalize your password.
3.1.2
Contents of the Installation Package In the Geocortex Viewer for Silverlight section, there are several versions of the Viewer available for download. A separate download in this folder is the Geocortex Viewer for Silverlight Language Tool.zip: An application that simplifies and streamlines the process of translating the strings in the Viewer application. Inside each version of the Viewer, there are the following separate files for download: l
Administrator and Developer Guide.PDF: A printable document on how to install and configure the Geocortex Viewer for Silverlight.
l
Installation Guide.PDF: A printable document on how to install the Geocortex Viewer for Silverlight.
l
Release Notes.pdf: Information about changes included in the most recent, and past releases, of the Geocortex Viewer for Silverlight.
l
Geocortex Viewer for Silverlight 1.9.zip: A ZIP file that contains a ready-to-deploy Geocortex Viewer for Silverlight application. You can use the Viewer as it is after you install the Viewer on the web server of your choice, or you can configure and customize it. This zip file contains all the files necessary to deploy the Viewer. Because it is self contained, it includes many of the same files as those on the web page so that you can download one zipped file rather than several individual files. The zip file contains: l
Installation Guide.PDF: A printable document on how to install the Geocortex Viewer for Silverlight.
l
Administrator and Developer Guide.PDF.
l
Geocortex.Essentials.SilverlightViewer.Template.1.9.vte: The Viewer template file. Template files (.vte extension) work with the Geocortex Essentials Viewer Template Engine. This template file makes it possible to configure or customize the Viewer in Geocortex Essentials Manager. The template provides management interfaces within Geocortex Essentials Manager.
|4
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
l
README.txt: A short list of the contents of the zip file and information about this release of the Viewer.
l
Release Notes.pdf.
l
SilverlightViewer.zip: The Viewer application files.
l
Upgrader.zip: The Upgrader package contains a command-line version of the upgrade tool used by REST Manager to upgrade Viewer configurations.
To download and extract the installation package: 1. Log in to the Geocortex Support Center. 2. Select the Downloads tab. 3. Under Geocortex Essentials section, click the link to the Geocortex Viewer for Silverlight. The documentation and the zip file for the Viewer display. 4. Select the version by clicking Geocortex Viewer for Silverlight 1.9. The Zip file and documentation for the Viewer display.
Example of a download package in the Support Center 5. Click Geocortex Viewer for Silverlight 1.9.zip. You may be asked to enter your password again. When you have entered your password, the File Download dialog box appears. 6. Save the zip file to a temporary location on your computer, for example, C:\Temp\. 7. In Windows, navigate to where you saved the zip file. 8. Extract the files to a temporary folder, for example, C:\Temp\. 9. If you plan to install the files manually, copy the contents of the SilverlightViewer.zip into a folder that is accessible by a web server. If you plan to integrate the Viewer with Geocortex Essentials, see Install Using a Template.
5 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
4 Installation
4
4.1
Installation Installation Options For convenience, there are two ways to install the Geocortex Viewer for Silverlight—using Geocortex Essentials, or manually. Whether you plan to install manually or using Geocortex Essentials, you need to download the Installation package from the Geocortex Support Center (http://support.geocortex.com/).
4.2
Install Using a Template These instructions describe the steps for installing the Geocortex Viewer for Silverlight template and integrating it with Geocortex Essentials Manager. If you have the Essentials Manager web application installed, then installing the Viewer template makes it possible to use the Geocortex Viewer for Silverlight Management Pack. The Management Pack is an add-on web application that allows you to easily configure and deploy the Viewer. This option makes configuration easier and most commonly-used features can be configured when this installation method is used. If you need full control of the XML files and plan to deploy multiple web-mapping applications, then we recommend that you install the Viewer manually. If you wish to use the template install, and have not already installed Geocortex Essentials 3.14 or later, please install Geocortex Essentials using the Geocortex Essentials Installation Guide, which is listed on the Downloads tab on the Geocortex Support Center.
To install and register the Viewer for Silverlight template: 1. On the desktop, click Start, and then select Latitude Geographics | Geocortex Essentials | Post Installation Configuration.
Launch Post Installation Configuration from Start The Geocortex Essentials Post Installation Configuration window opens. 2. In the Configuration - REST Elements section, click Configure Templates.
|6
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The Installed Templates box displays a list of all the templates currently installed in this instance of the Geocortex Essentials installation. The box may be empty if no templates are installed. 3. Click Add, and when the Select a Template File dialog box opens, browse to the location where you extracted the download package. 4. Click Geocortex.Essentials.SilverlightViewer.Template.1.9.vte, which is the template file, and then click Open. If you have installed Geocortex Essentials Manager, you are prompted to install a Management Pack for REST Manager.
Prompt to install the Management Pack for REST Manager 5. Click Yes to install the Management Pack. A prompt asks you if you want to deploy the Geocortex Viewer for Silverlight application into an IIS virtual directory.
Prompt to deploy the application to an IIS virtual directory 6. Click Yes. The Deploy Template to IIS dialog box opens. In the Select Virtual Directory box, the name SilverlightViewer_1_9 is displayed as a suggested name for the new virtual directory. The URL in Register URL with Manager points to the new virtual directory.
The Deploy Template to IIS dialog box
7 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
4.2 Install Using a Template
7. In the Select Virtual Directory box, you can type a different name for the IIS virtual directory that you want to deploy your Viewer to. The virtual directory that you create here becomes the location where your application is launched from. The virtual directory must not already exist.
The Geocortex Viewer for Silverlight prefers to use a virtual directory that includes the version number as a part of its path. To make upgrades simpler, remove the version from the virtual directory path or provide another (unique) path. Then, when upgrading, rename the existing folder and re-use the virtual directory name for the new version. The registered URL of the virtual directory for the new viewer will now be identical to that of the old viewer, and you will have a backup copy of the old viewer. 8. To register the Viewer Management Pack with Geocortex Essentials Manager, ensure that the check box in front of Register URL with Manager is selected. Registering the URL makes it possible to launch your Viewers from Geocortex Essentials Manager. 9. Click Deploy. A prompt tells you that the virtual directory was created. The URL has also been registered with Geocortex Essentials Manager.
Prompt that the virtual directory has been created and the URL registered 10. Click OK. You return to the Geocortex Essentials Post Installation Configuration window. 11. In the Installed Templates box, click the name of the template. A panel with three buttons appears. You can use this panel to delete the template, install the Management Pack in Geocortex Essentials, or deploy the template to IIS.
Installed Templates box 12. Click Finish to close the Post Installation Configuration window.
|8
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
13. To verify your installation, open your browser to the virtual directory that you created. The default link to use in the browser is: http://MACHINENAME/silverlightviewer_1_9/Viewer.html 14. When the Geocortex Viewer for Silverlight tab appears, click Launch. The Viewer displays a sample map of Charlotte. You have now installed the Geocortex Viewer for Silverlight and have registered the Viewer Management Pack with Geocortex Essentials Manager. This means that you can manage Viewer configuration for new or existing sites that you create from within Geocortex Essentials Manager.
4.3
Install Manually These instructions describe the steps for manually installing the Geocortex Viewer for Silverlight web site. Before you begin, you need to ensure that your web server has a MIME type for .xap files registered or the Viewer will not load correctly. You will find instructions for adding the .XAP MIME type for IIS 6 in the MSDN Library. To install the Viewer manually: 1. Unzip the contents of the SilverlightViewer.zip archive found in the installation package into a directory accessible to your web server. For IIS users, this might be: C:\inetpub\wwwroot\Geocortex\SilverlightViewer_1_9.
Example of the folder structure of extracted files 2. To verify your installation, launch the Viewer. If you installed in the location specified above, you would use the URL: http://localhost/Geocortex/SilverlightViewer_1_9/viewer.html. 3. When the Geocortex Viewer for Silverlight tab appears in your browser, click Launch. If you are upgrading, there is an upgrade utility in the distribution package that will upgrade your configuration files to the latest version. See the README.txt file in the distribution package for details.
9 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
4.4 Launch Viewer
4.4
Launch Viewer Once installed, you can run the Viewer using a browser that is compatible with Microsoft Silverlight.
To confirm the Viewer installed correctly: 1. Log in to the machine hosting the Viewer. 2. Open your browser and in the address, type in the URL to the virtual directory that you created during installation. For example, http://localhost/SilverlightViewer_1_9/Viewer.html. 3. Select a sample Viewer from the list, and then click Launch.
5
5.1
Upgrade Upgrade If you have modified the Viewer.Settings.xml or Viewer.Defaults.xml file, your changes will be lost when you upgrade. Make a backup copy of each of these files before you upgrade. You must manually port your changes to the new files after you upgrade. See Configuration Files on page 19 and Startup Files and the Startup Sequence on page 22 for information on the locations of these files.
To upgrade existing installations of Viewer for Silverlight: 1. Download the installation package for the new version of the viewer. Follow the instructions in Download and Extract the Installation Package on page 4. 2. Launch the Geocortex Essentials Post Installation tool. For the default installation, click Start, and then select Latitude Geographics | Geocortex Essentials | Post Installation Configuration. The Post Installation tool opens. 3. In the Configuration - REST Elements section, click Configure Templates. The Installed Templates box displays a list of the templates currently installed in this instance of Essentials. If no templates are installed, the box is empty. 4. Click Add, and when the Select a Template File dialog box opens, browse to the location where you extracted the download package. 5. Select the template file, Geocortex.Essentials.SilverlightViewer.Template.1.9.vte, and then click Open. You are prompted to install the management pack.
| 10
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Prompt to install the Management Pack for REST Manager 6. Click Yes to install the management pack. You are prompted to deploy the Viewer for Silverlight application to an IIS virtual directory.
Prompt to deploy the application to an IIS virtual directory 7. Click Yes. The Deploy Template to IIS dialog box opens.
Dialog box to deploy the template to IIS 8. In the file system, rename or move the existing virtual directory. You cannot deploy the viewer to an existing virtual directory. The renamed copy is your backup. Renaming the existing directory allows you to deploy to the original location, so you preserve the viewer's launch URL.
9. In the Select Web Site box, select the website where the old version of the viewer was deployed. 10. In the Select Virtual Directory box, type the name or path to the virtual directory where the old version of the viewer was deployed. 11. If you want to be able to launch your HTML5 viewers from Manager, make sure the Register URL with
11 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
5.1 Upgrade
Manager check box is selected. If you clear the check box, the launch links do not appear in Manager, but you can still add and configure viewers in Manager. 12. Click Deploy. A message tells you that the virtual directory was created. 13. Click OK. 14. Click Finish The Post Installation tool closes. If you customized the Viewer.Settings.xml or Viewer.Defaults.xml file, you will have to manually port over your changes to the new versions of the files. Now is a good time to do that, before you verify the new installation. 15. To verify your installation, point your browser to the URL that you registered in the Post Installation tool. The default URL to enter in the browser's address bar is:
http://MACHINENAME/silverlightviewer _1_9/Viewer.html 16. When the Viewer for Silverlight tab appears, click Launch. The Viewer displays a sample map of Charlotte. You have now installed an upgrade of the Viewer for Silverlight and have registered the management pack with Geocortex Essentials. This means that you can manage viewer configuration in Manager. To complete the upgrade, you must edit each Viewer for Silverlight viewer in turn and confirm the upgrade. 17. Launch Manager and log in. 18. Edit a site that has one or more Viewer for Silverlight viewers. 19. In the side bar, click Viewers. 20. Edit a Viewer for Silverlight viewer. You are prompted to upgrade the configuration. 21. Click Upgrade. The Viewer Info page opens. If you have made manual edits to your existing viewer configuration files, this procedure could result in errors.
22. Save the site. 23. Repeat steps 22 - 24 for each Viewer for Silverlight viewer in this site. 24. Repeat steps 20 - 25 for each site. You have now upgraded your Viewer for Silverlight viewers.
| 12
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
6
6.1
Architecture Foundational Technologies The Viewer uses a number of foundational technologies, each of which provides a different set of functions. If you plan to develop custom functionality in the Geocortex Viewer for Silverlight you will need to be familiar with these technologies.
6.1.1
Microsoft Silverlight V4 The Geocortex Viewer for Silverlight is built using Microsoft Silverlight version 4. Silverlight is Microsoft’s application framework for creating rich Internet applications that contain graphics, animations, and multimedia. It is an excellent platform for hosting web mapping applications. Microsoft Silverlight is distributed as a browser plug-in and is currently supported in most browsers for the PC and Mac. If you plan to customize the Viewer, learning the basics of programming for Silverlight is a good starting point. http://www.silverlight.net/ is the best place to start for learning about Silverlight development.
6.1.1.1
Managed Extensibility Framework (MEF) MEF is a technology available in Silverlight 4 that makes it possible to development loosely coupled components that are discovered and composed at application runtime. It sounds complicated, but the core concepts are really quite simple. MEF is becoming a widely used technology and is a required skill in any .NET developer’s arsenal. For more information, go to http://mef.codeplex.com/.
6.1.2
Prism Many of the core architectural principles of the Viewer build on a Silverlight application framework called Prism. The framework originated in the Microsoft Patterns and Practices group under the name Composite WPF. It was renamed Prism and is now a supported Microsoft technology. The Geocortex Viewer for Silverlight is built on top of Prism. This means that the better you know Prism, the deeper you can go into customizing the Viewer. If you only want to know enough for basic code changes, then this guide should be enough. For more information on Prism, go to http://compositewpf.codeplex.com/.
6.1.3
ArcGIS API for Microsoft Silverlight/WPF The Geocortex Viewer for Silverlight also uses the ArcGIS API for Silverlight. This comprehensive API makes it possible for users to take advantage of ArcGIS Server’s mapping, geo-coding, editing, and geo-processing abilities from within a Microsoft Silverlight application. The Viewer uses the ArcGIS API for Silverlight to connect to ArcGIS map services and the other related functionality available through the ArcGIS Server REST API. For more information about the ArcGIS API for Microsoft Silverlight, go to ArcGIS API for Silverlight.
13 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
6.1.4 Geocortex Essentials Silverlight API
6.1.4
Geocortex Essentials Silverlight API The Geocortex Viewer for Silverlight also uses Geocortex Essentials Silverlight API, which extends Esri’s Silverlight API. It adds management, security, printing, named extents, workflow, and other commonly used functionality into an easy-to-use construct called a Site. The Geocortex Essentials Silverlight API connects to Geocortex Essentials REST Sites. For more information, go to http://resources.geocortex.com/essentials/apis/.
6.2
Design Principles The Geocortex Viewer for Silverlight is designed to be easily configurable and customizable. The principles, framework, and building blocks of the Viewer are all geared towards making it simple to extend and modify.
6.2.1
Configurable One of the core principles of all Geocortex software is that it is built for configuration rather than customization, and the Geocortex Viewer for Silverlight adheres to this principle. Configuration is done by modifying the XML files.
6.2.2
Customizable Although the preference is for configuration rather than customization, the Viewer has also been built to be customizable. Customizing is done on two levels:
6.2.3
l
Editing XML configuration files.
l
Programming the Viewer’s own API.
Prism Framework The Geocortex Viewer for Silverlight is both a typical and an atypical Silverlight application. It is typical in that it consists of a startup web page and a number of application packages called XAP files. The startup web page retrieves the Silverlight application from the server and launches it within the Silverlight plug-in. The Viewer also differs from a typical Silverlight application. Traditional Silverlight applications are monoliths of tightly-coupled Modules, which makes it complex to expand or maintain. Instead, the Geocortex Viewer for Silverlight is built as an extensible framework based on an open-source framework called Prism (http://msdn.microsoft.com/en-us/magazine/cc785479.aspx). (Microsoft is a strong supporter of the Prism project.)
6.2.4
Prism Modules, Views, Commands, and Events Prism applications are collections of loosely-coupled Modules that are discovered dynamically when the application runs. Prism Modules are designed to be independent of one another. Each Module is loaded and configured separately. In most circumstances, one Module should not be negatively impacted if another Module is not present. Modules can contain a number of views - the user-interface controls that connect to the Module. Modules and views communicate with each other by calling commands and listening for events. See the API Reference section for more information about commands and events. The About Configuration topic contains information about other Prism building blocks like Shells, Regions, and Libraries (or Assemblies). It also explains more about Modules and Views.
| 14
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The Silverlight Viewer ships with a library of commands and events that are available to use when you implement your own applications. If you do not find a command or event that gives you the functionality you need, there is a template for creating your own.
6.3
Basic Components The basic components of a Viewer are:
6.3.1
l
Modules
l
Shell
l
Views
l
Regions
l
Libraries
Modules The most important building block when you configure or create a new Viewer is a Module. Normally when you create a software application, the number of components that are in the final product is overwhelming—tools, buttons, user interfaces, graphics, files, data, web services, APIs, documentation, etc. Without a mechanism to organize and group all these components, the end result would be an unmanageable mess. The underlying unit of organization in the Silverlight Viewer is a Module. Modules are used to group related components into units that can be included or excluded, as required. The Geocortex Viewer for Silverlight has many Modules that are part of the default configuration. Some of the main ones are:
6.3.1.1
l
Markup tools
l
Banner
l
Reporting
l
Workflow
Add or Remove Functions You add or remove a function in the Viewer by adding or removing a Module. You can add new functionality to the Viewer by adding a custom Module. In most cases when you create custom tools, user interfaces, or other functionality, you organize the functions into a Module, and then include the new Module. Similarly, you can create a simple, stripped-down application by deleting Modules and keeping only a few essential ones.
6.3.1.2
Settings In each Module, there are settings that are common to all Modules, as well as settings unique to that Module. For example, the settings for a Banner Module may contain unique URIs for graphics displayed in the banner, as well settings for the color for the banner text. These settings are unique to the Banner Module. The Banner Module also contains information about the Module ID, as well as where to load the Module from and these settings are common to other Modules. Version 1.9 of the Geocortex Viewer for Silverlight contains many Modules and it is the individual settings within these Modules that allow you to control exactly how your Viewer application functions.
15 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
6.3.2 Views
6.3.2
Views Every part of the Geocortex Viewer for Silverlight is either a View or is contained inside a View. A View is the user interface component of a Module. It displays output or accepts input in order to control the behavior of the application. For example, in the Viewer, the Map, Map Layers panel, Tool bar, Overview map, Banner, Navigation bar, Results panel, etc. are all Views. One of the unique characteristics of Views is that they are loosely coupled, which means that ideally, one View does not depend on another View to operate. This independence means that it is relatively easy to replace a particular View with another View that better suits your requirements. Views are the individual user interface components of an application and are placed into specific Regions. The Views and all the other related code are grouped into Modules.
6.3.3
Shell Every Viewer has a Shell. The Shell defines the layout of the user interface. The Shell is a container for placeholder areas called Regions. Shells are usually created by a designer using Xaml.
6.3.4
Regions A Region is a defined area within the Shell that is a placeholder into which Views are placed and displayed. A Region can be an empty floating panel window, a position in the toolbar for adding tools, a position on the map for showing map information, or a dedicated frame with the user interface. A Region is simply a designated placeholder into which a visual element is placed. The mapping of Views into Regions within a Shell gives you flexibility when it comes to the design and layout of a custom user interface. The Geocortex Viewer for Silverlight has a number of defined regions that are shipped with the Viewer. Many of the modules can work in more than one region. The regions are also parameters that can be set in modules or views. The graphic below indicates the various regions shipped with the Viewer and their names.
| 16
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Default regions of the Geocortex Viewer for Silverlight
6.3.5
Library Finally, the Modules, the Shell, and all other related files are packaged together into one or more Libraries that are downloaded by the Viewer at runtime. A Library, also sometimes referred to as an assembly, is the packaging into which all of the code, images and other application pieces get bundled. The Viewer XML configuration files call the libraries, which are then downloaded— usually when the application starts. Libraries often contain multiple Modules. The diagram below illustrates this architecture.
17 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
6.3.6 Globals
Diagram of the Viewer building blocks
6.3.6
Globals A global is a key-value pair that when referenced elsewhere in the configuration allows you to substitute a key with a value. An analogous concept from the programming world is a variable or a constant. Globals allow you to define a value once and to reuse that value in multiple places so that if you want to change that value in the future, you only have to change it in one place. Global values can also be overridden by child configuration files. This allows for a common pattern where you alter the configuration of a module in a child configuration file by simply changing the global value, without overriding the entire module. The most common usage of this pattern is for defining the SiteUri. Globals are very often simple primitive values, such as strings or numbers, but can also contain arbitrarily complex XML in the inner XML portion of the element. See also... Foundational Technologies on page 13 Design Principles on page 14
7
7.1
About Viewer Configuration Manager vs XML Configuration There are two ways to configure a Silverlight Viewer: l
Manager: Use Essentials Manager. This option is open to you only if you used the Post Installation tool to install the Silverlight Viewer, and you have deployed the Viewer's Management Pack. See Installation Options on page 6 for information.
l
Manual: Edit the Viewer configuration files in a text editor or XML editor.
You can edit all the Silverlight Viewer's common settings using Manager. In a few advanced situations, you might have to edit a configuration file.
| 18
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Manual editing of XML configuration files can be prone to error. It is recommended for advanced users only. Incorrect XML configuration can result in the Viewer's configuration becoming unreadable by the Geocortex Viewer for Silverlight Management Pack and the Geocortex Viewer for Silverlight application.
7.2
Configuration Files Each Silverlight Viewer you add to a site has two configuration files: l
Viewer.xml : Contains configuration that is specific to the Viewer, including your custom configuration. When you configure a Silverlight Viewer in Manager, the configuration changes you make are stored in this file.
l
Viewer.Defaults.xml : Contains configuration that is common to many Silverlight Viewers. The Viewer shares this file with all the Silverlight Viewers that use the same Viewer template. This file includes the list of Modules that are loaded for Silverlight Viewers.
Together, the Viewer.xml and Viewer.Defaults.xml files control how the Viewer looks and functions. If a particular Viewer setting is configured in both files, the custom configuration in Viewer.xml overrides the configuration in Viewer.Defaults.xml .
7.2.1
About the Viewer.xml File When you add a Silverlight Viewer to a site in Manager, Essentials creates a minimal Viewer.xml configuration file for the Viewer. The minimal configuration file does the following: l
Globals: Gives initial values to the Viewer's global settings, including the SiteUri setting, which specifies the URI where the site's REST endpoint is located.
... You can use the names in the Globals section as replacement tokens in the Viewer.xml file (and other files containing custom configuration, if there are any). For example, if you want to use the string "Geocortex Viewer for Silverlight" somewhere in the Viewer.xml file, you can type "{BrowserTitle}" (without the quotation marks ) instead of "Geocortex Viewer for Silverlight"—the Viewer application substitutes each instance of {BrowserTitle} with Geocortex Viewer for Silverlight throughout the file. The curly brackets around the global setting’s name are required. l
Location of Other Configuration Files: Specifies the location of any other configuration files for this Viewer, including the Viewer.Defaults.xml file.
l
Section for Custom Development: Provides placeholder elements where you configure any custom Modules,
19 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
7.2.1 About the Viewer.xml File
Libraries, and Resources you develop.
The following markup shows a subset of the default Viewer.xml file that is created when you add a Silverlight Viewer to a site, without changing any of the Viewer's settings. To shorten the markup, a number of the elements within the
Globals element have been removed.
Subset of the default Viewer.xml file ... The default Viewer.xml file is quite short, because most of the settings come from the Viewer.Defaults.xml file. As you customize a Viewer, its configuration file becomes longer. For example, if you add a menu item to the I Want To menu in Manager, a new Item element is added to the
IWantToMenu element in the Viewer.xml file . To see an example of what the newly created markup would look like, refer to I Want To Menu Module on page 89 in the "Configure Modules" section of this guide—the "Configure Modules" section shows sample markup for every configurable module.
Viewer.xml files are upgraded automatically, provided you follow the instructions given in Upgrade on page 10. After upgrading, the Viewer.xml file contains whatever is new in the Silverlight Viewer, plus all your custom configuration—your configuration is preserved. When you add a Silverlight Viewer to a site in Manager, the Viewer.xml is created in the Config sub folder of the Viewer's virtual directory. For example, if you add a Viewer called "sv" to the "MySite" site, then the Viewer's configuration file is in Sites\MySite\Viewers\sv\VirtualDirectory\Config .
| 20
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Location of the Viewer.xml file for the "sv" Viewer in the "MySite" site As an advanced option, you can locate the Viewer application and the Viewer.xml file on different servers or domain names, as long as the Viewer application running in the user's browser has HTTP access to the configuration file. If you put the Viewer.xml file on a different web host name than the Viewer, you need to create a
clientaccesspolicy.xml on the server with the Viewer.xml files, to allow cross-domain access. The Silverlight Viewer ships with a client access policy that you can adapt to your security needs. You can rename the Viewer.xml file if you want. If you rename it, make sure you use the new name in launch URLs and in the Viewer.Settings.xml file. The Viewer.xml files that are deployed to IIS are for the sample Viewers that ship with the Silverlight Viewer.
7.2.2
About the Viewer.Defaults.xml File By default, most of the configuration settings for Silverlight Viewers are in the Viewer.Defaults.xml file, which is part of the Viewer template. Every Silverlight Viewer that uses a particular template shares the default settings specified in the template's Viewer.Defaults.xml file. To override a default setting for a particular Viewer, you change the Viewer's configuration. This is usually done in Manager, which writes your modifications to the Viewer's Viewer.xml file. When the Viewer runs in a browser, settings from both the Viewer.xml and Viewer.Defaults.xml files contribute to the application's appearance and behavior. If a setting is configured in both files, the value in the Viewer.xml file overrides the value in the
Viewer.Defaults.xml file.
21 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
7.3 Startup Files and the Startup Sequence
If you do not want your Viewer to use the defaults defined in Viewer.Defaults.xml , you can add the attribute
InheritFromDefault="false" to the Configuration element in the Viewer's Viewer.xml file, like this: . Alternatively, you can comment out the ExternalConfig element in the Viewer.xml . As an advanced option, you can modify the Viewer.Defaults.xml file, however, any changes you make will be lost the next time you upgrade the Viewer template. To carry your changes forward after upgrading, you have to manually copy over the changes you made from the old version of the file to the new version. Refer to the Knowledge Base on the Geocortex Support Center (support.geocortex.com) for instructions on locating and changing the file. The Viewer.Defaults.xml file that is deployed to IIS when you deploy the Viewer template is for the sample Viewers that ship with the Silverlight Viewer. Changing this file will have no effect on your Viewers. Silverlight Viewers that you add to your sites use the Viewer.Defaults.xml file that is in the Viewer template file specified in the ExternalConfig element in the Viewer.xml file.
7.3
Startup Files and the Startup Sequence The Silverlight Viewer has two main startup files: l
Viewer.html: Launches the Geocortex Viewer for Silverlight in a browser.
l
Viewer.Settings.xml: Controls how the Geocortex Viewer for Silverlight loads Viewers, and the locations they load from.
7.3.1
Viewer.html Viewer.html is the file that end users run to launch the Silverlight Viewer. You can provide users with a hyperlink to the Viewer.html file, or you can distribute the URL to Viewer.html .
7.3.2
Viewer.Settings.xml The Viewer.Settings.xml file controls the loading of Viewers.
Viewer.Settings.xml provides a quick and easy way to launch Viewers by shortening the URL. However, since this file is not managed by REST Manager, it will be replaced when you upgrade to a newer version of the Viewer. If you modify the Viewer.Settings.xml file, and then you upgrade the Viewer, your changes will be lost—you will have to manually copy your changes to the new version of the file after you have upgraded. The Viewer.Settings.xml file is optional. If your launch URLs use the ViewerConfig URL parameter, which specifies the location of the configuration file, you do not need the Viewer.Settings.xml file.
The Viewer.Settings.xml file is located in the IIS virtual directory where you deployed the Silverlight Viewer. In the default deployment, this is C:\inetpub\wwwroot\SilverlightViewer _1_9. The default Viewer.Settings.xml file that ships with the Silverlight Viewer does the following: l
Launch Page: Specifies a Launch Page.
l
Default Viewer: Specifies the default Viewer to launch.
| 22
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
l
List of Viewers: Lists Silverlight Viewers and specifies the location of each Viewer's configuration file. This list has two purposes: l
It allows you to launch a Viewer without specifying the location of the Viewer’s configuration file—the Viewer application looks up the location in the Viewer.Settings.xml file.
l
It allows the Launch Page to list the viewers so the user can select one to load.
l
List of Servers: Provides markup to automatically search the specified servers for Silverlight Viewers, so the Viewers are included in the list on the Launch Page.
The following markup shows a subset of the Viewer.Settings.xml file that ships with the Silverlight Viewer. (To shorten the markup, a number of the ViewerConfig elements, and the instructions for using RemoteSettings , have been removed.)
Subset of the default Viewer.Settings.xml file --> The elements in the Viewer.Settings.xml file are: l
Settings : The Settings element has a DefaultViewerID attribute that defines the default Viewer that launches when the user runs Viewer.html .
23 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
7.3.3 The Splash Screen and Launch Page
In the out-of-the-box Viewer.Settings.xml file, the default Viewer is the Launch Page, which lists the available Viewers for the user to choose from. (The Launch Page is actually a very simple Viewer—that is why it is configured like a Viewer in Viewer.Settings.xml .) l
RemoteSettings : Used to list servers to search for Silverlight Viewers. Each RemoteUri element specifies a server to search. RemoteUri uses the Silverlight Viewer's Globally Unique Identifier (GUID)—E7A9CE23E047-4732-B8B7-DEB7F694B696—to identify Silverlight Viewers on the server. If you are using the Launch Page, the Viewers are included in the list on the Launch Page. In the default Viewer.Settings.xml , RemoteSettings is commented out. To use RemoteSettings , follow the instructions in the Viewer.Settings.xml file. The RemoteSettings element is useful in a development environment, but may not offer adequate performance for a production system.
l
ViewerConfigs : Used to list Silverlight Viewers that are available to be loaded. Each ViewerConfig element maps a Silverlight Viewer to the location of its Viewer.xml file. In the default Viewer.Settings.xml file, the Viewer configurations are all on a path that is relative to the
Viewer.Settings.xml file—they are on the same server as Viewer.Settings.xml . Viewer configurations can also be located on a different server. Initially, the Viewer.Settings.xml file lists the sample Viewers that ship with the Silverlight Viewer. When you have configured Viewers for your sites, you can replace the sample Viewers listed in Viewer.Settings.xml with your Viewers. You can also replace the title. Alternatively, if you do not want to use the Launch Page at all, you can remove it.
7.3.3
The Splash Screen and Launch Page Splash Screen The splash screen is the screen that displays in the browser while the Viewer is loading. The Silverlight Viewer's splash screen provides a place to display a title and logo. It also displays progress messages related to the startup process. For information on adding your logo and title to the splash page, see Change Words on the Launch Page on page 30.
Default Silverlight Viewer splash screen
| 24
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
When the startup process completes, the splash screen closes and the specified Viewer displays. If a Viewer configuration is not specified, an HTTP error displays. For information on specifying the Viewer configuration, see Specify the Viewer Configuration to Display on page 25.
Launch Page After the splash screen closes, the Viewer displays in the browser. By default, the Viewer that displays is the Launch Page—the Launch Page is really a simple Viewer. Like the splash screen, the Launch Page has a place for you to add your title and logo—it uses the same title and logo file as the splash screen, described in Change Words on the Launch Page on page 30. In addition, the Launch Page provides a way to select a Viewer configuration to display—it has a drop-down list of available Viewer configurations, and a Launch button that launches the selected configuration.
Default Launch Page with drop-down list of available Viewer configurations To launch a configuration, the user selects a Viewer configuration from the drop-down list, and then clicks the Launch button. In the following screen capture, the user has launched the sample Charlotte Viewer. The drop-down list of available Viewer configurations is populated using settings configured in the
Viewer.Settings.xml file. To be included in the drop-down list, a Viewer must either be specified in a ViewerConfig element, or it must be configured on a remote server that is specified in a RemoteUri element. The Launch Page is optional. You can change the default Viewer specified in the Viewer.Settings.xml file, or you can bypass the Viewer.Settings.xml file altogether by using launch URLs that specify the location of the Viewer configuration to load. The next section explains how to do this.
7.3.4
Specify the Viewer Configuration to Display To load a specific Viewer and site, the Viewer application must know the location of the Viewer configuration file to load. There are several ways to specify the Viewer configuration to display: l
ViewerConfig URL Parameter: Use the ViewerConfig parameter in the launch URL to specify the URL of the viewer configuration file to load. For example, the following launch URL uses the ViewerConfig parameter to specify the location of the
Viewer.xml file:
25 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
7.3.5 Startup Sequence
http://server.mydomain.com/silverlight/Viewer.html?ViewerConfig= http://server.mydomain.com/Geocortex/Essentials/REST/sites/Charlotte/ viewers/CharlotteViewer/virtualdirectory/Config/Viewer.xml If you provide your users with URLs (or links to URLs) that use the ViewerConfig parameter, you do not need to have a Viewer.Settings.xml file. l
Viewer URL Parameter: Use the Viewer parameter in the launch URL to specify the ID of a Viewer that is listed in a ViewerConfig element in the Viewer.Settings.xml file. The ViewerConfig element maps the Viewer ID to the location of the configuration file to load. For example, if the launch URL is:
http://www.mydomain.com/silverlight/Viewer.html?Viewer=Charlotte and Viewer.Settings.xml contains:
then the location of the configuration file (relative to the Viewer.Settings.xml file) is:
Charlotte/Viewer.xml l
Default Viewer: If the URL used to launch the Viewer does not contain a ViewerConfig or Viewer parameter, the Viewer ID specified in the Viewer.Settings.xml file's DefaultViewerID attribute is matched to a ViewerConfig element. The ViewerConfig element maps the Viewer ID to the location of the configuration file to load. For example, if Viewer.Settings.xml contains:
and
, then the location of the configuration file (relative to the Viewer.Settings.xml file) is:
Charlotte/Viewer.xml
7.3.5
Startup Sequence This startup sequence is for the default Silverlight Viewer deployment. It assumes you deployed the Management Pack and viewer template using the Post Installation tool, and you have not changed the startup or configuration files. Also, you have added at least one Silverlight Viewer to a site using Manager. The startup sequence for the Silverlight Viewer is as follows: 1. The user launches the Geocortex Viewer for Silverlight by running Viewer.html (or a web page with equivalent content). This runs the Viewer application in the Silverlight plug-in. The Launch Page starts loading in the user's browser. It displays the percent completion as it loads. 2. The Viewer application downloads the Viewer.Settings.xml file from the web server where the Viewer is deployed.
| 26
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
3. The Viewer application looks for the location of a Viewer.xml configuration file to load. It looks in the following places, in the given order: l
ViewerConfig URL Parameter: The Viewer looks for the ViewerConfig parameter in the launch URL. The ViewerConfig parameter is assigned the URL to the Viewer.xml file to load.
l
Viewer URL Parameter: If the Viewer does not find a ViewerConfig parameter in the launch URL, it looks for the Viewer parameter in the launch URL. The Viewer parameter is assigned a Viewer ID, which is matched to a Viewer ID listed in a ViewerConfig element in Viewer.Settings.xml . The ViewerConfig element maps the Viewer ID to the URI of the
Viewer.xml file to load. l
Default Viewer: If the Viewer application does not find a Viewer parameter in the launch URL, it looks for the DefaultViewerID attribute defined in Viewer.Settings.xml . The DefaultViewerID attribute is assigned a Viewer ID, which is matched to a Viewer ID listed in
Viewer.Settings.xml . The ViewerConfig element specifies the URI of the Viewer.xml file to load. 4. The Viewer application downloads the Viewer.xml file. 5. The Viewer application downloads any Module XAP files listed in the Viewer.xml file. Initially, there are no Module XAP files listed. If you purchase an Essentials extension, or you create custom Modules, you will list the Module XAP files in the Viewer configuration file. 6. The Viewer downloads the configuration for any ExternalConfig files listed in the Viewer.xml file. By default there is only one ExternalConfig file, Viewer.Defaults.xml , which contains the factory defaults for the Silverlight Viewer. 7. The Viewer application repeats steps 4 - 6 for each ExternalConfig file configured in the Viewer.xml file. 8. The Viewer application downloads the site from the Essentials REST Endpoint. The request looks like this:
https://hostname/Geocortex/Essentials/REST/sites/mySite?f=json&deep=true This is a “deep initialization” of the site—it returns all the site details in one REST call, in JSON format. If the site is secured with Essentials token security, the Viewer will prompt for credentials at this point and retry until it receives a JSON response containing the site. 9. For each map service in the site, the Viewer application downloads the service information from the ArcGIS REST Endpoint or OGC WMS service. The request looks like this: l
ArcGIS Server: https://hostname/arcgis/rest/services/myMap/MapServer?f=json
l
WMS: https://hostname/mapserver?SERVICE=WMS&REQUEST=GetCapabilities
The service information contains layer information, scale information, and other things that the Esri API needs to draw the map. ArcGIS Server returns a JSON text response. WMS services return XML. 10. For each map service in the site, the Viewer application downloads the resources needed to draw the map. If the service is a dynamic service, this is a single JSON (ArcGIS Server) or XML (OGC) request to draw the entire map. If it’s a cached service, this is several tile requests which will be aligned by the Viewer. If it’s a feature service, this is a JSON request that has a JSON response that represents geometries. 11. The Viewer application downloads static content needed to finish drawing the interface. Static content includes icons, XAML (for Viewer layout), and language resources.
27 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
7.4 List of Predefined Silverlight Viewer Regions
12. The progress bar is removed. 13. The Viewer application finishes drawing the interface.
7.4
List of Predefined Silverlight Viewer Regions Silverlight Viewer Regions AdvancedControlsRegion
Viewer.defaults.xml : Toolbar module
BelowMoreRegion
shell
BookmarksRegion
AdvancedMapControls module
BottomLeftMapRegion
shell
BottomMapRegion
shell
BottomRightMapRegion
shell
CoordinatesRegion
shell
CoordinateToolsRegion
Viewer.defaults.xml : Toolbar module
DataRegion
shell
DrawingToolsRegion
Viewer.defaults.xml : Toolbar module
FeatureDetailsContentRegion
MapTips module
FooterRegion
shell
HeaderRegion
shell
IdentifyRegion
Viewer.defaults.xml : Toolbar module
InnerBannerContent
Banner module
LeftMapRegion
shell
MapRegion
shell
MapTipsRegion
MapTips module
MeasurementToolsRegion
Viewer.defaults.xml : Toolbar module
NavigationRegion
shell
QuickLinks
Toolbar module
ResultsHistoryRegion
Results module
ResultsRegion
shell
| 28
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Silverlight Viewer Regions
8
8.1
ResultsSelectionRegion
Results module
ToolbarRegion
shell
TopLeftMapRegion
shell
TopMapRegion
shell
TopRightMapRegion
shell
UpperBottomLeftMapRegion
shell
Configure Start Up and the Interface URL Parameters The Geocortex Silverlight Viewer has several parameters that you can pass to it by default. These parameters control the Viewer at start up. (In different contexts, similar features are called Start-up Parameters or 3rd party integration.) For example, you can use these parameters to: l
Open the Viewer and immediately zoom to a specific extent.
l
Open the Viewer and perform an Identify at a specific point.
l
Open the Viewer and perform an attribute search.
l
Open the Viewer to a particular layer theme.
URL parameters are passed in the URL for the Silverlight Viewer. The Silverlight Viewer also supports the following parameters: Parameter Name
Module
Description
Syntax
attributeSearch
GlobalSearch
Performs a search Layer and Field.
attributeSearch=layerName, fieldName,matchValue1, matchValue2,..MatchValueX
Identifies based on a
identify=x,y
against the specified
identify
Identify
point or an extent.
identify=minX,minY,maxX,MaxY extent
Map
Zooms the map into
extent=minX,minY,maxX,MaxY, wkid
the extent based on a pair of map coordinates.
layerTheme
Map
Activates the spelayerTheme=ID cified layer theme. The value of this paralayerTheme=DisplayName meter can be either the display name or
29 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.2 Change Words on the Launch Page
Parameter Name
Module
Description
Syntax
the ID of the layer theme.
proj
Measurement
Changes the
proj=wkid,units
measurement projection.
showOverviewMap
OverviewMap
When set to true ,
showOverviewMap=trueOrFalse
displays the overview map.
showAdvancedTools
Shell
When set to true , shows the Advanced
showAdvancedTools= trueOrFalse
tools.
showDataFrame
Shell
When set to true ,
showDataFrame=trueOrFalse
opens the data frame.
runWorkflow
Workflow
Runs the specified
runWorkflow=workflowId1,workflowId2
workflows. This parameter accepts a comma separated list of workflow IDs to run. These parameters are appended to the Silverlight Viewer URL using the ampersand character & in between parameters.
Examples: This example, if it were pointing to a server, would load the Viewer and perform a search:
http://server.host.com/Geocortex/SilverlightViewer/110/Viewer.html? Viewer=CharlotteBingMaps&attributeSearch=Parcels,OWNERFIRST,john,jane,jerry In this case, the parameter is attributeSearch=Parcels,OWNERFIRST,john,jane,jerry. This example, would load the Viewer with a particular layer theme:
http://myserver/Geocortex/SilverlightViewer/Viewer.html?Viewer=MyViewer&LayerTheme=2 In this case, the parameter is layerTheme=2 . The ID of the layer theme is 2.
8.2
8.2.1
Change Words on the Launch Page Change Your Organization Name Here Graphic One of the first things you can modify in the Viewer is the wording on the Launch Page. The words Your Organization Name Here are actually a small graphic that can be replaced. The size of the default graphic is 340 x 30 pixels. Your replacement graphic does not have to be the same size, but a large graphic takes longer to load and
| 30
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
may be larger than the viewable area.
Launch Page graphic
To replace the Launch Page graphic: 1. In Windows, navigate to the directory where your Viewer is installed. For example, when it is manually installed, the Viewer would likely be in the following directory: C:\inetpub\wwwroot\SilverlightViewer_1_9. 2. Navigate to the Images folder. In the example above, this would be: C:\inetpub\wwwroot\SilverlightViewer_1_ 9\ClientBin\Resources\Images. The folder contains the following graphic:
Splash Title graphic 3. Create a graphic with your own wording. 4. Name your graphic SplashTitle.png, and save the new graphic to the same folder so that it overwrites the original. When you open the Viewer, your graphic displays in the Launch Page. The Viewer infrastructure currently only supports images in the .png format.
8.2.2
Change Launch Button Text You can change the wording on the Launch button on the Launch page. Because this part of the application is loaded early, the strings on the page are not part of the XAP file used by the Geocortex Language Tool to translate the GUI strings. The text on the button is controlled by a variable in the Viewer.Settings.xml file of the Viewer;
.
Example Configuration
31 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.3 Configure the Home panel
…
8.3
Configure the Home panel The Home panel was added in version 1.9 of the Geocortex Viewer for Silverlight to provide an easy entry point for end users when they first open the Viewer. It is easiest to configure the Home panel in Geocortex Essentials but you can configure the panel by adding code to the Viewer.xml file of a particular viewer. See Info Module on page 86 for more information. Using settings in Geocortex Essentials, you can configure the Home panel to: l
Be visible when the user first opens the viewer.
l
Close if the user clicks
l
Re-open if the user clicks a tool added to the toolbar.
.
To configure the Home panel in Essentials. 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose look and feel you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Look and Feel. The Look and Feel page opens. 6. Click the Layout tab and scroll down to the Home panel section. 7. If you want the Home panel to display as the user opens the viewer, in the Data Frame section, select Open By Default. 8. In the Home panel section, do any of the following: l
To hide the Home panel, deselect the Show Home panel check box.
l
To turn off the ability of end users to close the Home panel, deselect the Can Close check box.
l
To change the image used in the title bar and on the tab of the Home panel, paste a new URL into the Icon URI box, or click Browse to load a new icon.
l
To change the title text of the Home panel, type the new text into the Title box.
l
To configure the content of the Home panel, use the rich text editor to add text, images, and links to the panel.
| 32
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
You can only add images to the Home panel by entering an absolute or a relative URL. If you use an absolute URL, the image appears in the rich text editor so you can preview it, although this is not recommended. If you use a relative URL, you see only a placeholder icon, for example, actual image only appears in the viewer. l
. The
To toggle between the Rich Text mode and HTML mode in the rich text editor, click the Show Source icon. You can copy and paste HTML or XHTML code into the content box if you are in HTML mode, which allows you to create the content outside of Geocortex Essentials.
9. Click Apply Changes, and then Save Site.
To add a tool to open the Home panel from the toolbar: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Toolbar. The Toolbar page opens. 6. Click Copy Defaults to populate the boxes with the default tools available for the toolbar. 7. In the Configured Toolbar box, beside the Getting Around group, click the Add Group
icon.
8. In the Add Group dialog, type Home, and then click OK. 9. From the Available Tools box, under the Getting Around section, drag the Home tool into position on the toolbar.
33 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.4 Change the Look and Feel
10. Click Apply Changes, and then Save Site. See also... Info Module on page 86
8.4
Change the Look and Feel You can configure many aspects of a viewer's appearance, including the layout, colors, and images used in the viewer's user interface. In Manager, the Look and Feel page provides settings that control the viewer's appearance. The settings are on the following tabs: l
Banner tab: Provides settings that control the banner's images and text.
l
Layout tab: Provides settings that control the viewer's layout.
l
Theme tab: Provides settings that control the color scheme used throughout the viewer.
1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose look and feel you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Look and Feel. The Look and Feel page opens.
Configure the Banner The banner is the area at the top of the viewer that optionally contains the title and logo.
| 34
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Settings The Banner tab on Manager's Look and Feel page has the following settings: l
Browser Title: The title to display in the browser’s title bar or tab.
l
Application Title: The title to display in the banner. If you want control over the font and size, leave the Application Title box blank, embed the title in an image with the logo, and specify the image using one of the settings.
l
Left Image URL: The URL to the image that forms the left side of the banner. This setting is often used for the image containing the logo and title.
l
Background Image URL: The URL to the banner’s background image. Use this setting to add texture to the background color.
l
Right Image URL: The URL to the image that forms the right side of the banner. This setting is often used for the image containing the logo and title.
l
Show Banner: If this check box is selected, the banner shows in the viewer. If the check box is cleared, the viewer does not have a banner.
Configure the Layout The layout settings control what regions the viewer has, their size and position, and whether they are open when the user launches the viewer.
Main areas in a Silverlight viewer
Toolbar l
Open by Default: If this check box is selected, the advanced toolbar is visible when the user launches the viewer. If the check box is cleared, the advanced toolbar is initially collapsed.
35 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.4 Change the Look and Feel
General l
Flow Direction: The direction of wording and information in the viewer—left to right, or right to left. The default is left to right. Change this setting if your viewer's text is written in a right-to-left language, such as Arabic.
Data Frame (Information Pane) The data frame is a panel that is pinned to the left or right edge of the viewer. The data frame can be used to display map layers, search results (in list or table format), workflow steps, and more. l
Open by Default: If this check box is selected, the side panel is open when the user launches the viewer. If the checkbox is cleared, the side panel is initially closed—it opens automatically when the user performs some action that uses it.
l
Resizable: If this check box is selected, the user can resize the panel by dragging its edge. If the check box is cleared, the side panel is Default Width wide.
l
Position: The side of the viewer that the panel is pinned to—left or right. The position of the data frame is not affected by the flow direction.
l
Min Width: The minimum width that the user can make the panel if it is resizable. If the Resizable check box is cleared, the Min Width setting has no effect.
l
Max Width: The maximum width that the user can make the panel if it is resizable. If the Resizable check box is cleared, the Max Width setting has no effect.
l
Default Width: The width of the panel the first time when it opens. If the user resizes the frame, Essentials remembers its new width.
Results Frame (Wide View) The results frame is a panel that is pinned at the bottom of the viewer. The results frame can be used to display search results (in list or table format), map layers, workflow steps, and more. l
Results View Region: The region of the viewer where results, such as search and identify results, are displayed. If you select DataRegion, results display in the side panel. If you select ResultsRegion, results display in the bottom panel.
l
Results View Mode: The format to display results—list or table. Usually list format is better for the side panel (the data frame) and table format is better for the bottom panel (the results frame).
Configure the Theme The theme controls the colors used in the viewer's panels, toolbar and other viewer components. The Geocortex Viewer for Silverlight ships with a number of themes that you can either use as is, or customize.
To use a factory theme: 1. Select a theme from the Theme drop-down list. 2. Click Apply Changes. 3. Click Save Site.
| 36
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
To customize a theme: 1. Select a theme from the Theme drop-down list. 2. Click Save Copy. The Save as New Theme dialog box opens. 3. Enter a name for your custom theme. The name is visible in Manager only—it is not visible in the browser. 4. Click OK. The XML file becomes editable. 5. Edit the XML as desired.
To save your changes: 1. Click Apply Changes. 2. Click Save Site.
8.5
Change Viewer Information The Viewer Info page in Manager has meta information and high-level settings such as the viewer's display name, the location of its configuration file, and a link to launch the viewer. The launch link provides a quick way to view the changes you make to the viewer's configuration.
To open a viewer Info page in Manager: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose information you want to change. 4. Click the Edit button The Viewer Info page opens.
Settings The Viewer Info page has the following settings and information: l
Display Name: Used to refer to the viewer in Manager. It also appears in the Sites Directory (the directory of REST endpoints). The display name is not visible to the end user, however, the viewer's ID is—it appears in the viewer's URL. The ID is based on the display name at the time the viewer is created, with spaces converted to underscores. Changing the display name after the viewer has been created does not change the ID.
l
Path: The path to the viewer's configuration. {SitePath} represents the fully qualified path to the folder containing the site configuration file.
37 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.6 Configure the I Want To Menu
l
Hidden: Determines whether the viewer is listed in the default splash page's drop-down list. In order for this setting to work, you must configure the RemoteSettings element in the
Viewer.Settings.xml file. By default, this file is located in inetpub\wwwroot\SilverlightViewer_1_7\config . Follow the instructions in the file. l
Launch Links: A hyperlink that launches the viewer in the current browser.
l
Properties: Allows you to create a custom property for the viewer. See the Geocortex Essentials Administrator Guide for information on creating custom properties.
8.6
Configure the I Want To Menu The default I Want To menu in the Silverlight viewer contains a number of menu items. You can modify or remove these items, create new ones, and change the order that they appear in the menu. Each item is represented in the menu by some text and optionally a small image, both of which are customizable. Items also have a description that is used within Manager. A menu item can execute any Geocortex Viewer for Silverlight command. For information on Silverlight Viewer commands, see Command Reference on page 204. In addition to the main command that a menu item executes, there are usually preparatory ("batch") commands that you want executed before the main command is executed. For example, a menu item to create freehand markup might first execute the commands to show the advanced toolbar, show the toolbar's tab that contains the markup tools, and activate the freehand markup tool in the toolbar, in that order.
To open a viewer I Want To Menu page in Manager: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose I Want To menu you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click I Want To Menu. The I Want To Menu page opens.
To create a custom I Want To menu: 1. Click Copy Defaults. The list of menu items becomes available for editing. 2. Modify the menu as desired. Follow the instructions to add, edit, and remove menu items.
| 38
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
To configure the I Want To menu title:
1. In the Title box, type the title that you want to appear in the menu's banner.
To add an item to the I Want To menu: 1. Click Add Menu Item. The Add New Menu Item dialog box opens. 2. Appearance: Configure the menu item's appearance:
Settings that control the menu item's appearance in the viewer l
Text: Type the text to appear on the I Want To menu item.
l
Description: Type a short description of what the menu item does. The description is visible in Manager only—it is not visible in the viewer.
l
Image URI: The URI of the image to display next to the menu item. The image can be any size—it is automatically sized to fit beside the menu item. Valid file formats are PNG, BMP, JPG, and JPEG. The image is optional.
3. Command: Configure the main command that the menu item executes: l
Command: The name of the command to execute when the user selects the menu item. Click in the Command box to open a drop-down list of commands.
l
Command Parameter: The parameter value to pass to the command when it executes.
For information on Silverlight Viewer commands, see Command Reference on page 204. 4. Click OK.
To edit the appearance or command of a menu item: next to the item you want to modify. 1. Click the Edit icon The menu item's Details tab displays. 2. Edit the details as desired. 3. Click Apply Changes. 4. Click I Want To Menu in the side panel to return to the list of I Want To menu items.
39 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.6 Configure the I Want To Menu
To configure commands to execute when a menu item is clicked: next to the item you want to modify. 1. Click the Edit icon The menu item's Details tab displays. 2. Click the Batch Commands tab. 3. Click Add Batch Command. The Add New Batch Command dialog box opens. 4. To add a command, do the following: l
Command: Select the name of the command to execute. Click in the Command box to open a drop-down list of commands.
l
Command Parameter: Add the parameter values to pass to the command when it executes.
For information on Silverlight Viewer commands, see Command Reference on page 204. 5. Click OK. The command is added to the list of batch commands. 6. If the command is in the wrong position in the list, click and hold the command's its new position.
icon and drag the item to
The batch commands are executed in the same order that they appear in the Manager. 7. To modify a batch command you have already added, click the Edit icon modify. 8. To remove a batch command, click the Remove icon when prompted to confirm.
next to the command you want to
beside the command you want to remove and click OK
9. When you have added all the batch commands you want and they are in the correct order, click Apply Batch Order. 10. Click I Want To Menu in the side panel to return to the list of I Want To menu items.
To remove an item from the I Want To menu: If you remove any of the Silverlight Viewer's out-of-the-box menu items, you can add them back at any time using the Import Items from Default function.
1. Click the Remove icon beside the item you want to remove. You are prompted to confirm. 2. Click OK. The item is removed from the list of menu items.
To add factory items to the I Want To menu: 1. Click Import Items from Default. The Import Menu Items from Default dialog box opens. 2. Select the check box for each factory menu item you want to add to the I Want To menu.
| 40
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
3. Click OK. The items you selected appear at the bottom of the list of menu items.
To change the order of items in the I Want To menu: The menu items are listed in Manager in the same order that they appear in the viewer. 1. Click and hold the
icon for the menu item whose position in the menu you want to change.
2. Drag the item to its new position. 3. Repeat these steps until the menu is ordered the way you want it.
To revert to the default I Want To menu: Reverting to the default I Want To menu permanently deletes your custom menu.
1. Click the Revert to Default button. You are prompted to confirm. 2. Click OK.
To remove the I Want To menu: If you do not want the viewer to have an I Want To menu, you can remove the menu. 1. Click the Remove Menu button. You are prompted to confirm. 2. Click OK.
To add back the I Want To menu if you have removed it: 1. Click the Create Menu button. A copy of the default I Want To menu becomes available for editing. 2. Customize the copy of the default menu, or click Revert to Default to go back to the default I Want To menu.
To save your changes: 1. Click Apply Changes. 2. Click Save Site.
8.7
Configure the Toolbar The toolbar in the default Silverlight viewer contains an extensive selection of tools. You can use the default toolbar as is, or create a copy and customize it by adding, modifying, and removing tabs, tools, and groups.
41 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.7 Configure the Toolbar
Tabs, groups, and tools in Manager (back) and in the viewer (front) By default, tools in the Silverlight viewer are sticky—they remain active (selected) until deselected by the user. This allows the user to use a tool repeatedly without having to reselect it each time. You can disable stickiness in the configuration. When stickiness is disabled tools are automatically deselected after a single use. If stickiness is disabled in the configuration, the user can temporarily make a tool sticky by double-clicking it. Clicking the tool again turns the stickiness off.
You can add the following types of item to the toolbar: l
Buttons: When clicked, a button immediately executes its command using the parameter that is configured for it. See Command Reference on page 204 for the complete list of viewer commands.
l
Tools: When clicked, a tool waits for the user to draw a shape on the map, and then executes its command using the geometry created by the user as its parameter.
l
Regions: A region is an area in the toolbar that contains custom content. To add content to a region created in Manager, you must edit the viewer's configuration file. Refer to the Geocortex Viewer for Silverlight Administrator and Developer Guide for instructions.
l
Splitters: Splitters add space to the toolbar. You can add as many splitters as you want, anywhere in the toolbar—between two tools or at the beginning or end of a group.
The toolbar is optional. You can turn it off using the Remove Toolbar function.
To open a viewer Toolbar page in Manager: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose toolbar you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Toolbar.
| 42
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The Toolbar page opens.
To disable or re-enable tool stickiness: 1. To disable stickiness, clear the Sticky Tools check box. 2. To re-enable stickiness, select the Sticky Tools check box.
To create a custom toolbar: 1. Click Copy Defaults. The Available Tools and Configured Toolbar areas become available for editing. 2. Modify the toolbar as desired. Follow the instructions to add, edit, and remove tabs, groups, and tools.
To add a tab to the toolbar: 1. In the Configured Toolbar area, click The Add Tab dialog box opens.
.
2. In the Display Name box, type the text to appear on the tab. 3. Click OK. 4. To move the tab to a different location in the toolbar, click and drag it.
To add a group to a tab: 1. In the Configured Toolbar area, click the Add Group icon to.
beside the tab that you want to add the group
The Add Group dialog box opens. 2. In the Display Name box, type the text to appear at the bottom of the group.
Group's display name in the viewer 3. Click OK. 4. To move the group to a different location in the toolbar, click and drag it.
43 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.7 Configure the Toolbar
To add a button to a group: 1. In the Configured Toolbar area, click the Add Toolbar Item icon the button to.
beside the group that you want to add
A drop-down list opens. 2. Select Add Button. The Add Button dialog box opens. 3. Name: Type a name for the button. The name is visible in Manager only—it is not visible in the viewer. 4. Appearance: Configure the button's appearance:
Settings that control a button's appearance in the viewer l
Display Name: Type the text to appear on the button.
l
Image URI: The URI of the image to display on the button. The image can be any size—it is automatically sized to fit on the button. Valid file formats are PNG, BMP, JPG, and JPEG.
l
Tool Tip: Type the text for the tool tip that opens when the user hovers the pointer over the button.
5. Command: Configure the command that the button executes: l
Command: The name of the command to execute when the user clicks the button. Click in the Command box to open a drop-down list of commands.
l
Command Parameter: The parameter value to pass to the command when it executes.
For information on Silverlight Viewer commands, see Command Reference on page 204. 6. Click OK. 7. To move the button to a different location in the toolbar, click and drag it.
To add a tool to a group: 1. In the Configured Toolbar area, click the Add Toolbar Item icon the tool to.
beside the group that you want to add
A drop-down list opens. 2. Select Add Tool. The Add Tool dialog box opens.
| 44
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
3. Name: Type a name for the tool. The name is visible in Manager only—it is not visible in the viewer. 4. Appearance: Configure the tool's appearance:
Settings that control a tool's appearance in the viewer l
Display Name: Type the text to appear on the tool.
l
Image URI: The URI of the image to display on the tool. The image can be any size—it is automatically sized to fit on the tool. Valid file formats are PNG, BMP, JPG, and JPEG.
l
Tool Tip: Type the text for the tool tip that opens when the user hovers the pointer over the tool.
5. Command: Configure the command that the tool executes: l
Command: The name of the command to execute after the user has drawn the shape on the map. Click in the Command box to open a drop-down list of commands.
l
Draw Mode: The type of shape for the user to draw on the map. The geometry that the user draws is passed to the command when it executes.
For information on Silverlight Viewer commands, see Command Reference on page 204. 6. Click OK. 7. To move the tool to a different location in the toolbar, click and drag it.
To add a region to the toolbar: To add content to a region created in Manager, you must edit the viewer's configuration file.
1. In the Configured Toolbar area, click the Add Toolbar Item icon the region to.
beside the group that you want to add
A drop-down list opens. 2. Select Add Region. The Add Tool dialog box opens. 3. Name: Type a name for the region. The name is visible in Manager only—it is not visible in the viewer. 4. Click OK. 5. To move the region to a different location in the toolbar, click and drag it.
45 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.7 Configure the Toolbar
To add a splitter to the toolbar: 1. In the Configured Toolbar area, click the Add Toolbar Item icon the splitter to.
beside the group that you want to add
A drop-down list opens. 2. Select Add Splitter. A horizontal line representing a splitter appears in the group. 3. To move the splitter to a different location in the toolbar, click and drag it.
To edit a tab, group, or toolbar item: next to the item you want to modify. 1. Click the Edit icon The Edit dialog box opens. 2. Edit the item as desired. 3. Click OK.
To change the order of items in the toolbar: You can move tabs, groups, buttons, tools, regions and splitters within the toolbar. 1. Click and hold the item you want to move. 2. Drag the item to its new location in the toolbar.
To revert to the default toolbar: Reverting to the default toolbar permanently deletes your custom toolbar.
1. Click the Revert to Default button. You are prompted to confirm. 2. Click OK.
To remove the toolbar: If you do not want the viewer to have a toolbar, you can remove the toolbar. 1. Click the Remove Toolbar button. You are prompted to confirm. 2. Click OK.
To add back the toolbar if you have removed it: 1. Click the Create Toolbar button. A copy of the default toolbar becomes available for editing. 2. Customize the copy of the default toolbar, or click Revert to Default to go back to the default toolbar.
| 46
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
To save your changes: 1. Click Apply Changes. 2. Click Save Site.
8.8
Change the Behavior of Tools The Tool Behavior page in Manager has settings to configure buffering, units of measurement, and other aspects of tool behavior.
To open a viewer Tool Behavior page in Manager: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose tool behavior you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Tool Behavior. The Tool Behavior page opens.
Buffering By default, buffering is done in the spatial reference of the Universal Transverse Mercator (UTM) zone that the buffer geometry center falls into. This generally yields accurate results. However, if you need to create very large buffers, you should configure a specific coordinate system using one of the following settings: l
WKID: The Well-Known ID of a coordinate system to perform buffering in.
l
WKT: The Well-Known Text of a coordinate system to perform buffering in. If both the WKID and WKT are configured, the WKID overrides the WKT.
Identify l
Pixel Tolerance: The number of pixels away from a feature the user's geometry can be to successfully identify the feature. This setting applies to Point Identify only.
l
Visible Layers Only: When this check box is selected, Identify operations return features only from layers that are turned on—features on layers that are turned off are not identified.
l
Visible at Current Scale Only: When this check box is selected, Identify operations return features only from layers that are turned on and visible at the current scale—features on layers that are not currently visible are not identified.
47 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.8 Change the Behavior of Tools
Measurement The settings in the Measurement area of the Tool Behavior page apply to every measurement tool in the toolbar. l
Distance Units: The units to use for measuring distance. The user can change the units in the viewer.
l
Area Units: The units to use for measuring area. The user can change the units in the viewer.
l
Prediction Enabled: When this check box is selected, the measurement tools preview the length of line segments before vertices are added. The preview displays beside the pointer while the user draws the measurement markup.
l
Projection WKID: The Well-Known ID of the map projection suitable to project measurements into. If you configure a projection WKID, you must set the Projection Units setting to the native units for the WKID projection. If you leave the Projection WKID box blank, measurements are done in the coordinate system of the map.
l
Projection Units: If you configured a projection WKID, set the projection units to the native units for the configured projection.
Editing l
In-Place Attribute Editing: When this check box is selected, the user can edit feature attributes directly in the results table by clicking the attribute to edit. The feature attribute must belong to a feature layer that has editing enabled. In-place editing is independent of having an Edit tool in the viewer—you can have both or neither or just one type of editing.
Bookmarks l
Include Bookmarks: When this check box is selected, the Bookmarks control is visible in the viewer, provided the AdvancedMapControlsView is configured. The AdvancedMapControlsView contains the Map Scale control and the Bookmarks control. If you want only the Map Scale control to be visible, clear the Include Bookmarks check box. If you want both the map Scale and bookmarks controls to be visible, select the Include bookmarks check box.
Fragment of the toolbar with the Bookmarks control visible (top) and hidden (bottom)
Save/Open Project The Projects feature enables the user to save snapshots of viewer sessions and reopen them later or send them to colleagues to open locally. Saving a project saves the extent, markup, bookmarks, and other changes the user made during the session.
| 48
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The project category controls which projects can be opened in a viewer. If two viewers have the same project category, users in both viewers have access to all the projects in that category that were saved to the server, no matter which viewer the projects were saved on. If two viewers have different project categories, users do not have access to projects saved in the other viewer. l
Project Category: A name for the category that this viewer's projects belong to. The name itself is arbitrary, but if you want multiple viewers to share saved projects, you must set each viewer's Project Category setting to the same name and select the Can Save Project to Server setting.
l
Can Save Project to Server: When this check box is selected, the user can save viewer sessions on the server. Projects are saved in the Projects subfolder of the Sites folder.
l
Can Save Project as File: When this check box is selected, the user can save viewer sessions to the local hard drive.
8.9
Configure the Layer List The layer list lists the layers, map services, base maps, and graphics layers in the map. The Layer List page in Manager allows you to configure the visibility and behavior of layer list elements such as the legend and transparency slider.
To open a viewer Layer List page in Manager: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose layer list you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Layer List. The Layer List page opens.
To create a custom layer list: 1. Click Copy Defaults. The settings become available for editing. 2. Modify the layer list as desired.
Layer List l
Show Transparency Slider: When this check box is selected, a slider that controls the map's transparency is included in the layer list. If you do not want the user to be able to control map transparency, clear the check box.
l
Include Legend Swatches: When this check box is selected, legend swatches are embedded in the layer list
49 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.9 Configure the Layer List
under the layers they represent. The user can expand and collapse the legend for individual layers by clicking the legend icon beside the layer's name. If you want the legend to show as a separate list instead of being embedded in the layer list, clear the check box.
Legend embedded in the layer list, showing the Cities legend expanded (left) and collapsed (right) l
Auto Expand Swatches: When this check box is selected, embedded legend swatches are expanded when the user first opens the layer list. If you want the legends to initially be collapsed, clear the check box.
l
Expand Folders: This setting applies only to Essentials versions older than 3.7. When this check box is selected, folders in the layer list are expanded the first time the user opens the layer list. If you want folders to be collapsed initially, clear the check box.
l
Expand Group Layers: This setting applies only to Essentials versions older than 3.7. When this check box is selected, group layers are expanded the first time the user opens the layer list. If you want group layers to be collapsed initially, clear the check box.
l
Expand Map Services: This setting applies only to Essentials versions older than 3.7. When this check box is selected, map services in the layer list are expanded the first time the user opens the layer list. If you want map services to be collapsed initially, clear the check box.
Legend The following settings enable you to control which layers legend swatches are shown for: l
Toggled Visible: When this check box is selected, legend swatches are shown only for layers that are turned on. If you want the legend to show for layers that are turned off, clear the check box.
l
Available at Current Scale: When this check box is selected, legend swatches are shown only for layers that are visible at the current map scale. If you want the legend to show for layers that are not currently visible, clear the check box.
l
Layer Extent Intersects Current Map Extent: When this check box is selected, legend swatches are shown only for layers that extend into the current map extent—layers that lie entirely outside the current map extent are not shown in the legend. If you want the legend to show for layers that lie outside the current map extent, clear the check box.
| 50
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Filter l
Filter: The location of the Filter control—at the top or bottom of the layer list
To revert to the default layer list: Reverting to the default layer list permanently deletes your custom layer list.
1. Click the Revert to Default button. You are prompted to confirm. 2. Click OK.
To remove the layer list: If you do not want the viewer to have a layer list, you can remove it. 1. Click the Remove layer List button. You are prompted to confirm. 2. Click OK.
To add back the layer list if you have removed it: 1. Click the Create Layer List button. A copy of the default layer list becomes available for editing. 2. Customize the copy of the default layer list, or click Revert to Default to go back to the default layer list.
To save your changes: 1. Click Apply Changes. 2. Click Save Site. See Also
8.10
Set the Visibility of Layer Labels From version 3.14 of Essentials Manager, an administrator can set which layers in a dynamic map should have labels enabled or not. When the layer labels are enabled, end users can then toggle the visibility of the labels on and off in the Geocortex Viewer for Silverlight. The visibility of labels can only be set if the layer contains label information.
Labels must be turned on by default in ArcGIS to make it possible to set the default visibility of the labels from within Geocortex Essentials. The labels are all shown by default.
51 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.11 Configure Map Widgets
To set the visibility of labels on a layer: 1. In Manager, edit the site that contains the dynamic map service. The Dynamic Map Service must support Dynamic Layers for toggling of labels to function. 2. Click Map in the side panel. 3. Expand 4. Click
the map service so that the layers in it are visible. beside the layer you want to edit.
5. On the Details tab, to ensure that the layer is visible by default, select the Visible check box. If not selected, the layer and its labels are not visible. 6. In the Display section, select the Show Labels checkbox.
You can also toggle the visibility of a layer on or off from the context menu.
7. Click Apply Changes, and then Save Site.
8.11
Configure Map Widgets The Map Widgets page in Manager provides settings for the overview map, map tips, the scale bar and scale slider, and a variety of other map elements.
| 52
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Map widgets in the viewer
To open the Map Widgets page in Manager: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose map widget behavior you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Map Widgets. The Map Widgets page opens.
Overview Map The overview map settings control the visibility and behavior of the site's overview map in the viewer. A site can only have one overview map, so all of the site's viewers use the same overview map.
Settings l
Show Overview Map: When this check box is selected, the overview map is available in the viewer. If you do not want the viewer to have an overview map, clear the check box.
l
Open by Default: When this check box is selected, the overview map is open when the user launches the viewer. The user can close and reopen the overview map by clicking the icon in the corner of the overview map. If you want the overview map to be closed initially, clear the check box.
53 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.11 Configure Map Widgets
l
Mode: Controls whether the overview map's extent changes whenever the main map's extent changes. Set the mode to Dynamic if you want the overview map's extent to change with the main map's extent. Set the mode to Static if you want the overview map's extent to remain fixed.
l
Extent Scale Factor: The factor by which the extent of the overview map is scaled in relation to the scale of the viewer’s map.
Map Tips Map Tips are pop-ups that open when the user hovers over or clicks a feature. For performance reasons, map tips are disabled by default.
Settings l
Map Tips Enabled: When this check box is selected, features in the viewer are capable of displaying map tips. By default, map tips are displayed when the mouse hovers over a feature on the map. If you do not want the viewer to have map tips, clear the check box. The default toolbar has an Enable Map tips check box in it so the user can turn off map tips.
l
Display on Click: When this check box is selected, map tips display when the user clicks a feature on the map or in search results, instead of when the pointer hovers over the feature. If you want map tips to display when the pointer hovers over the feature, clear the check box.
l
Ignore Pixel Tolerance for Polygons: The number of pixels away from a feature the user's geometry can be to successfully identify the feature. The default pixel tolerance is 2 pixels. When this check box is selected, the viewer treats the pixel tolerance as zero for Polygon Identify operations. If you want the pixel tolerance used for Polygon Identify operations, clear the check box.
l
Default Feature Details Tab: Map tips contain a link that the user can click to see additional details about the feature. The dialog box that opens when the link is clicked has tabs for the feature's details (description), attributes, feature hyperlinks (if configured), and data links (if configured). Select the tab that you want to open by default when the user views additional details for a feature.
Watermark A watermark is an image that overlays the map in the viewer. Usually a watermark identifies the owner or copyright holder. You can adjust the opacity of the watermark image to ensure it does not interfere with the map image. The watermark appears below any markup or measurements made by the user so it does not interfere with the markings.
Settings l
Show Watermark Image: When this check box is selected, the watermark is visible on the map. If you do not want the viewer to use a watermark, clear the check box.
l
Image URL: The URL to the image to use as the watermark. Click Browse to select a file from the site's virtual directory.
l
Image Mode: Scaled mode scales the watermark up or down when the user resizes the window. Fixed mode displays the watermark at its original size and does not scale it when the user resizes the window. Tiled mode
| 54
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
repeats the (unscaled) watermark image in a tiled pattern. l
Opacity: The opacity of the watermark image. Drag the slider to the left to make the image more transparent.
Time Aware Slider The time-aware slider provides the ability to visualize data contained in time-aware layers. The end user can click the Play button to see time-sensitive data added incrementally to the map, which gives the effect of watching an animation of the event. The "primary" time-aware map service is the time-aware map service whose data shows on the map, in other words, the active map service. If you choose not to use a primary map service, the map shows the data for all the time-aware map services whose visibility is turned on in the layer list. The default primary time-aware map service is the time-aware map service that is listed closest to the top of the layer list. If the user turns off the primary map service in the layer list, the next highest time-aware map service becomes the primary map service.
Time slider in the Silverlight Viewer The primary map service also determines the extent of the time slider. If you have not overridden the primary map service's time extent, the time slider uses the primary map service's time extent as its full extent. If you have overridden the map service's time extent, then your override is used as the time slider's full time extent. See Override a Time-Aware Map Service's Time Extent in the Geocortex Essentials Administrator Guide for instructions. If there is no primary map service, the time slider's full extent spans the time extents of all the time-aware map services that are turned on in the layer list. The slider's full extent adjusts dynamically when the user turns timeaware map services on and off in the layer list. If you allow the user to configure the time slider's settings, the user will be able to select the primary map service. The current time extent is the time extent of the data that is currently shown on the map—data points outside the current time extent are not visible on the map. The current time extent is the time extent between the two bars on the time slider. You can configure the initial positions of the two bars.
Settings l
Show Time-Aware Slider: When this check box is selected, the time-aware slider shows in the viewer whenever one or more time-aware map services are selected in the layer list. If you do not want the viewer to have a time-aware slider, clear the check box.
l
Is User Configurable: When this check box is selected, the end user can change the time slider's settings, provided Show Time-Aware Slider is also selected. Specifically, the user can set: l
Primary Time-Aware Map Service
l
Time Mode
l
Start Date and End Date of the time slider's full time extent
55 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.11 Configure Map Widgets
l
Number of Intervals
l
Playback Speed
l
Loop Playback
If you do not want the user to be able to change the settings, clear the Is User Configurable check box. l
Use Primary Time-Aware Map Service: If you want to have a primary time-aware map service, select the Use Primary Time-Aware Map Service check box. This sets the time slider's default full extent to the time extent of the time-aware map service that is listed highest in the layer list. If you clear the check box, the time slider's default full extent will span the time extents of all the time-aware map services that are turned on in the layer list. Clearing the Use Primary Time-Aware Map Service check box is equivalent to setting the primary map service to None—in fact, the Primary Time-Aware Map Service setting in the viewer will initially be set to None, if you configured the time slider to be user configurable.
l
Playback Speed: The speed at which the animation occurs. The default playback speed is 1 second. This means the data displayed on the map updates every 1 second. You can enter fractions of seconds. Frequent updating of time-aware data can place a strain on your ArcGIS Server. Do not use a very low playback speed unless absolutely necessary.
l
Number of Intervals: The number of intervals that the time slider is divided into.
l
Loop Playback: When this check box is selected, the animation automatically cycles back to the beginning and replays until the user stops it. If you want the animation to play only once, clear the check box—in this case, the user can replay it manually.
l
Mode: The mode controls what subset of the primary time-aware layer's data is displayed on the map. l
Time Extent: The slider shows a time extent (time range) that moves back and forth on the slider. As the user drags the time extent back and forth, the data displayed on the map changes to show events within the current extent. The user can change the start and end of the time extent, making the extent longer or shorter. During playback, the entire time extent advances one interval every Playback Speed seconds.
l
Cumulative From Start: The slider shows a time extent whose start time is fixed at the beginning of the primary time-aware layer's time span. The user can drag a bar to change the end of the time extent. There is no bar to change the start of the time extent. During playback, the end of the time extent advances one time interval every Playback Speed seconds and the start remains fixed—the time extent gets one interval longer every Playback Speed seconds. The data that displays on the map is aggregated.
l
Time Instant: The slider shows a time instant that coincides with one of the slider's interval divisions. During playback, the data for the current instant is displayed on the map. The map displays the data for the exact instant that is selected. If there is no data for that instant, nothing will display on the map.
l
Initial Time Extent Options: The Dates and Ratios settings allow you to set the initial positions of the bars that define the current time extent on the time slider. Because the bars must coincide with interval boundaries, the time slider may have to approximate the dates or ratios you enter.
| 56
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
If you leave both the Dates and Ratios settings blank, the bars will be positioned at (approximately) the first 10% of the full time extent. If you define both Dates and Ratios, the time slider uses the Ratios. l
Start Date and End Date: To set a specific date range, click in the Start Date box and select the date from the calendar that opens. Use the same method to set the End Date. If you want the start date to coincide with the start of the time slider's full time extent, leave the Start Date box blank. The Start Date and End Date must be in UTC (Coordinated Universal Time), which , like GMT (Greenwich Mean Time), has the United Kingdom as offset zero, New York is UTC-5 (subtract 5 hours from UTC time), and the Netherlands is UTC+1 (add 1 hour). If the start or end date is outside the map service's time extent (or its override Start Date and End Date), the time slider will adjust the date to be within the map service's time extent.
l
Start Ratio and End Ratio: To set the bar positions to be a fraction of the full time extent, enter ratios. The left edge of the time slider's full extent is 0 (zero). The right edge it 1.0. For example, to set the initial time extent to the first quarter of the full time extent, type 0.0 in the Start Ratio box and 0.25 in the End Ratio box.
Other Map Widgets Manager has the following settings for additional map widgets: l
Show Scale Bar: When this check box is selected, the scale bar is visible on the map. If you do not want the viewer to have a scale bar, clear the check box.
l
Show Scale Slider: When this check box is selected, the scale slider is visible on the map. If you do not want the viewer to have a scale slider, clear the check box.
l
Show Base Map Control: When this check box is selected, the base map control is visible on the map. If you do not want the viewer to have a base map control, clear the check box.
l
Show Progress Indicator: When this check box is selected, a progress indicator displays whenever the viewer is busy processing a request. If you do not want the viewer to use progress indicators, clear the check box.
l
Show Mouse Coordinates: When this check box is selected, The mouse coordinates display on the map. The user can close the coordinates and reopen them by clicking the icon at the edge of the coordinates display area. If you do not want the viewer to show mouse coordinates, clear the check box.
8.12
Configure the Map Module The Map Module page in Manager allows you to configure: l
Context Menu tab: The context menu that opens when the user right-clicks the map.
l
Settings tab: Map settings such as minimum and maximum resolution, the geometry service to use, and pan and zoom durations.
To open a viewer Map Module page in Manager: 1. Launch Manager.
57 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.12 Configure the Map Module
2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose Map module settings you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Map Module. The Map Module page opens.
Configure the Map's Context Menu The default context menu in the Silverlight viewer contains a number of menu items. You can modify or remove these items, create new ones, and change the order that they appear in the menu. Each item is represented in the menu by some text and optionally a small image, both of which are customizable. Items also have a description that is used within Manager. A menu item can execute any Geocortex Viewer for Silverlight command. See Command Reference on page 204 for a complete list of Silverlight Viewer commands. In addition to the main command that a menu item executes, there are usually preparatory ("batch") commands that you want executed before the main command is executed. For example, a menu item to create freehand markup might first execute the commands to show the advanced toolbar, show the toolbar's tab that contains the markup tools, and activate the freehand markup tool in the toolbar, in that order.
Example context menu, with no images configured for the menu items
| 58
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
To create a custom context menu: 1. Click Copy Defaults. The list of menu items becomes available for editing. 2. Modify the menu as desired. Follow the instructions to add, edit, and remove menu items.
To add an item to the context menu: . 1. Click The Add New Menu Item dialog box opens. 2. Appearance: Configure the menu item's appearance: l
Text: Type the text to appear in the context menu.
l
Description: Type a short description of what the menu item does. The description is visible in Manager only—it is not visible in the viewer.
l
Image URI: The URI of the image to display next to the menu item. The image can be any size—it is automatically sized to fit beside the menu item. Valid file formats are PNG, BMP, JPG, and JPEG. The image is optional.
3. Command: Configure the command that the menu item executes: l
Command: The name of the command to execute when the user selects the menu item. Click in the Command box to open a drop-down list of commands.
l
Command Parameter: The parameter value to pass to the command when it executes.
For information on Silverlight Viewer commands, see Command Reference on page 204. 4. Click OK. 5. To move the item to a different location in the context menu, click and drag the item's
icon.
To edit a menu item: next to the item you want to modify. 1. Click the Edit icon The menu item's Details tab displays. 2. Edit the details as desired. 3. Click Apply Changes. 4. Click Map Module in the side panel to return to the list of context menu items.
To configure preparatory commands to execute when the user clicks a context menu item: next to the item you want to modify. 1. Click the Edit icon The menu item's Details tab displays. 2. Click the Batch Commands tab. 3. Click Add Batch Command.
59 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.12 Configure the Map Module
The Add New Batch Command dialog box opens. 4. Configure the command: l
Command: The name of the command to execute. Click in the Command box to open a drop-down list of commands.
l
Command Parameter: The parameter values that are passed to the command when it executes.
For information on Silverlight Viewer commands, see Command Reference on page 204. 5. Click OK. The command is added to the list of batch commands. 6. If the command is in the wrong position in the list, click and hold the command's its new position.
icon and drag the item to
The batch commands are executed in the same order that they appear in the Manager. 7. To modify a batch command you have already added, click the Edit icon modify. 8. To remove a batch command, click the Remove icon when prompted to confirm.
next to the command you want to
beside the command you want to remove and click OK
9. When you have added all the batch commands you want and they are in the correct order, click Apply Batch Order. 10. Click Map Module in the side panel to return to the list of context menu items.
To remove an item from the context menu: If you remove any of the Silverlight Viewer's out-of-the-box menu items, you can add them back at any time using the Import Items from Default function.
1. Click the Remove icon beside the item you want to remove. You are prompted to confirm. 2. Click OK. The item is removed from the list of menu items.
To add factory items to the context menu: 1. Click Import Items from Default. The Import Menu Items from Default dialog box opens. 2. Select the check box for each factory menu item you want to add to the context menu. 3. Click OK. The items you selected appear at the bottom of the list of menu items. 4. To move an item to a different location in the context menu, click and drag the item's
icon.
To change the order of items in the context menu: The menu items are listed in Manager in the same order that they appear in the viewer.
| 60
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
1. Click and hold the
icon for the menu item whose position in the menu you want to change.
2. Drag the item to its new position. 3. Repeat these steps until the menu is ordered the way you want it.
To revert to the default context menu: Reverting to the default context menu permanently deletes your custom menu.
1. Click the Revert to Default button. You are prompted to confirm. 2. Click OK.
To save your changes: 1. Click Apply Changes. 2. Click Save Site.
Configure Map Module Settings The following settings are on the Map Module page's Settings tab: l
Snap to Levels: When this check box is selected, zooming snaps to scale levels if the map contains cached layers. Clear the check box if you want the user to be able to zoom to scales that are in between cached scale levels.
l
Geometry Service URI: The URI to the geometry service to use for coordinate reprojections.
l
Pan Duration: The speed of the pan animation. Smaller values are faster and larger values are slower. We recommend that you do not set this value to more than 2. A value of 0 disables the animation completely.
l
Zoom Duration: The speed of the zoom animation. Smaller values are faster and larger values are slower. We recommend that you do not set this value to more than 2. A value of 0 disables the animation completely.
l
Minimum Resolution: The minimum resolution (map units per pixel) the user can zoom in to. For dynamic map services, the map scale is unconstrained by default. This setting allows you to constrain how far in to the map the user can zoom. For cached map services, the map scale is constrained to scales between the smallest and largest tile level by default. This setting enables zooming beyond the scale levels. If you leave the Minimum Resolution box blank, then the default behavior for that type of map service applies.
l
Maximum Resolution: The maximum resolution (map units per pixel) the user can zoom out to. For dynamic map services, the map scale is unconstrained by default. This setting allows you to constrain how far out from the map the user can zoom. For cached map services, the map scale is constrained to scales between the smallest and largest tile level by default. This setting enables zooming beyond the scale levels. If you leave the Maximum Resolution box blank, then the default behavior for that type of map service applies.
61 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.13 Menus
8.13
Menus The Geocortex Viewer for Silverlight 1.9 contains a standardized menu structure for all menus used in the Viewer. There are five menus currently in the Viewer: l
The IWantToMenu defined in the IWantToMenu module,
l
The LayerListActionsMenu defined within the LayerList module,
l
The MapMenu defined within the MapModule ,
l
The ResultsListMenu menu and ResultsTableMenu menu defined within the Results module.
You can add to these Menus or override them completely through configuration.
Example Menus Defined for Results Module
| 62
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Notice from the example, that each Module can define any number of Menus. In this case, there are two:
8.13.1
l
ResultsListMenu
l
ResultsTableMenu
Items Each Menu contains 0 or more Items. Each Item has at minimum a Text attribute and a Command attribute. The Text attribute is displayed by the Menu and the Command attribute is the name of the Command that is executed when the Menu item is selected. In the example above, the HideWhenDisabled attribute is set to false , which indicates that when the Command is disabled—CanExecute property is false— the Menu item will not appear. There is also an optional ImageUri attribute that references an image to display beside the Menu item.
8.14
Themes The Geocortex Viewer for Silverlight makes it possible to override the default color and font choices for a number of Viewer components. These overrides can be found in the Config/Themes directory of the Silverlight Viewer. The Viewer ships with a number of prepackaged theme files that you can modify. In the example below, you will see that you can override the application foreground color, application font, and a number of other visual components. This list is expected to grow over time.
Example Theme File Arial #FF000000 Orange 12 Bold /Resources/Images/PanelCloseWhite.png Black Black White White #7F000000 1
63 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
8.15 Configure the Scale Range of Base Maps
13 Normal #11CCCCCC #66CCCCCC #FF333333 White 12 White Black 11 0.5
The modified theme file must be referenced within the section of the Viewer.Defaults.xml file. For example, if you created a theme file called summer.xaml , the section of the Viewer configuration would be:
The prepackaged theme files contain a list of components that you can override.
8.15
Configure the Scale Range of Base Maps In version 1.9 of the Geocortex Viewer for Silverlight and version 3.14 of Geocortex Essentials, the ability to set the scale range to display a particular base map was added. This feature makes it possible to set minimum and maximum scale ranges where a base map is no longer visible. This can be used to show only the most appropriate base map at any given scale range. For example, you may elect to set up a streets and highways base map to disappear when it becomes too cluttered to decipher and then have it appear again when zoomed in close enough. The ability to control the base map at a particular scale range means that the: l
Performance of the map improves because the amount of data loaded at a given scale is minimized because there is less data to process. This results in faster response times.
l
Appearance and usefulness of the map improves as unnecessary clutter is removed but detail is present when it is needed.
| 64
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The scale range of a base map is controlled by setting the minimum and maximum scale that a base map displays. Although the settings are entered in Geocortex Essentials, the interpretation of the scale ranges is done by Geocortex Viewer for Silverlight.
To set the maximum and maximum scale of a base map: 1. Launch Manager. 2. Click the Edit Site button beside the site whose map you want to change.
You can only set the scale range on tiled and Base Map services.
The Site Information page opens. 3. In the side panel, click Map. 4. Click the Edit Map Service icon
beside the base map you want to change.
5. Select the Display Settings tab. 6. If you want to restrict the base map from displaying when zoomed out beyond a specific scale range, enter it into the Override Minimum Scale box. This field sets the smallest scale that the base map becomes visible. For example, 2400000 (2.4 mil).
Scales are fractions; 1:25,000 means 1/25,000th. Larger numbers typically refer to smaller map scales.
7. If you want to restrict the base map from displaying when zoomed in beyond a specific scale range, enter it into the Override Maximum Scale box. For example, 20000 (20k).
65 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9 Configure Modules
8. Click Apply settings and then Save Site.
9
9.1
Configure Modules About Module Configuration You configure the Viewer by modifying many of the elements in the configuration files. In this guide, information on how to change the settings in the Viewer.Defaults.xml file is divided into two levels: l
Basic: Covers how to configure the out-of-the-box behavior of the Viewer. This involves adjusting the settings of the individual Modules that are contained within the section of the Viewer.Defaults.xml file.
l
Advanced: Covers how to configure other elements like Views, Globals, Bookmarks, and Libraries. It also describes file inheritance.
The Viewer contains different tools that make it possible to print maps, draw on a map, make area measurements, etc. Each of these tools is contained inside a Module, which contains information and settings that you can adjust for that particular tool. You can disable the tool completely by removing its Module, or add a new tool by adding and configuring a new Module. The screen shot below is of a simplified Viewer.Defaults.xml file, with the Module shaded with blue.
| 66
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Simple configuration file The easiest way to configure the Viewer is to change existing settings. The Configure Modules section describes each Module, and lists the settings in that Module that you can change. Each Module has samples of the XML code that you can copy and paste.
9.2
Enable or Disable Modules The All Modules page in Manager allows you to enable and disable individual modules in the viewer. By default, all modules are enabled. This page also provides the following information about each module, as well as a link to the page in Manager where the module is configured: l
ID: The ID that uniquely identifies the module.
l
Name: The module's name.
l
Library URI: The URI to the assembly that the module is packaged in.
To open the All Modules page in Manager: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose modules you want to enable or disable. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click All Modules. The All Modules page opens.
67 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.3 Advanced Editing Module
To disable or enable a module: 1. To disable a module, clear the Included check box beside the module. 2. To enable a module, select the Included check box beside the module
To save your changes: 1. Click Apply Changes. 2. Click Save Site.
9.3
Advanced Editing Module The AdvancedEditing Module adds additional editing features onto the Editing Module. Most of the advanced editing features also require the Editing Module to be enabled. Before you can use the Advanced Editing Module: 1. Ensure that you have added the Editing module. 2. Add the Advanced Editing module to your Viewer.xml configuration file for the site. 3. Add the Advanced Editing library to your Viewer.xml configuration file.
Parameters l
GeometryServiceUri: The Uri of an ArcGIS Server geometry service.
l
HighlightDynamicSnappingLayers: Defines whether or not dynamic layers are visible on the map. The default is false . If you set this parameter to true, the layer becomes more visible on the map.
l
StickyTools: Defines the behavior of any of the editing tools. When set to true , the tool remains selected after an action is completed so that you can immediately repeat the action. When set to false, the tool is automatically deselected once the action is complete. You have to reselect the tool to repeat the action. When set to false , double-clicking the tool makes it behave as if the sticky parameter was set to true . The default is set to true .
l
ShowEdgeSnappingOption: If set to true the checkbox to allow edge snapping is displayed. If set to false the edge snapping option is hidden. If this parameter is set to false, edge snapping is disabled in that view.
Example Configuration Add the following code to the Viewer.xml: In the element, add:
| 68
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
In the element, add:
See also... Editing Module on page 74
9.4
Advanced Map Controls Module This module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.5
Authentication Dialog Module The AuthenticationDialog module implements the dialog that displays when the Geocortex Viewer for Silverlight opens a secured site. This module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.6
Banner Module The Banner Module manages the area at the top of the Viewer application that contains your Viewer’s title. There are a few configurable settings for the Banner Module.
69 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.7 Base Map Control Module
Parameters l
ApplicationTitle: The title displayed in the banner.
l
TitleColor: The color of the title as displayed in the banner. The default color is White.
l
BrowserTitle: The title to display in the browser’s titlebar.
l
ImageUri: The URI to the banner’s background image.
l
LeftImage: Defines the image displayed on the left of the banner. Consists of a URI to the image and image opacity.
l
RepeatX: True if the background image is repeated horizontally. The default value is false .
l
RepeatY: True if the background image is repeated vertically. The default value is false .
l
RightImage: Defines the image displayed on the right of the banner. Consists of a URI to the image and an image opacity.
l
ShowHelpLink: True if the banner should contain a link to the help system. The default value is true .
Example Configuration
9.7
Base Map Control Module The module sets the position and visibility of the of the Map Themes and Base Maps areas in the base map control.
Base map control
| 70
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
In the Viewer.Defaults.xml file, the Base Map Control module includes these globals: l
:Defines whether or not to display the Base Maps area of the base map control.
l
: Defines whether or not to display the Map Themes area in the base map control.
Parameters l
Region: Defines the position in the Viewer where the base map control should display.
l
Visible: Specifies whether or not to display the base map control in the Viewer.
l
ShowLayerThemes: Specifies whether or not to display layer themes in the base map control.
Example Configuration See also... Configure Layer Themes on page 147
9.8
Base Map Cache Module This module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.9
Bookmark Module The Bookmark module implements the bookmark feature for the Geocortex Viewer for Silverlight. The Bookmark feature allows end-users to navigate to preconfigured locations on their maps. They can also define their own bookmarks. This module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.10
Callouts Module A callout is a bubble containing one or more lines of text that you can place anywhere on the map. The tail of the bubble is anchored at a map location and as a result, callouts move with the map as the map is panned and zoomed.
Parameters None
71 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.11 Coordinate Tool Module
Example Configuration
9.11
Coordinate Tool Module The Coordinate tool makes it possible to place coordinate callouts anywhere on the map. You can interactively specify the location of a callout using your mouse or by entering an x-y location into the Add Custom Coordinate dialog box. Once the callout is placed, you can change the coordinate system of the callout by selecting a new system from a drop-down list below the coordinates box. For example, you can place a callout using the State Plane coordinate system and then display that same callout as Lat-Long coordinates.
Parameters l
GeometryServiceUri: The Uri to the ArcGIS Server geometry service, used to perform the map projections for the Coordinate tool.
l
CoordinateSystem: One of many coordinate systems that you can reference when placing callouts.
l
DisplayName: The name of the coordinate system as shown in the Coordinate Tools UI.
l
WKID: The Well Known ID of the Coordinate system.
l
NumDigits: The precision of the coordinates when they are displayed. For example, NumDigits = 4 digits after the decimal place.
l
DisplayasDMS: If true , coordinates are displayed as latitude/longitude pairs in DMS (degrees, minutes and seconds) notation. If false , coordinates are displayed as decimal degrees.
l
DisplayAsLatLon: If true , coordinates are displayed as latitude/longitude pairs in decimal degrees. Used with Geographic coordinate systems.
l
DisplayAsDDM: If true , coordinates are displayed as latitude/longitude pairs in degrees, decimal minutes notation.
l
MouseCoordDigits: Defines the number of decimal places to include for the mouse coordinates control. The default is set to"3". If MouseCoordReprojectionEnabled is set to true , the MouseCoordDigits parameter only sets the number of decimal places for the map’s native coordinate system; the number of decimal places for other configured coordinate systems is then determined by the NumDigits parameter.
l
MouseCoordReprojectionEnabled: If set to true , the user can reproject the mouse cursor coordinates, when set to false , the user cannot reproject the mouse cursor coordinates. The default is set to true . At least one extra configured coordinate system must exist. If a coordinate system is not configured, the native coordinate system is used.
| 72
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Example Configuration
9.12
DatumTransform Module The DatumTransform Module provides a mechanism to specify datum transform parameters to use when projecting between different spatial references. This feature is only available if you are using ArcGIS Server 10.1 geometry services.
Parameters The DatumTransform Module accepts zero-or-more DataTransform elements with the following parameters: l
WKID: The well-known ID of the datum transform to use.
l
WKT: The well-known text of the datum transform to use. This is ignored if WKID is also specified.
l
FromWKID: The well-known ID of the spatial reference that you are projecting from.
l
FromWKT: The well-known text of the spatial reference that you are projecting from. This is ignored if FromWKID is also specified.
l
ToWKID: The well-known ID of the spatial reference that you are projecting to.
73 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.13 Editing Module
l
ToWKT: The well-known text of the spatial reference that you are projecting to. This is ignored if ToWKID is also specified.
Example Configuration
9.13
Editing Module The Editing Module makes it possible to edit data layers on a map, if the data has been exposed for editing. Before you can set up Editing, you must have: l
Your data in ArcSDE.
l
Your data exposed in a feature service (Feature Server) in ArcGIS Server. ArcGIS Server 10 or above, is required for editing.
Steps for using the Editing module: 1. In Essentials Manager, add feature layers to your site. Instructions for adding feature layers can be found in the Geocortex Essentials Administrator Guide in the Feature Layers section. It is important to add Output fields to your feature layer service. Output fields define which fields you can edit. If no output fields are defined, you will not be able to edit attributes on that layer and will get the error message, "There are no attributes to edit on this layer." You can use "*" to include all output fields. 2. Add the Editing module to Viewer.xml of the site. This is different from all other modules as it is not in Viewer.Defaults.xml. 3. Add a region to Viewer.xml. For example, the Toolbar supports adding a Region through configuration:
...
| 74
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Parameters l
GeometryServiceUri: The Uri of an ArcGIS Server geometry service.
Example Configuration Add the following code to the Viewer.xml: In the element, add:
In the element add:
... This configuration is only an example implementation and may not be appropriate for all instances.
9.14
Export Map Module The Export Map module makes it possible for users to export a map image. From version 1.9 of the Geocortex Viewer for Silverlight, it also allows users the option of including georeference data with the map image so that the image can be accurately positioned in a different GIS application. You can add or remove the Include Georeference Data option in Geocortex Essentials, in the Tool Behavior settings.
Parameters l
AllowIncludingGeoreferenceData : Set whether or not the option to include georeference data is visible or not. If set to true , users see the field with the option to include the georeference data when exporting the map. If set to false , the option is hidden. The default is set to true .
Example Code
75 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.15 Extract Module
9.15
Extract Module The Extract module makes it possible to extract markup added to the map as a zipped set of shape, database and projection files that you can then import into other GIS applications. The feature allows you to extract any graphics layer but it is likely to be used mainly to extract markup. Point, polyline and polygon data is extracted but text markup is not included. Attributes are not supported currently.
The contents of the zip file showing points, polygons and polylines The zip file can be opened in ArcCatalog or other GIS applications.
Example Configuration
9.16
Feature Actions Module The Feature Actions Module exists to support feature actions and feature set actions. The module must be present but has no configurable settings for the module.
| 76
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
9.17
Geocoding Module A geocode service allows for encoding/decoding of geographic information such as addresses and coordinates. It provides the ability to resolve a point on a map based on a given address (forward geocoding) or an address from a given point (reverse geocoding).The Geocoding Module makes it possible to use the following geocoding services within the Geocortex Viewer for Silverlight: l
ArcGIS Geocoder
l
Bing Geocoder
You can add both the ArcGIS and Bing Geocoder to a single viewer. If you add both geocoders, you will have two results displayed when you do searches, as each geocoder returns different results. Parameters differ depending on the geocoder you use. Some parameters exist in both the Bing and ArcGIS geocoders. In addition there are unique parameters that are unique to the Bing or ArcGIS geocoders. From version 1.8 of the Geocortex Viewer for Silverlight, reverse geocoding is also supported. Both geocoders support reverse geocoding.
Geocoding Parameters l
ID: The id is used by Search Manager to uniquely identify each geocoding endpoint.
l
DisplayName: The display name is used Global Search bar to display options for selecting which search provider you would like to use.
l
IncludeGlobalSearch: A description of the type of geocoding service. Currently we support three different types for this attribute: BingGeocoder , ArcGisGeocoder , ArcGISBatchGeocoder .
l
ConnectionString: The URL to the geocoding endpoint. The Bing geocoder does not require this parameter. The ArcGis geocoder does require this parameter.
The following table indicates parameters for forward and reverse geocoding. The table indicates which parameters are used by both geocoders, each separate geocoder, and whether a parameter is required or not. Geocoder
Required?
Parameter
Description
Both
Yes
URL
The URL to the geocoding endpoint.The ArcGis Geocoder needs the URL in both the GeocodingEndpoint and the
Parameters elements to function. Both
Yes
globalSearchKey
The field in the search results that should be used as the key. In the Example Configuration below, we have specified address. Address indicates that the geocoder should return addresses when using both forward or reverse geocoders respectively.
ArcGIS
No
state
In the Example Configuration, ESRI_Geocode_USA, is used. This parameter tells the geocoder that we would like to narrow the search to this state.
ArcGIS
No
city
The city parameter tells the geocoder that it can narrow its search down to the city given by this parameter
77 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.17 Geocoding Module
Geocoder
Required?
Parameter
Description
Bing
No
countryRegion
This parameter tells Bing to narrow its search to the country provided.
Bing
No
adminDistrict
This parameter allows searches to be further narrowed down by in this case state, but I presume it could be province if our
countryRegion was Canada. Bing
No
locality
This parameter allows searches to be further narrowed down by a city or town.
Bing
Yes
key
This parameter is necessary for geocoding with the Bing geocoding service. It is an API key that the end user (i.e. our clients) must get for their own site. If they would like to use Bing's geocode service, they have to request a key and provide the top level domain that the key should be registered with. See Getting a Bing Maps Key
Example Configuration The example configuration below does not contain a GeocodingEndpoint.
| 78
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The GeocodingEndpoint parameters are specific to the type of geocode service configured. To find parameters relevant for a Bing Geocode Service, see Bing Maps REST Services API Reference.
9.17.1
Reverse Geocoding Reverse geocoding is possible as long as a valid ArcGIS or BingMaps geocoding endpoint has been setup. Reverse coding allows users to enter co-ordinates in any projection into the Global Search bar and have any addresses at those co-ordinates returned to them in the Results List. When text is entered into the Global Search box, the geocoding search provider inspects the text string to deduce whether it contains coordinates. If the geocoder ascertains that coordinates are present in the search string, it checks to see if they resemble a longitude/latitude pair, for example, the string contains decimals, degrees, minutes, or seconds. The order of the coordinates does not matter as long as the user has the W/E and N/S. If no direction is specified, the coordinates are assumed to be longitude and latitude respectively. If the coordinates are not found to be in a suitable longitude/latitude format, then the geocoding search provider assumes that the coordinates are in the projection used by the base map. If the user includes a wkid=number in the text string, then the geocoder tries to use the projection indicated by the wkid, for example, WKID=10200 indicates Mercator. The correct format is coord_x coord_y wkid=#### .
79 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.17.1 Reverse Geocoding
The following diagram indicates the flow of logic used:
For more information see:
9.17.1.1
l
Using spatial References
l
Projected Coordinate Systems
l
Geographic Coordinate Systems
Address by LocationTool The Address By Location tool can be added to the Tasks tab of the toolbar. This tool makes it possible to find the address at any location on the map that is clicked. You can add the tool to any tab of the toolbar. You can also add a new region on the tab if you wish to and then add the tool to the region. It is important to set up the geocoding module and the geocoding endpoint before adding this tool.
To add the Address by Location tool to the toolbar: 1. Launch Geocortex Essentials. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens.
| 80
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose toolbar you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Toolbar. 6. In the Configured Toolbar panel, scroll down to Tasks. 7. In the Available Tools panel, scroll down to Tasks where the Address By Location tool is located. 8. Drag the Address by Location tool into position on the Tasks tab of the toolbar.
You can add the tool anywhere on any tab of the toolbar. You can also a new region on the tab if you wish to and then add the tool to the region.
The ReverseGeocodePoint command can be inserted into any toolbar group, for example, other identify tools, but in this example, it is inserted into the Tasks section.
9.17.2
Batch Geocoding You can also import large numbers of addresses in the CSV or XLS/XLSX file formats and add them to the map as a graphics layer. You cannot import Excel files that are password protected.
As part of the import process, you can re-order the columns in the file to ensure that once imported, the information is in the order you want to display it. During the import process, the XY co-ordinates of each address are plotted on the map. Once imported, all the normal tools like search and identify, work on the imported information. Currently, there is only one batch geocoder supported - the ArcGIS Batch Geocoder. Only one Batch Geocoder can be used per viewer.
81 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.17.2 Batch Geocoding
ArcGIS Server 10.1 or higher is required for Batch Geocoding.
The maximum number of records to import can be configured.
Parameters l
BatchSize: The BatchSize parameter sets the maximum number of records to allow in an import file. If the number of records in the import file exceeds the configured amount, the import fails. The default number of records is 1000. The batch size cannot exceed the SuggestedBatchSize defined in the geocode service. The suggested batch size for the ArcGIS Geocode Server is 1000.
l
DisplayName: The name of the batch geocoder, for example, "ArcGIS Batch Geocoder" .
l
SupportsBatchGeocoding: If set to true , this parameter enables batch geocoding.
l
ColumnPrefix: This parameter allows you to use the Column prefix in place of the column headings when the Use First Row as Header option is unchecked. In this case, the headings are replaced by the word "Column and the number of the column, for example, Column1, Column2.
l
ConnectionString:The URL to the batch geocoding service, for example,
"url=http://serverapps101.esri.com/arcgis/rest/services/USA_Geocode/GeocodeServer"
Example Configuration The following code must be inserted into the Viewer.xml of the site. This code is inserted as a Module within the
tags.
| 82
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
9.18
GeoRSS Module The GeoRSS module implements the ability to add GeoRSS data sources to a web mapping application. The GeoRSS module provides a single command: GeoRSSListFeatures, which displays a list of GeoRSS features to select and add in the Viewer’s Results List. There are no user-configurable settings for this module.
9.19
Global Search Module The GlobalSearch module implements the global search box found in the top right-hand corner of the Geocortex Viewer for Silverlight. The Global Search module is internal to the Geocortex Viewer for Silverlight and contains no user-configurable settings.
9.20
Graphics Layer Search Module The GraphicsLayerSearch module makes it possible to search map layers such as ESRI Shape Files or commadelimited files that are imported from within the Geocortex Viewer for Silverlight global search infrastructure. This module contains two configurable parameters: IncludeInGlobalSearch and ExactMatch
Parameters l
IncludeInGlobalSearch: If set to true , when a user performs a global search, the search includes a search of graphics layers. The default is true .
l
ExactMatch: If set to true , the GraphicsLayerSearch returns results only for attributes that match exactly. If set to false, partial matches are returned in the search. The default is true .
Example Configuration
9.21
Help Module The Help module implements the end-user help system in the Geocortex Viewer for Silverlight. The Help module makes it possible for a user to open the help by clicking the Help icon located top-right, or contextually by pressing the F1 key when on a viewer feature.
83 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.21 Help Module
Parameters l
UseF1Key: If set to true, the help system opens whenever a user presses the F1 key. The default is true .
l
Topics: The list of help topics configured for the help system. Each topic found in this section contains a URI to the HTML page containing a specific help topic.
{Insert__Help-Topics}
9.22
Identify Module Identify manages the interactive identification process. Users can identify items on the map using points, rectangles, polygons, or polylines. Users can also use this tool to perform buffered identify operations. By default, buffered identify operations are done in the spatial reference of the Universal Transverse Mercator (UTM) zone that the buffer geometry center falls into. This generally yields accurate results. However, if you need to create very large buffers, you should configure a specific coordinate system. You can configure the Identify module to use a specific coordinate system instead of UTM. You do this by setting properties on the BufferingOptions element in the module configuration. You can specify a WKID or WKT value for the buffering to be performed in. If you use a WKT, the IsGeographic parameter should be set to indicate if the coordinate system is geographic or not. We do not recommend that you buffer polylines or polygons using a geographic coordinate system as Esri does not fully support doing so. When you specify a WKT for buffering to use, you should place the WKT in the BufferingProjectionWkt global as the body of the XML element, as the text will contain quotes. For example:
Parameters l
PixelTolerance: A positive integer that sets the number of pixels away from a feature that the mouse cursor can be in order for a feature to be included within an identify operation. The default is 2 pixels.
l
VisibleLayersOnly: When true, features from layers currently turned on are displayed. The default is true.
l
VisibleAtCurrentScale: When true, features for layers visible at the current scale dependency are considered. The default is true.
l
WKID: The well-known ID of a coordinate system to perform buffering in (overrides the WKT, if a WKT is also specified).
l
WKT: The well-known text of a coordinate system to perform buffering in (overridden by the WKID, if a WKID is also specified).
l
IsGeographic: If WKT is specified, isGeographic should be set to reflect whether or not the specified WKT represents a geographic coordinate system.
Example Configuration The module configuration:
85 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.23 Info Module
9.23
Info Module Introduced in version 1.9, the Info Module implements the Home panel in the Geocortex Viewer for Silverlight. The Home panel can be configured to be the first thing users see when the Viewer opens. The Info Module provides the ability to add images, text, and UI elements to the panel, including buttons or links to launch a web page, invoke a command, or run a workflow.
Home panel showing sample content The ability to add links and workflows means that the panel can act as a quick entry point for users to try out features and tools, or to find help. The icon and title of the panel are also configurable. Because the module can be used in other contexts or for other purposes, it is called the Info module in the code. The Home panel is visible by default but can be hidden by changing the settings in Essentials Manager or in the configuration file.
| 86
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The Developer QuickStart contains a comprehensive sample configuration of the Home panel with the code required to implement it.
Parameters l
HomePanelIsVisible : Defines whether or not the Home panel is visible. The default is false .
l
HomePanelCanClose : Defines whether or not the user can close the Home panel. The default is true .
l
HomePanelIconUri : The URI to the image you want to use for an icon in the Home panel.
l
HomePanelTitle : The title that displays at the top of the Home panel.
Example Configuration - Viewer.Defaults.xml The code below, implements the Home panel in the Viewer.Defaults.xml file.
{HomePanelContent}
Example Configuration - Viewer.xml Once you configure the Home panel in Geocortex Essentials, the code that configures the Home panel is added within the element of the Viewer.xml for that particular viewer. The code below is a sample of typical content that may be added to the Home panel. Notice that the content of the Home panel is contained within a CDATA section, which begins with ends with
and
.
.... Welcome to the Tools & Features Demo
87 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.23 Info Module
Site
The Geocortex Viewer for Silverlight is a configurable viewer framework. For evalu ation purposes, this app showcases all available tools and features.
Among other things, you can:
1. Search for information
Find features and other results (e.g. search “ville”).
2. Explore the advanced toolbar p>
The toolbar is an optional element that provides numerous capabilities for m ore specialized, web-GIS style applications.
3. Perform specific tasks
This Home panel and the “I want to…” menu are great for directing users to s tep-by-step functionality to get things done quickly. For example:
Crea te a mailing label report
Print a map
]]>
| 88
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
See also... Configure the Home panel on page 32
9.24
Instant Search Module This module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.25
I Want To Menu Module The I Want To Menu Module defines the menu items that display in the I Want To Menu visible under the I Want To button of the main map area. The I Want To menu is a list of frequently-used tasks.
Parameters l
Title: The title of the I Want To menu that displays on the banner.
l
Text: The text to appear on the I Want To menu item.
l
Command: The named command to execute when the menu item is selected.
l
CommandParameter: The parameter value that is passed along to the command when it is executed.
l
ImageUri: The image to display next to the menu item.
l
Description: A few sentences describing the feature in a little more detail. The description is visible in Manager only—it does not appear in the viewer's user interface.
Example Configuration -
-
-
{Insert__Menus-IWantTo-Items}
9.26
JavaScript Module The Layer Catalog module integrates the named commands of the Geocortex Viewer for Silverlight with JavaScript.
Parameters l
StartupFunction: The name of the JavaScript function to execute when the Viewer loads.
Example Configuration
9.27
Layer Catalog Module The Layer Catalog module is internal to the Geocortex Viewer for Silverlight.
| 90
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Parameters l
HideApplyButton: Determines whether or not an Apply button is shown in the Layer Catalog dialog. The Apply button transfers selected layers from the catalog to the Layer List. Unselected layers are removed from the Layer List.
l
HideOKButton: Determines whether an OK button will show or not on Layer Catalog dialog. OK button functions exactly like Apply button plus it closes the dialog.
l
HideCancelButton: Determines whether a Cancel button will show or not on Layer Catalog dialog. Cancel button when clicked closes the dialog and layer list remains unchanged.
l
MinFilterLength: Determines the minimum number of characters that are required for filtering. For example if this parameter is set to 3, user will not be able to filter the catalog layers by typing “ai” because the length of “ai” is only 2.
Example Configuration
9.28
Layer Drawing Order Module The Layer Drawing Order module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.29
Layer List Module The Layer List Module is the panel displayed along the left side of the Viewer with the title of Map Layers. It contains the directory of map services, layers, base maps, and graphics layers currently in the Viewer. You are able to turn map layers on and off and manipulate the transparency of base map layers from the Map Layer. You can set parameters that give you control over how the Layer List behaves, including which layers or layer groups are automatically selected when you click a layer, whether the Legend icons or swatches are integrated into the Layer List, or whether layers are expanded or hidden when the Layer List opens. Layer themes allow you to define complex sets of layers in Geocortex Essentials and then quickly flip between very different layer sets in the Viewer.
Parameters l
LayerThemes: The Visible setting allows you to specify whether or not the layer themes selector is shown on the Layer List, in cases where the site has layer themes. Valid values are true or false . The default setting is true , which means that the layer theme selector is shown on the Layer List if the site has Layer Themes.
91 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.29 Layer List Module
l
Filter: Defines the location of the Layer List filter. If the filter element is not specified then the layerlist filter is not displayed. Filter contains a single attribute: Location which may be one of Top or Bottom .
l
LayerList: You can configure the following parameters in the Layer List: l
ExpandFolders, ExpandMapServices, and ExpandGroupLayers are parameters that can all be set to true or false . If true , the folders, map services, or group layers are expanded in the Layer List at startup. If false , they are hidden. The default value is false . The ExpandGroupLayers and ExpandMapServices parameters do not have any effect if you are using Essentials 3.7 or higher. Instead there are properties available for each individual group layer and map service in the site.
l
IncludeLegendSwatches : Can be set to true or false . When true , legend swatches are included in the Layer List as children of layers. The default value is false .
Legend icons shown below each Layer in the Viewer l
AutoExpandSwatches : Can be set to true or false . When true , the legend swatches in the Layer List are automatically expanded or collapsed based on the state of the parent layer. The default value is
false . l
FilterLegendSwatchesInLayerList : Works with AutoExpandSwatches and can be set to true or false . When true , the legend swatches are filtered according to the Legend rules that you have set under VisibleLayersOnly , VisibleAtCurrentScaleOnly , and VisibleWithinCurrentExtentOnly (See below under Legend). When true , any options that are set in the Layers List are applied to the Legend swatches too. The default value is false .
l
DisableAutoExpandSwatchThreshold : Sets the number of Legend swatches that are expanded automatically. When a number is specified, the layer expands automatically only if the number of swatches are less than or equal to this number. To disable this behavior, set a value of zero (0).
l
ShowTransparencySlider : Can be set to true or false . When true , a slider control is included in the Layer List next to each entry that supports transparency control. The default value is true .
| 92
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
l
l
ToggleParentOnCheck : Controls the selection behavior of child layers in relation to the parent layer. Can be set to true or false . When true , the parent layer is automatically selected when you click a child layer. The default value is false .
l
ToggleChildrenOnCheck : Controls the selection behavior of the child layers in relation to its parent layer. Can be set to true or false . When true , all child layers are selected when you click the parent layer. The default value is false .
l
ToggleChildrenOnUncheck : Controls the uncheck behaviour of parent/children layers. Can be set to true or false . When true , all child layers are unchecked if you uncheck their parent layer. The default value is false .
l
ToggleRecursively : Works with the other three Toggle parameters. Can be set to true or false . When true, the ToggleParentOnCheck , ToggleChildrenOnCheck , and ToggleChildrenOnUncheck options apply to the whole layer list. The default value is false .
Legend: You can configure the following items on the legend component of the layerlist : l
VisibleLayersOnly : Shows the legend items for only the visible layers on the map. Can be set to true or false.
l
VisibleAtCurrentScaleOnly : Shows the legend items for only the current scale of the map.Can be set to true or false.
l
VisibleWithinCurrentExtentOnly : Shows the legend for only the current extent. Can be set to true or false .
l
LegendSwatchSize : Controls the size of the legend icons by pixel. Is set as a single number (integer). The default is 20 pixels.
l
LayerTypeIcons: Defines the default icons to show for a particular layer type in the Layer Action window.
LayerType may be one of Group, Line, Polygon, Point, Graphics, or None. You can set the ImageUri as a URI to an image file that you want to use.
Example Configuration -
See also... About Layer Themes on page 143 Base Map Control Module on page 70
9.30
Layer Search Module The Layer Search module provides the ability to search layers published by ArcGIS Server. The Layer Search module respects search settings configured for layers in the Geocortex Essentials. The Layer Search module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.31
Map Module The Map Module has several parameters that control the behavior and appearance of the map.
Parameters l
GeometryServiceUri: Defines the URI referencing a valid geometry service that is used for coordinate reprojections.
l
SnapToLevels: When true, zooming will snap to scale levels if the map contains cached layers. When false, you can zoom to scales, which are in between cached scale levels. The default is "false" .
l
PanDuration: Specifies the speed of the pan animation. Smaller values are faster and larger values are slower. We recommend that you do not set this value to more than 2. A value of 0 disables the animation completely.
l
ZoomDuration: Specifies the speed of the zoom animation. Smaller values are faster and larger values are slower. We recommend that you do not set this value to more than 2. A value of 0 disables the animation completely.
95 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.31 Map Module
DefaultPointFeatureZoomScales: Specifies the default map scale rendered when you zoom in to a
l
particular point feature. MinimumResolution: The minimum resolution (map units per pixel) you can zoom in to. By default, the map
l
scale is either unconstrained for dynamic services, or constrained to scales between the smallest and largest cache level if your map contains a cached service. By setting this property, you can either impose a scale constraint for dynamic services, or allow the map to zoom beyond the scale levels of a cached service. This setting affects how far you can zoom in. You can leave this attribute out entirely and then the default behavior of the map control applies. MaximumResolution: The maximum resolution (map units per pixel) you can zoom out to. By default, the
l
map scale is either unconstrained for dynamic services, or constrained to scales between the smallest and largest cache level if your map contains a cached service. By setting this property, you can either impose a scale constraint for dynamic services, or allow the map to zoom beyond the scale levels of a cached service. This setting affects how far you can zoom out. You can leave this attribute out entirely and then the default behavior of the map control applies.
Example Configuration
| 96
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
9.32
Map Tips Module Map Tips are the pop-ups that appear when you hover over a feature on the map. For performance reasons, Map Tips are disabled by default, but are easy to enable. From version 1.6, it is possible to control the default opening appearance of the Feature Details map tips. The default appearance of the feature details map tips is set in the section of the Viewer.Defaults.xml file using the parameter. Possible values for the parameter are
Attributes , DataLinks , Description , or Hyperlinks . The default value is Description . The Map Tips Module also has parameters that are set in the Map Tips Module of the Viewer.Defaults.xml. In order for map tips to appear in your Silverlight viewers, they must be configured in Essentials. Refer to the Geocortex Essentials Administrator Guide or Manager's help system for information.
Parameters l
DisplayOnClick: Map tips are activated when the user clicks on the map as opposed to when they hover over the map. The default is false .
l
Enabled: If set to true , map tips are displayed when the mouse hovers over a feature. The default is false .
l
IgnorePixelToleranceForPolygons: If set to true a PixelTolerance value of 0 is used when identifying on polygon features. The default is false .
l
PixelTolerance: A positive integer that defines the number of pixels away from a feature that the mouse cursor can be in before the map tip is displayed for that feature. The default is 2 pixels.
l
RestoreOpenMapTips: A value that indicates whether map tips should be restored after tool usage and extent changes. The default is false .
l
VisibleLayersOnly: If set to true , map tips for layers currently turned on are displayed. The default is true .
l
VisibleAtCurrentScale: If set to true , map tips for layers that are visible at the current scale are displayed. The default is true .
Example Configuration
97 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.33 Markup Module
-
9.33
Markup Module The Markup Module provides tools that allow an end user to add markup shapes or text to a map. From version 1.7 of the Geocortex Viewer for Silverlight, the Text Tool includes the ability to add feature information found at a point clicked on the map. The feature information can then be added to labels and displayed on the map.
Parameters The Markup Module contains a the following parameters: l
MarkupLayer Name: The name of the markup layer.
l
MarkupTextPixelTolerance: A positive integer that sets the number of pixels away from a feature that the mouse cursor can be in order for the feature to be included for selection in the Advanced Label Options dialog. The default is 2 pixels.
l
MarkupTextVisibleLayersOnly: When true, features from layers currently turned on are displayed for selection when the Advanced Label Options are activated. The default is true.
l
MarkupTextVisibleAtCurrentScale: When true, features for layers visible at the current scale are displayed for selection when the Advanced Label Options are activated. The default is true.
| 98
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Example Configuration
9.34
Measurement Module The Measurement Module adds the ability to measure distances and areas on the map. The Module also contains a coordinate system within which to perform all measurements. The Module can project to and from geographic and linear coordinate systems, allowing length and area measurements to be made with a high level of accuracy.
Parameters l
GeometryServiceUri: A URI referencing an ArcGIS Geometry Service endpoint to use for projection and measurement.
l
PredictionEnabled: When set to true the measurement tools preview the length of line segments before vertices are added. When set to true, if you hover your mouse while drawing measurement markup, it shows the current segment length.
l
WKID: The Well-Known ID (WKID) of a map projection suitable for measuring distances and/or areas. If not specified, measurements are done in the coordinate system of the map. If specified, all measurements are projected into this system. If you set this value, you must also set ProjectionUnits .
l
ProjectionUnits: If a projection WKID is set, you must define this setting to reflect the native unit of the desired coordinate system. For example, if Wkid is set to 2264 , then ProjectionUnits must be set to feet , the unit type that the 2264 projection uses. Valid values include: degree , degrees , decimaldegree ,
decimaldegrees , foot , feet , kilometer , kilometers , meter , meters , miles , mile , nauticalmile , nauticalmiles , yard , yards . l
OverrideUnits: This parameter overrides the reference unit used by the Measurement Module if a map misreports its units. See possible units above. For example, if a map misreports its units as meters but its coordinates are actually in feet, the OverrideUnits corrects the value by overriding the incorrect value.
l
DefaultAreaUnit: This parameter determines the measurement unit for area that is used by default. Valid values are squareFeet, squareYards, squareMeters, squareKilometers, squareMiles,
squareNauticalMiles, acres, hectares . The default is squareFeet. l
DefaultUnit: This parameter determines the measurement unit that is used by default. The Viewer will start up using this unit of measurement. Valid values are the same as the ones in ProjectionUnits . The default is
feet
99 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.35 Open Csv Module
Example Configuration
9.35
Open Csv Module The OpenCsv module provides the ability to open comma separated values (CSV) files and load the data into the map as graphics. The module also supports semicolon separated files. The CSV data must contain X and Y columns and values for the module to be able to process it.
Parameters l
GeometryServiceUri: A URI referencing an ArcGIS Geometry Service endpoint to use for projection and measurement.
l
MaxFileSize: The maximum allowable file size in bytes. The default is 2097152 bytes (2MB).
l
XColumns: A comma separated list of case insensitive candidate column names to use when attempting to identify the X-coordinate column of the CSV data.
l
YColumns: A comma separated list of case-insensitive candidate column names to use when attempting to identify the Y-coordinate column of the CSV data.
Example Configuration
9.36
Open Shapefile Module Provides the ability to open Esri Shapefiles and load the data into the map as graphics. If a .prj file is provided, the module projects the data to the map’s spatial reference. If the file is not provided, the map’s spatial reference is assumed.
| 100
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Parameters l
GeometryServiceUri: A URI referencing an ArcGIS Geometry Service endpoint to use for projection and measurement.
l
MaxFileSize: The maximum allowable file size in bytes. The default is 2097152 bytes (2MB).
Example Configuration
9.37
Optimizer Integration Module Geocortex Optimizer is a product that collects and reports on a GIS infrastructure. The Geocortex Viewer for Silverlight allows publishers to collect information about users. The Optimizer Integration Module then collects data about: l
The areas and layers users are looking at.
l
The user who is using the Viewer.
l
The tools within the Viewer they are using.
This data is collected and can be used to create informative reports within the Geocortex Optimizer Reports Module.
Parameters l
Enabled: If true , then the Viewer sends data to Optimizer. The default value is false .
l
UserName: The name of the user.
l
DataRelayUri: The Uri to the REST endpoint hosting the Optimizer Database Module. If the endpoint is not specified, the Optimizer integration Module attempts to log back to the same host that the Viewer application is launched from.
Example Configuration
9.38
Overview Map Module The overview map displays in the bottom right hand corner of the Viewer and shows the position of the current extent within a larger map.
101 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.39 Print Templates Module
Parameters l
OpenByDefault: True if the overview map is displayed by default.
l
ExtentScaleFactor: The factor by which the extent of the overview map is scaled in relation to the scale of the Viewer’s map.
l
Mode: Either Static or Dynamic . l
If Static , the overview map extent remains fixed unless explicitly moved.
l
If Dynamic , the overview map extent is centered on the current map extent. The Region="BottomRightMapRegion" parameter positions the overview map in the bottom right corner of the map.
Example Configuration
9.39
Print Templates Module The Print Templates module makes it possible to print a map using a print template. The Print Templates module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.40
Progress Indicator Module The Progress Indicator module provides the progress bar displayed by the viewer each time a lengthy viewer operation occurs. This module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.41
Query Builder Module The QueryBuilder Module provides a way for an end user to use advanced queries to search for the features of a layer. The Query Builder supports both a simple and an advanced user interface.
| 102
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
From Geocortex Essentials version 3.11 onwards there is a property on the Details tab of a layer that makes it possible to exclude or include the layer when running queries. The QueryBuilder Module can perform queries on ArcGIS Server 10.0 layers and OGC layers if you also have the Advanced OGC Extension for Geocortex Essentials. The Filter Builder is a slightly different version of the Query Builder that applies the query statement as a filter on a layer. Rather than performing a query on a layer and returning results, the results are reflected by redrawing the filtered data on the map itself. The Filter Builder is the same as applying a definition expression in ArcMap. The Query Builder module automatically assembles SQL where clauses are based on user input. The syntax of a where clause statement depends on the query operator and the data type of the field to be queried. There are also subtle syntax differences depending on the underlying geodatabase that contains the data. This module supports administrator configuration of all the format strings used to assemble queries. For each format string:
o{0} is substituted at runtime for the field name of the selected layer. o{1} is substituted at runtime for the text value supplied by the user.
Parameters The following parameters are optional and should only be configured if you wish to override the default format strings. l
AutoCompleteNumericQueryFormat: The format string that an autocomplete input should use when assembling a lookup query for a numeric field. Exception: {{0}} is substituted at runtime for the text value supplied by the user.
l
AutoCompleteTextQueryFormat: The format string that an autocomplete input should use when assembling a lookup query for a text field. Exception: {{0}} is substituted at runtime for the text value supplied by the user.
l
AutoCompleteTextNoCaseQueryFormat: The format string that an autocomplete input should use when assembling a lookup query for a text field of a datasource that does not support case functions. Exception:
{{0}} is substituted at runtime for the text value supplied by the user. l
NumericEqualsQueryFormat: The format string to use when assembling an equals query for a numeric field.
l
NumericNotEqualsQueryFormat: The format string to use when assembling an not equal to query for a numeric field.
l
NumericLessThanQueryFormat: The format string to use when assembling a less than query for a numeric field.
l
NumericLessThanEqualsQueryFormat: The format string to use when assembling a less than or equal
to query for a numeric field. l
NumericGreaterThanQueryFormat: The format string to use when assembling a greater than query for a numeric field.
l
NumericGreaterThanEqualsQueryFormat: The format string to use when assembling a greater than or
equal to query for a numeric field. l
NumericIsNullQueryFormat: The format string to use when assembling an is null query for a numeric field.
l
NumericIsNotNullQueryFormat: The format string to use when assembling an is not null query for a numeric field.
l
TextEqualsQueryFormat: The format string to use when assembling an equals query for a text field.
103 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.41 Query Builder Module
l
TextNotEqualsQueryFormat: The format string to use when assembling an not equal to query for a text field.
l
TextLessThanQueryFormat: The format string to use when assembling a less than query for a text field.
l
TextLessThanEqualsQueryFormat: The format string to use when assembling a less than or equal to query for a text field.
l
TextGreaterThanQueryFormat: The format string to use when assembling a greater than query for a text field.
l
TextContainsQueryFormat: The format string to use when assembling a contains query for a text field.
l
TextContainsNoCaseQueryFormat: The format string to use when assembling a contains query for a text field of a datasource that does not support case functions.
l
TextStartsWithQueryFormat: The format string to use when assembling a starts with query for a text field.
l
TextStartsWithNoCaseQueryFormat: The format string to use when assembling a starts with query for a text field of a datasource that does not support case functions.
l
TextEndsWithQueryFormat: The format string to use when assembling an ends with query for a text field.
l
TextEndsWithNoCaseQueryFormat: The format string to use when assembling an ends with query for a text field of a datasource that does not support case functions.
l
TextIsNullQueryFormat: The format string to use when assembling an is null query for a text field.
l
TextIsNotNullQueryFormat: The format string to use when assembling an is not null query for a text field.
Example Configuration
9.42
Reporting Module The Reporting module makes it possible to create reports within the Geocortex Viewer for Silverlight. The Reporting module publishes two commands: RunFeatureReport and RunFeaturesReport . The Reporting module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.43
Results Module The Results module provides the interface to display search and selection results the Results List of the Geocortex Viewer for Silverlight. The Results module has two modes; a list-oriented view and a tabular view. The Results module publishes a number of events including Feature Hover, Click and Double-Click events and has a number of commands to change the orientation of the Results List. These commands and events are described in some detail in the Command Reference on page 204.
9.44
SaveOpenProject Module The SaveOpenProject Module provides a way to save a Viewer session and return to it later. For example, a user may start the Viewer, zoom and pan to a particular location, add markup to their map and then save the project. They can then send an email to a colleague and tell them about the project. That colleague can then load the project and see the markup that was added. When you save a project, it is assigned whatever category has been configured in ProjectCategory . Later, when you open a project, you will see a list of all the saved projects that contain the category, even if they are from another viewer. From version 1.7 onwards, it is possible to save a project locally on a client rather than to the server. The project is then not visible to others.
Parameters l
ProjectCategory: The category that is assigned to all the projects that are saved. When you open a project, you see a list of all the saved projects containing this category, from all Viewers.
105 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.45 Scale Bar Module
l
Support: Tells the Viewer what to do when the Essentials server does not support projects. When Support = "Warn", the application displays a warning message to the user.
l
CanSaveToServer: Defines whether or not the user can save their project to the server. The default setting is
true . l
CanSaveToClient: Defines whether or not the user can save their project as a file on their own computer. The default setting is true . The following table explains how these parameters work in relation to each other:
CanSaveToServer
CanSaveToClient Behavior
Setting
Setting
true
true
When the Save and Open buttons are pressed, the project is saved to, or opened from, the server. The drop-down arrows next to each button allow the user to select whether they want to work with projects on the server or on their own computer.
true
false
When the Save and Open buttons are pressed, the project is saved to, or opened from, the server. Users do not see options for working with project files on their own computer. This was the behavior in previous releases of the Silverlight Viewer.
false
true
When the Save and Open buttons are pressed, the project is saved to, or opened from, the user's own computer. Users do not see options for working with project files on the server.
false
false
The Save and Open buttons are hidden.
Example Configuration
9.45
Scale Bar Module The Scale Bar module implements the scale bar control in the bottom left corner of the map. The Scale bar module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.46
Scale Dependent Base Maps The Scale Dependent Base Maps module implements the ability to set a maximum and minimum scale to display a base map. The Maximum and Minimum Scale for a base map are configured in Geocortex Essentials on the Display Settings tab of the map service. See Configure the Scale Range of Base Maps on page 64 for more information.
| 106
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The Scale-Dependent Base Maps module only supports tiled and Base Map services.
Example Configuration Adding this code to your Viewer.Defaults.xml file enables the Scale-Dependent Base Maps module. This module enables the viewer to honor minimum and maximum scale ranges when they are set in Essentials.
9.47
Scale Slider Module The Scale Slider module implements the scale-slider control in the top left corner of the map. The Scale Slider module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.48
Selection Module A core concept of the Geocortex Viewer for Silverlight is that of selection. A selection is a place where features are gathered and then operated on. For example, a user searches for features, and selects those of interest into a selection. The user can then perform another search or two to find other features of interest, and then add those features to the selection. Once the user has all of the features they need, they can choose to use those selected features in a report. The Selection Module provides the functionality to manage and operate on selected features.
Parameters l
l
Menus: The menus used by the Selection Module. The selection module currently uses these menus: l
CurrentSelectionMenu
l
SelectionLayerMenu
l
HistoricalResultsRootMenu
l
HistoricalResultsLayerMenu
Menu: Each menu consists of an ID and a set of menu items. The ID is used internally to identify the menu programmatically.
l
Items: Each menu item consists of Items. The menu can contain a Separator created using - . l
Text: The text that displays for each menu item.
l
Command: The named command to execute when the menu is selected.
l
Description: (optional) The description associated with the menu item. Depending on the menu, the description may or may not be used.
l
ImageUri: (optional) The uri to the icon that can be displayed on the menu next to the item text.
l
HideWhenDisabled: (optional) If true, the menu item is hidden when the associated command’s CanExecute property is false .
107 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.48 Selection Module
Example Configuration
109 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.49 Shell Module
9.49
Shell Module The Shell Module manages the layout of the Viewer application. The Shell Module hosts the Regions that the Viewer’s Modules are loaded into. From version 1.6 of the Geocortex Viewer for Silverlight you can control the following elements: l
Data Frame: Can be resized and a minimum, maximum, and default width specified for the frame. These parameters are configured in the Shell Module in the Viewer.Defaults.xml file (see Parameters below) and in
:
Drag the edge of the frame to resize Data Frame l
Results View: Can be positioned by default on the left side or at the bottom of the screen and show the results in either list or table format. These settings are configured using two parameters in the section of the Viewer.Defaults.xml file:
These global parameters control the appearance of the Results Frame at start up: l
Results View Region: Controls the default region in which the Results List displays. Possible values are either DataRegion or ResultsRegion . If you use DataRegion the Results List is displayed on the left as it was previously. If you use ResultsRegion the Results List displays in wide view at the bottom of the window.
| 110
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
l
Results View Mode: Controls the default mode of display for the Results List. Possible values are List and Table . If you use List , which is the default mode, the results display in as a vertical list. If you use
Table mode, the results display in a tabular grid.
Parameters l
ShellFlowDirection: Sets the flow of wording and information for different languages to go either
LeftToRight or RightToLeft . The Default value is LeftToRight . l
ToolBarOpenByDefault: If true , the advanced toolbar is visible at startup, otherwise, it is collapsed. The default value is false .
l
DataFramePosition: Sets the position of the data frame to the Left or Right . The default is Left . l
If Right , the data frame is pinned to the right of the application
l
If Left , the data frame is pinned to the left of the application. This setting is independent of the FlowDirection setting.
l
DataFrameOpenByDefault: If true , the data frame is visible at startup, otherwise, it is collapsed. The default is false .
l
ResultsFrameHeight: Sets the height of the Results View.
l
DataFrameResizable: Sets the data frame so that you can drag it to resize it. Can be true or false . If true , the data frame can be resized. The default is true .
l
DataFrameMinWidth: Sets the minimum width that the data frame can be.
l
DataFrameMaxWidth:Set the maximum width that the data frame can be.
l
DataFrameDefaultWidth: Sets the default width of the panel when it opens.
Example Configuration
111 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.50 Site Module
9.50
Site Module The Site Module hosts a Geocortex Essentials site and manages its lifecycle.
Parameters SiteUri: The Uri references the Geocortex Essentials Site.
Example Configuration
9.51
Symbolization Module The Symbolization Module provides tools that allow an end user to modify the symbology of dynamic layers. From version 1.8 onwards, you can apply settings in Geocortex Essentials that make it possible to: l
Enable or disable symbolization of the whole map service.
l
Enable or disable the symbolization of individual layers.
l
Enable certain layers for symbolization even if the map service itself is disabled. For example, in Geocortex Essentials you can turn off DefaultAllowSymbolization on the map service and enable
AllowSymbolization on a single layer. This feature is only available for ArcGIS Server 10.1 map services that have dynamic layers enabled. In addition, the Allow per request modification of layer order and symbology option must be turned on. In symbolization, there are three types of symbols: l
Simple: All the features in the layer are symbolized the same way, for example, a dot.
l
Class Breaks: Symbolizes features based on the value of one of the feature's numeric attributes. The possible values for the attribute are broken down into ranges (class breaks), for example population ranges.
l
Unique Value: Symbolizes groups of features that have matching attributes, for example, zoning designations (Commercial, Residential, and so on).
Geocortex Essentials provides the ability to control which map services and which layers in a map service can be symbolized, even if ArcGIS allows it. From Geocortex Essentials 3.12, this control extends to which fields are candidates for class breaks and unique value renderers.
Parameters The Symbolization Module contains the following parameters: l
DefaultNumberOfBreaks: Defines the default number of breaks to use for class breaks symbolization. The default is 5.
| 112
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
MakeLayerVisibleOnApply: Defines whether to make a layer that has just been symbolized visible when
l
symbolization changes are applied. The default is true . ShowNewAttributeQuickLink: Defines whether to show a link to copy a duplicate of the current layer and
l
symbolize it on a new attribute. The default is false . ShowNormalizationOptions: Defines whether to show normalization options for generating class breaks
l
renderers. The default is false . AllowMultipleFieldsUniqueValueRenderer: Defines whether the Unique Value symbolization can be based
l
on multiple fields. If you set this parameter to true, the user will be able to select up to 3 attributes. The default is false . UniqueValueMaximumFeaturesInLayer: Defines the maximum number of features in the layer when using
l
Unique Value symbolization. The default is 10,000. PreventUniqueValueWhenMaximumFeaturesReached: Defines whether a warning or error should be
l
shown when UniqueValueMaximumFeaturesInLayer is reached. If this parameter is set to true , an error displays and the symbolization does not proceed. If set to false , a warning will display but the symbolization will proceed. The default is true . Note that this paramater is checked when the user clicks Create Unique Values—it is not checked when new features are added, so it is possible to add more than UniqueValueMaximumFeaturesInLayer features.
Example Configuration Configuration ShowNormalizationOptions="{SymbolizationShowNormalizationOptions}" ShowNewAttributeQuickLink="{SymbolizationShowNewAttributeQuickLink}" DefaultNumberOfBreaks="{SymbolizationDefaultNumberOfBreaks}" DefaultRampFromColor="{SymbolizationDefaultRampFromColor}" DefaultRampToColor="{SymbolizationDefaultRampToColor}" MakeLayerVisibleOnApply="{SymbolizationMakeLayerVisibleOnApply}" AllowMultiFieldsUniqueValueRenderer="{SymbolizationAllowMultiFieldsUniqueValueR enderer}" UniqueValueMaximumFeaturesInLayer="{SymbolizationUniqueValueMaximumFeaturesInLa yer}" PreventUniqueValueWhenMaximumFeaturesReached="{symbolizationPreventUniqueValueW henMaximumFeaturesReached}">
113 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.52 Time Slider Module
9.52
Time Slider Module The Time Slider module implements a time slider that is used in conjunction with Esri time-aware layers. Users of time-aware map services are able to see maps change over time - usually by changing the time extents of a map using a time slider. As the slider changes, so does the map image.
Parameters l
TimeMode: The mode of the time slider. The modes include the following: l
TimeExtent : Shows a time range that moves up and down the slider. The time range is defined by two bars to mark the beginning and end of the time extent. As the user drags the bar back and forth, the data on the map changes to show events within the current time extent (blue area), in the same way that a person can see only the current map extent. You can drag the bars to adjust the start and end of the time extent.
Time slider with Time Extent mode selected l
TimeInstant : Shows a particular instant in time. If the time-aware layer does not have data for that particular instant in time, the map renders no data.
Time slider with Time Instant mode selected l
CumulativeFromStart : Shows cumulative data over a time span. There is a bar that the user can drag to set the end of the time span, but there is no bar for the beginning—the beginning is fixed at the beginning of the full time extent. As the bar moves, more and more data is added to the map as more time is added to the time extent (blue area) - to represent cumulative events over time.
Time slider with Cumulative From Start mode selected The default time mode is TimeExtent . l
Loop: If set to true , the time slider plays continuously. When the playback reaches the end of the time extent, it starts again from the beginning. The default is set to true .
l
PlaySpeed: The speed of the playback in seconds. If the play speed is set too low, it results in a very high number of requests to the map service and could result in delays or uneven rendering if the service cannot respond quickly enough to keep up with the demand.
l
NumberOfIntervals: The number of time intervals that the time extent is divided into for playback.
l
UserConfigurable: When this is set to true, the end user can change the time slider's settings, provided the time slider is visible. Specifically, the user can set the primary time aware map service, the time mode, the start date and end date of the time slider's full time extent, the number of intervals the time extent is divided into, the playback speed, and loop playback mode.
l
UsePrimaryTimeAwareMapService: Specifies whether to have a primary time-aware map service. When
| 114
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
this setting is true, the time-aware map service that is highest in the layer list is the primary map service. The time slider's full time extent is initially set to the time extent of the primary map service. When this is false, the full time extent initially spans the time extents of all that time-aware map services in the site that are turned on in the layer list. l
InitialTimeExtent: Sets the initial time extent to particular start and end dates within the time slider's full time extent. The dates are in UTC (Coordinated Universal Time), which , like GMT (Greenwich Mean Time), has the United Kingdom as offset zero, New York is UTC+5 (add 5 hours to UTC time), and the Netherlands is UTC-1 (subtract 1 hour). Dates are stored in Unix time—the number of milliseconds since Jan. 1, 1970 at midnight (UTC). To convert between Unix time and human-readable time, use a converter like http://www.epochconverter.com/. If you want the start date to be the start of the time slider's time extent, you can omit the start date by typing the comma followed by the value of the end date. For example, InitialTimeExtent=",1364774400000" . If, in addition to InitialTimeExtent , you specify one or both of InitialTimeIntervalStartRatio and
InitialTimeIntervalEndRatio , the InitialTimeExtent will be ignored and the ratio settings will used. Because the bars that define the time extent must coincide with interval boundaries, the time slider may have to approximate the dates or ratios you enter.
l
InitialTimeIntervalStartRatio: Sets the start position of the initial time extent as a fraction of the full time extent. The full time extent is 0.0 - 1.0. If you set InitialTimeIntervalStartRatio , you must also set
InitialTimeExtentEndRatio . l
InitialTimeIntervalEndRatio: Sets the end position of the initial time extent as a fraction of the full time extent. In the following example, the initial time extent is set to the second quarter of the full time extent.
Example Configuration
115 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
9.53 Toolbar Module
9.53
Toolbar Module The Toolbar Module holds many of the controls that access features within the Viewer. The toolbars are mostly organized into tabs and each tab contains one or more groups of controls. Groups actually contain many things including tools, buttons, and Regions. The only restriction is that whatever is loaded into a group, must be a toolbar item. Tools and buttons on the toolbar look similar but there is an important difference: Tools require the user to interact with the map before the tool is executed. Buttons do not. The type of interaction is specified in the tool’s DrawMode parameter. The commands executed by a tool must take a geometry object as a parameter.
Parameters l
StickyTools: Defines whether or not the tools on the toolbar should be in continuous mode. When set to true , you can use a tool repeatedly until you deselect the tool. When set to false , the tools deselect automatically after a single use. The default configuration is . When in non-sticky mode, you can temporarily set a tool to sticky by double-clicking it. To return the tool to non-sticky mode, click the tool again.
l
DisplayName (Tab): The name that appears on the toolbar tab.
l
DisplayName (Group): The name that appears below a group of tools.
l
DisplayName (Tool): The name that appears below the actual tool.
l
DrawMode (Tool): Defines the kind of map input required before the tool can be used. Can be any one of the following: l
Point
l
Freehand
l
Polyline
l
Polygon
l
Rectangle
l
Tooltip: The text to display when the cursor hovers over a tool or button.
l
Command: The named command to execute when the user clicks on the tool or button.
l
ImageUri: A URI to an image that is displayed on the button or tool.
Example Configuration This example, is of a simplified Toolbar module.
| 116
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
9.54
URL Integration Module The URL Integration module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
9.55
User Layer Addition Module This module is internal to the Geocortex Viewer for Silverlight. The configurable settings for the module can be set in Geocortex Essentials. See Add User Layers on page 120 for more information.
9.56
Xaml Shell Module The standard layout of the Viewer user interface is defined within a Viewer Module called Shell. The Shell that the Viewer uses to layout the user interface is a pluggable component. The Developer Quickstart demonstrates how to create a custom shell complete with code-behind. However, if you want to define the layout of your user interface completely using Xaml, then you can use the XamlShell module as a replacement for the standard Shell module. Steps for using XamlShell : 1. Remove the standard Shell module from your Viewer.Defaults.xml configuration file. Assuming that is defined in the Viewer.Defaults.xml and that your Viewer is inheriting from the Viewer.Defaults.xml, add the
line to your Viewer.xml configuration file. If your Viewer configuration is not inheriting from the Viewer.Defaults.xml, then you do not have to do this step. 2. Add the XamlShell module to your configuration file. There are two ways to use the XamlShell module in configuration. They are discussed below.
Parameters l
Xaml: The element that is defined for the Xaml shell. The Xaml can be specified inline or downloaded using a specified Uri.
l
Uri: The Uri referencing the XAML for the XAML shell.
Example Configuration The Xaml for a shell can also be defined in a remote Xaml file that is retrieved via Uri. Use the following syntax:
Alternatively, the Xaml can be defined inline:
The inline Xaml above, starting with the element, is the same Xaml you would place in an externally accessible file. In this example, a simple Grid is defined with two columns, each containing a ContentControl . Each
ContentControl has a unique attached attribute called RegionName with a unique value identifying the name of the Region to the Viewer. The Viewer uses the Region name to locate the areas into which the Views must be placed. Notice in Viewer.Defaults.xml how the Map module has a View that targets a Region called MapRegion . As long as your shell defines a control with a region named MapRegion , then the Viewer will place the map into that Region. The Viewer ships with a sample, self-contained (InheritFromDefault="false" ) Viewer configuration called
CharlotteBingMapsSimpleShell that illustrates all of these concepts.
9.57
Web Map Integration Module The Web Map module is internal to the Geocortex Viewer for Silverlight and contains no user configurable settings.
| 118
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
9.58
Watermark Module The Watermark module provides a way to add a configurable graphic watermark, for example, a corporate logo, to the map in the Geocortex Viewer for Silverlight.
View Parameters l
Visible: If set to true , the watermark image appears. If set to false , no watermark appears. The default is
false .
Configuration Parameters l
ImageUrl: The web address of the image to use as a watermark. The default is “” (empty string).
l
ImageMode: Specifies which mode to use to display the watermark image: l
Fixed: The watermark image displays in the full, original size of the image.
l
Scaled: The watermark image scales automatically to the size you specify in the Size parameter as the browser window is resized.
l l
Tiled: The watermark image repeats in a grid - horizontally and vertically over the entire map.
Opacity: Specifies a value between 0.0 (fully transparent) to 1.0 (fully opaque) to set the opacity of the watermark image. The default is 0.25.
l
Size: Specifies a value between 0.0 (0% of the map) and 1.0 (100% of the map) representing a percentage of the total map area that the watermark image should cover in Scaled image mode. This parameter does not apply to Fixed or Tiled image modes. The aspect ratio of the supplied image is always preserved to prevent distortion. The default is 0.1.
l
Position: In Fixed or Scaled modes, this parameter specifies where on the map to display the watermark image. This parameter does not apply to Tiled image mode. Possible values include: Top-left, Top, Top-right, Left, Center, Right, Bottom-left, Bottom, and Bottom-right. The default is Center.
Example Configuration
9.59
Workflow Module The Workflow Module provides support for running workflows.
119 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10 Configure Features
Parameters l
RunAtStartup: The RunAtStartup element allows you to specify workflows by ID that then run when the viewer loads. You can run multiple workflows by adding multiple child Workflow elements.
l
WorkflowContainers: The WorkflowContainers element contains a collection of configurable user interface containers for hosting workflow related content. See Workflow Container Configuration on page 175 for more information.
Example Configuration
10
10.1
Configure Features Add User Layers User-added layers allow non-administrative users to add map services to their existing map. The Add User Layers feature makes it possible to add ArcGIS Server map services as well as WMS services. This means that users can add and interact with additional map services. When they are added, the new map service layers are placed are located above all the operational layers and below the basemap layers in the Map Layers list. Using the Add Layer wizard, users can add almost any public ArcGIS Server or WMS map service available on the Internet. Newly-added layers become visible in the Map Layers List and support operations like Identify and Search depending on the capabilities of the map service. This feature also allows the administrator to pre-configure one or more servers or services. When you are adding a Layer, the Add Layer search attempts to match URLs or keywords entered in the URL or Keyword(s) box, for example, sampleserver1 .
| 120
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Supported technologies include: l
ArcGIS l
Map Server, Image Server, and Feature Server
l
GeoRSS
l
WMS
l
BING (Requires a token.)
To add a map layer in the Viewer: 1. On the Maps and Data Sources tab in the Viewer, click Add Map Layer. The Add Layer wizard opens with a list of map services that you can select.
2. To select a map service, do one of the following: l
Click on a Map Service in the list, and then click Next.
l
Type or paste in the URL of a Map Service, and then click Next. (This option depends on the services configured.)
3. Type in an alias for your layer, or select an alias from the list under Available Layers.
121 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.1.1 Configure the Add User Layers Feature
Type an alias for the layer that will appear in the Map Layers list. 4. Click Next. 5. Preview the layer and click Finish, or click Back to modify your selections. 6. You can click Add Another Layer, to select and add more layers, or click Close to return to the map. Some map services in the list may not be compatible with the current map. This may happen if the current map uses cached map services, and the user has searched for one or more map services which are also cached, but are in a different coordinate system. In this case, these map services are still shown in the Add Layer wizard, but they may not be added.
10.1.1
Configure the Add User Layers Feature The Add User Layers feature can be configured in the Geocortex Viewer for Silverlight Management Pack on the User Layer Addition Tab. The Management Pack is added to Essentials as part of the installation process.
User Layer Addition section in Manager
Parameters l
Search Location: The base URL that is used to find new ArcGIS map services that users can add by using the Add Layer wizard. Users can filter the results using keywords.
| 122
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
l
Search Service: The search service to use. For example, if you entered ArcGISOnline, all the map services available on ArcGISOnline would be listed for users to add.
l
Template Location: The location of the template indicates how to build base URLs in order to discover new ArcGIS map services and layers to add to the map.
l
Token: An ArcGIS token that is used to authenticate a user and grant access to token-secured ArcGIS services.
l
BingToken: The Bing Maps Key that is used to authenticate a user and make it possible to add Bing layers.
Example Configuration
10.1.2
Configure Map Service Providers for User-Added Layers The User-Added Layers feature enables users to add layers in the viewer. The User Layer Additions page in Manager allows you to configure the User-Added Layers feature for ArcGIS Server and Bing Maps. For ArcGIS Server, you specify the URL to ArcGIS map services that users can add. If the services secured, you must also configure the tokens. For Bing Maps, you have to configure the token that provides access to Bing Maps. The default Silverlight Viewer has a number of ArcGIS Server map service providers configured. You can use the default configuration out of the box only if your ArcGIS map services are not token-secured and you are not allowing users to add Bing Maps layers.
To open a viewer User Layer Addition page in Manager: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens.
123 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.1.2 Configure Map Service Providers for User-Added Layers
beside the viewer whose layer addition settings you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click User Layer Addition. The User Layer Addition page opens.
To modify the default configuration: 1. Click Copy Defaults. The list of providers becomes available for editing. 2. Modify the providers as desired. Follow the instructions to add, edit, and remove map service providers and tokens.
To revert to the default configuration: Reverting to the default configuration permanently deletes your custom User-Added Layers configuration.
1. Click the Revert to Default button. You are prompted to confirm. 2. Click OK.
To remove the ability for users to add layers: If you do not want the viewer to allow users to add map services, you can remove the module. 1. Click the Remove Module button. You are prompted to confirm. 2. Click OK. The UserLayerAddition module is disabled on the All Modules page.
To re-enable user-added layers: 1. Click the Enable Layer Addition button. A copy of the default configuration becomes available for editing. 2. Customize the copy of the default configuration, or click Revert to Default to go back to the default configuration.
Configure ArcGIS Server Providers When adding a layer from an ArcGIS Server map service, the user selects from a list of available map services. This list is created from the search locations (ArcGIS Server map service URLs) and templates (patterns that match ArcGIS Server map service URLs) that you configure. The User Layer Addition page provides the following Add functions: l
Add Search Location: Use this option to add the URLs to your ArcGIS Server map services that you want users to be able to choose from. If the services are token-secured, you must also add the tokens using the Add
| 124
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Token function. l
Add ArcGIS Online: Use this option if you want users to be able to add layers from ArcGIS Online map services.
l
Add Template: Use this option to add URL templates that the viewer uses to build ArcGIS Server map service URLs. Templates contain the {0} token, which stands for user input. The viewer builds the URL by replacing the {0} token with the value that the user enters. Usually you do not need to add templates—the default templates match most ArcGIS Server URLs.
l
Add Token: Use this option to specify the URL and token for token-secured ArcGIS Server map services that you want users to be able to add.
To add a search location: 1. At the top of the Searches list, click Add Search Location. The ArcGIS Search Location dialog box opens. 2. Type URL to the ArcGIS Server map service(s). The server must publish its list of services. 3. Click OK. The URL is added to the Searches list. If any of the map services you added are token-secured, you must add the token using the Add Token function.
To edit a search location: next to the search location you want to modify. 1. In the Searches list, click the Edit icon The ArcGIS Search Location dialog box opens. 2. Edit the URL. 3. Click OK.
To remove a search location: 1. In the Searches list, click the Remove icon You are prompted to confirm.
beside the search location you want to remove.
2. Click OK. The search location is removed from the Searches list.
To add ArcGIS Online: If "Search Service: ArcGIS Online" already appears in the Searches list, ArcGIS Online is already configured.
125 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.1.2 Configure Map Service Providers for User-Added Layers
1. Click Enable ArcGIS Online. "Search Service: ArcGIS Online" is added to the Searches list.
To remove ArcGIS Online: 1. In the Searches list, click the Remove icon You are prompted to confirm.
beside Search Service: ArcGIS Online.
2. Click OK. The ArcGIS Online search service is removed from the Searches list.
To add a template: 1. At the top of the Templates list, click Add Template. The ArcGIS URL Template dialog box opens. 2. Type an ArcGIS Server URL template. Use the {0} token to represent the part of the URL that is replaced by the user input. 3. Click OK. The template is added to the Templates list. If any of the map services that could match the template are token-secured and you want users to be able to add them, you must add the token using the Add Token function.
To edit a template: next to the template you want to modify. 1. In the Templates list, click the Edit icon The ArcGIS URL Template dialog box opens. 2. Edit the template. 3. Click OK.
To remove a template: 1. In the Searches list, click the Remove icon You are prompted to confirm.
beside the template you want to remove.
2. Click OK. The template is removed from the Templates list.
To configure the token for secured ArcGIS Server map services: Defining the URL here does not make it available to the user—the URL must match a configured search location or template.
1. Click Add Token. The ArcGIS Token dialog box opens
| 126
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
2. In the Location box, type the URL to the ArcGIS Server map service(s). 3. In the Token Value box, type the ArcGIS token. 4. Click OK. The token is added to the Tokens list.
To edit a token or the URL: 1. In the list of tokens, click the Edit icon The ArcGIS Token dialog box opens.
next to the token you want to modify.
2. Edit the URL and token. 3. Click OK.
To remove a token: 1. In the list of tokens, click the Remove icon You are prompted to confirm.
beside the token you want to remove.
2. Click OK. The token is removed from the list of tokens.
To save your changes: 1. Click Apply Changes. 2. Click Save Site.
Configure Bing Maps Providers To configure the Bing Maps map service provider: 1. Click the Bing Maps Provider tab.
To remove the Bing Maps map service provider: 1. On the Bing Maps Provider tab, delete the key.
To save your changes: 1. Click Apply Changes. 2. Click Save Site.
127 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.2 Data Extraction
10.2
Data Extraction Data Extraction is the ability to extract data from selected layers within a defined region of a map. A user first selects the layers, and then defines the area they are interested in, usually by drawing a shape on the map. They can also select the format of the output files. When the extraction is run, a geoprocessing service clips the data from the selected area and creates a zip file containing the data. The zip file can then either be linked to directly, or emailed. The extract process uses ArcGIS Server for data extraction, which supports the most commonly-used data file formats by default. However, over 100 different GIS and spatial data formats can be included by using the Data Interoperability Extension for ArcGIS Server. Once the zip file is created on the web, or emailed, you can download it to your system. Data extraction is based on and uses the ArcGIS Server extract data geoprocessing tasks. These geoprocessing tasks perform data extraction to a number of different output formats. There are two types of geoprocessing task: l
Extract Data Task: Extracts the data and saves it for use locally.
l
Extract Data and Email Task: Extracts the data, zips it and sends it via email.
Each type of geoprocessing task works with a map service that is configured for extracting data. In the Silverlight Viewer, data extraction has been implemented as two workflows that are easy to deploy and configure in the Workflow Designer. There is an Extract workflow for each type of geoprocessing task; the Extract and ExtractAndEmail workflows. These workflows use the ArcGIS built-in geoprocessing tasks to extract data within the Geocortex Viewer for Silverlight. To enable data extraction in the Viewer, you need to set up these elements: l
A map service that contains the data layers that you want your users to be able to download.
l
One, or both, of the geoprocessing services that clip the data and zip it into a file.
l
The Extract or Extract and Email workflows published to the site you plan to use for extracting data.
l
The Geocortex Viewer for Silverlight that consumes the map service and that is configured to run the Extract workflows.
10.2.1
Set up Data Extraction Setting up data extraction for use in the Silverlight Viewer involves the following tasks: l
Prepare a geoprocessing task and a map service in order to use the ArcGIS Server built-in features for data extraction.
10.2.1.1
l
Add the Extract workflows to the site.
l
Configure a button in the Viewer Toolbar or I Want To menu to run the data extraction workflow.
Create and Deploy an ArcGIS Geoprocessing Task In order to use the data extraction features in ArcGIS, you need to: l
Deploy an ArcGIS Server extract-data geoprocessing task that uses a number of different output formats. You can set up a geoprocessing task to either clip and zip, or to clip, zip, and ship (email). The following links explain how to deploy a geoprocessing task:
| 128
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
l
Video on Data Extraction Services in ArcGIS Server 10
l
ArcGIS Desktop 10 Help in the ArcGIS Resource Center: GP Service example: Clip and ShipArcGIS ServerArcGIS Server Data Interoperability Extension
l
10.2.1.2
Optional: Deploy a geometry service to your ArcGIS Server.
Copy the Extract Workflow(s) to Geocortex Essentials Site Folder When you set up a geoprocessing task, you have to select whether to extract data and use it locally or to send it via email. There is a workflow .xaml file for each type of geoprocessing task: l
Extract.xaml: The extracted data is linked to you directly from the Viewer.
l
ExtractAndEmail.xaml: The extracted data is sent to you by email.
For Geocortex Essentials, the default installed location for the Extract.xaml or ExtractAndEmail.xaml workflows is: C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sample Sites\Resources\Workflows\CharlotteOperational To use the .xaml files from within Geocortex REST Manager, copy the .xaml files to a folder beneath the Sites folder. Generally this would be in the Site folder itself or C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\Resources\Workflows. When the Extract workflows are located in the Workflows folder, it is possible to share them between several sites. 10.2.1.3
Configure the Extract Workflow(s) Before you can use the Extract workflows in the Viewer, you need to: l
Change the geoprocessingTaskUrl variable to match the URL of your extract geoprocessing task.
l
(Optional) Change the geometryServiceUri variable to match the URI of the geometry service you plan to use.
Although the steps below show the Extract workflow, the procedure is the same for both .xaml files
To reset the variables in an Extract workflow: 1. On the desktop, open the Geocortex Workflow Designer.
Open Workflow Designer from the Start button 2. In the Workflow Designer, click File | Open.
129 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.2.1 Set up Data Extraction
3. Navigate to the folder that you copied the Extract.xaml and ExtractAndEmail.xaml files into. A good choice would be the following folder: C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\Resources\Workflows 4. Select either the Extract.xaml or the ExtractAndEmail.xaml file and then click Open. The .xaml file you choose must match the geoprocessing task you plan to use. For example, if you are using the geoprocessing task that zips and emails the data, you need to select the ExtractAndEmail.xaml file. Both Extract.xaml and the ExtractAndEmail.xaml are customizable. You can open them in the Workflow Designer and modify them to suit your needs.
| 130
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The .xaml file opens in the Workflow Designer.
The high-level view of the Extract.xaml file (click to enlarge) 5. In the ActivityBuilder, select the Master Flowchart activity. 6. Click the Variables tab at the bottom of the ActivityBuilder. 7. In the Variables table, select the geoprocessingTaskUrl variable, click in the Default cell, and then type in the URL of your extract geoprocessing task. Because the URL is a string, be sure to put it in quotes " ".
131 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.2.1 Set up Data Extraction
Change the geoprocessingTaskUrl variable to the URL of your geoprocessing task 8. Select the geometryServiceUri variable and in the Default cell, type in the URL of the geometry service you plan to use.
Change the geometryServiceUri variable to the URI for the actual geometry service 9. Click File | Save to save the changes to the workflow. 10.2.1.4
Publish the Extract Workflow to your Site To add the Extract workflow to a site: 1. Open Geocortex Essentials Manager and log in. 2. On the Site List, click the Edit Site button of the site that you want to use to extract data. 3. In the Site menu, click Workflows.
| 132
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Site menu in Geocortex Essentials Manager 4. In the Workflows area, click Add Workflow.
Click Add Workflow 5. In the Display Name box, type the name of your workflow - either Extract or ExtractAndEmail. This name will be listed in the Display Name column on the Workflows page. 6. To locate your workflow, click the Browse button. Notice that the Sites folder is the highest folder that you can browse to. To be accessible from Geocortex Essentials, your workflow must be located within this directory.
133 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.2.1 Set up Data Extraction
7. Navigate to the folder where you copied the Extract .xaml files. 8. Select the workflow file, and then click OK.
Workflow Display Name and Uri If you have not saved your workflow to the correct location, in the Browse Workflow Location window, click to open the Upload dialog that allows you to upload the workflow file to a folder under the Sites directory. 9. Click OK, and then click Save Site. When the Extract workflow is listed on the page, an ID for this workflow has been created and listed in the ID column.
Workflow with new ID listed under Workflows Make a note of the Workflow ID - in this case Extract, as you will use this ID when you configure a button in the Viewer to run the workflow.
10. Click Save Site to save your changes to the site. 10.2.1.5
Add a Button to the Viewer To start the Extract workflow, you need a button on the Viewer interface. You can add a button to the I Want To menu or to the Toolbar. You can add the button in Geocortex Essentials by clicking Viewers on the Site menu. Alternatively, you can add it directly to the Viewer.xml file. You need the workflow ID from the Site for this step. In our example in Step 9 above, the ID is Extract.
I want to Menu Button Use the following code to add a button to the I Want To menu:
| 134
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Parameters for the I want to Menu Button l
Item Text: The text that will appear below the button on the I Want To menu
l
Command: The command that runs the workflow when the button is clicked.
l
CommandParameter: The ID of the Workflow, which is run when the button is clicked. The ID of the Workflow is assigned to the workflow when it is published to the site.
l
ImageUri: The URI to the image used as the button icon.
Example Configuration - I want to Menu Icon This configuration adds buttons to the I Want To menu to run both the Extract and the Extract and Email workflows:
Toolbar Button Use the following code to add a button to the Toolbar:
Parameters for the Toolbar Button l
Button Name: The name that appears below the button on the Toolbar.
l
Command: The command that runs the workflow when the button is clicked.
l
CommandParameter: The ID of the Workflow, which is run when the button is clicked. The ID of the Workflow is assigned to the workflow when it is published to the site.
l
ImageUri: The URI to the image used as the button icon.
l
Tooltip: The text of the tooltip that appears when you hover over the button.
Example Configuration - Toolbar Button This configuration adds a button to the Toolbar to run both the Extract and the Extract and Email workflows:
10.3
10.3.1
GeoRSS About GeoRSS The GeoRSS feature makes it possible to map geographically tagged feeds. A GeoRSS feed is represented in the Viewer as a layer in Map Layer list and each feed item is represented as a feature. The feeds can be updated manually or scheduled to update at regular time intervals. There are two standards for GeoRSS; GeoRSS simple and GeoRSS GML (Geography Markup Language). The Geocortex Viewer for Silverlight supports GeoRSS simple. There is no limit to the number of GeoRSS feeds you can add to the Viewer. It is possible to use the Geocortex Viewer for Silverlight with regular RSS feeds such as Reuters using a web service called GeoNames, or example Reuters: World News (http://feeds.reuters.com/reuters/worldNews/). In this case, the web service converts the feed data from the RSS feed into geographic data that can be displayed as a GeoRSS layer. For example, the following URL:http://ws.geonames.org/rssToGeoRSS?feedUrl=http://feeds.reuters.com/reuters/worldNews displays in the Viewer as a world map with the news events clustered and numbered in specific places:
Reuters' news feed in the Viewer converted to GeoRSS feeds via the GeoNames web service A customizable menu is associated with every GeoRSS layer. You can select a specific GeoRSS layer and the map automatically zooms to an extent that includes all the feed items on that layer. If several feeds are too close together, they are clustered as shown. As you zoom in to this point, the feeds separate. You can hover over a feed cluster to see the details of each feed within the cluster.
| 136
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Hover over a node to reveal details about that feed GeoRSS feeds can display mixed geometries for different feed items on the same layer. For example, the layer below shows a polygon of the Microsoft office in London, a line to show the walk to the parking garage, and a point for the garage itself. In the top right corner of the previous graphic, a fine red line on the map shows which section of a road is closed.
GeoRSS feed with mixed geometries on the same layer If a feed contains valid HTML, it displays in the Results panel and on the map tooltips as HTML with links and styling. You are able to see all the GeoRSS items for a given feed. To do so, click the feed in the layer list and select List Items.
HTML features of RSS feeds maintained and used in the Viewer When you click List Items from the context menu, all the feed items display as a list in the Results panel. When you click on a feed in the Results list, the map zooms to this feed on the map. When you click on View Additional Details in the map tip, you see more detail.
137 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.3.1 About GeoRSS
For example, the graphic below is a GeoRSS layer showing feeds of global earthquakes greater than 5 on the Richter scale. The first feed in the Results list has been selected. It is a 5.8 magnitude earthquake in Guatemala. The map is zoomed in to show the epicenter near Guatemala City. If you click View Additional Details, a dialog with a summary of information opens. The summary includes a link to the US Geological Survey (USGS) web site, which contains detailed information about the earthquake.
Drilling down to find more information on an earthquake feed To display the list of GeoRSS feeds in table format, click the Table View link in the Results panel. To display the table of feeds in a split screen at the bottom of the map, click the Wide icon
in the top right corner of
the Results panel. You can drag the edge of the split screen to see more feeds. Click the Wide icon
again to return
the list to the Results panel.
Feeds shown as a table at the bottom of the map 10.3.1.1
Set up GeoRSS To activate GeoRSS, the configuration below must be present in the Viewer.Defaults.xml file.
| 138
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Parameters l
GeometryServiceUri: The Uri of the Geometry service to use as an RSS feed.
Example Code Most of the configuration for this feature must be done in Geocortex Essentials REST Manager.
10.3.2
Configure GeoRSS Apart from adding the small snippet of code to Viewer.Defaults.xml , GeoRSS is set up in Geocortex Essentials REST Manager by adding GeoRSS feeds to a site and then configuring them to display in the Map Layer list.
To add a GeoRSS layer to a site: 1. Open Geocortex Essentials REST Manager and log in. 2. Click the
button for the site you want to add the GeoRSS service to.
3. In the Site menu, click Map. The map currently contains only one Map service.
Map with one map service 4. Click Add GeoRSS Layer. 5. In the Add GeoRSS Layer wizard, type or paste in the URL of the GeoRSS feed you want to add, and then click Next.
GeoRSS Wizard - Enter URL 6. In the Display Name box, edit the name for the layer or leave the name that was extracted from the feed.
139 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.3.2 Configure GeoRSS
GeoRSS Wizard - Display Name and markers 7. If you want to use an icon or symbol for the feeds, click Browse, select a file in the Images folder, and then click OK. You can use the button to open the Upload wizard, which you can use to navigate to and upload an icon or graphic to this site. 8. If you do not select an image, click Next, and the GeoRSS feeds marker defaults to a point that you can later configure to the color and size you want. 9. Click Finish and the layer is added to your map.
GeoRSS Layer added to map The GeoRSS Layer is added to the Map Layer list by default. You can remove it from the Map Layer list temporarily by clicking the down-arrow and deselect the option to add it to the layer list.
10. Click Apply Changes and then click Save Site.
To configure the GeoRSS Layer: 1. To open the map service to configure it, click the Edit Map Service
button.
2. On the Details tab, you can configure the following: l
Display Name: Edit the name of the map service.
l
Description: Add a description that clarifies what this map service does. The Description does not display anywhere.
l
Update Interval(in Seconds): Set the time interval between updates to the RSS feed in the GeoRSS layer. For example, if you set an Update Interval of 30, the RSS feeds in the layer will refresh every 30
| 140
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
seconds. A GeoRSS layer can be updated in the Viewer by right-clicking the layer in the Results panel, and selecting Update.
l
Connection String: Edit the Url of the GeoRSS feed by clicking Edit Connection Settings, changing the URL, and then clicking OK. For example: http://earthquake.usgs.gov/earthquakes/catalogs/eqs7day-M5.xml
3. On the Display Settings tab, you can configure the following: l
Visible: Set the GeoRSS markers to be visible or hidden.
l
Include in Layer List: Adds or removes the layer from the Map Layers list.
l
Icon URI: Add or edit the icon used to identify this layer when several are stacked in the Results panel.
l
Marker Symbol URI: Add or change the graphic used as a marker for the feed items. You can use the button to open the Upload wizard, which you can use to navigate to and upload an icon or graphic to this site to use as an Icon or Marker Symbol.
l
Opacity: Drag the slider to adjust the transparency of the feed markers.
l
Brush Color: Select the color for markers and geometries in the layer. This color is also applied to shapes if the feed has them, for example, polygons, lines, etc.
4. Click Apply Changes and then click Save Site.
10.4
Configure Map Tips Map tips are callouts in the user interface that contain feature information for the currently selected feature. Map tips appear when you do one of the following: l
Enable Map Tips on the Maps and Data Sources tab and hover your cursor over features on the map.
l
Click the Analysis tab, and then click on any of the Identify tools. When you then click on the map, a list of identified features appears in the Results list. When you click any of the features in the Results list, the map tip displays.
141 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.4 Configure Map Tips
Map tips using Identify tools Map tips contain the following configurable information: l
Feature Label: The display name of the feature, for example, Parcel ID.
l
Feature Description: A short tip that briefly describes the feature or adds more information about it, for example, the name of the owner of the parcel. The short tip appears in the Results list when the Identify features are used.
l
Feature Long Description: A longer description that can include details about the feature or a more comprehensive description, for example, the size of the parcel, presence of wells, usage, or buildings present. The Feature Long Description appears in the map tip just below the Feature Label.
Different types of map tips shown in the Geocortex Viewer for Silverlight In the Silverlight Viewer, if the Feature Long Description is not configured (blank), the short Feature Description is used in place of the Feature Long Description in the map tip.
These labels and tips can be configured to include useful information on a feature through Site layer configuration in Geocortex Essentials.
To configure the content of map tips: 1. In Manager, edit the site that you want to configure. 2. In the side panel, click Map. The Map page opens. 3. In the list of map services, click 4. Click the Edit Layer
to expand the map service you want to edit so that you can see the layers.
icon.
| 142
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
5. On the Details tab, you can configure the following: l
Feature Label: Type in the label for this feature.
l
Feature Description: Type in a short description or information about this feature.
l
Feature Long Description: Type in a long description or information about this feature.
6. If you want to include a Field Token in any of these boxes, click Edit, select the token from the Field Token list, and then click Insert. A placeholder for the token appears in the box, for example, the placeholder for the full name of the parcel owner is
. In the Viewer, the placeholder is replaced with the real information.
7. If you want to use rich text features to edit the text, click Edit. You can use the formatting bar at the top of the box to change the appearance of the text. You can also add links or click
to see the HTML code and edit it directly.
Only basic HTML functionality is available.
10.5
Configure Feature Description Hyperlinks Feature description hyperlinks and the substitution tokens they can contain are documented in the Create Dynamic Information in the User Interface section of the Geocortex Essentials Administrator Guide. Specifically:
10.6
10.6.1
l
Overview of Related Features and Tools: Refer to the Hyperlink Features and Tools sub section.
l
Feature Description Hyperlinks: Refer to the Viewer Commands in Hyperlinks sub section.
l
Substitution Tokens for Fields: Refer to the Field Tokens sub section.
l
Substitution Tokens for Complex Objects: Refer to the Object Tokens sub section.
Layer Themes About Layer Themes A layer theme is a defined set of layers with a particular theme. Layer themes makes it possible for a user to swap the entire layer list for a completely different set of layers or swap to the same set of layers but with completely different visibility settings. You can create many layer themes and make it possible to quickly flip between layer sets that are grouped for different purposes. In the application interface of the Geocortex Viewer for Silverlight, layer themes are referred to as map themes. For example, there could be one layer theme for commonly-used tasks, followed by several specialized layer themes. Each specialized theme would be configured to meet the particular needs of a specific group such as engineers or environmental users. In this way, layer themes make it possible to streamline and specialize the selection of layers and visibility settings and improve both the efficiency and speed of operation.
143 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.6.1 About Layer Themes
Swapping quickly between different layer themes in a Viewer
Layer Theme Usage Scenarios The following are some scenarios for configuring and using layer themes: l
Configure several layer themes to display only those layers necessary for a specific task, analysis, or business need. Each layer theme then displays only those layers needed for that particular task. Distracting layers are eliminated. This enables users to quickly flip between the layers when performing a particular task.
l
Group frequently-used layers into the default theme. Group all the other layer themes by specialized functions in order of priority or work flow. The reduction in the number of layers in the default theme provides performance benefits.
l
Configure a Viewer with many layer themes, all of which have the same layer set, but each with different visibility settings, or bulk layers, selected. In this case, toggling between themes would change the visibility settings of multiple layers simultaneously.
l
Create a light-weight viewer application with no information panel i.e., the map layer completely removed. The objective being to simplify the Viewer for users not familiar with GIS layer concepts. Instead of the layer list, configure a set of layer themes in place of the layer list for users to change the context of the map.
Layer Theme Interactions in the Viewer Layer themes interact in the Viewer in the following ways: l
Once you add the first layer theme to a Site, the Site will consist of the new theme and an automaticallygenerated theme containing all the layers in the Site - the All Layers theme. The All Layers theme cannot be removed, but it can be given a different display name or hidden.
l
When a layer theme is configured, it is also possible to set whether or not a particular layer or sub-layer is in the theme or removed from the theme. You can also configure if the theme is visible or not. If a layer is not in a theme, none of its data is available. If a layer is set to visible, it will be active and display when the layer theme
| 144
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
is selected. If a layer is not configured to be visible, its data is still part of the layer theme and can be selected and displayed in the Layer List for that Layer Theme. The data of non-visible layers is also available for reports and data sources. l
When the application opens, the All Layers theme is displayed by default and the user can then select from a list of other configured layer themes. However, it is possible to configure a different layer theme to be the theme used at start-up.
l
When the layer theme changes, the list of map services and layers change to those defined by the new layer theme. However, the current extent, selections, markup, user-added layers, selections, search history, and active tools, do not change. If certain layers in the new layer theme are not active, then selections or search results for those layers are not active either.
l
When you include a sub-layer in a particular layer theme, you must also include the parent layer.
l
A layer may belong to multiple layer themes.
l
When you exclude a service from a theme, you also exclude all of the service's constituent layers.
l
If you do not want some layers to show in the Layer List, you can remove them from the map configuration, or set the IncludeInLayerList property to false for those layers. This will affect all layer themes.
l
When you include a cached map service, you must include all of the service's constituent layers. If you don't want certain layers to show in the layer list, you can set the IncludeInLayerList property to false for those layers.
l
A layer theme may consist of all types of services and layers, e.g. ArcGIS dynamic map services, tiled services, WMS, GeoRSS, feature layers, etc.
l
A single base map can be included in multiple layer themes. A single layer theme may include more than one base map, in which case the user can toggle between them.
l
When a layer theme is configured, the theme is automatically displayed in the drop-down list of available themes. You can configure theBase Map Control module to display only base maps. If you have both layer themes and the base map control module configured, both will be displayed.
Configurations for the base map control as seen in the Viewer l
When you save a project file with a particular theme selected, that theme is saved as part of the project. When you open the saved project, that particular theme is displayed.
l
When you launch the Viewer, it is possible to launch with a particular layer theme applied. This is done by adding the layerTheme parameter to the Viewer Url. The Url parameter uses the theme ID or the Display name of the layer theme that you have configured in Geocortex Essentials. In the example below, 2 is the ID of the layer theme. Alternatively, you could use the display name of the theme in its place.
http://myserver/Geocortex/SilverlightViewer/Viewer.html?Viewer=MyViewer&LayerTheme=2 See also... URL Parameters on page 29
145 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.6.2 Add a Layer Theme
Add a Layer Theme on page 146 Configure Layer Themes on page 147 Base Map Control Module on page 70 Layer List Module on page 91
10.6.2
Add a Layer Theme You add a layer theme in Geocortex Essentials as part of a Site. The process of adding a theme involves selecting which layers to include or exclude from the theme. If a layer is excluded from a theme, the layer is not available for reports, identify tools, search, or map tips. You can also set the visibility of a layer or map service; a layer can be set to be either visible or hidden when the map opens. If a layer is hidden but included in the theme, the layer can still be selected to display in the Map Layers list and its data is also available for reports, identify tools, search, or map tips.
To add a layer theme to a site: 1. Launch Geocortex Essentials Manager and log in. 2. Click the Edit Site button for the site you want to add a layer theme to. 3. In the Site List, select Layer Themes.
4. Click Add/Edit.
5. In the Add/Edit Layer Themes dialog, click Add New Layer Theme. A new layer appears at the bottom of the list.
6. Type in a name for the new layer theme.
| 146
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
This name appears in the theme drop-down lists in the Viewer . As the drop-down lists are narrow, it is recommended that the layer theme name be relatively short. You can change the name of the default All Layers theme. If you want to use the All Layers theme as the Start Up theme, it must be selected here.
7. If you want the new layer theme to be the theme that appears when this site starts up, then click the Startup Theme radio button beside the new theme. 8. Click Ok. The Layer Themes list displays all the themes for this particular site. 9. Do one of the following:
l
To include all the layers in the layer theme and map services, click
.
l
To exclude all the layers from this layer theme and map services, click
l
To include or exclude a single layer or map service from the layer theme, click the arrow beside it to toggle
.
between the included and excluded states. Excluding the layer removes it from the theme completely and it is no longer visible on the map or layer list. Information from the layer is also removed from Reports. l
To set a layer to be visible in the map when the layer theme is selected, select the checkbox the layer name.
l
To prevent the layer from being shown when the layer theme is selected, clear the checkbox the layer name. This does not remove the layer from the theme.
in front of
in front of
10. Click the Layer List Preview to see the changes you have made to the layer list and to see how it will look in the Viewer. 11. Click Apply Changes, and then click Save Site.
10.6.3
Configure Layer Themes The configuration of Layer Themes is done largely in Geocortex Essentials REST Manager when you add or edit a layer theme. In addition, there are two areas in the Viewer. Defaults.xml file that contain settings for layer themes; the module and module: l
Base Map Control Module: Sets the Map Themes control and the Base Maps control to be visible or hidden in the drop-down list on the right side of the map.
l
Layer List Module: Sets the display of layer themes information to be visible or hidden in the drop-down list in
147 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.7 Add Third-Party Maps
the Map Layers area. The parameters for setting this control are in the LayerList module in the Viewer.Defaults.xml file.
Please see Base Map Control Module on page 70 and the Layer List Module on page 91 for details of the parameters and how to configure them.
See also... Add a Layer Theme on page 146 Base Map Control Module on page 70 Layer List Module on page 91
10.7
10.7.1
Add Third-Party Maps Add Existing Web Maps The Geocortex Viewer for Silverlight can integrate with the following existing third-party maps: l
Bing Maps, including birds-eye view.
l
Google Maps, including street view.
l
Pictometry, including measurable oblique images.
The following buttons on the Map & Data Sources ribbon of Toolbar launch the third-party maps:
Parameters l
DisplayName: The name of the third-party map that appears below the button.
l
Command: The command to open the third-party map. In most cases, this should be the “OpenWebPage” command.
l
CommandParameters: The command parameter that runs when the button is clicked. The URL to the thirdparty map to open. This can be an absolute or relative URL.
l
ImageUri: The Uri to the image used for the button.
l
Tooltip: The text that shows when you hover over the button on the toolbar.
| 148
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Example Configuration The following code snippet is a within the module in the Viewer.Defaults.xml file:
10.7.2
About the Pictometry Extension Support for Pictometry® Online (POL) was added to the Geocortex Viewer for Silverlight in version 1.5. The Viewer for Silverlight for Geocortex Essentials makes it possible to see the current map as a measurable image. Pictometry View also makes it possible to locate, search, display, and extract these aerial images. Because the images are measurable, it is possible to establish the height, area, distance, elevation, and bearing of a feature in an image. The Geocortex Viewer for Silverlight is integrated with the Pictometry Extension. This means the center point of the map can be synchronized with the center of the Pictometry image.
Viewer for Silverlight synchronized with the Geocortex Viewer
149 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.7.3 Viewer/Pictometry Integration
10.7.3
Viewer/Pictometry Integration To integrate Pictometry® Online into the Geocortex Viewer for Silverlight, you need to do the following: l
Edit the Map module in the Viewer.Default.xml file to add a Pictometry context menu item.
l
Add a button to the Maps & Data Sources tab of the Toolbar so that you can open the Viewer for Silverlight from the toolbar. This can be done in the XML or Geocortex Essentials. Unzip the Pictometry files to a virtual directory in the same domain as the Viewer application, preferably to the
l
WMI folder. Follow the detailed steps in Connect to Pictometry on page 154.
l
10.7.3.1
Add a Context Menu In order to start the Viewer for Silverlight from the context (right-click) menu, you need to configure the Map module in the Viewer.Defaults.xml file. The following configuration is added as a new item in the map module:
-
Parameters l
Text: The text that displays on the context menu.
l
Command: The command to open the context menu.
l
CommandParameter: The URL to the Pictometry service.
Full Example 10.7.3.2
Add a Toolbar Icon To make it possible to open the Viewer for Silverlight from the toolbar, you need to add an icon to the External Mapping section of the Maps & Data Sources tab of the toolbar. You can do this in two ways: l
Adding an Xml fragment to the Configuration section of the Toolbar module in the Viewer.Default.xml.
l
Configuring a new icon in Geocortex Essentials.
Configure the Viewer.Default.xml Add the following Xml fragment to the Configuration section of the Toolbar module:
Parameters l
DisplayName: The label of the button on the toolbar.
l
Command: The command to open the Viewer for Silverlight.
l
CommandParameter: The URL to the Pictometry service.
l
ImageUri: The path to the image used in the toolbar.
151 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.7.3 Viewer/Pictometry Integration
Full Example The following code shows you where to insert the code within the Toolbar module:
...
Configure a Toolbar Icon in Essentials To add a Pictometry icon to the toolbar in Essentials: 1. In Geocortex Essentials edit your site. 2. In the Site menu, click Viewers. 3. Click the Edit icon
of the Viewer you want to change.
4. In the Viewer menu, click Toolbar. 5. If the Configured Toolbar box is not active, click Copy Defaults. 6. In Configured Toolbar Tree, scroll down to Maps & Data Sources.
| 152
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
7. In the 3rd Party Web Maps section, click the Add Toolbar icon
.
8. Configure the button by doing the following: l
Name: Type in Pictometry to identify this toolbar item.
l
Display Name: Type in Pictometry ® , which is the text to be displayed below the icon.
l
Image URI: Type in the path to the image you want to use for the icon, or click Browse to navigate to the image and load it into the site.
l
Tool Tip: Type in the text to display when a cursor hovers over the icon.
l
Command: Type in OpenWebPage, which is the command to open Pictometry.
l
Command Parameter: Type or paste in the URL to the Pictometry service.
Configure a toolbar icon in the Edit Button dialog 9. Click OK. 10. Click Save Site. 10.7.3.3
Unzip Pictometry Files The Pictometry files you need for the final part of the configuration must be downloaded from the Geocortex Support Center. It is important to unzip the Pictometry Files.zip under the WMI folder of your Silverlight Viewer installation. If you unzip the files anywhere other than under the WMI folder, you must update your paths to Pictometry.html accordingly. The Pictometry files must be in the same domain as your Silverlight Viewer or Pictometry will not run.
The next steps involve setting up the connection to the Pictometry Image Repository at Pictometry® Online Services and applying any customizations you want to include. For detailed information on these steps, see Connect to Pictometry on page 154
153 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.7.4 Connect to Pictometry
10.7.4
Connect to Pictometry To connect the Pictometry Image Repository to the Geocortex Viewer for Silverlight, you set up:
10.7.4.1
l
Connection settings.
l
Customization and localization.
Connection Settings To make it possible for Geocortex Viewer for Silverlight to integrate with the Pictometry® Online Services, a user ID and signature key must be supplied via a proxy. The signature key and address of the Pictometry Online Services are set in the proxy file. The user ID is set in a JSON file.
User ID and signature key supplied via a proxy The proxy file, proxy.ashx, is contained in the Viewer for Silverlight for Geocortex Essentials {Date}.zip file. When you unzip the file, it should be under the WMI folder. The signature key that you obtain from Pictometry® must be inserted into this proxy file. You also set the address to the host server of the Pictometry ® Online repository in this file.
To insert a signature key and address into the proxy file: 1. Open the Proxy. ashx file in a text editor. 2. Locate the line of code that sets the address for the Pictometry® Image Repository:
String ImageNavigatorServer = "http://pol.pictometry.com/ImageNavigator/portal/?"; The address in the above line of code is the default address for the repository hosted by Pictometry Online®. Only change this address if you have a different hosting arrangement, in which case, enter the correct URL to the host server. 3. Locate the line of code that identifies the signature key:
String SignatureKey = "[PLEASE INSERT YOUR SIGNATURE KEY HERE]"; 4. Replace the [PLEASE INSERT YOUR SIGNATURE KEY HERE] text with the valid signature key you obtain from Pictometry®. 5. Save the file.
To add the user ID: 1. Open the Javascript folder that was extracted from the Pictometry_zip file. The default location would be the WMI\Javascript folder.
| 154
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
2. Open the pinConfig.json file in a text editor. 3. Locate the following lines in the file:
"serverProxy": "proxy.ashx", "userID": "YOUR POL USER ID" 4. Replace the YOUR POL USER ID text with the ID of the user you want to use. Your IIS must include the ".json" Mime type. The Mime type for a json file is "application/json" .
To connect to IIS 6: 1. Open Internet Information Services (IIS) Manager. 2. In the tree on the left, expand your server node and select Web Service Extensions.
Select Web Service Extensions from the tree 3. In the Web Service Extensions page, select ASP.NET v2.0.50727.
155 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.7.4 Connect to Pictometry
4. Click the Allow button. 5. Restart IIS.
10.7.4.2
Localization The pinConfig.json file, located in the WMI\Javascript folder, also includes localizable resources, for example, to localize the toolbar buttons, labels, and tooltips:
"NeighborhoodViewToolText": "Neighborhood View " , "NeighborhoodViewToolTip": "Zoom in to Neighborhood View" , In addition to the text resources, the pinConfig.json file also contains other parameters that you can use to set User preferences.
Parameters Some of the configurable parameters are: l
"autoSyncWithMap": Default setting is true . Turns automatic syncing of the Geocortex map in the Viewer and the Pictometry picture on or off.
l
"showCrosshairs": Default setting is true . Show or hide the crosshairs that indicate the center of the map and center of the Pictometry image.
l
"showStatus": Default setting is true . Show or hide the status in the status bar.
l
"measureColor": Default setting is "#000000" . Change the color of the line that is drawn on the map to measure distance, area, etc.
l
"lineThickness": Default setting is 2 . Change the thickness of the line that is drawn on the map to measure distance, area, etc.
| 156
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Parameters like server proxy and user ID are critical to the functioning of the Pictometry feature. If they are incorrectly configured, Pictometry may not work or may work with diminished functionality.
10.8
Help Framework The Geocortex Silverlight Viewer has an extensible help framework that is capable of displaying help for viewer-related topics. Help topics are identified by their content keys. Content keys are short, unique strings that identify individual help topics. It is up to the help topic handler to interpret this mapping. The viewer’s help framework is extensible such that developers are able to plug in their own handlers to handle the display of help topics. For convenience, the Geocortex Viewer for Silverlight has a built-in help topic handler called the Uri Content Handler that displays help topics using your web browser. The Help Framework makes it possible to register and invoke help content within a viewer configuration. However, the actual help content that can be registered with the framework is arbitrary – the administrator can deliver help content using a medium that best suits the users of a particular viewer. Examples of the types of help mechanisms that an administrator can use include: l
Static HTML content hosted on a web server.
l
Dynamic content authored as Silverlight controls integrated into the viewer.
l
Context-sensitive pop-up help that gives targeted instructions depending on where the user is working in the UI.
10.8.1
Help Topics/Help Manager A help topic is simply a mapping of a unique key string to a .Net object that represents the content. For example a help topic could be:
“CustomToolHelp” -> Uri(“http://uri/to/my/help/content/”) The Help Framework is built in such a way to allow the administrator to register help topics and then have the user invoke them in various ways. To programmatically register a help topic of a particular type with the system, a developer writes custom code invoking the HelpManager to: 1. Register a help topic handler for a specific type of help topic. 2. Register help topics of that type.
Example code - Register Help Topic Types: … HelpManager.RegisterHelpTopicHandler(HandleMyHelpTopic); … public void HandleMyHelpTopic(MyHelpTopicClass topic) { … } The above code instructs the HelpManager how to handle help topics of a specific type. There are two types of help topic handlers that are pre-registered with HelpManager :
157 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.8.2 Invoking Help
l
Uri: Help topics of type Uri can be registered with HelpManager . When a Uri help topic is invoked, it opens in a pop-up window.
l
PreparedCommandWrapper : A help topic handler that allows arbitrary viewer commands to be invoked for specific help topics. A detailed description of how it works is discussed below.
Once the help topic handlers are registered with HelpManager , we then need to register the help topics themselves. A help topic is simply a unique string key mapped to an object with a type that the HelpManager knows how to handle.
Example Code - Register a Help Topic HelpManager.RegisterHelpTopic("MyCustomTopic", new Uri("http://uri/to/my/help/conten t")); In this example, a Uri topic type has been registered with HelpManager using a specific Uri that will be invoked when the “MyCustomTopic” key is requested.
10.8.2
Invoking Help Help is programmatically invoked using the following command:
HelpCommands.ShowHelpTopic.Execute(“MyCustomTopic”); The help framework then uses the HelpManager to invoke the appropriate handler for that help topic. All help topics are invoked the same way, regardless of their help topic type. This provides a consistent mechanism to invoke help from buttons, tools, workflow, JavaScript, and any other place that a named command can be used.
10.8.3
Context-Sensitive Help The help framework also provides a way to associate areas of the user interface, specifically Views, with help topic keys via configuration. A new attribute on a View, called AssociatedHelpTopicKey makes this possible.
Any View configured in a viewer, will have this mapping registered with HelpManager. You can also do this programmatically:
HelpManager.RegisterHelpTopicLookup(myControl, "MyCustomTopic"); where myControl is any user interface component that derives from DependencyObject . The ability to create an abstract mapping of user interface components to help topic keys makes it possible for users to access context-sensitive help topics by different types of user actions. Two specific ways are discussed below.
10.8.4
Help Module A new module has been introduced called Help that leverages the underlying help framework. In addition to handling the ShowHelpTopic command described above, it also provides two other mechanisms for invoking help: l
Launching context sensitive help using the F1 key. When the user presses the F1 key, the most appropriate user interface control that has a help topic key registered with it is invoked.
| 158
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
l
Launching context sensitive help by clicking on the user interface on a user interface element of interest. When the 'What's This?' tool button is clicked, the mouse cursor changes and the user can click anywhere on the user interface. This invokes the help topic which is most appropriate for where the user clicked.
The Help module provides configuration that allows help topics to be registered through XML. Inside the Help module configuration, there is a Topics element that supports two types of XML elements: 10.8.4.1
UriTopic HTML help topics are initialized using settings in the HelpModule’s configuration settings. Developers are welcome to add their own help topics and all that is required is that they add their help topic to the list of help topics found under the help module’s Topics element as shown below.
--> {Insert__Help-Topics}
159 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.8.5 HTML Help System
10.8.4.2
RunCommandTopic RunCommandTopic maps a help topic key to a named command with an optional parameter value if required. This provides a generic mechanism to run custom functionality mapped to a help topic.
10.8.5
HTML Help System In addition to the help framework described above, the Geocortex Viewer for Silverlight also comes with an HTMLbased help system focused on the basics of using the Viewer as well as an introduction to some simple web mapping and GIS concepts. Note that the help content is static and may not be as relevant to a highly customized Viewer. The help content can be found in the Help folder at the root of the Viewer.
10.9
Include Geocoding Services in Global Search You can configure the Viewer's Global Search to query and return search results from a Geocoding Service in addition to Map Services. The Geocortex Viewer for Silverlight's Global Search supports the following Geocoding Services: l
ArcGIS Geocoder
l
Bing Geocoder
You can configure one of these services as a geocoding service endpoint by editing the configuration of the Geocoding Module on page 77. To configure the endpoint, edit the following two elements in the Geocoding module: 1. Set the IncludeInGlobalSearch attribute of the GeocodingEndpoint element to True .
... 2. Configure a globalSearchKey
parameter for the GeocodingEndpoint .
When you add this parameter, it is added with the text of any Global Search query to the Geocoding Service's query parameter. The value of the globalSearchKey parameter depends on the ServiceType of the
GeocodingEndpoint . In the extract below, the globalSearchKey parameter has a value of addressLine , which corresponds to a Bing Geocoder service parameter.
...
| 160
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
...
10.10
Edit Attributes on the Map From version 1.6 of the Geocortex Viewer for Silverlight it is possible to configure Map Tips and the Results List so that you can edit feature attribute information directly in the pop ups on the map. The ability to edit attributes is controlled by a parameter in the Viewer.Defaults.xml file:
The parameter must also be present in the and modules in the Viewer.Defaults.xml file. When this attribute is set to true , you can double-click a field and edit the Feature Details information on the Attribute tab in Map Tips.
Edit feature information directly in the Map Tip on the Attributes tab To edit feature details in the Results List, you must change to Table View and double-click inside the field you want to edit. To be editable, attributes must be in the Output Fields of the Feature Layer and must not be read-only.
161 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.11 Export Georeference Data
Edit feature information directly in the Results List in Table View
10.11
Export Georeference Data From Geocortex Viewer for Silverlight version 1.9, you can include or exclude the option to export georeference data with an exported map image. When georeference information is included in an export, the georeference data is added to a zip file that contains: l
The map image in the image format selected by the user.
l
The map projection in .PRJ format at the current extent and with any added markup.
l
The world file in .PGW format. The Include Georeference Data option requires Geocortex Essentials 3.12
The unzipped files can then be imported to other GIS applications like ArcMap, and the georeference data used to position the map image correctly. If the feature is enabled, the Include Georeference Data option is present in the Export a Map Image dialog. If the option is disabled in Geocortex Essentials, then the Include Georeference Data option is not visible on the dialog. The option is included by default.
The Include Georeference Data option shown in the dialog
| 162
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
To disable the Georeference Data option: 1. Edit the site whose viewer you want to change. 2. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose information you want to change. 3. Click the Edit button The Viewer Info page opens. 4. In the side panel, click Tool Behavior, and scroll to the bottom of the page. 5. Deselect the Allow Including Georeference Data checkbox.
6. Click Apply Changes, and then Save Site.
10.12
Advanced Editing Extension
10.12.1 About
the Advanced Editing Extension
The Advanced Editing Extension for Geocortex Essentials adds additional capabilities to the basic editing tools that ship with the Geocortex Viewer for Silverlight. The extension adds the ability to: l
Copy a feature from another layer to the edit layer.
l
Snap precisely to a line by using the Edge Snapping option.
l
Snap to a vertex or an edge (line) on any layer in any map service. Basic editing only allows snapping to feature and graphic layers.
l
Replace a straight light to a complex path using the Align to Edge tool.
The Advanced Editing Extension is a full extension. For more information about what this means, see Full Geocortex Extension. The table below lists the details of which editing functions are added when you have the extension, and which functions come with Essentials-out-of-the-box. Feature
Available With Advanced Editing Extension License
Add features to a map.
Add features using feature templates.
Edit attributes and feature geometry.
163 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
Available in Essentials Out-ofthe-box
10.12.2 Deploy the Advanced Editing Extension
Feature
Available With Advanced Editing Extension License
Available in Essentials Out-ofthe-box
Use freehand editing.
Cut, Reshape, Union, and Delete features. Copy features from other layers.
Align edges along a complex path.
Use the Edge Snapping tool to snap precisely to edges from dynamic services, WMS layers, tiled layers etc. Snap precisely to vertices and edges on any type of layer.
10.12.2 Deploy 10.12.2.1
the Advanced Editing Extension
Manual Deployment The Advanced Editing Extension exists inside a library file named Geocortex.EssentialsSilverlightViewer.AdvancedEditing.xap. To enable advanced editing without using Geocortex Essentials, it is necessary to add a reference to the library, and configure the Advanced Editing module. The Geocortex Viewer for Silverlight includes a sample viewer configuration named AdvancedEditing that shows the xml configuration necessary to enable the Advanced Editing Extension. It is much easier to deploy the Advanced Editing Extension automatically using Manager.
10.12.2.2
Automatic Deployment Geocortex Essentials can automatically enable advanced editing. You can enable the extension in a viewer that does not have basic editing already enabled as well as in a viewer that already has basic editing.
10.12.2.2.1
Enable Advanced Editing in a Viewer without an Editing Tab If the viewer does not have an editing tab, you should create a tab and a group to hold the editing tools. The advanced editing tools are already grouped in a region under Tasks in the Toolbar page called the EditToolsRegion, which you can add to the new toolbar tab.
To add a new Editing tab to the toolbar: 1. In Geocortex Essentials, edit the site that contains the viewer in which you want to deploy editing. 2. Click Viewers in the side panel. 3. Click Edit
beside the Viewer.
4. Click Toolbar in the side panel. 5. Click Copy Defaults to add all the default tools to the viewer. 6. In the Configured Toolbar section, click Add Tab.
| 164
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
7. In the Display Name box, type in the name you want to give the toolbar tab, for example, Editing, and then click OK.
8. Position the new tab in relation to the current Configured Toolbar tabs. If you want it to appear at the end of the toolbar, drag it to the bottom.
9. Click Apply Changes.
To create a new group for the editing tools: 1. Beside the new tab, click Add Group
.
2. In the Display Name box, type a name for the group, for example, Editing. 3. Click Apply Changes.
To add the Edit Tools Region to the new toolbar tab: 1. In the Available Tools section, scroll down to the Tasks section. 2. Drag the EditToolsRegion into the position below the new group.
165 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.12.2 Deploy the Advanced Editing Extension
3. Click Apply Changes. The Enable Advanced Editing prompt dialog opens. The prompt explains that you can use basic editing without paying for the licensed advanced editing tools.
4. Select the Enable Advanced Editing checkbox, and then click OK. 10.12.2.2.2
Enable Advanced Editing in a Viewer with Basic Editing If the viewer already has an Editing toolbar, but you wish to add the advanced editing tools, you can also enable the extension automatically.
To add advanced editing to an existing toolbar: 1. In Geocortex Essentials, edit the site that contains the viewer you want to edit. 2. Click Viewers in the side panel. 3. Click Edit
beside the Viewer.
4. Click Tool Behaviour in the side panel.
| 166
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
5. In the Editing section, select Enable Advanced Editing Module. 6. Click Apply Changes and then Save Site.
10.12.3 Configure
Layers for Editing
There are layer settings that you can configure in Geocortex Essentials Manager to facilitate editing. These settings are applied to each layer in the map separately. The editing settings are on the Details page of each Layer and include: l
Features can be Copied to Edit Layer: When selected, features from this layer can be copied to the edit layer you are working on.
l
Allow Snapping: When selected, this layer appears in the Layers for Snapping list so that it can be downloaded to the client and its graphics used to snap to.
l
10.12.3.1
Snapping Enabled: When selected, this layer will be enabled for snapping by default.
Configure a Layer for Copying In order for a layer to appear in the Layers for Copying list so that its features can be copied to the edit layer, you need to configure them in Geocortex Essentials Manager.
To enable a Layer for Copying: 1. In Geocortex Essentials, edit the site. 2. Click Map in the side panel. 3. Expand the map service to list the layers. 4. Click Edit
beside the layer you want to enable for copying.
5. On the Details tab, scroll to the Editing section at the bottom of the page. 6. Select Features be Copied to Edit Layer.
167 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.12.3 Configure Layers for Editing
7. Click Apply Changes, and then Save Site. 10.12.3.2
Configure a Layer for Snapping Before a layer can appear in the Layers for Snapping list and its features snapped to using the snapping tool, you need to configure them in Geocortex Essentials Manager.
To enable a Layer for Snapping: 1. In Geocortex Essentials, edit the site. 2. Click Map in the side panel. 3. Expand the map service to list the layers. 4. Click Edit
beside the layer you want to enable for snapping.
5. On the Details tab, scroll to the Editing section at the bottom of the page. 6. Do one of the following: l
If you want the layer to appear in the Layers for Snapping drop-down list, select Allow Snapping.
l
If you want the layer to appear selected in the list by default, select Snapping Enabled.
| 168
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
7. Click Apply Changes, and then Save Site.
10.12.4 Disable
Advanced Editing
If you have enabled advanced editing, but want to use only the basic editing features on a particular viewer, you can disable the advanced editing features. You can also disable the editing tools but enable only the snapping tools. You can also remove all the advanced editing tools and the Editing tab completely.
To disable advanced editing without removing the Editing tab: 1. In Geocortex Essentials, edit the site that contains the viewer you want to edit. 2. Click Viewers in the side panel. 3. Click Edit
beside the Viewer.
4. Click Tool Behaviour in the side panel. 5. Uncheck Enable Advanced Editing Module. 6. Click Apply Changes, and then Save Site.
To provide the snapping option without Advanced Editing: 1. In Geocortex Essentials, edit the site that contains the viewer you want to edit. 2. Click Viewers in the side panel. 3. Click Edit
beside the Viewer.
4. Click Toolbar in the side panel. 5. Drag the EditToolsRegion into another tab of the toolbar, for example, under the MarkupSnappingRegion. The Snapping tools will then be available beside the Markup tools on the toolbar.
6. If you are prompted to Enable the Advanced Editing Extension, select the checkbox. and then click OK. 7. Click Save Site.
169 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
10.13 Manage Service Outages
To remove all the editing features from a viewer: 1. In Geocortex Essentials, edit the site that contains the viewer you want to edit. 2. Click Viewers in the side panel. 3. Click Edit
beside the Viewer.
4. Click Toolbar in the side panel. 5. In the Configured Toolbar section, click Remove
beside the EditToolsRegion section.
6. Click Apply Changes, and then Save Site.
10.13
Manage Service Outages When a user launches a Silverlight Viewer, the Viewer connects to the services configured in the site as part of its initialization process. You can configure how the viewer behaves if a service is down when the viewer is launched. Each service you add to a site has a Failure Action setting, so you can configure different behaviors for different services. The Viewer behavior you configure is a measure of how important the service is to a user session. For services that are essential, you can prevent the user session from proceeding. For less important services, you can let the user session proceed even though the service is down, optionally with a warning. The Failure Action setting has three possible values: l
Ignore: The viewer does not warn the user that the service is not available. The user can use the site (the service will not work).
l
Warn: The viewer displays a warning to the user that says the service is not available. The user can close the warning and use the site (the service will not work). This is the default value.
l
Error: The viewer displays a warning to the user that says the service is not available. The user cannot close the warning, and cannot use the site. The Failure Action setting only affects new user sessions—it does not affect user sessions that are already in progress when a service goes down.
To configure the Viewer behavior when services are unavailable: The default behavior is to warn the user, and then allow the user to proceed with using the application (Failure Action is set to Warn). 1. Launch Manager and edit the site. The Site Info page opens. 2. In the sidebar, click Map. The Map page opens. 3. Edit a service by clicking its Edit Map Service icon The map service's settings open.
.
4. On the Details tab, select Ignore, Warn, or Error from the Failure Action drop-down list. 5. Click Apply Details.
| 170
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
6. Repeat steps 2 - 5 for each service whose Failure Action setting you want to configure. 7. Save the site.
11
11.1
Configure ArcGIS Server Features Attachments Attachments are files that are related to particular features. The Geocortex Viewer for Silverlight supports the download and batch export of file attachments for a feature from the Feature Details Dialog and from Map Tips. It is possible to configure the content of map tips to include the number of attachments to the feature in the Feature Label, Feature Description, or Feature Long Description using the {AttachmentCount} placeholder token. A count of files attached to a feature also appears in the Table View of the Results List. For more information see Configure Map Tips in the Geocortex Essentials Administrator Guide.
Attachments shown in the Results List and Feature Details dialog The Results List displays each parcel feature with an attachment count included as part of the Layer's configured Feature Description. The Feature Details dialog includes an Attachments tab, and a table of metadata for each attachment that includes a hyperlink to the attached file content itself. If the user clicks the Export Feature Attachments link, a ZIP file containing all attachments can be downloaded. Zipped files that are greater than 4 GB may not extract correctly.
When the Layer is configured for attachments, the Table View of the Results List also includes a count of available attachments.
171 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
11.2 Coded Value Domains
Attachments shown in Table View As of ArcGIS Desktop 10, attachments can be added to a feature by first enabling attachments on the layer and then adding the desired files as attachments to a selected feature. For more information about configuring attachments, see ArcGIS Desktop 10: Enabling Attachments. See also... Map Tips Module on page 97 Customize the Feature Details Dialog on page 192
11.2
Coded Value Domains Taken from the ArcGIS Desktop 10 Help Library: "Attribute domains are rules that describe the legal values of a field type, providing a method for enforcing data integrity. Attribute domains are used to constrain the values allowed in any particular attribute for a table or feature class. If the features in a feature class or nonspatial objects in a table have been grouped into subtypes, different attribute domains can be assigned to each of the subtypes." Attribute domains fall into two categories: 1. Range Domains 2. Coded Value Domains A feature attribute with an associated Coded Value Domain will contain a simple code value that is mapped through the coded value domain definition to a more user-friendly description string. The Geocortex Viewer for Silverlight supports rendering of feature attribute values as mapped coded domain description strings in such locations as the Map Tips and Feature Details dialogs. Currently, Geocortex Workflow and Geocortex Reporting do not support this Coded Value Domain description string substitution; only the Coded Value Domain attribute's code value will be available when executing a Workflow, or running a Report.
11.3
Subtypes Taken from the ArcGIS Desktop 10 Help Library:
"Subtypes are a subset of features in a feature class, or objects in a table, that share the same attributes." The Geocortex Viewer for Silverlight supports rendering of subtype feature attribute values in such locations as the Map Tips and Feature Details dialogs.
| 172
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
12
12.1
Configure Workflow Configure Workflow The Workflow page in Manager allows you to configure the viewer's startup workflow and workflow containers. In order for a viewer to run a workflow, the workflow must be added to the site that the viewer belongs to.
See Add or Import a Workflow in the Essentials Administrator and Developer Guide for instructions. For information on workflow containers, refer to the "Configure Workflow" section of the Geocortex Viewer for Silverlight Administrator and Developer Guide.
To open a viewer Workflow page in Manager: 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer whose workflows you want to change. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Workflow. The Workflow page opens.
To modify the default configuration: 1. Click Copy Defaults. The workflow settings become available for editing. 2. Modify the settings as desired. Follow the instructions to add, edit, and remove a startup workflow and workflow containers.
To revert to the default configuration: Reverting to the default configuration permanently deletes your custom workflow configuration.
1. Click the Revert to Default button. You are prompted to confirm. 2. Click OK.
173 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
12.1 Configure Workflow
To remove the ability for users to run workflows: If you do not want the viewer to allow users to run workflows, you can remove the module. 1. Click the Remove Workflow button. You are prompted to confirm. 2. Click OK. The Workflow module is disabled on the All Modules page.
To re-enable workflow: 1. Click the Enable Workflows button. A copy of the default configuration becomes available for editing. 2. Customize the copy of the default configuration, or click Revert to Default to go back to the default configuration.
Startup Workflow The startup workflow runs automatically when the user launches the viewer.
To add a startup workflow: 1. In the Workflow ID box, select the workflow that you want to run when the viewer is launched.
Containers To add a workflow container: 1. Click Add Workflow Container. The Add Workflow Container dialog box opens. 2. Name: A name for the container. The name is not visible in the viewer. 3. Title: The title to appear in the title bar of the region where the workflow displays. If you do not specify a title, the default title, "Workflow", is used. 4. Region Name: The region in the viewer where the workflow displays. The most common regions for workflows are: l
DataRegion: Opens the workflow in the data frame (information pane) at the side of the viewer.
l
ModalWindowRegion: Opens the workflow opens in a modal dialog.
For information on additional regions, refer to the Geocortex Viewer for Silverlight Administrator and Developer Guide. 5. Icon URI: (Optional) The URI to the icon that enables the user to return to the workflow if it is interrupted by another activity. The icon displays at the bottom of the frame where the workflow is displayed.
| 174
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
6. Click OK. The container is added to the list.
To edit a workflow container: next to the container you want to modify. 1. In the list of containers, click the Edit icon The Edit Workflow Container dialog box opens. 2. Edit the container settings. 3. Click OK.
To remove a workflow container: 1. In the list of containers, click the Remove icon You are prompted to confirm.
beside the container you want to remove.
2. Click OK. The container is removed from the list.
To save your changes: 1. Click Apply Changes. 2. Click Save Site.
12.2
Workflow Container Configuration A workflow container is a visual element that allows you to specify where and how to display a workflow in the Viewer. You can use a workflow container to display workflows in a separate pop-up dialog or in the frame on the left side of the user interface. You can show or hide a workflow container either through the ConfigureWorkflowActivity or by using the ShowWorkflowContainer or HideWorkflowContainer commands. Workflow containers persist between activities. This means that you can use a container to show users the transitions between activities or to display feedback messages during a workflow's execution to indicate that an activity is running and to ask them to wait.
12.2.1
Set up The simplest setup for a workflow container is to reference the workflow container from certain activities, so that the content of the activity displays inside the workflow container. The workflow activities that currently support containers include: l
DisplayForm
l
DisplayHyperlink
l
DisplayCaptureGeometry
When you use a workflow container to display the content of an activity, you get natural transitions between activities, which are more suitable for displaying workflows that have a wizard-like functionality.
175 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
12.2.2 Examples of Workflow Containers
In the Workflow Designer, the property that you use to reference a workflow container is Workflow Container Name. If you wish to use the same container for all activities in your workflow, we recommend that you store the container name in a variable rather than hard coding each activity to the same container name.
The DisplayForm activity also supports a Region Name property, which has similar but less functionality than workflow containers. It is therefore better to use the Workflow Container Name property rather than Region Name where possible. In addition, a workflow container can be re-configured or modified by using and changing the properties of a specific activity - the ConfigureWorkflowContainer activity. The properties of the ConfigureWorkflowContainer allow you to configure the title, a message, a busy indicator, as well as the visibility of the container during the execution of a workflow. You can change the properties of the workflow container at any point, even while the workflow is running. To do so, you set up the ConfigureWorkflowContainer properties so that they change during the execution of the workflow. For example, you can reset the message of a single ConfigureWorkflowContainer activity so that it displays a series of different messages as the workflow executes. Any properties that are not set will be ignored.
12.2.2
Examples of Workflow Containers You can use a workflow container with a DisplayForm activity, to ensure that the workflow does not disappear from the interface between activities but displays a spinner to indicate that something is happening. Workflow containers will gray out or disable their content between activities to indicate to the user that they should wait. If the workflow container is displayed in the DataRegion , then a spinner also displays between activities. You can use a container to show a Loading... (or any other) message at the beginning of a workflow to give users feedback before the first activity displays. You could then change the message in the middle of the workflow to ask the user to wait while significant data processing completes, for example during geoprocessing. The message can also be updated periodically within an intensive data processing routine, to display status updates on a single long process.
Parameters The following Workflow Container parameters can be configured in the Viewer.xml file of a Geocortex Viewer for Silverlight: l
Name: The name of your workflow container.
l
DefaultTitle="Workflow " DefaultRegion="DataRegion " DefaultIconUri="/Resources/Images/Form.png ": Default parameters used to construct a new workflow container when a reference cannot be found with a specified name.
l
Title: The title of the container as it appears in the title bar of the region where the workflow displays. In the Geocortex Viewer for Silverlight the two most common regions are DataRegion and ModalWindowRegion .
l
RegionName: Defines where on the Viewer interface the workflow will display. l
If DataRegion , the workflow opens in the frame to the left.
l
If ModalWindowRegion , the workflow opens in a modal dialog.
| 176
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
l
IconUri: (Optional) The Uri to the icon that will display in the tab area at the bottom of the frame so that you can return to this workflow if several are stacked one above the other. For example,
/Resources/Images/Form.png .
Example Configuration
13
13.1
13.1.1
Advanced Configuration Configure XML Elements XML Root Element Every Viewer configuration XML file begins and ends with the element. The element is the highest element and contains all other Viewer configuration.
Element Attributes Attribute name
Description
Values
Required
InheritFromDefault
Indicates whether the
No
Viewer should inherit
true = inherits values false = no inherited
values from
values
Viewer.Defaults.xml.
Version
Is the version number of
1.9
the configuration schema.
177 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
No
13.1.2
Attribute name
Description
Values
Required
The Viewer uses this number to determine how to load the configuration file.
13.1.2
is a child element of and can occur only once. Globals are used to perform string substitutions within the XML file before it is actually processed. Each global has a unique string identifier as well as an associated string value that is used for substitution. For example, Viewer.Defaults.xml defines a Global called
{DataFramePosition} that looks like this: Then, anywhere else within the XML document, the string token {DataFramePosition} can be used to substitute whatever the specified value is, in this case "Left". This is a convenient way to configure a single value that can be used in multiple places within the XML document. An alternative form for a Global is to specify the value as the inner XML of the element, such as this:
Left Both forms are valid, leaving it to the administrator to choose the form that works best. If you have a lot of text to substitute or text that contains special characters, multiple lines, or even XML, the second form is the one to use.
All Globals are specified as child elements of the element. does not have any attributes.
13.1.3
is a child of and can occur only once. The Modules element contains child Module elements each representing an individual Module.
13.1.3.1
Module Elements Each Module element is a child of and can occur 0, 1 or many times. Individual Module elements are unique in that they do not all have to have the same element name. Instead, the element name is actually used as the Module name. For example, the Module that controls the banner is called .
Example:
| 178
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Modules are associated with individual .Net classes and so the Viewer needs to know specific information in order to locate, download, load, and instantiate the Module. For example, the Bookmarks Module is actually hiding most of this required information. The Viewer is able to create the Bookmarks Module by inferring a lot of this information. Without the inference, the fully explicit version of the Bookmarks Module would be:
All the extra information is needed by the Viewer to load the Module, however, most of it can be specified once in a single element. The Module element name has to be the same as the Module class name, without the full namespace. If the Module class name ends in Module, then the Module suffix must be removed. For example, the full class name of the Bookmarks Module is:
GeocortLibrex.EssentialsSilverlightViewer.CoreModules.Bookmarks.BookmarksModule . The namespace is GeocortLibrex.EssentialsSilverlightViewer.CoreModules.Bookmarks. The Module name is BookmarksModule , which means that once you remove the namespace and the suffix, the element name must be . If you do not use this naming convention, the Viewer throws an exception.
Module Element Attributes Attribute Name
Description
Id
A unique string ID to identify
Values
Required See desc.
this Module. The module ID must be exactly the same as the module name or the Viewer will not load.
LibraryUri
The Uri from where the XAP can
code
No
be downloaded. The XAP contains the assembly that contains the Module. The Uri can be absolute (http://) or relative to the Client Bin folder of the Viewer.
AssemblyQualifiedTypeName See MSDN for a description of
No
AssemblyQualifiedType Name
InitializationMode
Tells the Viewer if a Module
179 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
l
WhenAvailab No
13.1.4
Attribute Name
Description
Values
le
should be downloaded and initialized immediately or only
Required
l
OnDemand
when it is first used. The default value is WhenAvailable . If you use WhenAvailable , the Module loads at startup. The ID of the Library. Use it to
LibraryId
No
infer the values of LibraryUri as well as the
AssemblyQualifiedTypeName . If you do not specify
LibraryId, LibraryUri or AssemblyQualifiedTypeName , values from the default Library are used. (See . ) The most important thing to remember is that the Viewer needs to know how to locate the specific class associated with your Module, and it needs very specific information to determine this:
13.1.4
l
The URI of the XAP.
l
The assembly in the XAP containing the Module.
l
The class name of the Module inside the assembly.
is a child element of and can occur only once. Libraries are what contain the Viewer’s Modules as well as the related binary, configuration, and other files, and all are packaged as XAP files. The
element contains individual elements and has only one attribute. Element Attribute Attribute Name
Description
Default
The string ID of the Library
Values
Required No
element that should be used as the default Library.
13.1.4.1
is a child of and can occur 0, 1, or many times. Every Module that is configured in a Viewer.xml file needs to be associated with a Library. A single Library can contain many Modules. In fact, the vast majority of Modules that the Geocortex Viewer for Silverlight ships with are contained in a single Library called Core. When the Viewer loads a Module, it needs to know which XAP file to download as well as the
AssemblyQualifiedTypeName to load. The element specifies these settings so that Module definitions can point to a specific Library instead of explicitly redefining all the same values. In the Bookmarks example, we saw how Bookmarks was specified very simply:
| 180
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Recall that if a Module does not specify the LibraryId attribute, then it assumes it should use the default library ID, which is usually Core, so the more explicit version of Bookmarks looks like this:
Element Attributes Attribute Name
Description
Values
Required
Id
A unique string ID to represent this Library
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
element. The Uri from where to download the XAP
Uri
containing the assembly. The Uri can be absolute (http://) or relative to the ClientBin folder of the Viewer.
AssemblyName
The name of the assembly in the XAP file containing the Modules.
ClassNameTemplate
A string template used to determine the class name representing the Module to load. Using the
ClassNameTemplate allows the configuration of a Module to optionally not specify the assembly qualified type name of the Module class. Because the element is using the Core LibraryId , it will infer the LibraryUri and
AssemblyQualifiedTypeName from the configure Core Library. It looks like this: The ClassNameTemplate determines the classname of a Module from only knowing the library. It does this by replacing string tokens using a few reserved tokens: l
{_Version} is the assembly version number of the main Geocortex Viewer for Silverlight assembly. If you are writing custom Modules, you probably will not use this token.
l
{_ModuleName} is the name of the Module, taken from the Module element. In the case of , the Module name is Bookmarks .
l
{_Type} is replaced with the string Module when the Viewer is trying to load a Module, and View when the Viewer is trying to load a view.
13.1.5
is a child of a Module element and can occur 0 or 1 times. It has no attributes and only contains individual elements.
181 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
13.1.6
13.1.5.1
is a child of and can occur 0, 1, or many times. A View is a UI component that the Viewer instantiates and then places into a defined Region . Element Attributes Attribute Name
Id
Description
Values
A unique string ID of this View. Only required when
Required
No
Visible is set to false . Region
The string ID of the Region into which the view should be
Yes
placed.
Type
The type name of the View to load. This should not be an
No
assembly qualified type name, but a regular type name including the namespace. If this attribute is not specified, the ClassNameTemplate of the associated Library is used.
Visible
Whether or not the View should be visible when placed
true/false
No
into the Region.
13.1.5.2
for Modules and Views This element, should not to be confused with the document root. This element is a child of either a element or of and can occur 0 or 1 times within each Module or View. Every Module and View in the Viewer can have a unique configuration based on this element. Each individual Module or View interprets the XML inside this element as it sees fit. Some Modules and Views will not have any specific configuration or a element. If you are writing your own custom Modules, then the element is how you configure the Module in the Viewer.xml file. When your custom Module is loaded and initialized, the entire
XML element is passed to your Module for processing. The same applies to custom views.
13.1.6
The element is a child of and can occur 0 or 1 times. It has no attributes and is just a container for individual elements.
13.1.6.1
The element is a child of and can occur 0, 1, or many times. It tells the Viewer that the configuration file should inherit settings from one or more external configuration files. The word external in this context means that the configuration file is external to this particular file, not external in a networking sense.
| 182
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Element Attributes Attribute name Description
Uri
The Uri specifies where the Viewer can find and
Values
Required Yes
download the external configuration file. The Uri can be absolute or relative. If you use a relative value, the location must be relative to the current configuration file.
13.2
XML File Inheritance The settings from the Viewer.Defaults.xml file are by default, automatically applied to every Viewer you create (unless you explicitly disable this setting). This includes Globals, Libraries, and Modules. The mechanism for applying default settings is called configuration inheritance. Configuration inheritance happens automatically in the case of Viewer.Defaults.xml. Configuration inheritance can be extended beyond a single default file to include other configuration files, called parent configuration files.
Syntax to include other configuration files: In this syntax, the Viewer configuration is specifying that is should inherit from a parent configuration file called Viewer.xml located one directory above the current configuration file.
Syntax for multiple-parent configurations: In this syntax, the configuration file is inheriting from three parents, ViewerA.xml one directory up, ViewerB.xml two directories up, and ViewerC.xml located at an absolute URI. When multiple parents exist, priority is given to items higher up the list. Items with a higher priority will override the configuration settings of items with lower priority. In the example in the graphic, configuration settings in ViewerA.xml will override settings from ViewerB.xml and settings from ViewerB.xml will override ViewerC.xml. Configuration inheritance is not restricted to a single level. In fact, the configuration hierarchy can be deep. The following diagram illustrates how this works.
183 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
13.3 Inheritance Operations
Inheritance Levels The diagram shows three levels of inheritance including implicit inheritance from the Viewer.Defaults.xml file. It is important to know the exact order of priority when you are dealing with inheritance. For example, ViewerB.xml is a higher priority than ViewerC.xml because it was specified first. However, because ViewerB.xml has a higher priority, the entire branch under ViewerB.xml has higher priority than all of ViewerC.xml. Viewer.Defaults.xml is always the lowest priority.
Inheritance Order How does the InheritFromDefault attribute work with multiple levels of inheritance? The rule is that the configuration file with the highest priority that explicitly sets a value for InheritFromDefault takes precedence. So if ViewerC.xml specifies InheritFromDefault="false" and ViewerB.xml specifies a value of "true", then the final value is "true" because ViewerB.xml has higher priority. See also... Inheritance Operations on page 184 Configure XML Elements on page 177 Command Reference on page 204 Event Reference on page 232
13.3
Inheritance Operations Inheritance can be applied to Globals, Libraries, and Module XML sections.
| 184
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
13.3.1
Globals Globals are uniquely identified by their element name. Global values are inherited from parent to child. If a child does not have a particular Global that a parent does, then the child inherits that Global. However, if the child has the same Global as a parent, then the child has effectively overridden the parent’s Global value and it will not inherit it. The end result of the inheritance is a collection of all the Global values specified in the inheritance tree with child Globals possibly overriding parent Globals.
13.3.2
Libraries Libraries behave in the same way as Globals. A child Library overrides a parent Library with the same ID, and the final result is a collection of all the Libraries configured in the inheritance tree. It is important to note that when a child configuration overrides a Library from a Parent, the entire element and all of the parent attributes are replaced.
13.3.3
Modules Modules have the same inheritance behavior as Libraries and Globals with one added capability. If a Viewer configuration inherits a set of Modules from its parent, but wishes to remove one or more specific Modules, there is a special attribute on the Module that can be used. For example, if ViewerB.xml specifies a Module called ScaleSlider like this:
It is easy for ViewerA.xml to remove it from its Modules with the following configuration:
Consider using Globals to overriding specific areas such as attribute values in your configuration. To see how this works, see the SiteUri Global , where the {SiteUri} token is used in Viewer.Defaults.xml, and notice how the sample Charlotte sites override the SiteUri Global to specify different sites for each Viewer configuration.
13.4
Integrate Optimizer Geocortex Optimizer collects data about and reports on GIS infrastructure. If you do not use Geocortex Optimizer, skip this page. If you are running Geocortex Optimizer and you have configured the Client API Relay collector, you must configure your viewer applications to send data to the collector so it can be written to the Optimizer database. The Silverlight Viewer sends data about: l
The users who use the viewer
l
The areas and layers users look at.
l
The tools users use
185 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
14 Custom Development
The Optimizer Integration page in Manager enables you to configure the settings required to send data to Optimizer.
How do I open the Optimizer Integration page in Manager? 1. Launch Manager. 2. Click the Edit Site button beside the site whose viewer you want to change. The Site Information page opens. 3. In the side panel, click Viewers. The Viewers page opens. beside the viewer that you want to send data to Optimizer. 4. Click the Edit button The Viewer Info page opens. 5. In the side panel, click Optimizer Integration. The Optimizer Integration page opens. The Optimizer Integration page has the following settings: l
Enabled: When this check box is selected, the viewer sends data to Optimizer. If you do not use Optimizer, clear the check box.
l
User Name: A phrase indicating that the real user name is not available because the site does not require the user to log in.
l
Data Relay URI: The URI to the Optimizer endpoint responsible for collecting data. If the endpoint is not specified, the viewer attempts to log back to the same host that the Viewer application is launched from.
When you have finished configuring Optimizer integration 1. Click Apply Changes. 2. Click Save Site.
14
14.1
14.1.1
Custom Development Key Concepts Modules The concept of a Module has been explained in the Building Blocks section under Architecture. Modules contain runtime configuration that is loaded from the Viewer.Defaults.xml file and the related Viewer.xml files. The Viewer Modules are Silverlight classes that inherit from those found in the
Geocortex.EssentialsSilverlightViewer.Infrastructure.Modularity namespace. When the Viewer starts up, the Viewer consults Viewer.Defaults.xml and Viewer.xml. All the Modules are instantiated, and each View is loaded into its associated Region.
| 186
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Module and View names follow a simple convention. The class name of a Module must end in the word Module and the class name of a View must end in the word View. For example, ToolBarModule is a valid class name for a Module but ToolBar is not. Once a Module is instantiated, the Viewer calls the Module’s Initialize method and passes it the Module's configuration. This configuration can contain anything that is represented as XML and usually differs from Module to Module.
14.1.2
Views Views are standard Silverlight User Controls often written using the Model-View-ViewModel (MVVM) design pattern. User controls are usually created using the design tools in Visual Studio or Expression Blend and anyone who has created a WPF or Silverlight application will probably be familiar with the process. Creating a user control that follows the MVVM design pattern is optional but recommended. When the Viewer starts up, Views are loaded into predefined locations of the application’s main window. These areas are called Regions. In the context of the Geocortex Viewer for Silverlight, it is best if a View implements:
Geocortex.EssentialsSilverlightViewer.Infrastructure.Configuration IConfigurableView . Once a Module is instantiated, the Viewer calls the Module’s Initialize method and passes it the Module's configuration. This configuration can contain anything that is represented as XML and usually differs from Module to Module. Similarly, Views can have their own configuration as well. If a View implements IConfigurableView , then the Viewer gives each View its configuration when the View is instantiated. It is possible to define a Module that contains more than one View, and this creates the need for Module-level and View-level configuration. Module-level configuration applies Module wide and View-level configuration applies only to a particular View.
14.1.3
Commands Modules and Views interact with one another by calling Commands and listening for Events. Commands integrate with many of the controls, including buttons, tools, and menu items. Commands can also signal to the underlying user interface when it is OK to invoke a Command. This allows user interface components to automatically enable and disable themselves based on the Command's ability to execute. Prism has its own type of Commands which are based on the ICommand interface. Instead of implementing Commands directly, the actual implementation of a Command is registered at runtime. When you call the Command, you are unaware of who is actually supplying the implementation. At first glance, this seems like a roundabout way to implement a Command but it has an important advantage; the object consuming the Command does not need a reference to the object providing the implementation. This is another way that Prism helps maintain the low level of coupling that is so desirable when building enterprise applications. The Geocortex Viewer for Silverlight publishes over 100 commands that you can use to do everything from opening the toolbar to executing a workflow. All of the Viewer’s Commands use the ICommand interface, which makes it easy to consume within a Silverlight application.
14.1.3.1
Named Commands All of the Commands are also Named Commands, which means that they integrate easily with the Viewer’s Toolbar and I Want To menu. Below is an example of the IWantToMenu Module configuration in the Viewer.Defaults.xml file:
14.1.3 Commands
When you click the menu item above, it executes the named command ZoomToInitialExtent . Named Commands are just like Commands, but they are consumable from various Viewer components including the
IWantToMenu Module and the Toolbar Module. Named Commands are Commands that implement ICommand and are decorated with the NamedCommand attribute found in the Geocortex.EssentialsSilverlightViewer.Infrastructure.Commands namespace. Named commands may take parameters. For example, the OpenWebPage command shown below takes a string URI parameter.
Sometimes command parameters are not simple types such as strings, integers or booleans but are instead more complex types such as map extents. In those cases, you will want to format those parameters as JSON.
Example: This example defines a button that, when pressed, executes the ZoomToExtent command. ZoomToExtent takes a json-serialized ESRI extent object as its command parameter. You probably will not use this capability often, but in those few circumstances when it is needed, this technique can be very helpful.
Example Declaration of a NamedCommand. using ESRI.ArcGIS.Client.Tasks; using Geocortex.Essentials.Client.Tasks; using Geocortex.EssentialsSilverlightViewer.Infrastructure.Commands; . . . . /// /// Gets the command to highlight the given feature /// [NamedCommand("HighlightFeature", typeof(Feature))] public static CompositeDelegateCommand HighlightFeature { get; private set; }
As you can see, the highlighted feature command is a CompositeDelegateCommand , which takes a feature as a parameter. See Composite Delegate Commands on page 196 for more details. The API Reference section describes the specific Commands and Events published by the Geocortex Viewer for Silverlight in more detail. They can also be found in the
Geocortex.EssentialsSilverlightViewer.Infrastructure.Commands namespace. 14.1.3.2
Events Prism also has its own type of Events. These Events are based on a simple publish-subscribe architectural pattern. Senders do not know who is receiving their Events and receivers do not know who is sending them. Senders do not need to exist before a receiver can subscribe to an Event.
| 188
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The Geocortex Viewer for Silverlight Commands and Events are defined in the assembly called
Geocortex.EssentialsSilverlightViewer.Infrastructure.dll . Only this assembly should be referenced from your Viewer application. Normally, when a Module is instantiated, it sets up Listeners for specific Viewer-wide Events. For example, the Overview Map might need to be notified when a user zooms the map to a new extent. The Geocortex Viewer for Silverlight publishes about 40 Events. Each of these Events pass EventArgs to Event handlers and in most cases, those EventArgs contain enough information for your handlers to implement a response to the Event. The following is an example of a Module subscribing to an Event.
Example EventAggregator.GetEvent().Subscribe(OnActiveToolChanged); In this example the Module is subscribing to the ActiveToolChangedEvent with the Event handler;
OnActiveToolChanged .
14.2
Developer Quickstart There is a companion Developer Quickstart for the Geocortex Viewer for Silverlight that is available for download from the Geocortex Support Center as a single ZIP file. The zip file contains a Visual Studio solution with related documents. On the Download tab, click Geocortex Viewer for Silverlight Quickstart 1.9 [date].zip. We recommend that you begin any custom development using the Geocortex Viewer for Silverlight Quickstart.
The solution builds out-of-the-box and contains a number of examples of how to develop with the Viewer including:
14.3
l
How to setup a Visual Studio solution to develop with the Viewer.
l
A simple Hello-World module.
l
The best practices on how to create and organize Modules.
l
How best to use the MVVM pattern in a Geocortex Viewer for Silverlight application.
l
How to create custom Views and place them in Regions.
MultiView Control The Geocortex Viewer for Silverlight contains a MultiView control, which enables multiple Views to be displayed at once. The MultiView control places Views one behind the other like a tab control, and displays an icon for each View at the bottom of the control so that users can click each icon to switch between the Views.
189 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
14.3 MultiView Control
MultiView control with icons for LayerList, Results, and Selection Views You define the MultiView control in the xaml of the Viewer's Shell Module. The following code sample shows the MultiView definition in the standard shell.xaml that ships with the Viewer:
Example 14.3.0.1
MultiView Region The MultiView defines a region that you target when you configure the Views for your modules in your View.xml file. The code sample above shows that the Region defined for this MultiView is DataRegion . In the Viewer.Defaults.xml file, there are several views that target the DataRegion including the example below—the Layer List View:
14.3.0.2
Multiview Events The MultiView publishes two Events: Activated and Minimize . The Activated Event is fired whenever a View within the MultiView is activated. The stock shell uses the
Activated Event to display the data region if it is currently collapsed. You can use the Activated Event for other purposes should you need to. The easiest way to activate a View programmatically is to use ViewCommands.ActivateView in the
Geocortex.EssentialsSilverlightViewer.Infrastructure.Commands namespace.
| 190
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
The Minimize Event is fired when a user double clicks on the View's title bar in the default Viewer. The Minimize Event collapses the DataFrame . 14.3.0.3
Header and Footer The MultiView displays a number of items in its title bar and footer. The title bar includes an icon, a title, and a few buttons. The title bar also displays a spinning Busy indicator when the Viewer is performing a search.
The footer contains a larger version of the icon.
These items are accessible through properties in the IMultiviewContent interface. To implement this, set your View to inherit from the MultiViewContentBase class or implement the IMultiviewContent interface in the
Geocortex.EssentialsSilverlightViewer.Infrastructure.UIComponents namespace. You could implement your View to inherit from MultiView without implementing IMultiViewContent , but your View will be displayed with no wording and only a generic icon in the title bar.
IMultiViewContent Definition /// /// This interface should be implemented if you wish to put a user control into a Mult iView /// public interface IMultiViewContent : INotifyPropertyChanged { /// /// Busy indicates if the view is busy doing something. If it is, the MultiView will d isplay a busy indicator /// bool Busy { get; set; } /// /// The image to display in the selector area of the MultiView /// string LargeIconUri { get; set; } /// /// The image to display in the header area of the MultiView /// string SmallIconUri { get; set; } /// /// The priority of the view. Views with higher priorities are displayed ahead of vi ews with lower priorities
191 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
14.4 Customize the Feature Details Dialog
/// int Priority { get; set; } /// /// Buttons to display in the header of the MultiView. For example, close, minimize, t all view, wide view /// ObservableCollection SpeedButtons { get; set; } /// /// The title to display in the MultiView header /// string Title { get; set; } /// /// The tooltip with information relevant to this view. /// string Tooltip { get; set; } /// /// True if the view displays an icon in the selection area of the MultiView. /// bool IsSelectable { get; set; } }
14.4
Customize the Feature Details Dialog The Geocortex Viewer for Silverlight contains a Feature Details dialog that displays comprehensive information about Viewer features.
| 192
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Example of Feature Details dialog You can display the Feature Details dialog from a number of locations within the Viewer, including the Show Feature Details context menu in the Results List, or by clicking View Additional Details in the Map tips if Enable Map Tips is checked on the Maps and Data Sources tab.
Map Tips - View Additional Details The Feature Details dialog is useful but may be even more so if you customize it, particularly on a layer-by-layer basis. From version 1.4 of the Geocortex Viewer for Silverlight, customizing the Feature Details dialog is possible. Customizing the display of the Feature Details involves: l
Creating a View to display the customized Feature Details in.
l
Implementing an interface on that View called IShowable .
l
Adding the new View to your module configuration.
Code Samples - Feature Details Interface FeatureDetailsContent is a public user control that implements the IShowable. interface. The view must be decorated using the [Export] attribute in order to make it discoverable by the Viewer framework. /// /// Implements the contents area of our custom feature details dialog /// [Export] public partial class FeatureDetailsContent : UserControl, IShowable { private int _priority = 50; /// /// Constructor. Set up loaded event handler /// public FeatureDetailsContent() The IShowable interface allows the Viewer's framework to ask the View, prior to display, if it should be displayed. The interface has one method and one property:
namespace Geocortex.EssentialsSilverlightViewer.Infrastructure.UIComponents { /// /// Views targeting an AutoView must implement IShowable /// public interface IShowable
193 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
14.4 Customize the Feature Details Dialog
{ /// /// Determines if a View can be shown or not - typically based on the value o f a DataContext /// /// The DataContext in question /// True if display, false otherwise bool CanShow(object context); /// /// The priority of the View. View's with higher priority are asked "CanShow" before Views with lower priority /// int Priority { get; set; } } }
Before the Feature Details dialog is shown, it asks each of its Views if it would like to display Feature Details for a given feature. As soon as a View responds positively, the Feature Details dialog shows that View and stop its search. If no Views respond, the stock Feature Detail View displays. You use the View’s CanShow method for this purpose. IShowable.CanShow has one parameter called context . In the case of the Feature Details dialog, the context parameter is the feature that is displayed. This parameter sets up the decision on whether to display your custom View or not. For example, you can first examine the layer that the feature is from and make your decision based on the layer, as shown in the code sample below:
/// /// Base implementation - can always show! /// /// The feature /// It returns true public bool CanShow(object context) { var feature = context as Geocortex.Essentials.Client.Tasks.Feature; if (feature.Layer.DisplayName == "Parcels") { return true; } else { return false; } }
| 194
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
IShowable also has a property called Priority . The Priority property determines the order in which Views are consulted. For example, if multiple Views are registered and you want to ensure that your View is considered first, you would set your custom View’s priority high. The priority of the default Feature Details View is 50.
14.4.1
Register a Custom View The final task is to register your View with the Viewer’s configuration. Use the following code to register Feature Details:
Type="Geocortex.EssentialsSilverlightViewer.CoreModules.Maptips
FeatureDetailsContent"
Visible="true" Region="FeatureDetailsContent" /> Once your View is registered, your custom Feature Details View is complete. See the developer Quick Start for a working example of this customization.
14.5
JavaScript Integration Module Silverlight provides a powerful, built-in mechanism for integrating HTML/JavaScript and Silverlight together called the HTML Bridge. You can find very thorough MSDN documentation on the HTML Bridge at http://msdn.microsoft.com/enus/library/cc645076(v=vs.95).aspx. When you develop custom code for the Geocortex Viewer for Silverlight, you can use all the HTML Bridge functionality. In addition, the Viewer contains the JavaScript Integration Module that exposes two core Viewer concepts to JavaScript code: 1. Named Commands 2. Named Events. Named Commands and Named Events are system commands and events that are identified using a unique string name. The string name can be then be invoked from external systems such as the JavaScript or Workflow. There are two common scenarios for using the JavaScript Integration Module: 1. Invoking a Named Command from JavaScript. 2. Subscribing to a Named Event from JavaScript. The Viewer.html file demonstrates both these mechanisms:
silverlightPlugin.Content.essentialsViewer.RunCommand("StepZoomIn", null); silverlightPlugin.Content.essentialsViewer.SubscribeToEvent("MapExtentChangedEvent", mapE xtentChangedEventHandler); function mapExtentChangedEventHandler(eventArgs) { // event specific handling code } The starting point is to get the Silverlight plug-in and reference the Content.essentialsViewer object, which is the base for all other JavaScript Integration Module calls.
195 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
14.6 Composite Delegate Commands
In the above code, the StepZoomIn command is being invoked. Notice that the value null is being passed in place of a command parameter because StepZoomIn does not take a parameter. If the command being invoked requires a parameter, you need to reference how JavaScript marshals values to Silverlight. For primitives such as strings, integers, and floating point numbers, no special marshalling is required. The code for subscribing to an Event is similar. It calls the SubscribeToEvent function and passes it the name of the event to subscribe to, as well as the JavaScript function to be invoked when the Event is fired. Every Event subscribed to potentially has a different structure of Event arguments. A tool like Firebug is useful for exploring them. Invoking Commands and subscribing to Events in JavaScript is not limited to Commands and Events in the core Viewer. If you create your own Named Commands and Named Events, then they are automatically exposed as well. This is perhaps a more powerful approach than using the out-of-the-box Commands and Events because you can encapsulate your complex logic within your own commands in managed-code in Silverlight, and invoke the Command from JavaScript. This minimizes JavaScript logic and keeps your business logic within Silverlight.
14.6
Composite Delegate Commands The CompositeDelegateCommand class is a strongly typed relative of the PRISM CompositeCommand class. The
CompositeCommand class provides a mechanism for representing a group of child commands as a single command. When the CompositeCommand is invoked, all of the child commands are subsequently invoked. The child commands are actually DelegateCommand objects. The DelegateCommand class encapsulates two delegates, Execute and CanExecute , which reference corresponding implementations in a view model class. When Execute and CanExecute are invoked on DelegateCommand objects, the calls are forwarded to the corresponding methods in the view model class. The CompositeDelegateCommand augments the behavior of a typical CompositeCommand and allows a third party to provide a custom command handler that overrides the default behavior of the system. For example, the default behavior of a composite delegate command may be to perform a specific logical command on a feature regardless of which layer that feature originates from, but you want to execute an alternative handler if the feature is derived from a specific layer. The changes to the system command behavior are accomplished via three mechanisms: l
The ability to register a command handler with a flag specifying it is a higher priority than a default handler.
l
The ability to control whether or not all command handlers are executed upon invocation of a
CompositeDelegateCommand , or only the first command handler to indicate it can handle the supplied parameter. l
The ability to control whether only one command handler, or all command handlers, must be able to handle the specified parameter in order to allow execution of the CompositeDelegateCommand .
The CompositeDelegateCommand has a number of important methods: Command
Result
Argument
ClearCommands
Clears all of the commands registered None with the composite delegate command.
RegisterCommand
Registers a command with the composite delegate command at the specified priority, Normal or High . If a priority parameter is not specified, the delegate is registered with a default priority of Normal .
DelegateCommand, {Geocortex.Essentials.SilverlightViewe r. Infrastructure.Commands. CommandEnums. CompositeCommandExecutePriority}
| 196
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
Result
Argument
UnregisterComman d
Unregisters all instances of a
DelegateCommand
CanExecuteMode
Set the can
ExecuteMode
Set the
previously registered command.
Geocortex.Essentials. CompositeCommandCanExecuteMo SilverlightViewer.Infrastructure. de flag to one of two possible values, Commands.CommandEnums. CompositeComman RequireAny or RequireAll . dCanExecuteMode
CompositeCommandExecuteMode flag to one of two possible values,
ExecuteAll or ExecuteFirst .
14.6.1
Geocortex.Essentials.SilverlightViewe r. Infrastructure.Commands.CommandEnums. CompositeCommandCanExecuteMode
Enumerations Three enumerations are used to specify can execute mode , execute mode and execution priority : Enumeration
Value
Description
CompositeCommand CanExecuteMode
RequireAny
Requires only a single child command’s
ICommand.CanExecute to return true in order to return true for the CompositeDelegateCommand RequireAll
Requires all child command's ICommand.CanExecute to return true in order to return true for the
CompositeDelegateCommand . CompositeCommand ExecuteMode
ExecuteAll
Iterate through all registered commands and execute those for which ICommand.CanExecute returns true.
ExecuteFirst
Iterate through high priority commands and execute only the first command for which
ICommand.CanExecute returns true . If no high priority delegate is able to handle the specified parameter, iterate through normal priority commands and execute only the first command for which
ICommand.CanExecute returns true . CompositeCommand ExecutePriority
Normal
The default execution priority level for registering commands with a composite command.
High
When performing check's on a command's
CanExecute as well as actually executing a command, commands that are registered with priority High will be checked/executed before commands with priority
Normal .
197 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
14.6.2 Override Default Behavior
14.6.2
Override Default Behavior To override the default behavior of the system and execute a single delegate for a specified parameter, you need to: l
Create a custom module that implements a delegate with the desired functionality.
l
Register the delegate as high priority.
l
Set the CanExecuteMode to RequireAny .
l
Set the ExecuteMode to ExecuteFirst .
Example Configuration To specify an alternate command for ShowFeatureDetails for a specific layer use:
{Create custom module and implement _layerFeatureDetailsCommand}FeatureCommands.ShowFeatu reDetails.RegisterCommand(_layerFeatureDetailsCommand, CompositeCommandExecutePriority.Hi gh); FeatureCommands.ShowFeatureDetails.ExecuteMode = CompositeCommandExecuteMode.ExecuteFir st; FeatureCommands.ShowFeatureDetails.CanExecuteMode = CompositeCommandCanExecuteMode.Requ ireAny;
14.6.3
Augment/Replace Existing Commands The CompositeDelegateCommand class also allows you to add additional delegates to a specified composite delegate command, and so augment the existing command. Alternatively, you can completely replace the currently registered command(s) with your own implementation. If you are familiar with object-oriented programming, the concept is similar to overriding a virtual method. To replace the currently registered command with your own implementation, call ClearCommands on the
CompositeDelegateCommand before calling RegisterCommand .
Example Configuration To replace the current command for HighlightFeature use:
FeatureCommands.HighlightFeature.ClearCommands(); FeatureCommands.HighlightFeature.RegisterCommand(_highlightFeatureCommand); For more information on CompositeCommands , see the Prism 4 documentation found on the Microsoft Patterns and Practices website: Microsoft Patterns and Practices site: http://msdn.microsoft.com/en-us/practices Prism 4.0 manual: http://msdn.microsoft.com/en-us/library/gg406140.aspx Prism CompositeCommands in the Prism 4 manual: http://msdn.microsoft.com/en-us/library/gg405494 (v=PandP.40).aspx
14.7
Global Search The Geocortex Viewer for Silverlight contains a useful feature called Search Manager that allows you to develop custom search functionality and link it into the Viewer’s Global Search box.
| 198
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Global Search box In order to implement a custom search, you implement a single interface called ISearchProvider and register it with the Viewer’s Search Manager. Everything else is done behind the scenes and there is only one UI element - the Global Search box.
14.7.1
Interactions The Global Search UI interacts with the Search Manager in the following way: l
The user enters text into the Global Search text box and presses Enter.
l
The Global Search UI calls the Search Manager’s Search method and passes it the text to search for and a
FeatureSetCollection to receive the results. l
The Search Manager then asks each Search Provider (a class that implements ISearchProvider ) to search for the text the user entered.
l
The Search Manager collects the results and updates the FeatureSetCollection .
l
In the background, the Results list listens for updates to the FeatureSetCollection and displays search results as they become available.
14.7.2
Auto Complete The search framework also includes options for Auto Complete. As the user enters text into the Global Search box, the Search Providers look for candidate Auto Complete items; very similar to Google’s search.
14.7.3
Search Provider Interface Every search provider must implement the ISearchProvider interface shown in the code snippet below. The Silverlight Viewer ships with a number of stock search providers including: l
Layer Search
l
Instant Search
l
Geocode Search
/// /// Interface definition for a search provider. /// Register Search providers with the search manager programmatically /// or export a class that implements ISearchProvider /// See Core Modules GlobalSearchProvider for details. /// public interface ISearchProvider {
199 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
14.7.3 Search Provider Interface
/// /// The unique name of the provider - may be displayed in the ui /// string Name { get; } /// /// The description of the provider /// string Description { get; } /// /// Boolean for enabling and disabling the provider /// bool IsEnabled { get; set; } /// /// Search method /// /// where search results are to go /// what to search for void Search(FeatureSetCollection targetCollection, string searchText); /// /// Cancel a search /// voice CancelSearch(); /// /// Current search status /// SearchStatus Status { get; } /// /// Event to obtain progress notifications. When a search completes, status must be se t to idle or error /// event EventHandler Progress; }
| 200
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
14.7.4
Interface Methods and Properties The following is a summary of the methods and properties of the ISearchProvider interface: l
Name: A unique name given to the Search Provider that displays in any list of Search Providers in the Viewer.
l
Description: A description of the Search Provider that is not used currently within the Viewer but will be in the future.
l
IsEnabled: Turns the Search Provider on and off.
l
Search: Asynchronously searches for the text entered in the Search box. Progress events are fired as a search progresses. Please ensure that an event is fired at the start of a search and again when the search completes even if an error occurs. The search event has a status property that you should set at each stage of the search.
l
CancelSearch: Cancels a search that is currently underway.
l
Progress: An event that the Search Manager subscribes to in order to be notified when the status of the ongoing searches changes.
A Search Provider may also wish to implement the ISearchHintProvider interface in order to provide Auto Complete data to the Global Search box.
namespace Geocortex.EssentialsSilverlightViewer.Infrastructure.Search { /// /// Interface for providing search hints given a search string.
Not to be confused wi
th actual /// search results, search hints are simply strings of things that are related to or m atch the /// provided search text.
A typical use of search hints is in an autocomplete drop do
wn box. /// /// /// This interface is a companion to ISearchProvider.
If a class implements ISearchPr
ovider, /// then it might optionally implement this class to provide search hints.
It's up to
the /// consumer of the search provider to actually make use of this functionality.
In the
/// Silverlight viewer, SearchManager manages the search providers and exposes the ass ociated /// ISearchHintProvider implementations. /// public interface ISearchHintProvider { /// /// Returns a collection of strings that match or are related to the provided sear ch text. /// This is typically used for auto complete dropdown boxes. ///
201 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
14.7.5 Register a Search Provider with Search Manager
/// The collection of hints.
This collection should be manipu
lated (added) /// to by the implementation. /// The text the user is searching on. void GetSearchHints(ObservableCollection hints, string searchText); } }
Example Search Provider Code The ISearchHintProvider interface works as follows: The Viewer’s framework calls GetSearchHints and passes in the search text entered by the user as well as a target collection to update. GetSearchHints uses the search text to creates a set of hints. The following is an example of a very simple ISearchHintProvider that remembers the last 5 things you searched for.
private Queue _last5Searches = new Queue(); Public void Search(FeatureSetCollection) targetCollection, string searchText) { _last5Searches.Enqueue(searchText); if (_last5Searches.Count > 5) { _last5Searches.Dequeue(); } // Do the search ... //... } public void GetSearchHints(System.Collections.ObjectModel.ObservableCollections h ints, string searchText) { hints.Clear(); foreach (var hint in _last5Searches) { hints.Add(hint); } } }
14.7.5
Register a Search Provider with Search Manager Once you have implemented the ISearchProvider interface and optionally, ISearchHintProvider , you need to register your Search Provider with the Search Manager. The best way to register a search provider, is to import the global Search Manager into a custom module and then call the RegisterSearchProvider function using the following code:
| 202
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
[Import] public SearchManager SearchManager { get; set; } protected override void Initialize(Moduleconfigureation moduleConfiguration) { base.Initialize(moduleConfiguration); SearchManager.RegisterSearchProvider(new LayerSearchProvider()); } Once your Search Provider is registered with the Search Manager, you can run custom searches in the Viewer.
203 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
15 Reference
15
15.1
Reference Command Reference All the commands listed in this reference are declared in the
Geocortex.EssentialsSilverlightViewer.Infrastructure.Commands namespace within the Geocortex.EssentialsSilverlightViewer.Infrastructure assembly. Viewer Commands can be referenced either by configuration or invoked programmatically. Some Commands require parameters and in those cases, the Command argument is specified in the Arguments column, or just below the Command. You can find all the built-in Commands and Command arguments by using IntelliSense within Visual Studio 2010. Often, executing a Command triggers the firing of an Event that can be caught and acted upon in separate Modules. For example, executing the
FeatureSetManager.Open command sends a corresponding FSMCollectionOpenedEvent . The fourth column in the table below indicates simply whether each command can be used within a workflow or not. However, not all commands work well in a workflow. Some commands are not suited to workflows even though they can work within them.
15.1.1
CallOutCommands CalloutCommands contains commands for adding and removing callout symbols. Command
Result
Arguments
Use in workflow?
AddCallout
Adds a callout to the map.
Geocortex.EssentialsSilverlight Viewer.Infrastructure.Models. CalloutParameters
No
RemoveAllCallouts
Removes all the callouts from the map.
None
Yes
RemoveCallout
Removes the callout represented by the graphic
ESRI.ArcGIS.Client.Graphic
No
provided.
| 204
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
15.1.2
Command
Result
Arguments
Use in workflow?
RemoveCalloutsFromLayer
Removes all the map callouts from a specified
The ID of the layer where the callouts
Yes
layer.
are located (string ).
EditingCommands EditingCommands add the ability to edit feature attributes. Command
Result
Arguments
Use in workflow?
CancelAttributeEditing Command
Cancels the process started by the
None
Yes
Geocortex.EssentialsSilverlight Viewer.Infrastructure.Commands. CompositeDelegateCommand. EditAttributesArgs.
No
None
Yes
StartAttributeEditingCommand . After executing this command, you can no longer click on a feature to edit it.
EditAttributesCommand
This command shows a form that allows you to edit feature attributes.
StartAttributeEditing Command
Sets up the map so that you can click on a feature and have an edit attributes form open to edit features.
15.1.3
ExportCommands ExportCommands contain commands related to exporting map data from the Viewer into various formats. Zipped files that are greater than 4 GB may not extract correctly.
Command
Result
Arguments
Use in workflow?
ExportFeatureAttachments
Exports a ZIP archive file containing all attachments
Geocortex.Essentials.Client. Tasks.Feature
No
on a feature.
205 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
15.1.4 ExportMapCommands
Command
Result
ExportFeaturesToCsv
Exports the feature set to a comma-delimited format. Geocortex.Essentials.Client.
Use in workflow?
Arguments
No
Tasks.FeatureSet ExportFeaturesToCsv SemicolonDelimited
Exports the feature set to a semicolon-delimited
ExportFeaturesToCsv DataLinks
Exports the feature set and its data links to a comma
format.
delimited format. Note: This command is obsolete
No
Geocortex.Essentials.Client. Tasks.FeatureSet
No
Geocortex.Essentials.Client. Tasks.FeatureSet
and the ExportFeaturesToCsvWithExtras Command should be used.
ExportFeaturesToCsv WithDataLinks SemicolonDelimited
Exports the feature set and its data links to a semicolon delimited format. Note: This command is
No
Geocortex.Essentials.Client. Tasks.FeatureSet
obsolete and the
ExportFeaturesToCsvWithExtras Command should be used.
15.1.4
ExportFeaturesToCsvWith Extras
Exports and feature set with its data links and
ExportFeaturesToCsvWith ExtrasSemicolonDelimited
Exports a feature set with its data links and related
related features to a comma delimited format.
features to a semi-colon delimited format.
No
Geocortex.Essentials.Client. Tasks.FeatureSet
No
Geocortex.Essentials.Client. Tasks.FeatureSet
ExportMapCommands Zipped files that are greater than 4 GB may not extract correctly.
Command
Result
Arguments
Use in workflow?
ExportMap
Exports the map.
None
Yes
| 206
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
15.1.5
ExtractCommands Zipped files that are greater than 4 GB may not extract correctly.
Command
Result
Arguments
ExtractEsriFeatureSet
Extracts an Esri feature set from a layer and
ESRI.ArcGIS.Client.Tasks.FeatureSet
Use in workflow? Yes
adds them to a zip file.
ExtractFeatureSet
Extracts a Geocortex feature set and adds it to a zip file.
ExtractFeatureSetCollecti Extracts a feature set collection and adds it to a zip file. on ById ExtractGraphicsLayerById
Geocortex.Essentials.Client.Tasks.Feature Set
The name/ID of the FeatureSetCollection
No
Yes
(string ).
Extracts a graphics layer, including markup, The name/ID of the Graphics Layer (string ).
Yes
and adds shape, projection and database data to a zip file.
15.1.6
FeatureCommands FeatureCommands contain the Commands that manipulate Geocortex features. Geocortex features are similar to Esri features except that they contain Geocortex Essentials-specific extensions, including support for Data Links. Command
Result
Arguments
Use in workflow?
BufferFeatures
Executes geometry buffering using Esri’s
ESRI.ArcGIS.Client.Tasks. BufferParameters
No
geometry service. The
BufferFeaturesCompleteEvent is fired when it is completed, and includes the collection of resulting Graphics.
207 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
15.1.7 FeatureSetManagerCommands
Command
Result
Arguments
Use in workflow?
ClearHighlights
Clears all currently highlighted features.
None
Yes
CreateHighlightLayer
Highlight a given layer.
The name/ID of the highlight layer (string ).
Yes
HighlightEsriFeatureSet
Highlights a given Esri FeatureSet.
ESRI.ArcGIS.Client.Tasks. FeatureSet
HighlightFeature
Highlights a given feature.
Geocortex.Essentials.Client. Tasks.Feature
HighlightFeatureSet
Highlights a Geocortex FeatureSet.
ICollection
RemoveHighlightLayer
Removes highlighting from a given layer.
The name/ID of the highlight layer(string ).
Yes
SetActiveHighlightLayer
Highlights the active layer.
The name/ID of the highlight layer (string ).
Yes
SetHighlightBorderColor
Sets the border color used for highlighting.
The Hex value of the ARGB color, for example,
Yes
Yes
No
No
#FFFFFFFF where each 2-hex character represents a value between 0-255 (FF = 255). Given as string .
SetHighlightFillColor
Sets the fill color used for highlighting.
The Hex value of the ARGB color, for example,
Yes
#FFFFFFFF where each 2-hex character represents a value between 0-255 (FF = 255). Given as string .
ShowFeatureDetails
Displays the feature details dialog for a given feature.
15.1.7
Geocortex.Essentials.Client. Tasks.Feature
No
FeatureSetManagerCommands The FeatureSetManager manages features and feature sets within the Viewer. Feature sets are created by both the Search and Identify Modules, and can also be generated by Workflow operations. The ResultsView Module accepts feature sets and displays them in the Viewer.
| 208
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
FeatureSetCollections can be given a name, so that they can be isolated. A FeatureSetCollection without a name is the default FeatureSetCollection . Most core Viewer functions use the default FeatureSetCollection to keep track of search results and selections. Command
Result
Arguments
Use in workflow?
AppendToDefaultCollection
Appends the given feature set collection to the default
Geocortex.Essentials.Client. Tasks.FeatureSetCollection
No
Appends the feature set collection specified by the
The ID of the FeatureSet
Yes
parameter to the default feature set collection. The
Collection (string ).
feature set collection. The
FSMCollectionAddedEvent is fired when the collection is appended.
AppendToDefaultCollection ById
FSMCollectionAddedEvent is fired when the collection is appended.
CloseDefaultFeatureSet Collection
None
Yes
The CloseFeatureSetCollection is called after
The name of the FeatureSetCollection
Yes
you are finished manipulating the feature set
(string ).
Similar to CloseFeatureSetCollection, except that it closes the default FeatureSetCollection. Feature set collections must be closed after you are finished operating on them.
CloseFeatureSetCollection
collection. The FSMCollectionClosedEvent is fired when the given collection is closed. Feature set collections must be closed after you are finished operating on them.
OpenDefaultFeatureSet Collection
Similar to OpenFeatureSetCollection , it opens the None default FeatureSetCollection . The default
FeatureSetCollection is the collection that the Results List and potentially other Viewer components use. Feature set collections must be opened before performing any other operations on them.
209 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
Yes
15.1.7 FeatureSetManagerCommands
Command
Result
Arguments
Use in workflow?
OpenFeatureSetCollection
The OpenFeatureSetCollection is called prior to
The name of the FeatureSet
Yes
manipulating a feature set collection. The
Collection (string ).
FSMCollectionOpenedEvent is fired when the given collection is opened. Feature set collections must be opened before performing any other operations on them.
Geocortex.Essentials. Client.Tasks.FeatureSetCollection
No
Set Manager. Removes the feature set collection matching the
The ID of the FeatureSetCollection to
Yes
specified ID from the Feature Set Manager.
remove (string).
SetActiveCollection
Makes a specified feature set collection the active collection.
Geocortex.Essentials. Client.Tasks.FeatureSetCollection
No
SetActiveCollectionId
Makes the active feature set collection the given ID.
The ID of the FeatureSetCollection
Yes
Anything displaying the currently active feature set
(string ).
RemoveCollection
RemoveCollectionById
Removes the feature set collection from the Feature
collection, including the results list, now displays this new feature set collection.
SetActiveFeatureSet
Makes a given feature set active.
Geocortex.Essentials. Client.Tasks.FeatureSetCollection
No
SetActiveFeatureSetId
Makes the active feature set the given ID. Anything
The ID of the FeatureSet (string ).
Yes
displaying the currently active feature set, including the results list, now displays this new feature set collection.
| 210
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
15.1.8
FileCommands FileCommands contains commands related to exporting map data from the Viewer into various formats. Command
Result
Arguments
Use in workflow?
OpenCsvFileDialog
Displays a dialog to select CSV files to be added to
The file extension filter to be used by the Open
No
the map.
file dialog (string ). If no value is provided, the implementation in CoreModules uses Shapefiles (*.shp;*.dbf;*.prj)|*.shp;*.dbf; *.prj.) See the MSDN article on OpenfileDialog.Filter Property.
OpenShapeFileDialog
No
Displays a dialog to select Shapefile files to be added The file extension filter to be used by the open to the map.
file dialog (string ). If no value is provided, the implementation in CoreModules uses Shapefiles (*.shp;*.dbf;*.prj)|*.shp;*.dbf; *.prj.). See the MSDN article on OpenfileDialog.Filter Property.
15.1.9
FilterBuilder Commands Command
Result
Arguments
ShowFilterBuilderView
Display the Filter Builder View for a
Geocortex.Essentials.Client.Layer
specific layer
15.1.10 GeographyCommands GeographyCommands contain commands that can be used to perform forward and reverse geocoding.
211 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
Use in workflow? Yes
15.1.11 HelpCommands
Command
Result
Arguments
ForwardGeocode
Performs a forward geocode operation.
System.String
ProjectGeometry
Projects a geometry from one coordinate system to another.
Geocortex.EssentialsSilverlightViewer. Infrastructure.Models.ProjectionParameters
ReverseGeocode
Performs a reverse geocode operation.
System.String
ReverseGeocodePoint
Performs a reverse geocode operation on
ESRI.ArcGIS.Client.Geometry.
Use in workflow? Yes
No
Yes
Yes
the given point.
MapPoint
15.1.11 HelpCommands HelpCommands can be used to prompt the user and invoke help topics. Command
InvokeClickHelp
ShowHelpTopic
Result
Arguments
Use in workflow?
Prompts the user to click on something in the viewer for which there may be a help topic.
None
Yes
Displays help for the given help topic.
The help topic content key, for example, MapFeatures
Yes
15.1.12 IdentifyCommands IdentifyCommands contain the Commands that identify the set of features that intersect with a given geometry. The commands can be configured in the Identify Module’s parameters. The IdentifyCommands include those that allow buffering of a specified geometry before identifying features. Command
Result
Arguments
BufferGeometry
Displays a dialog to define a buffer distance around a ESRI.ArcGIS.Client.Geometry. geometry, preview the buffer and add the preview Geometry
Use in workflow? Yes
graphic to the markup layer. This Command does not execute an Identify operation when you click OK.
| 212
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
Result
Arguments
Identify
Identifies any features that intersect the specified
ESRI.ArcGIS.Client.Geometry. Geometry
geometry and populates the FeatureSetManager ’s
Use in workflow? Yes
active collection with the results. When the IdentifyCommand executes, the
FeatureSetManager ’s Events fire as the default feature set is updated.
IdentifyBufferedFeature
Opens the same dialog as
IdentifyBufferedGeometry , yet allows
Geocortex.Essentials.Client. Tasks.Feature
No
configuration of the layers to be included in the identify operation. Uses the geometry of the feature as the initial geometry to be buffered. Executes the Identify command on the resulting geometry you click OK.
IdentifyBufferedFeature Set
Displays the same dialog as
IdentifyBufferedFeature . Uses the unioned
Geocortex.Essentials.Client. Tasks.FeatureSet
No
geometry of all features in the entire feature set as the initial geometry to be buffered. Executes the Identify command on the resulting geometry when you click OK.
IdentifyBufferedGeometry
Opens a dialog in order to define a buffer distance, preview the buffer, and add the preview graphic to the markup layer. Executes the Identify command on the resulting geometry when you click OK.
213 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
ESRI.ArcGIS.Client.Geometry. Geometry
Yes
15.1.13 InfoCommands
15.1.13 InfoCommands Command
Result
Arguments
Use in workflow?
ShowHomePanel
Displays the Home Panel.
None.
Yes
Use in workflow?
15.1.14 LayerCatalogCommands Command
Result
Arguments
AddCatalogLayers
Adds the layers specified to the map.property .
A comma-separated list of layer IDs that are Yes configured in a Layer Catalog (string ).
ShowLayerCatalog
Displays the dialog for adding layers from a layer
Yes
None.
catalog to the map.
15.1.15 LayerDrawingOrderCommands Command
Result
Arguments
Use in workflow?
ShowLayerDrawingOrder
Displays the dialog for changing the draw order of
None.
Yes
map services and layers.
15.1.16 LayerListCommands LayerListCommands contains commands for manipulating the LayerList . Command
Result
Arguments
Use in workflow?
SelectBaseMap
A map can have a number of base maps associated with it.
The name of the base map to switch to (string ).
Yes
None
Yes
SelectBaseMap allows you to programmatically select one of the base maps to display. All other base maps are then faded out.
SwitchToLayerView
The Map layer (layer list) consists of two views: a Layer View
| 214
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
Result
Arguments
Use in workflow?
None
Yes
and a Legend View. Normally, the layer list is hosted in the data frame along the left site of the map. If the data frame containing the layer list is closed, it is then opened. If the layer list component is currently displaying the legend, the view is switched to layer view.
SwitchToLegendView
The layer list consists of two views; a Layer View and a Legend View. Normally, the layer list is hosted in the data frame along the left site of the map. If the data frame containing the layer list is closed, it is opened. If the layer list component is currently displaying the layer view, the view is switched to legend view.
15.1.17 LayerThemeCommands The Layer Theme command calls either the Layer Theme ID or the display name. Command
Result
SwitchToLayerTheme
Activates the theme and updates the map based on the theme The ID or display name of the layer theme.
Use in workflow?
Arguments
Yes
settings in the site.
15.1.18 LogCommands LogCommands show or hide the viewer log. Command
Result
Arguments
Use in workflow?
ShowLog
Shows the log.
If true, the log screen is shown. If false , the log screen is
Yes
hidden. The default Parameter is false .
HideLog
Hides the log.
215 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
None
Yes
15.1.19 MapCommands
15.1.19 MapCommands MapCommands are those commands that operate on the Viewer’s map. Zooming and panning are a primary concern of MapCommands . Use in workflow?
Command
Result
Arguments
DuplicateLayer
Creates a duplicate of a specified layer.
Geocortex.Essentials.Client. Layer
DuplicateLayerAnd Symbol ize
Creates a duplicate of a specified layer and opens the dialog to modify the layer's symbology.
Geocortex.Essentials.Client. Layer
PanDown
Pans the map downwards.
None
Yes
PanLeft
Pans the map left.
None
Yes
PanRight
Pans the map right.
None
Yes
PanToFeature
Pans the map so that it is centered over the given
Geocortex.Essentials.Client. Tasks.Feature
feature.
PanToPoint
Pan’s the map so that it is centered over the given point.
ESRI.ArcGIS.Client.Geometry. Geometry
PanUp
Pans the map upwards.
None
RemoveDuplicatedLayer
Removes a duplicated layer from the application.
Geocortex.Essentials.Client. Layer
RemoveEssentialsLayer
Removes a layer from the application.
Geocortex.Essentials.Client. Layer
SetPrimaryTimeAware MapService
Sets the given map service as the Primary time-aware
Geocortex.Essentials.Client. MapService
map service.
No
No
No
Yes
Yes
No
No
Yes
| 216
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
Result
Arguments
Use in workflow?
SetTimeExtent
Sets the time extent of the ESRI map. Data displayed
An ESRI time extent which includes a start date time
Yes
in the map is then constrained to the extents
and an end date time.
provided. Yes
Shows or hides the cross hair shown in the center of
A boolean, which when true, shows the crosshair, and
the map.
when false, hides the crosshair.
Displays the Layer Options dialog for the specified layer.
Geocortex.Essentials.Client. Layer
StepZoomIn
Zooms the map in by a predetermined amount.
None
Yes
StepZoomOut
Zooms the map out by a predetermined amount.
None
Yes
ToggleFullScreen
This command has been deprecated.
ToggleLayerVisibility
Toggles a layer's visibility according to its name.
ShowCrossHair
ShowLayerOptions
No
No
Requires a Tuple of two strings.
No
The first is the ID of the map service. The second is the ID of the layer to be toggled. For example:
CommandRegistry. GetCommand("ToggleLayerVisibility"). Command. Execute(Tuple.Create("mapserviceid", "laye rid")); ToggleServiceVisibility
Toggles a map service's visibility according to its
The name of the map service (string ).
Yes
The extent to zoom in to as in
Yes
name.
ZoomInToExtent
Zooms the map in to a given extent.
ESRI.ArcGIS.Client.Geometry. Envelope .
217 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
15.1.19 MapCommands
Command
Result
Arguments
Use in workflow?
ZoomOutToExtent
Zooms the map out to a given extent.
The extent to zoom out to as in
Yes
ESRI.ArcGIS.Client.Geometry. Envelope . ZoomToAllFeatures
Zooms the map to a given feature set.
ICollection
ZoomToExtent
Zooms the map to the given extent.
ESRI.ArcGIS.Client.Geometry. Envelope
ZoomToFeature
Zooms the map so that the given feature is in full view. Geocortex.Essentials.Client.Tasks.
No
Yes
No
Feature ZoomToFeatures
ZoomToFullExtent
Zooms the map to the given set of features so all the
No
features are in view.
Geocortex.Essentials. Client.Tasks.FeatureSet
Zooms the map to the full extent of all of the map
None
Yes
NoneY
Yes
services configured for the map.
ZoomToInitialExtent
Zooms the Viewer’s map control to the initial extent configured in the Geocortex Essentials site.
ZoomToLayerVisible
Zooms the given map to the visible extent of the given layer.
ZoomToMapServiceVisible
ZoomToNextExtent ZoomToPreviousExtent
Geocortex.Essentials. Client.Layer
No
No
Zooms the map to a given resolution.
Geocortex.Essentials.Client. MapService
Zooms the map to the next saved extent.
None
Yes
Zooms the map to the previous saved extent.
None
Yes
| 218
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
Result
Arguments
Use in workflow?
ZoomToResolution
Zooms the map to a given resolution.
The resolution to zoom to (double )
Yes
ZoomToScale
Zooms the map to the given scale.
The scale to zoom to (double ).
Yes
15.1.20 MapTipCommands MapTipCommands contain commands that can be used to manipulate the MapTip functionality. You are able to turn map tips on and off programmatically as well as display map tips for a given feature. Command
Result
Arguments
Use in workflow?
DisableMapTips
Disables map tips that are displayed when the user
None
Yes
None
Yes
hovers over a feature in the map.
EnableMapTips
Enables map tips that are displayed when the user hovers over a feature in the map.
HideAllMapTips
Hides all map tips.
None
Yes
HideMapTips
Hides the currently displayed map tip but remembers None
Yes
its location in case it is restored.
RestoreAllMapTips
Restores the map tips that have been hidden.
None
ShowMapTip
Shows a map tip for each of the given features.
ICollection
ShowMapTips
Shows map tips for all features.
None
219 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
Yes
No
Yes
15.1.21 MarkupCommands
15.1.21 MarkupCommands MarkupCommands contain commands that can be used to manipulate the markup/drawing layers. Command
Result
Arguments
AddCustomMarkup
Adds a custom markup to the markup layer. This
Geocortex.EssentialsSilverlight Viewer.Infrastructure.Models. MarkupParameters
command allows you to supply both the geometry and symbology wrapped in a MarkupParameters
Use in workflow? No
object.
AddMarkup
Adds the given geometry to the markup layer. This ESRI.ArcGIS.Client.Geometry. command is identical to the AddMarkupGeometry Geometry
Yes
command and can be used interchangeably with it.
AddMarkupFeature
Similar to AddMarkup but uses the geometry found in the given Geocortex feature.
AddMarkupGeometry
Geocortex.Essentials.Client. Tasks.Feature.
Adds the given geometry to the markup layer. This ESRI.ArcGIS.Client.Geometry. command is identical to the AddMarkup Geometry
No
Yes
command and can be used interchangeably with it
AddTemporaryMarkup
Adds a custom markup to the temporary markup
No
AddTemporaryMarkup Geometry
Adds the given geometry to the temporary markup ESRI.ArcGIS.Client.Geometry. layer. Geometry
Yes
AddTextMarkup
Displays a text box where you are prompted to
Yes
Geocortex.Essentials layer. This command allows you to supply both the SilverlightViewer. geometry and symbology wrapped in a Infrastructure.Models. MarkupParameters object. MarkupParameters
type text. When complete, the text is added as a
ESRI.ArcGIS.Client.Geometry. Geometry
graphic to the markup layer at the provided geometry. The text appears at the center point of the geometry.
| 220
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
Result
Arguments
ClearMarkup
Clears all of the markup from the markup layer and None
Use in workflow?
presents the user with a confirmation dialog.
ClearMarkupQuiet
Clears all of the markup from the markup layer
None
Yes
None
Yes
Null
Yes
without presenting the user with a confirmation dialog.
ClearTemporaryMarkup
Clears all of the markup from the temporary markup layer.
ExtractMarkup
Extracts the current markup drawn on the map to a shapefile.
RedoMarkup
Redoes the last markup operation
None
No
SetDrawMode
Sets the mode on the Draw surface to either Point,
Geocortex.Essentials Silverlight Viewer.Infrastructure. Commands.DrawModeWrapper
No
None
No
Polyline, Polygon, Freehand, Rectangle or None.
UndoMarkup
Undoes the last markup operation.
15.1.22 MeasurementCommands MeasurementCommands allow you to set measurement options and clear the measurement surface. Command
Result
Arguments
Use in workflow?
ClearMeasurementMarkup
Clears all the current measurement markup.
None
Yes
SetMeasurementProjection
Sets the current measurement projection.
ERSI.ArcGIS.Client.Geometry. SpatialReference
No
SetMeasurementProjection
Specifies the units used by the measurement
The unit used by the measurement projection
Yes
221 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
15.1.23 OptimizerCommands
Command
Result
Arguments
Units
projection. Execute this command with the
(string ).
Use in workflow?
appropriate units if you execute
SetMeasurementProjection. SetMeasurementUnit
Sets the current unit of measurement.
Geocortex.Essentials.Client. DistanceUnit
No
15.1.23 OptimizerCommands Geocortex Optimizer is a product that collects and reports on a GIS infrastructure. Geocortex Viewer for Silverlight integrates with Optimizer to report on usage and performance. OptimizerCommands allow you to integrate even more with Optimizer and provide detailed usage information regarding Geocortex Viewer for Silverlight. Command
Result
Arguments
Use in workflow?
LogEvent
Logs a Viewer Event to the Optimizer database
Geocortex.EssentialilverlightViewer. Infrastructure.Commands. OptimizerEventArgs
No
module if Optimizer is available.
15.1.24 PrintTemplatesCommands Command
Result
Arguments
Use in workflow?
PrintMap
Displays the print map dialog which allows the user
None
Yes
to select a template to use when printing the current map.
15.1.25 ProjectCommands Command
Result
Argument
Use in workflow?
OpenProject
Displays a list of projects that you can select and open.
None
Yes
OpenProjectLocal
Opens a saved project from a file on the user’s machine.
None
Yes
| 222
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
Result
Argument
Use in workflow?
SaveProject
Saves the current project or displays a dialog to fill in
None
Yes
None
Yes
None
Yes
None
Yes
details about the project to be saved.
SaveProjectAs
Displays a dialog to fill in details about a project to be saved.
SaveProjectLocal
Displays a dialog to fill in details about a project to be saved to a local machine.
ViewProjectDetails
Displays a dialog with details about the project.
15.1.26 ReportingCommands Command
Result
Argument
RunFeatureReport
Displays a dialog that allows a user to run a feature
Geocortex.Essentials. Client.Tasks.Feature
report.
RunFeaturesReport
RunReport
Displays a dialog that allows a user to run a features report.
Geocortex.Essentials. Client.Tasks.FeatureSet
Displays the dialog that allows a user to run a
None
Use in workflow? No
No
Yes
report.
15.1.27 ResultsListCommands The ResultsList Module implements the View that displays features in a list or tabular view. The ResultsListCommands makes it possible to change how the results list is displayed by switching from tabular to list view. You can also refine the current list of results. Command
Result
ExecuteFeature
Opens the Feature Details about a particular
Argument
Geocortex.EssentialsSilverlightViewer. feature when it is double-clicked in the Results Infrastructure.Events.
223 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
Use in workflow? No
15.1.27 ResultsListCommands
Command
Result
Argument
List.
FeatureSelectEventArgs
HideFeatureSet
Hides a feature set from the results.
Geocortex.Essentials.Client. Tasks.FeatureSet
HoverOverFeature
Highlights a feature when you hover over it in
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events. FeatureSelectEventArgs
the Results List.
LeaveFeature
Un-highlights a feature previously highlighted by the HoverOverFeature command.
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events. FeatureSelectEventArgs
RefineSearchResults
Shows the Refine Results dialog.
Geocortex.Essentials.Client. Tasks.FeatureSet
SelectFeature
Zooms and pans to a feature that is clicked in
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events. FeatureSelectEventArgs
the Results List.
Use in workflow?
No
No
No
No
No
No
ShowFeatureSet
Shows a feature set in the results.
Geocortex.Essentials.Client. Tasks.FeatureSet
ShowFeatureSetCollection
Shows a feature set collection in the results.
Geocortex.Essentials.Client. Tasks.FeatureSetCollection
SwitchToHistoryView
Switches to the History view.
None
Yes
Switches to Results list view.
None
Yes
Switches to the Results view, either the list or table view depending upon which is active.
None
Yes
SwitchToListResultsView SwitchToResultsView
No
| 224
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
SwitchToSelectionView SwitchToTabularResultsView SwitchToTallView SwitchToWideView
Result
Argument
Use in workflow?
Switches to the Selection view.
None
Yes
Switches to Results table view.
None
Yes
Switches the Results view to tall.
None
Yes
Expands the Results view to wide.
None
Yes
15.1.28 SearchCommands Command
Result
Arguments
Use in workflow?
GlobalSearch
Performs a global search for a particular string.
Any set of characters to search for.
Yes
SearchAttributes
The Viewer has a programmatic search command
No Geocortex.EssentialsSilverlightViewer. called search Attributes. You can specify the layer, Infrastructure.Models.SearchAttributesParams a field to search, and a list of values that users can then search on.
15.1.29 SelectionCommands All the selection commands interact with the default collection within the Feature Set Manager. The Viewer uses the default collection to maintain a collection of feature sets that represent your selected features from various layers. Command
Result
Arguments
AddFeatureSetToSelection
Adds a specified feature set collection to the
Geocortex.Essentials.Client. Tasks.FeatureSet
default collection.
AddFeatureSetsTo Selection
Adds specified feature set collections to the default collection.
225 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
IEnumerable
Use in workflow? No
No
15.1.30 ShellCommands
Command
Result
Arguments
AddFeatureToSelection
Adds a specified feature to the default
Geocortex.Essentials.Client.Tasks. Feature
collection.
AddFeaturesToSelection
ClearSelection
Adds specified features to the default collection.
Clears all features from the default collection in
IEnumerable None
Use in workflow? No
No
Yes
the Feature Set Manager.
IntersectFeatureSetWith Selection
Intersects a specified feature set collection with the default collection.
RemoveFeatureFromSelection Removes a specified feature from the default
Geocortex.Essentials.Client.Tasks. FeatureSet Geocortex.Essentials.Client.Tasks.Feature
No
No
collection.
RemoveFeatureSetFrom Selection
Removes a specified feature set from the default Geocortex.Essentials.Client.Tasks. collection. FeatureSet
No
RemoveFeatureSetsFrom Selection
Removes specified feature sets from the default
No
RemoveFeaturesFrom Selection
Removes specified features from the default
collection.
collection.
IEnumerable IEnumerable
No
15.1.30 ShellCommands The Shell is a container that hosts Module Views. Many items in the shell can be manipulated programmatically including whether to: l
Open or close the data frame (panel on the left).
l
Show or hide the toolbar.
l
Manipulate the overview map.
| 226
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
Result
Arguments
Use in workflow?
BringToFront
Brings a given UI element into view.
System.Windows.UIElement
No
CloseDataFrame
Closes the Data frame if it is currently
None
Yes
None
Yes
None
Yes
System.Windows.UIElement
No
open.
CloseOverviewMap
Closes the Overview map if it is currently open.
CloseResultsFrame
Closes the Results frame if it is currently open.
Hide
Hides a given UI element.
NavigateCurrentWindowToUri
Opens the browser to the specified URI in The absolute or relative URI to navigate to Yes the current window. This URI can be
(string).
called independently of user actions like a button click.
NavigateToUri
Opens the browser to the specified URI in The absolute URI to navigate to (string). a new window. This URI can be called
Yes
Relative URIs are not supported.
independently of user actions like a button click.
OpenDataFrame
Opens the data frame if it is currently
None
Yes
closed
OpenOverviewMap
Opens the Overview map if it is currently closed
None
Yes
OpenResultsFrame
Opens the Results frame if it is currently
None
Yes
The region to save.
No
closed.
SaveRegionToJpg
Saves the given region to a jpg file.
227 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
15.1.31 SymbolCommands
Command
Result
Arguments
ShowModalErrorDialog
Shows the error dialog.
Geocortex.Essentials SilverlightViewer. Infrastructure.Models. ErrorDialogInfo
ToggleDataFrame
Opens the data frame if it is currently
None
Use in workflow? No
Yes
closed or closes it if it is currently open.
15.1.31 SymbolCommands Use in workflow?
Command
Result
Arguments
ShowSymbolizeDynamic Layer
Displays a dialog to modify the symbology of the specified layer.
Geocortex.Essentials.Client. Layer
ShowSymbolizeDynamic LayerById
Displays a dialog to modify the symbology of the
A comma-separated pair of IDs, the first for Map
specified layer.
Service ID and the second for Layer ID (e.g. "0,1")
ShowSymbolizeDynamic LayerNewAttribute
Displays a dialog to select a layer and then modify
None
Yes
ShowSymbolizeDynamic LayerSelection
Displays a dialog to modify the symbology of the
Geocortex.Essentials.Client.Layer
No
No
Yes
its symbology.
specified layer starting on the choose attribute page.
15.1.32 ThirdPartyMapIntegration Commands WebMapIntegrationCommands provide a mechanism for interacting with the Viewer from 3rd party maps, for example, Bing or Google Maps. Command
Result
Arguments
Use in workflow?
BroadcastCurrent Viewpoint
Causes the Viewer to broadcast information about
None
Yes
its current position so that both maps can maintain the same view point.
| 228
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Command
Result
RemoveViewpointIndicator Removes the integration indicator. SetMapViewpoint
Sets the map viewpoint position for a viewer.
Arguments
Use in workflow?
None
No
Geocortex.EssentialsSilverlightViewer. Infrastructure.Models. MapViewpointParams
No
15.1.33 ToolbarCommands The toolbar is a configurable Module that provides an easy-to-use, easy-to-organize, and an easy-to-find area to launch functionality from. Toolbar Commands make it possible to manipulate the toolbar programmatically. Command
Result
Arguments
Use in workflow?
ActivateTool
Activates the given named tool. If the tab the
The ID of the tool to activate (string ).
Yes
None
Yes
If the toolbar is visible, HideAdvancedTools None
Yes
tool is defined on is not currently visible, that tab is selected together with the given tool.
ClearActiveTool
If a tool is activated, then
ClearActivateTool deactivates it. HideAdvancedTools
collapses it. You may restore the tools by calling ShowAdvancedTools .
HideToolbarItem
Hides an item (Button, Tool, Group, Region)
The Name of the item to hide (string).
Yes
in the toolbar.
HideToolbarTab
Hides a tab from the toolbar.
The DisplayName of the tab to hide (string).
Yes
SetCurrentTab
Sets the current toolbar tab.
The ID of the tab to set (string ).
Yes
ShowAdvancedTools
Displays the currently hidden tool bar.
None
Yes
229 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
15.1.34 ViewCommands
Command
Result
Arguments
Use in workflow?
ShowToolbarItem
Displays the currently hidden tool bar.
None
Yes
ToggleAdvancedTools
Shows an item (Button, Tool, Group, Region)
The Name of the toolbar item to show (string).
Yes
in the toolbar.
15.1.34
ViewCommands Modules contain Views hosted within Regions. ViewCommands make it possible to manipulate Views programmatically. Command
Result
Arguments
Use in workflow?
ActivateView
Activates a View if it is currently not
The ID of the View to activate. A View is given an ID, and then
Yes
active.
assigned to a Region in the Viewer configuration file (string ).
Deactivates a View if it is currently active.
The ID of the View to deactivate. A View is given an ID, and then
Hides a View if it is currently visible.
The ID of the View to hide. A View is given an ID, and then assigned
DeactivateView
HideView
Yes
assigned to a Region in the Viewer configuration file (string ). Yes
to a Region in the Viewer configuration file (string ).
MoveViewToRegion
Moves a given view to the given region.
Geocortex.Essentials SilverlightViewer. Infrastructure.Regions.MoveViewToRegionOptions which
No
consists of: • ViewId : The Id of the view to move. •RegionName : The id of the region to move the view to. • ActivateAfterMove : True if the view is to activated after it lands in the new region.
ShowView
Displays the current View if it is not currently not visible.
The ID of the View to display.
Yes
A View is given an ID, and then assigned to a Region in the Viewer configuration file (string ).
| 230
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
15.1.35 VisualStatusCommands VisualStatusCommands are used to indicate the visual status of in-progress tasks. Command
Result
Arguments
RegisterProgressTask
Registers a progress task with the given
Geocortex.EssentialsSilverlightViewer. Infrastructure.Commands.ProgressTaskParams
parameters.
UnregisterProgressTask
Unregisters a progress task using the name Geocortex.EssentialsSilverlightViewer. and module strings in the supplied Infrastructure.Commands.ProgressTaskParams
Use in workflow? No
No
ProgressTaskParams . PulseProgressTask
Pulses a progress task by name, applying the given parameters if they have changed.
Geocortex.EssentialsSilverlightViewer. Infrastructure.Commands.ProgressTaskParams
No
Keeps tasks from timing out and disappearing.
15.1.36
WorkflowCommands Geocortex Essentials contains a full-featured Workflow package. The RunWorkflow and RunWorkflowById commands are identical and can be used interchangeably. To find out more about Geocortex Workflow, go to https://support.geocortex.com/workflow. Command
Result
Arguments
Use in workflow?
HideWorkflowContainer
Hides the workflow container.
The ID of the workflow container to hide (string ).
Yes
RunWorkflow
Runs a given workflow identified by the Workflow ID. This command is an alias of RunWorkflowById .
Geocortex.EssentialsSilverlight Viewer.Infrastructure. Commands.RunWorkflowParams
Runs a given workflow identified by the Workflow ID.
The ID of the workflow to run (string ).
RunWorkflowById
Yes
This command is an alias of RunWorkflow.
RunWorkflowWithArguments Executes a workflow, where the workflow ID is defined IDictionary
231 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
No
15.2 Event Reference
Command
Result
Arguments
Use in workflow?
The ID of the workflow container to show (string ).
Yes
by a key-value pair in the dictionary, where the key is "WorkflowID" (case insensitive). The value corresponding to the "WorkflowID" key should be the ID of the workflow you wish to run. All other keys in the dictionary are matched to workflow arguments, and are sent to the workflow when it is started. Any dictionary keys which do not map to workflow arguments are ignored.
ShowWorkflowContainer
15.2
Shows the workflow container.
Event Reference The Viewer's Modules listen for triggered Events. This is done using Event Listeners and notifications. Before a Module can be notified by an Event Listener, the Event Listener must be registered on the specific event that they wish to listen for. To register an Event Listener, add the following lines of code to the Module or View that needs to listen for the event:
using Geocortex.EssentialsSilverlightViewer.Infrastructure.Events; {Other using statements} [Import] public IEventAggregator EventAggregator { get; set; } {Sometime later on} EventAggregator.GetEvent().Subscribe(Handler); The EventClass name is the name of the class that contains the Event definition. (Handler) is a delegate that is able to handle Events fired from EventClassName . [Import] is a dependency injection construct that allows the Viewer infrastructure to assign the instance of IEventAggregator to your Module or View class so that you are able to subscribe to Viewer-wide Events. The following is a list of events that ship with the Viewer.
| 232
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
All of these events are defined in the Geocortex.EssentialsSilverlightViewer.Infrastructure.Events namespace found in the
Geocortex.EssentialsSilverlightViewer.Infrastructure assembly.
15.2.1
AuthenticationEvents Event
Occurs...
Arguments
AuthenticatingEvent
When a user is being authenticated.
None
AuthenticationFailedEvent
When authentication fails, usually due to invalid
Geocortex.Essentials.Client.Infrastructure.Events.
credentials. Note that this event may be fired multiple times AuthenticationEventArgs before AuthenticationSucceededEvent is raised.
AuthenticationSucceededEvent
15.2.2
When authentication succeeds.
Geocortex.Essentials.Client.Infrastructure.Events. AuthenticationEventArgs
EditingEvents Editing events fire when users interact with editing tools in the Viewer. Event
Occurs...
Arguments
CopyFeatureCompleteEvent
When a copy feature operations completes successfully.
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events.SaveEditsEventArgs
CopyFeatureFailedEvent
When a copy feature operation fails.
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events.SaveEditsFailedEventArgs
CopyFeatureStartedEvent
When a copy feature operation begins.
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events.CopyFeatureStartedEventArgs
EditLayerChangedEvent
When the visibility of the current edit layer changes.
System.EventArgs
233 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
15.2.3 FeatureEvents
15.2.3
FeatureEvents FeatureEvents fire when users interact with features in the Viewer.
15.2.4
Event
Occurs...
Arguments
BufferFeatureCompleteEvent
When a buffer feature operation is completed.
IList
FeatureExecuteEvent
When a user double-clicks a feature.
Geocortex.Essentials.Client.Infrastructure.Events. FeatureSelectEventArgs
FeatureHoverEvent
When a user hovers over a feature.
Geocortex.Essentials.Client.Infrastructure.Events. FeatureSelectEventArgs
FeatureSelectEvent
When a user selects a feature.
Geocortex.Essentials.Client.Infrastructure.Events. FeatureSelectEventArgs
FeatureSetManagerEvents The FeatureSetManager handles the flow of feature sets within the Viewer. Feature sets are created by both the Search and Identify modules, and can also be generated by Workflow operations. The FeatureSetManager has a default feature set, which is currently used by the Viewer. The ResultsView Module accepts the feature sets and displays them in the viewer. The FeatureSetManager events are fired as FeatureSets and are manipulated within the FeatureSetManager . Event
Occurs...
Arguments
FSMActiveCollectionChangedEvent
When the active FeatureSet collection changes.
Geocortex.Essentials.Client.Infrastructure.Events. FeatureSetManagerEventArgs
FSMCollectionAddedEvent
When a FeatureSet collection is added.
Geocortex.Essentials.Client.Infrastructure.Events. FeatureSetManagerEventArgs
| 234
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Event
Occurs...
Arguments
FSMCollectionChangedEvent
When a FeatureSet collection hosted by the
Geocortex.Essentials.Client.Infrastructure.Events. FSMCollectionChangedEventArgs
feature set manager changes.
15.2.5
FSMCollectionClosedEvent
When a FeatureSet collection is closed.
Geocortex.Essentials.Client.Infrastructure.Events. FeatureSetManagerEventArgs
FSMCollectionOpenedEvent
When a FeatureSet collection is opened.
Geocortex.Essentials.Client.Infrastructure.Events. FeatureSetManagerEventArgs
FSMCollectionRemovedEvent
When a FeatureSet collection is removed.
Geocortex.Essentials.Client.Infrastructure.Events. FeatureSetManagerEventArgs
FSMDefaultCollectionChanged Event
When the default FeatureSet collection is
Geocortex.Essentials.Client.Infrastructure.Events. FeatureSetManagerEventArgs
changed.
LayerThemeEvents LayerThemeEvents occur before or after a layer theme has changed. You can get the old and new themes from different parameters at the time of the change. Event
Occurs...
Arguments
LayerThemeChangingEvent
Just before a theme is changed. At this point, the theme
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events. LayerThemeChangingEvent
property will be set, but the theme is not yet applied to the map. You can get the new theme from
LayerThemesInfo.Active and the old theme from LayerThemesInfo.Previous. LayerThemeChangedEvent
Just after a theme is changed. At this point, the theme has been applied to the map. You can get the new theme from
LayerThemesInfo.Active and the old theme from LayerThemesInfo.Previous.
235 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events. LayerThemeChangedEvent
15.2.6 MapEvents
15.2.6
MapEvents MapEvents are fired when something happens within the Viewer’s map. Typically, the event arguments passed to the event handler contain a reference to where the event occurred. Event
Occurs...
EsriMapLayerPropertyChange When the visibility or opacity of an Esri map layer d changes. Event
MapExtentChangedEvent
When the map extent has changed and a pan or zoom is completed.
Arguments
Geocortex.Essentials.Client.Infrastructure.Events. EsriMapLayerPropertyChanged EventArgs Geocortex.Essentials.Client.Infrastructure.Events. MapExtentEventArgs
MapExtentChangingEvent
When the map extent is changing.
Geocortex.Essentials.Client.Infrastructure.Events. MapExtentEventArgs
MapFilesDroppedEvent
Occurs when files are dropped on the map control.
Geocortex.Essentials.Client.Infrastructure.Events.EventPay load >
MapGotFocusEvent
When the map gets user input focus.
Geocortex.Essentials.Client.Infrastructure.Events. MapFocusEventArgs
MapHoverBeginEvent
When the user hovers over one spot in the map.
Geocortex.Essentials.Client.Infrastructure.Events. MapHoverEventArgs
MapHoverEndEvent
When the user moves the cursor after a
Geocortex.Essentials.Client.Infrastructure.Events. MapHoverEventArgs
MapHoverBeginEvent has been raised.
MapKeyDownEvent
When the user presses a key down while the map has focus.
Geocortex.Essentials.Client.Infrastructure.Events. MapKeyEventArgs
| 236
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Event
Occurs...
Arguments
MapKeyUpEvent
When the user raises as key while the map has focus.
Geocortex.Essentials.Client.Infrastructure.Events. MapKeyEventArgs
MapLayerPropertyChangedEve When a property of a Geocortex Essentials layer object Geocortex.Essentials.Client.Infrastructure.Events. is changed. nt MapLayerPropertyChanged EventArgs MapLostFocusEvent
When the map loses user input focus.
Geocortex.Essentials.Client.Infrastructure.Events. MapFocusEventArgs
MapMouseClickedEvent
When a user clicks on the map.
Geocortex.Essentials.Client.Infrastructure.Events. MapMouseClickedEventArgs
MapMouseLeftButtonDownEven When a user presses the left mouse button t
Geocortex.Essentials.Client.Infrastructure.Events. MapMouseButtonEventArgs
MapMouseLeftButtonUpEvent
When a user raises the left mouse button.
Geocortex.Essentials.Client.Infrastructure.Events. MapMouseButtonEventArgs
MapMouseMoveEvent
When the user moves the mouse cursor over the map
Geocortex.Essentials.Client.Infrastructure.Events. MapMouseEventArgs
surface
MapMouseRightButtonDown Event
When a user presses the right mouse button.
MapMouseRightButtonUpEvent When a user raises the right mouse button.
MapProgressEvent
As the map loads resources such as tiles or layer metadata.
237 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
Geocortex.Essentials.Client.Infrastructure.Events. MapMouseButtonEventArgs Geocortex.Essentials.Client.Infrastructure.Events. MapMouseButtonEventArgs Geocortex.Essentials.Client.Infrastructure.Events. MapProgressEventArgs
15.2.7 MarkupEvents
Event
Occurs...
Arguments
MapResolutionChangedEvent
When the Resolution of the map has changed, usually
Geocortex.Essentials.Client.Infrastructure.Events. MapResolutionEventArgs
directly after a MapExtentChangedEvent.
15.2.7
15.2.8
MapServicePropertyChanged Event
When a property of a map service is changed.
Geocortex.Essentials.Client.Infrastructure.Events. MapServicePropertyChanged EventArgs
MapTimeExtentChanged Event
When the time extent is changed on a map.
Geocortex.Essentials.Client.Infrastructure.Events. MapServicePropertyChanged EventArgs
MarkupEvents Event
Occurs...
Arguments
MarkupChangedEvents
When a markup graphic changes
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events. MarkupChangedEventArgs.
NamedEventAttribute Event
Occurs...
Arguments
NamedEventAttribute
Identifies an event as a named event so that it can be
The name of the event.
used in places like configuration, JavaScript, and workflow.
15.2.9
ProjectProgressEvent Event
Occurs...
Arguments
ProjectProgressEvent
Occurs periodically to publish information about the
Geocortex.Essentials.Client.Infrastructure.
| 238
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Event
Occurs...
Arguments
status of a project.
Events.ProjectProgressEventArgs
15.2.10 QueryEvents Event
Occurs...
Arguments
QueryCompletedEvent
When a query has completed execution.
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events.QueryCompletedEventArgs
Event
Occurs...
Arguments
SearchProgressEvent
Occurs periodically to publish information about the
Geocortex.Essentials.Client. Infrastructure.Events. SearchProgressEventArgs
15.2.11 SearchProgressEvent
status of a search task.
15.2.12 SiteEvents The Site Module manages a Geocortex Essentials site that is used by many Modules within the Viewer. Before the site can be used, it must be initialized. Sometimes the initialization fails. SiteEvents let those consumers know when these are happening within the site. Event
Occurs...
Arguments
InitializationActivityEvent
To indicate that initialization activities are
Geocortex.Essentials.Client.Infrastructure.Events. nitializationActivityEventArgs
happening and so the site should not be timed out.
LayerCollectionChangedEvent
When a map's layer collection changes.
Geocortex.Essentials.Client.Infrastructure.Events. LayerCollectionChangedEventArgs
LayerInitializedEvent
When a layer is initialized.
Geocortex.Essentials.Client.Infrastructure.Events. LayerInitializedEventArgs
239 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
15.2.13 ToolEvents
Event
Occurs...
Arguments
LayerInitializationFailedEvent
When a layer fails to initialize.
Geocortex.Essentials.Client.Infrastructure.Events. LayerInitializationFailedEventArgs
ServiceLayersInitializedEvent
When all the layers have been initialized.
Geocortex.Essentials.Client.Infrastructure.Events. ServiceLayersInitializedEventArgs
ServiceLayersLoadedEvent
When the site has successfully completed initialization.
Geocortex.Essentials.Client.Infrastructure.Events. ServiceLayersLoadedEventArgs
When a site has completed its initialization
Geocortex.Essentials.Client.Infrastructure.Events.
SiteInitializedEvent
process and all service layers have been loaded. SiteInitializedEventArgs
SiteInitializationFailedEvent
When a site has failed to initialize, or the initialization process has timed out.
15.2.13
Geocortex.Essentials.Client.Infrastructure.Events. SiteInitializationFailedEventArgs
ToolEvents The tools on the toolbar fire events that can be listened to. For example, your Module may wish to cancel whatever it is doing when a tool starts to execute. Event
Occurs...
Arguments
ActiveToolChangedEvent
When the currently active tool changes.
Geocortex.Essentials.Client.Infrastructure.Events. ActiveToolChangedEventArgs
ToolBeginEvent
When the currently active tool begins a map interaction.
Geocortex.Essentials.Client.Infrastructure.Events. ToolEventPayload
ToolCompleteEvent
When the currently active tool completes a map
Geocortex.Essentials.Client.Infrastructure.Events. ToolEventPayload ToolVertexAddedEvent
When the currently active tool adds a vertex through map interaction.
Geocortex.Essentials.Client.Infrastructure.Events. ToolEventPayload
15.2.14 ThirdPartyMapIntegration Event
Occurs...
Arguments
ViewerPositionUpdatedEvent
When the Viewer position is updated. The event is
Geocortex.Essentials.Client.Infrastructure.Events. ViewerPositionUpdatedEventArgs
fired by the WebMapIntegration module.
15.2.15 UIEvent
15.2.16
Event
Occurs...
Arguments
ViewShownEvent
When a view is shown by the framework.
Geocortex.EssentialsSilverlightViewer. Infrastructure.Events.ViewShownEventArgs
WorkflowEvents The Geocortex Viewer for Silverlight integrates with Geocortex Essentials Workflow. When a workflow is being executed, various events are fired. Event
Occurs...
Arguments
WorkflowActivityCompletedEvent
When a Workflow activity completes.
Geocortex.EssentialsSilverlightViewer Infrastructure.Events.WorkflowCompletedEventArgs
WorkflowCompletedEvent
When a Workflow completes.
Geocortex.EssentialsSilverlightViewer
241 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved
15.2.16 WorkflowEvents
Event
Occurs...
Arguments
Infrastructure.Events.WorfklowActivity CompletedEventArgs
| 242
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
16
16.1
Getting Help Help and Resources Below is a list of options for finding help and support if this guide does not provide the information you need.
16.1.1
Resource Centers These resources are available online: l
The Geocortex Silverlight API Resource Center (http://resources.geocortex.com/essentials/apis/silverlight/) contains information on using the Geocortex Silverlight API for custom development.
l
The ArcGIS API for Microsoft Silverlight (http://help.arcgis.com/en/webapi/silverlight/index.html). Contains information on using the ArcGIS API for Microsoft Silverlight for custom development.
l
The Microsoft Silverlight Web Site (http://www.microsoft.com/silverlight). Contains detailed information about Microsoft Silverlight.
16.1.2
Geocortex Essentials Discussion Forum The Geocortex Support Center (http://support.latitudegeo.com/) has a discussion forum where you can post questions and suggestions. The Support team monitors the forum closely and responds to posts either via the forum or by email for detailed responses.
16.1.3
Support: Email If you have a question that is not suitable for posting to the forum, please send an email to [email protected] . The Support team will respond by email.
16.1.4
Send Log Files The Support team may ask you to email your Viewer's log files to help solve an issue. Zipped files that are greater than 4 GB may not extract correctly.
To Send a Log File: 1. To create a log file to email, launch the Viewer, and go through the steps to reproduce the problem. 2. Hold down the Shift key and press Esc twice to display a list of log entries. 3. For each row in the log, you can click on an entry to display more information about it in the panel below.
243 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
16.2 Related Documents
Log Entries in the Browser 4. To export the file, click Export. 5. Give the file a name and save it to your desktop or another location that is easy to find. 6. Attach the exported file to an email and send it to [email protected] . If the file is large, you may need to compress it.
16.2
Related Documents These documents provide information about the l
Geocortex Viewer for Silverlight Installation Guide : Contains information on how to install the Silverlight Viewer.
l
Geocortex Viewer for Silverlight Administrator and Developer Guide (this document): Contains information on installation, configuration, and custom development of the Silverlight Viewer.
l
Geocortex Essentials Installation Guide: Provides instructions for installing Geocortex Essentials and performing post installation configuration, including activation, re-licensing, migrating sites, and configuring IIS settings for Essentials web components. This guide is used for all Geocortex Essentials installations.
l
Geocortex Essentials Administrator Guide: Describes the architecture of Geocortex Essentials and the key concepts that administrators need to be familiar with to effectively configure Essentials; also provides instructions for configuring and managing sites. This guide is available through the Windows Start menu, provided you have installed the components required for Geocortex Essentials.
| 244
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
l
Geocortex Essentials Manager Help System: Geocortex Essentials Manager is used to configure Essentials sites. In addition to instructions for configuring and managing sites, the built-in help system provides some background information on Essentials features and how they are used. The Geocortex Essentials Manager help system is launched by clicking the Application Help hyperlink in the Manager interface.
l
Geocortex Resource Center: Provides information on the Geocortex Essentials JavaScript and Silverlight client APIs and the server-side architecture that supports them. For the client APIs, the Resource Center provides conceptual discussion of the APIs, thoroughly commented code samples, live samples to run, and complete API references. Documentation for the server side includes conceptual discussions of Essentials and the REST interface that the client APIs interact with, a reference for the REST API, and tutorials for advanced topics such as extending Geocortex Essentials with custom functionality. Although directed primarily at developers, the Resource Center might also be of interest to site administrators and the personnel responsible for evaluating and purchasing GIS tools. The Resource Center is available at http://resources.geocortex.com/.
l
Geocortex Workflow Designer User Guide: Workflow Designer User Guide provides conceptual information about workflows and instructions for creating workflows.
16.3
Provide Feedback on Documentation Please send comments, suggestions, or feedback on the Geocortex product documentation to [email protected] .
17
Glossary ArcGIS Server. Software that makes it possible to create GIS services over the web for web mapping applications. Bootstrapper. The component used by the application to initialize the Viewer and services. It is also used to initialize the dependency injection container to register any application-level components and services with it. It is also configures and initializes the module catalog and the Shell's View and View Model. Commands. Commands are used to encapsulate application functionality in a way that allows them to be defined and tested independently of the application's UI. They can be defined as command objects or as command methods in the View model. Prism provides the DelegateCommand class and the CompositeCommand class. The
CompositeCommand class represents a collection of commands which are all invoked together. Epoch Time. See Unix Time. EventAggregator. Components in an application that communicate with other components and services in the application in a loosely coupled way. To support this, Prism provides the EventAggregator component, which implements a pub-sub event mechanism, to allow some components to publish events and other components to subscribe to those events without either of them needing to reference the other. GIS. Geographic Information System, a system that captures, analyzes or manages data that is linked to a location on a map. KML. Keyhole Markup Language - a schema for rendering geographic markup on web-based maps. Based on XML. See also: OGC. Map. The maps referred to in this application are web-based maps, which are fundamentally different from paperbased maps in that they are both interactive and searchable. Web maps contain data in many forms, which can be searched, annotated and used for analysis and decision-making.
245 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.
17 Glossary
Web maps are also referred to as base maps and operational maps. Base maps supply background and contextual information in layers. Base maps usually contain information about features or structures that do not change often like highways, rivers, mountains, and borders. Operational maps often contain layers with additional data used for specific tasks like tracking, research, or analysis. The data in operational maps is usually within a specific area of interest, for example forestry, population, or earthquake incidents and are used to highlight quantities, densities, or distribution. Operational layers are usually added to base maps which provide a contextual background for the operational information. Map Service. A map service is how most maps are published over the Internet. Maps are generated by a map server using data from GIS database. Well-known maps services include ArcGIS, Google Maps, Bing, and MapQuest but there are many others. Most map services work with Global Positions Systems (GPS) to provide position data. Map services can be used by many different client applications. Tools and specifications such as Keyhole Markup Language (KML) and Open Spatial Consortium (OGC) have made it easier for applications to use map services by providing common languages and standards for rendering maps. A dynamic map service is where the server draws maps on demand, which means that the map is re-drawn each time the user zooms or pans. A cached map service, is a set of tiled map images that are pre-rendered so that they display rapidly. Cached maps are created at specified scale levels and stored on a server (server-side cache) or locally. Cached maps can be a higher quality and use features like 3D and transparency. Modules. Are packages of functionality that can be independently developed, tested, and deployed. In many situations, modules are developed and maintained by separate teams. A typical application is built from multiple modules. Modules can be used to represent specific business-related functionality (for example, the toolbar) and encapsulate all the Views, Services, and Data models needed to implement that functionality. Modules also encapsulate common application infrastructure or services (for example, logging and exception management services) that can be reused across multiple applications. OGC. The Open Spatial Consortium is an international organization that sets standards for geospatial services and content, data sharing and GIS data processing. They have issued over 30 standards including: l
GML - Geography Markup Language: XML-format for geographical information.
l
KML - Keyhole Markup Language: XML-based language schema for expressing geographic annotation and visualization.
l
WFS - Web Feature Service: describes a service for the discovery, querying of, and operations for the transformation of data.
l
WMS - Web Map Service: a standard protocol for serving dynamic geographical map images over the Internet that are generated by a map server.
l
WMTS - Web Map Tile Service: a standard for implementing servers to deliver tiled maps.
Regions. Regions are logical placeholders defined within the application's UI (in the shell or within views) in which Views are displayed. Regions allow the layout of the application's UI to be updated without requiring changes to the application logic. Many common controls can be used as a region, allowing Views to be automatically displayed within controls, such as a ContentControl , ItemsControl , ListBox , or TabControl . Views can be displayed within a Region programmatically or automatically. Regions can be located by other components through the RegionManager component. REST. The Representational State Transfer provides a simple, open Web interface to services hosted by ArcGIS Server. All the resources and operations exposed by the REST API are accessible through a hierarchy of endpoints or Uniform Resource Locators (URLs) for each GIS service published with ArcGIS Server.
| 246
Geocortex.Viewer for Silverlight.1.9.Administrator and Developer Guide
Shell. The shell is the host application into which modules are loaded. The Shell defines the overall layout and structure of the application, but it is typically unaware of the exact modules that it hosts. It usually implements common application services and infrastructure, but most of the application's functionality and content is implemented within the modules. The Shell also provides the top-level window or visual element that hosts the different UI components provided by the loaded modules. Unix Time. The number of milliseconds since the "epoch", Jan. 1, 1970 at midnight (UTC). Unix time is a common way for software to store times internally. To convert between human-readable times and Unix time, use a converter like http://www.epochconverter.com/. URI. A Uniform Resource Identifier is a string of characters used to identify a name or a resource on the Internet. The identifier enables interactions over the Internet using protocols. URIs are classified as locators (URLs), or as names (URNs), or as both. A Uniform Resource Name (URN) functions like a person's name, while a Uniform Resource Locator (URL) resembles that person's street address. In other words, the URN defines an item's identity, while the URL provides a way to find it. UTC. Closely related to Greenwich Mean Time, Coordinated Universal Time (UTC) is the primary time standard by which clocks and time are regulated. Viewed as a time zone, the United Kingdom is UTC+0, New York is UTC-05:00 (subtract 5 hours from UTC time), and the Netherlands is UTC+01:00 (add one hour to UTC time). UTM. Universal Transverse Mercator geographic coordinate system. A transverse Mercator projection orients the equator north-south through the poles, providing a north-south swath with little distortion. The orientation of the cylinder onto which the map is projected, is changed slightly for each swath. This creates relatively undistorted regions. Each swath is called a UTM zone and is 6 degrees of longitude wide. Views. Views are UI controls that encapsulate the UI for a particular feature or functional area of the application. Views are used in conjunction with the MVVM or Model-View-Presenter (MVP) patterns, which are used to provide a clean separation of concerns between the UI and the application's presentation logic and data. Views encapsulate the UI and define user interaction behavior, allowing the View to be updated or replaced independently of the underlying application functionality. Views use data binding to interact with the View model and presenter classes. WFS. Web Feature Service: describes a service for the discovery, querying of, and operations for the transformation of data. WMS. Web Map Service - a widely supported format for web-based maps and a standard issued by the OGC on the implementation of dynamic map services. See also: OGC. WMTS. Web Map Tile Service: a standard for implementing servers to deliver tiled maps.
247 | © 2013 Latitude Geographics Group Ltd. All Rights Reserved.