terriajs
Version:
Geospatial data visualization platform.
57 lines (50 loc) • 1.51 kB
text/typescript
import primitiveTrait from "../Decorators/primitiveTrait";
import mixTraits from "../mixTraits";
import CatalogMemberTraits from "./CatalogMemberTraits";
import LegendOwnerTraits from "./LegendOwnerTraits";
import MappableTraits from "./MappableTraits";
import ImageryProviderTraits from "./ImageryProviderTraits";
export default class MapboxStyleCatalogItemTraits extends mixTraits(
ImageryProviderTraits,
CatalogMemberTraits,
MappableTraits,
LegendOwnerTraits
) {
({
name: "url",
description: "The Mapbox server url.",
type: "string"
})
url = "https://api.mapbox.com/styles/v1/";
({
name: "accessToken",
description: "The username of the map account.",
type: "string"
})
username = "mapbox";
({
name: "styleId",
description:
"The Mapbox Style ID. eg 'streets-v11', 'outdoors-v11'. You can find more styleIds for the 'mapbox' user here: https://docs.mapbox.com/api/maps/styles/#mapbox-styles",
type: "string"
})
styleId?: string;
({
name: "accessToken",
description: "The public access token for the imagery.",
type: "string"
})
accessToken?: string;
({
name: "tilesize",
description: "The size of the image tiles.",
type: "number"
})
tilesize = 512;
({
name: "scaleFactor",
description: "When true, the tiles are rendered at a @2x scale factor.",
type: "boolean"
})
scaleFactor = false;
}