WmsMapLayer: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== About == | == About == | ||
Used for displaying maps from a | Used for displaying maps from a WMS service. | ||
==Setup== | ==Setup== | ||
Revision as of 09:48, 3 May 2022
About
Used for displaying maps from a WMS service.
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)