UNPKG

@nativescript-community/ui-carto

Version:

NativeScript plugin for CARTO Mobile SDK

40 lines 1.33 kB
import { TileDataSource } from '.'; import { nativeProperty } from '..'; export class HTTPTileDataSource extends TileDataSource { createNative(options) { return NTHTTPTileDataSource.alloc().initWithMinZoomMaxZoomBaseURL(options.minZoom, options.maxZoom, options.url); } // set autoHD(value: boolean) { // this.native.setAutoHD(value); // } set httpHeaders(value) { const map = NTStringMap.alloc().init(); for (const key in value) { map.setX(key, value[key]); } this.native.setHTTPHeaders(map); } set subdomains(value) { const array = Array.isArray(value) ? value : value.split(''); const vector = NTStringVector.alloc().init(); for (let index = 0; index < array.length; index++) { vector.add(array[index]); } this.native.setSubdomains(vector); } } __decorate([ nativeProperty({ nativeGetterName: 'isTMSScheme' }) ], HTTPTileDataSource.prototype, "TMSScheme", void 0); __decorate([ nativeProperty ], HTTPTileDataSource.prototype, "maxAgeHeaderCheck", void 0); __decorate([ nativeProperty ], HTTPTileDataSource.prototype, "baseUrl", void 0); __decorate([ nativeProperty ], HTTPTileDataSource.prototype, "timeout", void 0); //# sourceMappingURL=http.ios.js.map