Set max Zoom in level and changing annotation image for feature layer

2639
4
03-23-2014 11:44 PM
PrasadPotale
New Contributor
Hello All,

1. I am trying to show LA street lights data in iOS map, i have used "http://www.arcgis.com/home/item.html?id=fbea2cb239004e6ba4c4f01eb809bba4" for reference, so in iOS app loading webmap using following method

self.webmap = [AGSWebMap webMapWithItemId:@"fbea2cb239004e6ba4c4f01eb809bba4" credential:nil];

I can zoom in map and its showing street lights data properly.

Now i would like to change its base map, so for that i have adding tiled map layer using following method

AGSTiledMapServiceLayer *tiledLayer =
    [AGSTiledMapServiceLayer
     tiledMapServiceLayerWithURL:[NSURL URLWithString:@"http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"]];
    [self.mapView addMapLayer:tiledLayer withName:@"Basemap Tiled Layer"];


Its loading properly, but problem which i am facing is, its not further zoom in after specific zoom in level.
i have tried by using "zoomToEnvelpe" its working fine if above tiled layer is not used.

2. Also my another question is, Is it possible to change default annotations (pins) shown in above webmap created with id "fbea2cb239004e6ba4c4f01eb809bba4", if not what is the approach that i can use so i can load different annotations.

Any help really appreciated.

Thanks.
0 Kudos
4 Replies
DiveshGoyal
Esri Regular Contributor
1).  You can try overriding the map's maxScale or minResolution property to allow you to zoom in beyond the canvas basemap's most detailed level. Note, when you do this, the tiles will be resampled when you zoom in beyond the last level and may appear pixelated, but it will allow you to zoom in enough to see the light poles layer.

2) You have a couple of options here. You can make a copy of the webmap in your Arcgis online account and change the symbology there. Then when you open your webmap copy, it'll have the updated symbology. Or you can continue using the existing web map but override the symbology in your app. To do this, find the AGSFeatureLayer representing the light poles layer in the AGSMapView, and override the renderer.
0 Kudos
PrasadPotale
New Contributor
1).  You can try overriding the map's maxScale or minResolution property to allow you to zoom in beyond the canvas basemap's most detailed level. Note, when you do this, the tiles will be resampled when you zoom in beyond the last level and may appear pixelated, but it will allow you to zoom in enough to see the light poles layer.

2) You have a couple of options here. You can make a copy of the webmap in your Arcgis online account and change the symbology there. Then when you open your webmap copy, it'll have the updated symbology. Or you can continue using the existing web map but override the symbology in your app. To do this, find the AGSFeatureLayer representing the light poles layer in the AGSMapView, and override the renderer.


Hello Divesh, thanks a lot for reply,
As you have suggested i have changed annotation symbology from online arcgis account.
Now it looks good, not found minResolution method and maxScale in AGSMapView class, but now its not necessary as i have used world topography map , and its not have any zooming issue.
But now i am facing a different problem if i touch on annotation it shows proper annotation callout, but if i click on blank area it shows annotation with "IN" text. 
[ATTACH=CONFIG]32482[/ATTACH]
It dose not show any callout on browser for that web map.
0 Kudos
DiveshGoyal
Esri Regular Contributor
Thats probably coming from another layer in your map.
You can loop through each layer in the map and disable the allowCallout property for layers you don't want to display a callout for.
0 Kudos
SusannaMoore
New Contributor

Can i set different image zoom values and change annotation image for different layers?

0 Kudos