"ShowFeatureDetails" Command Zooms Unintentionally
The problem is that clicking on a feature in the results panel zooms to the feature and shows it's detials. It should not zoom as there is no zoom command in the behaviours. Please note the config exert below.
In the "Results" module I have the configuration set up like this:
...
"behaviors": [
{
"name": "ResultsListFeatureClickedBehavior",
"event": "ResultsListFeatureClickedEvent",
"commands": [
"ShowFeatureDetails"
]
},
{
"name": "ResultsListFeaturePressedBehavior",
"event": "ResultsListFeaturePressedEvent",
"commands": [
"ShowFeatureDetails"
]
},
...
Does anyone know how to show the feature details _without_ zooming?
GE 4.4
GE HTML5 Viewer 2.5.2
0
-
The FeatureDetails module has a ZoomToFeature behavior and that is probably what is being triggered. 0 -
Hi Matthew and Dan,
Dan has it right. In my case, I removed the ZoomToFeature line from the command section of FeatureDetailsOpenedBehavior, and the viewer no longer zoomed to the feature when I clicked it in the results pane. If you search for FeatureDetailsOpenedBehavior in the json.js files, you should get only one result which will look like the block below:"name": "FeatureDetailsOpenedBehavior", "event": "FeatureDetailsCurrentFeatureChanged", "commands": [ "ZoomToFeature", "SetActiveHighlightLayerDefault", "ClearHighlights", "HighlightFeature" ]
Thanks!
Danny0 -
Hey Danny, thanks for the dirrection. That worked for me. Need to think out of the box more ---> don't believe I didn't take event based commands into account XD 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer