terriajs
Version:
Geospatial data visualization platform.
116 lines (103 loc) • 3.11 kB
text/typescript
import { JsonObject } from "../../Core/Json";
import anyTrait from "../Decorators/anyTrait";
import objectArrayTrait from "../Decorators/objectArrayTrait";
import objectTrait from "../Decorators/objectTrait";
import primitiveTrait from "../Decorators/primitiveTrait";
import mixTraits from "../mixTraits";
import ModelTraits from "../ModelTraits";
import CatalogMemberTraits from "./CatalogMemberTraits";
import GetCapabilitiesTraits from "./GetCapabilitiesTraits";
import ImageryProviderTraits from "./ImageryProviderTraits";
import LayerOrderingTraits from "./LayerOrderingTraits";
import LegendOwnerTraits from "./LegendOwnerTraits";
import LegendTraits from "./LegendTraits";
import MappableTraits from "./MappableTraits";
import UrlTraits from "./UrlTraits";
export class WebMapTileServiceAvailableStyleTraits extends ModelTraits {
({
type: "string",
name: "Style Identifier",
description: "The identifier of the style."
})
identifier?: string;
({
type: "string",
name: "Title",
description: "The title of the style."
})
title?: string;
({
type: "string",
name: "Abstract",
description: "The abstract describing the style."
})
abstract?: string;
({
type: LegendTraits,
name: "Style Name",
description: "The name of the style."
})
legend?: LegendTraits;
({
type: "string",
name: "Is Default",
description: "True if this Style is default; otherwise, false."
})
isDefault: boolean = false;
}
export class WebMapTileServiceAvailableLayerStylesTraits extends ModelTraits {
({
type: "string",
name: "Layer Name",
description: "The name of the layer for which styles are available."
})
layerName?: string;
({
type: WebMapTileServiceAvailableStyleTraits,
name: "Styles",
description: "The styles available for this layer.",
idProperty: "identifier"
})
styles?: WebMapTileServiceAvailableStyleTraits[];
}
export default class WebMapServiceCatalogItemTraits extends mixTraits(
LayerOrderingTraits,
GetCapabilitiesTraits,
ImageryProviderTraits,
UrlTraits,
MappableTraits,
CatalogMemberTraits,
LegendOwnerTraits
) {
({
type: "string",
name: "Is GeoServer",
description: "True if this WMS is a GeoServer; otherwise, false."
})
isGeoServer: boolean = false;
({
type: "string",
name: "Layer",
description: "The layer to display."
})
layer?: string;
({
type: "string",
name: "Style",
description: "The style to use with `Layer`."
})
style?: string;
({
type: WebMapTileServiceAvailableLayerStylesTraits,
name: "Available Styles",
description: "The available styles.",
idProperty: "layerName"
})
availableStyles?: WebMapTileServiceAvailableLayerStylesTraits[];
({
name: "Parameters",
description:
"Additional parameters to pass to the MapServer when requesting images."
})
parameters?: JsonObject;
}