DrawObjectLayer: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
()
()
Line 39: Line 39:
           StyleXml:{Type:"inline", Value:""}
           StyleXml:{Type:"inline", Value:""}
         }
         }
const layers = new Layers.ILayersrInfo={
const layers = new Layers.ILayersInfo={
     Services:{},
     Services:{},
     Layers:[DOLayer]
     Layers:[DOLayer]

Revision as of 15:17, 26 April 2022

About

The Draw Object Layer is used to display tactical graphics served as map tiles from the draw object service.

Setup

interface IGdkDrawLayerInfo {
    LayerType: "GdkDrawLayer";
    Id: string; 
         
    Name?: string;
    Description?: string;
    Visible?: boolean;
    ZoomRange?: [minZoom: number, maxZoom: number];
    ParentLayerId?: string;
    LogLevel?: LogLevel;

    StoreId?: string;
    StyleXml?: UrlOrInlineData;
    FilterXml?: UrlOrInlineData;
    DrawObjectServiceUri?: URL;
    RenderServiceUri?: URL;
    UpdateIntervalMs?: number;
}

Example

include {Layers} from "@mariateleplan/map-core"
const DOLayer = new Layers.DrawObjectLayer{
          LayerType:"GdkDrawLayer",
          Id:"drawobjs",
          StoreId:"test",
          Name:"GDK Objects",
          Description:"TPG test draw object layer",
          DrawObjectServiceUri:new URL("http://serviceHosterName:PORT/drawobjects/web/"),
          RenderServiceUri:new URL("http://serviceHosterName:PORT/drawobjectrendering/web/"),
          StyleXml:{Type:"inline", Value:""}
        }
const layers = new Layers.ILayersInfo={
    Services:{},
    Layers:[DOLayer]
}
const props = {   
      "Zoom": 10,
      "Center": [1197567, 8380058],
      "Projection": 'EPSG:3857'
    }
const mapHtmlId = "map";
const maria = new MariaCore(props, mapHtmlId)
maria.SetupLayers(layers)