AGSWMTSLayer and AGSWMTSInfo not working in iOS

04-21-2013 02:58 AM
New Contributor
I am trying to initialize AGSWMTSInfo but I can't get it to work. There is my code:

AGSWMTSInfo *wmtsinfo = [[AGSWMTSInfo alloc] initWithURL:[NSURL URLWithString:@""]];
wmtsinfo.delegate = self;

The delegate never get called and I can't get the AGSWMTSLayerInfo in order to init the layer. What is wrong?
0 Kudos
4 Replies
New Contributor
Same for me ! If anyone has a solution...

0 Kudos
Esri Contributor
Hi -
Can you create a property for wmtsInfo instead of a local variable?
That way, it has a strong reference to the delegate as well as it is retained, and so the delegate methods are called.

Hope this helps.

0 Kudos
New Contributor

I am having the same problem. I have created a property . Still I can only see the grids of the map,.

When I check the requests (using wireshark) I see the url request isnt formed properly. (Compared with Android.)

Can anyone help ?

0 Kudos
Regular Contributor

Hi Mikko,

I use this syntax can successfully view this AGSWMTSLayer:

AGSWMTSLayer *wmtsLayer = [AGSWMTSLayer wmtsLayerWithUrl:[NSURL URLWithString:@""] title:@"topo2" imageFormat:AGSImageFormatJPG tileMatrixSet:@"EPSG:32633"];

However, when I switch to this wmtslayer it doesn't work:

AGSWMTSLayer *wmtsLayer = [AGSWMTSLayer wmtsLayerWithUrl:[NSURL URLWithString:wmtsURL] title:@"Countries of the World" imageFormat:AGSImageFormatJPEG tileMatrixSet:@"EPSG:4326"];

I use Charles, a proxy debug tool found that error is 500, said default while fetching modifiable parameters for LAYER opengeo:countries

(as screenshot) I will try to see if I got any luck. But one thing for sure the syntax is fine but specific to WMTSLayer.

Screen Shot 2015-02-18 at 5.44.12 PM.png

0 Kudos