UNPKG

terriajs

Version:

Geospatial data visualization platform.

50 lines (49 loc) 2.65 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import primitiveArrayTrait from "../Decorators/primitiveArrayTrait"; import mixTraits from "../mixTraits"; import CatalogMemberReferenceTraits from "./CatalogMemberReferenceTraits"; import UrlTraits from "./UrlTraits"; import primitiveTrait from "../Decorators/primitiveTrait"; import { traitClass } from "../Trait"; let TerriaReferenceTraits = class TerriaReferenceTraits extends mixTraits(UrlTraits, CatalogMemberReferenceTraits) { isOpen; path; }; __decorate([ primitiveTrait({ name: "Is Open", description: "True if this group is open and its contents are visible; otherwise, false. (This only applies if `isGroup = true`)", type: "boolean" }) ], TerriaReferenceTraits.prototype, "isOpen", void 0); __decorate([ primitiveArrayTrait({ type: "string", name: "Path", description: "The path to the catalog item or group in the target catalog file given as a list of IDs. If not given, Terria will create a pseudo-group with all the catalog items in the catalog file as its members." }) ], TerriaReferenceTraits.prototype, "path", void 0); TerriaReferenceTraits = __decorate([ traitClass({ description: `Creates a catalog group or item from url that points to a terria catalog json file. <strong>Note:</strong> <li>The referenced json file may contain more items than you need.</li> <li>Specify required catalog entry IDs (e.g. "LAEMW8fc") in <code>path</code>. If not specified, the whole catalog will be added.</li> <li>If the reference is a group, it is helpful to set <code>isGroup</code> to <code>true</code>.</li>`, example: { type: "terria-reference", url: "https://tiles.terria.io/terriajs-examples/terria-reference/a-terria-catalog.json", isGroup: true, path: ["LAEMW8fc"], name: "terria-reference example", id: "some unique id for terria-reference example" } }) ], TerriaReferenceTraits); export default TerriaReferenceTraits; //# sourceMappingURL=TerriaReferenceTraits.js.map