AnsweredAssumed Answered

AGSWMTSLayer is loaded but invisible. Can any one help me ?

Question asked by roshnadsouza on Feb 3, 2015
Latest reply on Oct 3, 2016 by Yue_Wu-esristaff

- (void)startWMTSLayerSetUp

{

    NSString *wmtsUrl = [[[DataManager sharedInstance] getWMTSInfoUrl] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];

   

    if (!wmtsUrl) return;

   

    self.wmtsInfo = [[AGSWMTSInfo alloc] initWithURL:[NSURL URLWithString:wmtsUrl]];

 

    self.wmtsInfo.delegate = self;

}

 

- (void)wmtsInfoDidLoad:(AGSWMTSInfo *)wmtsInfo

{

    NSArray *layerInfos = [wmtsInfo layerInfos];

 

    for (AGSWMTSLayerInfo *layerInfo in layerInfos) {

 

        self.wmtsLayer = [wmtsInfo wmtsLayerWithLayerInfo:layerInfos[0] andSpatialReference:self.mapView.spatialReference];

       

        self.wmtsLayer.delegate = self;

       

        NSUInteger value = [layerInfos indexOfObjectIdenticalTo:layerInfo];

        [self.mapView insertMapLayer:self.wmtsLayer withName:layerInfo.title atIndex:value];

    }

}

 

 

Here is the url I use https://show.msgis.net/wmts/basemap-WMTSCapabilities.xml

blank map grid view is shown. and delegates say that the layers are loaded .

 

Same functionality works perfectly fine for this url http://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/WMTS/1.0.0/WMTSCapabilities.xml 

Outcomes