initWithIdentifier$1 method

MLNVectorTileSource initWithIdentifier$1(
  1. NSString identifier, {
  2. required NSString configurationURLString,
})

Returns a vector tile source initialized with an identifier and a string-based configuration URL.

After initializing and configuring the source, add it to a map view’s style using the MLNStyle/addSource: method.

The string may be a full HTTP or HTTPS URL or a canonical URL. The string should point to a JSON file that conforms to the TileJSON specification.

This constructor can be used for URLs that cause problems with NSURL’s URL parsing behavior. For example, URLs starting with pmtiles://https:// were not parsed correctly on iOS 17.

@param identifier A string that uniquely identifies the source in the style to which it is added. @param configurationURLString A string to a TileJSON configuration file describing the source’s contents and other metadata. @return An initialized vector tile source.

Implementation

MLNVectorTileSource initWithIdentifier$1(objc.NSString identifier, {required objc.NSString configurationURLString}) {
  final _ret = _objc_msgSend_15qeuct(this.ref.retainAndReturnPointer(), _sel_initWithIdentifier_configurationURLString_, identifier.ref.pointer, configurationURLString.ref.pointer);
  return MLNVectorTileSource.castFromPointer(_ret, retain: false, release: true);
}