DrawObjectLayer: Difference between revisions
Jump to navigation
Jump to search
(→) |
No edit summary |
||
Line 29: | Line 29: | ||
<source lang="ts"> | <source lang="ts"> | ||
include {Layers} from "@mariateleplan/map-core" | include {Layers} from "@mariateleplan/map-core" | ||
const DOLayer = new Layers.DrawObjectLayer{ | const DOLayer = new Layers.DrawObjectLayer( | ||
{ | |||
LayerType:"GdkDrawLayer", | LayerType:"GdkDrawLayer", | ||
Id:"drawobjs", | Id:"drawobjs", | ||
Line 38: | Line 39: | ||
RenderServiceUri:new URL("http://serviceHosterName:PORT/drawobjectrendering/web/"), | RenderServiceUri:new URL("http://serviceHosterName:PORT/drawobjectrendering/web/"), | ||
StyleXml:{Type:"inline", Value:""} | StyleXml:{Type:"inline", Value:""} | ||
}) | |||
const layers = new Layers.ILayersInfo={ | const layers = new Layers.ILayersInfo={ | ||
Services:{}, | Services:{}, |
Revision as of 08:48, 3 May 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)