Hi
I am try to set Layer MaxScale it look like nothing happened
Dim layerName As String = Layer_HR
Dim HRLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType(Of BasicFeatureLayer)().FirstOrDefault(Function(l) l.Name.Equals(layerName))
HRLayer.SetMaxScale(501)
Thanks
Sigster
Solved! Go to Solution.
Hi,
At first, SetMaxScale must be called on MCT thread inside QueuedTask.Run.
After setting new values open layer properties and check is values are specified (general tab).
Max value must be less then min value:
I have tried vb sample from community samples with values:
multiPointLayer.SetMaxScale(1000000)
multiPointLayer.SetMinScale(5000000)
And it works as expected. It could be that your values are to small or not in expected range
Hi,
At first, SetMaxScale must be called on MCT thread inside QueuedTask.Run.
After setting new values open layer properties and check is values are specified (general tab).
Max value must be less then min value:
I have tried vb sample from community samples with values:
multiPointLayer.SetMaxScale(1000000)
multiPointLayer.SetMinScale(5000000)
And it works as expected. It could be that your values are to small or not in expected range
What is MCT thread ?
Dim layerName As String = Layer_NR
Dim NRLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType(Of BasicFeatureLayer)().FirstOrDefault(Function(l) l.Name.Equals(layerName))
QueuedTask.Run(Function()
NRLayer.SetMaxScale(1000000)
NRLayer.SetMinScale(5000000)
End Function)
MCT means that you must call method inside QueuedTask.Run. Like in your second code sample
Thanks GKmieliauskas