Can't get ZoomToFeature to work
After a feature point is selected and featuredetalis are shown in the resultslist, i try to press the ZoomToFeature action button at the bottom of the list. The only ting that happens is a pan to center the map on the feature. No zooming is performed. The same happens when i click a feature in the ResultsTable. The map only pans. No zoom, in spite that the ZoomToFeature-command is linked to the ResultsTableFeatureClickedEvent.
My site consists of a base layer in Web Mercator and a operational layer in GCS WGS 1984 (WKID: 4326). I have been thinking that this may have caused some trouble of getting the geometry of selected features. But the same site seems to function well with ZoomToFeature inside the Silverlight viewer.
Any Ideas? Anyone?
Kind regards, Jostein
-
What is the ResultsListFeaturePressedEvent pointing to? If you are in a Result List, then this rather than the Table event is the one it uses... Do you have a Feature Zoom Scale set in Manager?
0 -
The ResultsListFeaturePressedEvent (and -ClickedEvent) is pointing to "ShowFeatureDetails". I am in a ResultsTable (not ResultsList), and the Pressed/Clicked-events here points to "ZoomToFeature".
My point is that no matter what event that fires the ZoomToFeature-command, no zooming occurs. Only a pan.
Mike, I do not have a Fature Zoom Scale set. I didn't think I had to? When viewing the same site in the Silverlight 1.6 viewer, ZoomToFeature from the results list/results table works well.
Jostein
0 -
Jostein,
I just tested it, and the Feature Zoom Scale is being used by the HTML5 viewer. If it is not set and you are working with a point feature, then it zooms in, but not much. If you are already zoomed in beyond the level that it wants to zoom in, then it just does a pan. I find that setting the Feature Zoom Scale on points to around 1200 (one of my cache scales) works well.
Mike
0 -
Thanks Mike! Setting the Feature Zoom Scale made it all work :-)
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare