Scale Dependent Rendering for Feature Layers not Working

3594
7
Jump to solution
04-10-2012 10:37 AM
DonSusini
New Contributor II
I am having an issue where feature layers are rendering at all scales.  The layers have been setup with a minimum scale of 1200, and I can see the value of 1200 when I examine the "minScale" property of the feature layers within the app.  I know it is setup correctly server-side because if you load the feature layers into an ArcGIS.com map, scale-dependent rendering works just fine.  I did notice that if I check the value of the "mapScale" property on my AGSMapView it is always set to NaN.

I've tried explicitly scaling the map to see if I can get that mapScale property to change, but it always remains NaN.  I've been searching for days now trying to figure this out, has anyone ever come across this issue or have any ideas that I could try?  I appreciate any help.

Thanks!
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
Is your feature layer a base layer (first layer in the map view)? If yes, you should just add one tiled or dynamic layer as base layer and make feature layer as operational layer.

Regards,
Nimesh

View solution in original post

0 Kudos
7 Replies
NimeshJarecha
Esri Regular Contributor
Is your feature layer a base layer (first layer in the map view)? If yes, you should just add one tiled or dynamic layer as base layer and make feature layer as operational layer.

Regards,
Nimesh
0 Kudos
DonSusini
New Contributor II
Is your feature layer a base layer (first layer in the map view)? If yes, you should just add one tiled or dynamic layer as base layer and make feature layer as operational layer.

Regards,
Nimesh


I have a tiled map layer followed by several feature layers.  I did have to put a few polygon feature layers under the tiled layer because they were covering labels on the tiled map layer.  Is that the problem?  If so, how do I handle the polygon feature layers covering the labels on the tiled layer (they consist of street, building, sidewalk polygons etc.).  Labels don't show in feature layers, correct?  The reason these have to be individual feature layers is so that I can do queries, etc.

Again, I appreciate the help.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Okay..let's look at two issues one by one.

1. Does adding feature layers on TOP of tiled layer resolves the scale dependent issue?
2. If yes, you should set the transparency on the feature layer view to resolve tiled layer label display issue. Here is the code...

UIView<AGSLayerView> *flView = [self.mapView addMapLayer:self.featureLayer withName:@"Feature Layer"];
flView.alpha = 0.5;


Regards,
Nimesh
0 Kudos
DonSusini
New Contributor II
Okay..let's look at two issues one by one.

1. Does adding feature layers on TOP of tiled layer resolves the scale dependent issue?
2. If yes, you should set the transparency on the feature layer view to resolve tiled layer label display issue. Here is the code...

UIView<AGSLayerView> *flView = [self.mapView addMapLayer:self.featureLayer withName:@"Feature Layer"];
flView.alpha = 0.5;


Regards,
Nimesh



1. Yes, fixed...will mark previous post as the answer.
2. In theory, this layer doesn't need to be visible at all, so I can set it's alpha to something really small.  I'll give it a shot. 

Thank you for all of your help.  I would have never thought that the base layer would affect the scale-dependency in that way.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Great! If layer need not be visible at all times then you can set "flView.hidden = TRUE;"

Regards,
Nimesh
0 Kudos
LukePhilips
New Contributor III
Along the lines of this thread, if I have a featureLayer that has a predefined max-scale from the service and I want to override that, I could set
self.featureLayer.maxScale = 144447.638572;
correct? If so, doesn't seem to work.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Yes, correct! It should work but ONLY if you are setting the value after feature layer is finished loading. Otherwise, server returned value will override your setting.

Regards,
Nimesh
0 Kudos