WmsMapLayer: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== About == Used for displaying maps from a tile map service, with default projection 'EPSG:3857'. ==Setup== <source lang="ts"> export interface IWmsMapLayerInfo extends IB...") |
No edit summary |
||
Line 14: | Line 14: | ||
Projection?: string; | Projection?: string; | ||
} | } | ||
</source> | |||
=== Example === | === Example === | ||
Revision as of 09:46, 3 May 2022
About
Used for displaying maps from a tile map service, with default projection 'EPSG:3857'.
Setup
export interface IWmsMapLayerInfo extends IBaseLayerInfo {
LayerType: "WmsMapLayer";
/** URL to WMS tile provider */
WmsUrl: URL;
/** WMS Layers, */
Layers?: string;
/** Projection used, default is WPSG:4326 */
Projection?: string;
}
Example
include {Layers} from "@mariateleplan/map-core"
const wmsLayerInfo: Layers.IWmsMapLayerInfo = {
"Visible": false,
"LayerType": "WmsMapLayer",
"Id": "wms_test",
"Name": "WMS Raster",
"WmsUrl": "https://ahocevar.com/geoserver/wms",
"Layers": "ne:NE1_HR_LC_SR_W_DR",
"ParentLayerId": "maps"
}
const layers: Layers.ILayersInfo = {
Services:{},
Layers:[new Layers.WMSLayer(wmsLayerInfo);]
}
const props = {
"Zoom": 10,
"Center": [1197567, 8380058],
"Projection": 'EPSG:3857'
}
const mapHtmlId = "map";
const maria = new MariaCore(props, mapHtmlId)
maria.SetupLayers(layers)