Loading...
Searching...
No Matches

HTTP XYZ source for outdoor vector tiles. More...

#include <com/navigine/idl/objc/NCHttpTileSource.h>

Inherits NSObject.

Instance Methods

(nonnull instancetype) - initWithUrlTemplate:headers:queryParameters:
 Default constructor for class NCHttpTileSource.
 

Class Methods

(nonnull instancetype) + httpTileSourceWithUrlTemplate:headers:queryParameters:
 Factory method for class NCHttpTileSource.
 

Properties

NSString * urlTemplate
 HTTPS XYZ template with {z}, {x}, {y}.
 
NSDictionary< NSString *, NSString * > * headers
 Extra request headers. Null or empty: none. Overrides the default User-Agent when that header is set.
 
NSDictionary< NSString *, NSString * > * queryParameters
 Extra query parameters appended to each tile URL. Null or empty: none.
 

Detailed Description

HTTP XYZ source for outdoor vector tiles.

urlTemplate must contain {z}, {x}, {y}. Optional query parameters (API keys such as key, access_token, apikey) are appended to each request. Optional headers cover Authorization, Referer, or a custom User-Agent. The SDK always sends an identifying User-Agent unless the headers map already has one. Keys may also be baked into urlTemplate.

Referenced from TileProvider.

Definition at line 24 of file NCHttpTileSource.h.

Method Documentation

◆ httpTileSourceWithUrlTemplate:headers:queryParameters:

+ (nonnull instancetype) httpTileSourceWithUrlTemplate: (nonnull NSString *) urlTemplate
headers: (nullable NSDictionary< NSString *, NSString * > *) headers
queryParameters: (nullable NSDictionary< NSString *, NSString * > *) queryParameters 

Factory method for class NCHttpTileSource.

◆ initWithUrlTemplate:headers:queryParameters:

- (nonnull instancetype) initWithUrlTemplate: (nonnull NSString *) urlTemplate
headers: (nullable NSDictionary< NSString *, NSString * > *) headers
queryParameters: (nullable NSDictionary< NSString *, NSString * > *) queryParameters 

Default constructor for class NCHttpTileSource.

Property Documentation

◆ headers

- (NSDictionary<NSString *, NSString *>*) headers
readnonatomicassign

Extra request headers. Null or empty: none. Overrides the default User-Agent when that header is set.

Definition at line 58 of file NCHttpTileSource.h.

◆ queryParameters

- (NSDictionary<NSString *, NSString *>*) queryParameters
readnonatomicassign

Extra query parameters appended to each tile URL. Null or empty: none.

Definition at line 63 of file NCHttpTileSource.h.

◆ urlTemplate

- (NSString*) urlTemplate
readnonatomicassign

HTTPS XYZ template with {z}, {x}, {y}.

Swift code snippet:

let http = NCHttpTileSource(
urlTemplate: "https://api.maptiler.com/tiles/v3-openmaptiles/{z}/{x}/{y}.pbf",
headers: nil,
queryParameters: ["key": "YOUR_MAPTILER_KEY"])

Objective C code snippet:

initWithUrlTemplate:@"https://api.maptiler.com/tiles/v3-openmaptiles/{z}/{x}/{y}.pbf"
headers:nil
queryParameters:@{@"key": @"YOUR_MAPTILER_KEY"}];

Definition at line 52 of file NCHttpTileSource.h.


The documentation for this class was generated from the following file: