DrawObjectLayer: Difference between revisions

From Maria GDK Wiki
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==
Setup by json:
 
{| class="wikitable"
 
|-
<source lang="ts">
! field !! type !! description
interface IGdkDrawLayerInfo extends IBaseLayerInfo {
|-
    LayerType: "GdkDrawLayer";
| LayerType || string || Example
    /** Set which store is used on the draw object service  */
|-
    StoreId?: string;
| Example || string|| Example
    /** Set default style Xml. If empty, the service default will be chosen  */
|-
    StyleXml?: UrlOrInlineData;
| Example || string || Example
    /** Set default filter. If empty, none is chosen. */
|-
    FilterXml?: UrlOrInlineData;
| Example || string || Example
    /** Maria draw object service URL */
|-
    DrawObjectServiceUri?: URL;
| Example || string || Example
    /** Maria draw object rendering service URL */
|-
    RenderServiceUri?: URL;
| Example || string || Example
    /** Sets the update interval time in [ms] checking for new draw objects */
|-
    UpdateIntervalMs?: number;
| Example || string || Example
}
|}
</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 09: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)