FeatureActions - Zoom
I'm trying to configure my desktop.json.js file to alter the feature action commands. Primarily the zoom to feature action item.
"id": "FeatureActions",
"description": "@language-feature-actions-description",
"moduleId": "FeatureDetails",
"defaultIconUri": "Resources/Images/Icons/check-24.png",
"items": [
{
"text": "@language-feature-layer-edit",
"description": "@language-feature-layer-edit-desc",
"iconUri": "Resources/Images/Icons/arrow-right-alt-24.png",
"command": "StartEditingFeature",
"hideOnDisable": true
},
{
"text": "@language-native-attach-file",
"description": "@language-native-file-from-browser",
"iconUri": "Resources/Images/Icons/Toolbar/attach-file-photo-24.png",
"command": "AttachFileToFeature",
"hideOnDisable": true
},
{
"text": "@language-menu-zoom",
"description": "@language-menu-zoom-description",
"iconUri": "Resources/Images/Icons/arrow-right-alt-24.png",
"command": "ZoomToScale",
"commandParameter": "1:500"
"hideOnDisable": true
I've added the two bolded text items to allow the feature to zoom in beyond the default setting, but after I add these two lines the viewer doesn't even open...!!!
Any ideas....Walter
-
Hi Walter,
It looks like a couple of things are going on:
1. A comma is missing after "commandParameter": "1:500"
2. According to the HTML5 admin guide, the command parameter should only be the denominator, so it should look like "commandParameter": "500",
Cheers,
-Darren
0 -
Darren,
thanks for your response. I'll give that a try tomorrow.
Walter
0 -
A lot of us developers here @ Latitude use (http://jsonlint.com/) JSONLint , it's great for verifying that your JSON configs are syntactically correct. Highly suggest!
0 -
Gents,
The proper syntax that Darren provided worked, it that the viewer didn't complain about any issues. But my objective was to over ride the zoom scale
and i was wishing that the Action: Zoom to Feature would take me beyond that, which it did not. Here's a portion of my config file:
"text": "@language-menu-zoom",
"description": "Zoom to Cemetery Plot",
"iconUri": "Resources/Images/Icons/arrow-right-alt-24.png",
"command": "ZoomToScale",
"commandParameter":"500",
"hideOnDisable": trueWalter
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare