majorl3oat

Custom layer

Discussion created by majorl3oat on Jun 4, 2013
Latest reply on Jun 19, 2013 by njarecha-esristaff
Hi,

    I'm developing map iOS app using Arcgis sdk. I googled around with no luck. What I have is tile server which have to call by get method    

Host:
    https://servername?api=tile

and parameter like:
    "x=%@&y=%@&z=%@", x, y, z

to get tile image. and output of api is rawdata of tile image (NSData) what should I do for using Arcgis.

PS. The way I use with MapKit is like this:
    [self.map addOverlay:tileOverlay];
but ArcGIS has no overlay? just only addMapLayer? so I google and found keyword like custom layer.

What I have
API URL for get tile.

What I need to do.
1. Create custom layer
2. Get x, y, z to send to api for geting tile.

What server return
An encrypt image rawdata. So I need to decrypt it before using.

Can someone help me out please.

Thanks in advance.


EDIT:
I found this post
http://forums.arcgis.com/threads/60285-How-do-I-create-a-layer-that-is-generated-from-an-image

my case just kind of this. But I cannot follow what in this post wrote.

EDIT2:
For more information I found this post
in this link -> http://forums.arcgis.com/threads/38835-custom-tiled-layer-sample-has-nsgenericexception

thanks Nimesh,

AGS api version 2.0,
ios 4.3



images from web:

NSString* dir = [_allLayersPath stringByAppendingFormat:@"/%@/%@/%@.png",decLevel,hexRow,hexCol];
//NSLog(dir);
_tile.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:dir]]];

it works well until the exception happen.

I just want sth. like this, ARCGIS 10.1 is still allow sth. like this?

Outcomes