Angular service

service source

Description

Service for parsing object definition which are invalid for direct use as layers

Methods

createSparqlLayer (lyr_def)

Parse definition object to create Sparql layer

Parameters

NameTypeDescription
lyr_def Object

Layer definition object

createVectorLayer (lyr_def) -> ol.layer.Vector|function

Parse definition object to create Vector layer (classic Ol.vector, KML, GeoJSON, WFS, Sparql)

Parameters

NameTypeDescription
lyr_def Object

Layer definition object

Returns

TypeDescription
ol.layer.Vector|function

Either valid vector layer or function for creation of other supported vector file types)

createWmsLayer (lyr_def) -> Object

Parse definition object to create WMS Ol.layer (source = ol.source.ImageWMS / ol.source.TileWMS)

Parameters

NameTypeDescription
lyr_def Object

Layer definition object

Returns

TypeDescription
Object

Ol WMS layer

parseStyle (j) -> ol.style.Style

Parse style definition object to create valid Style

Parameters

NameTypeDescription
j Object

Style definition object

Returns

TypeDescription
ol.style.Style

Valid Ol style object