Pushpins Module
Pushpins are not currently supported in the Handheld interface. Adding pushpin configuration to the Handheld configuration file has no effect.
The Pushpins Module is responsible for placing a pushpin on the map. When pushpins are visible, they are placed in the center of a feature, subject to any configured offset. Pushpins can be used with geocoders and workflows.
For information about pushpin visibility for point, line, and polygon features on a map, see Pushpins.
Configuration Properties
Module
-
pushpinsEnabled
: If you want pushpins to appear for each feature of the search results, set totrue
. The default istrue
. -
pushpinsRemainVisible
: If you want pushpins to remain visible even when a view other than the Results List or Results Table activates, set totrue
. Closing the Results panel will still hide the pushpins regardless of this property. The default istrue
.In versions prior to 2.6, the default behavior was to hide pushpins when a view other than the Results List or Results Table activates. If you want the previous default behavior, set this property to
false
.This option has been deprecated effective with Geocortex Essentials 4.7 as a result of changes implemented in highlighting.
-
pushpinMarkerUri
: The URL to the image that represents the pushpin. The default is a red pushpin image located atResources/Images/Pushpins/map-marker-red-32.png
. Other colors available out-of-the-box include blue, green, purple and yellow. -
pushpinMarkerWidth
: The width of the pushpin in pixels. This is typically set to the width of the pushpin image, otherwise the image will be scaled. The default is32
. -
pushpinMarkerHeight
: The height of the pushpin in pixels. This is typically set to the height of the pushpin image, otherwise the image will be scaled. The default is32
. -
offsetX
: The number of pixels to horizontally offset the pushpin image. In other words, the distance along the X-axis between the center of the feature and the center of the pushpin image. Use a negative integer to place the pushpin to the left of the feature's center. The default is0
. -
offsetY
: The number of pixels to vertically offset the pushpin image. In other words, the distance along the Y-axis between the center of the feature and the center of the pushpin image. Use a negative integer to place the pushpin below the feature's center. The default is16
, because the pointer is at the bottom of the default image, which is 32 pixels high. -
behaviors
: An array of named behaviors that run when an associated event occurs. By default, there is a single behavior,PushpinClickedBehavior
, although several other behaviors exist that are omitted by default:-
PushpinClickedBehavior
: A behavior that runs an array of commands when the user clicks a pushpin. By default, this includes two commands:ShowMapTip
andHighlightFeatureDefault
. -
PushpinMouseLeftButtonDownBehavior
: A behavior that runs an array of commands when the left mouse button is pressed down while the mouse pointer is on a pushpin. By default, this behavior is omitted. -
PushpinMouseRightButtonDownBehavior
: A behavior that runs an array of commands when the right mouse button is pressed down while the mouse pointer is on a pushpin. By default, this behavior is omitted. -
PushpinMouseLeftButtonUpBehavior
: A behavior that runs an array of commands when the left mouse button is released while the mouse pointer is on a pushpin. By default, this behavior is omitted. -
PushpinMouseRightButtonUpBehavior
: A behavior that runs an array of commands when the right mouse button is released while the mouse pointer is on a pushpin. By default, this behavior is omitted. -
PushpinMouseEnterBehavior
: A behavior that runs an array of commands when the mouse pointer first hovers over a pushpin. By default, this behavior is omitted. -
PushpinMouseLeaveBehavior
: A behavior that runs an array of commands when the mouse pointer moves away from a pushpin it was previously hovering over. By default, this behavior is omitted.
You can remove or rearrange the commands of any behavior. You can also remove behaviors altogether.
You can add commands to a behavior if the command does not require a parameter, or if the type of the command's parameter matches the parameter of an existing command or the event associated with the behavior. Refer to "Viewer Commands and Events" in Developer Help to determine if the parameters are compatible. Note that private commands and events are not documented.
Adding a new behavior is only recommended for experienced developers.
See Viewer Commands and Events for more information.
-
Views
No views
View Models
No view models
Example - Add a Command with a Parameter to a Behavior
The following example demonstrates adding a new command with a parameter to the behavior, MapOnFeatureClickBehavior
.
To add a command with a parameter to a behavior:
-
Run an XML editor or text editor as an administrator.
-
Open one of the viewer configuration files,
Desktop.json.js
,Tablet.json.js
, orHandheld.json.js
, in the editor.By default, the configuration files are here:
C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\[instance]\REST Elements\Sites\[site]\Viewers\[viewer]\VirtualDirectory\Resources\Config\Default\
-
In the
Pushpins
module section, find thebehaviors
property. Locate the behavior you want to edit, for example,PushpinClickedBehavior
.{ "moduleName": "Pushpins", ... "configuration": { ... "behaviors": [ { "name": "PushpinClickedBehavior", "commands": [ "ShowMapTip", "HighlightFeatureDefault" ] } ] } }
The behavior executes two commands:
ShowMapTip
andHighlightFeatureDefault
. -
Refer to Viewer Commands and Events to determine the type of parameter that is associated with these commands. Both commands a parameter of type,
geocortex.essentialsHtmlViewer.mapping.infrastructure.Feature
. -
Find a command that you want to add to the behavior that has the same parameter type, for example,
PanToFeature
. -
Add the desired command to the list of commands, separated by a comma. For example:
"commands": [ "ShowMapTip", "HighlightFeatureDefault", "PanToFeature" ]
-
Save the file.