WPF, Scale and Resolution

3221
2
08-30-2011 01:59 AM
Labels (1)
AvnerKashtan
New Contributor II
Hello,

I'm trying to replicate the behavior of ArcClient, where layers are automatically hidden or shown based on the current zoom level/map scale. I'm getting the layers via the SOAP web service, and get the MinScale and MaxScale values.

The WPF FeatureLayer objects, though, only contain MinimumResolution/MaximumResolution properties, which aren't directly mappable to MinScale/MaxScale. Some googling led me to try adding the current display DPI into the equation, but even if I do, I can't figure out how to map between Scale and Resolution.

Can anyone help me out here?

Thanks,
   Avner
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
Support for scale dependency defined by feature layers in map/feature services will be added in the future versions of the API.
0 Kudos
GarySinner
New Contributor III
Hi Jennifer,

A follow up question on this topic.  Looks like 2.3 added support for scale dependency for dynamic feature layers.  But it looks like the map�??s minimum resolution still only looks at the minimum resolution of the tiled layers on the map (http://help.arcgis.com/en/webapi/silverlight/apiref/esri.arcgis.client~esri.arcgis.client.map~minimu...).  So if the map contains both tiled layers (with a min res value) and dynamic layers (with max scale set), you�??ll only be able to zoom in as far as the minimum resolution of the tiled layer.  Is that correct?

We�??ve got a client with some facilities data that he wants to be able to zoom WAY, WAY in �?? beyond the minimum resolution of the base map tile layer.  He�??s set a max scale on the facilities layer, but can�??t zoom in far enough to get the detail he wants to see.  Appears that the tile layer is limiting how far in he can zoom.

Since the map doesn�??t appear to look at the min/max scale values for the feature layers when setting the min/max resolution for the map, I figure that I have to walk through the layers and LayerInfos to find the max scale from the layers.  Then I�??m in the same situation as Avner�??s original post �?? how can I reliably convert the max scale for a feature layer into a resolution value that I could use for setting the map�??s MinimumResolution?

Or do you have any other suggestions for setting the map�??s MinimumResolution to allow zooming in down to a feature layer�??s max scale?

Thanks,

Gary
0 Kudos