Select to view content in your preferred language

Pass additional header to URL in AGSTiledMapServiceLayer

2634
0
10-31-2014 12:08 AM
sumitzarkar
Deactivated User

Hi I need some help on AGSTiledMapServiceLayer.

 

For a TiledMapsService that I need to invoke, it requires an custom setting to be passed in the request header for security.  I understand we can set URL to AGSTiledMapServiceLayer object but did not see a way to set the Request object. Is there any way to pass AGSRequest or to add additional headers directly? Are there any alternatives?

 

For Eg:

NSMutableDictionary *HeaderDictionary = [[NSMutableDictionary alloc] init];

[HeaderDictionary setValue:@“<Header Value>” forKey:@“<Header Key>"];

[AGSRequest setAdditionalUserAgentInfo:[NSString stringWithFormat:@"%@", HeaderDictionary]];

[AGSRequest requestForURL:tiledMapServiceURL credential:nil resource:nil queryParameters:nil method:AGSRequestHTTPMethodGet cachePolicy:nil timeoutInterval:60.0 userHeaders: HeaderDictionary] ;

//Now how do I set this Request in AGSTiledMapServiceLayer?

0 Replies