initWithIdentifier$2 method
- NSString identifier, {
- required NSArray tileURLTemplates,
- NSDictionary? options,
Returns a vector tile source initialized an identifier, tile URL templates, and options.
Tile URL templates are strings that specify the URLs of the vector tiles to load. See the “Tile URL Templates” guide for information about the format of a tile URL template.
After initializing and configuring the source, add it to a map view’s style
using the MLNStyle/addSource: method.
@param identifier A string that uniquely identifies the source in the style to
which it is added.
@param tileURLTemplates An array of tile URL template strings. Only the first
string is used; any additional strings are ignored.
@param options A dictionary containing configuration options. See
MLNTileSourceOption for available keys and values. Pass in nil to use
the default values.
@return An initialized tile source.
Implementation
MLNVectorTileSource initWithIdentifier$2(objc.NSString identifier, {required objc.NSArray tileURLTemplates,objc.NSDictionary? options}) {
final _ret = _objc_msgSend_11spmsz(this.ref.retainAndReturnPointer(), _sel_initWithIdentifier_tileURLTemplates_options_, identifier.ref.pointer, tileURLTemplates.ref.pointer, options?.ref.pointer ?? ffi.nullptr);
return MLNVectorTileSource.castFromPointer(_ret, retain: false, release: true);
}