DrawObjectLayer: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== About == The Draw Object Layer is used to display tactical graphics served as map tiles from the draw object service. ==Setup== Setup by json: {| class="wikitable" |- !...") Â |
(→â€)  |
||
(11 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
==Setup== | ==Setup== | ||
 | |||
 | |||
<source lang="ts"> | |||
interface IGdkDrawLayerInfo extends IBaseLayerInfo { | |||
  LayerType: "GdkDrawLayer"; | |||
  /** Set which store is used on the draw object service */ | |||
  StoreId?: string; | |||
  /** Set default style Xml. If empty, the service default will be chosen */ | |||
  StyleXml?: UrlOrInlineData; | |||
  /** Set default filter. If empty, none is chosen. */ | |||
  FilterXml?: UrlOrInlineData; | |||
  /** Maria draw object service URL */ | |||
  DrawObjectServiceUri?: URL; | |||
  /** Maria draw object rendering service URL */ | |||
  RenderServiceUri?: URL; | |||
  /** Sets the update interval time in [ms] checking for new draw objects */ | |||
  UpdateIntervalMs?: number; | |||
} | |||
</source> | |||
=== Example === | |||
 | |||
<source lang="ts"> | |||
include {Layers} from "@mariateleplan/map-core" | |||
const drawObjectInfo: Layers.IGdkDrawLayerInfo = { | |||
     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: Layers.ILayersInfo = { | |||
  Services:{}, | |||
  Layers:[new Layers.DrawObjectLayer(drawObjectInfo);] | |||
} | |||
const props = {Â | |||
   "Zoom": 10, | |||
   "Center": [1197567, 8380058], | |||
   "Projection": 'EPSG:3857' | |||
  } | |||
const mapHtmlId = "map"; | |||
const maria = new MariaCore(props, mapHtmlId) | |||
maria.SetupLayers(layers) | |||
</source> | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
 | |||
[[Category:Web]] | [[Category:Web]] |
Latest revision as of 08:54, 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 extends IBaseLayerInfo {
LayerType: "GdkDrawLayer";
/** Set which store is used on the draw object service */
StoreId?: string;
/** Set default style Xml. If empty, the service default will be chosen */
StyleXml?: UrlOrInlineData;
/** Set default filter. If empty, none is chosen. */
FilterXml?: UrlOrInlineData;
/** Maria draw object service URL */
DrawObjectServiceUri?: URL;
/** Maria draw object rendering service URL */
RenderServiceUri?: URL;
/** Sets the update interval time in [ms] checking for new draw objects */
UpdateIntervalMs?: number;
}
Example
include {Layers} from "@mariateleplan/map-core"
const drawObjectInfo: Layers.IGdkDrawLayerInfo = {
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: Layers.ILayersInfo = {
Services:{},
Layers:[new Layers.DrawObjectLayer(drawObjectInfo);]
}
const props = {
"Zoom": 10,
"Center": [1197567, 8380058],
"Projection": 'EPSG:3857'
}
const mapHtmlId = "map";
const maria = new MariaCore(props, mapHtmlId)
maria.SetupLayers(layers)