AGSWMTSLayer and AGSWMTSInfo not working in iOS

5072
4
04-21-2013 02:58 AM
MikkoKutilainen
New Contributor
Hi,
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:@"http://v2.suite.opengeo.org/geoserver/gwc/service/wmts/"]];
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
LEFEBVREJean-Philippe
New Contributor
Same for me ! If anyone has a solution...

Thanks.
0 Kudos
SuganyaBaskaran1
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.

Thanks,
Suganya
0 Kudos
RoshnaDsouza
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
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Mikko,

I use this syntax can successfully view this AGSWMTSLayer:

AGSWMTSLayer *wmtsLayer = [AGSWMTSLayer wmtsLayerWithUrl:[NSURL URLWithString:@"http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts"] title:@"topo2" imageFormat:AGSImageFormatJPG tileMatrixSet:@"EPSG:32633"];

However, when I switch to this wmtslayer it doesn't work: http://v2.suite.opengeo.org/geoserver/gwc/service/wmts/

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