setMaxExtent on ArcGISTiledMapServiceLayer does not work

1548
0
03-23-2016 04:17 PM
Shaulezrac
New Contributor

In my app i'm using ESRI web service maps:

http://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer

I'm loading the map into a ArcGISTiledMapServiceLayer layer and when the event for Layer loaded is up, i set the extent & scale as so:

double minscale = layer.getMinScale();
double maxscale = layer.getMaxScale();
CustomMapView.this.setMaxScale(maxscale);
CustomMapView.this.setMinScale(minscale);

Envelope boundaries = layer.getFullExtent();
CustomMapView.this.setMaxExtent(boundaries);

But it doesn't work, and i can pan up and down to see the square grid.

Why is that?

How do i fix it?

2016-03-23 12.41.53.png

0 Kudos
0 Replies