@evergis/sp-api
Advanced tools
Comparing version 0.4.15 to 0.4.16
@@ -118,2 +118,4 @@ import { ServiceGroup } from "./ServiceGroup"; | ||
} | ||
if (desc.activeTileSets) | ||
service.activeTileSets = desc.activeTileSets; | ||
} | ||
@@ -133,3 +135,4 @@ function saveContainer(container) { | ||
meta: container.service && container.service.meta, | ||
children: saveChildren(container.service) | ||
children: saveChildren(container.service), | ||
activeTileSets: container.service.activeTileSets | ||
}; | ||
@@ -136,0 +139,0 @@ } |
@@ -50,2 +50,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
}); | ||
renders.forEach(render => render.opacity = this.opacity); | ||
return renders; | ||
@@ -52,0 +53,0 @@ } |
@@ -58,2 +58,3 @@ import { Layer } from "@evergis/sgis/layers/Layer"; | ||
this._dynamicLayer.opacity = opacity; | ||
this._resolutionGroups.forEach(group => group.layer.opacity = opacity); | ||
this.fire('propertyChange', { property: 'opacity' }); | ||
@@ -60,0 +61,0 @@ } |
@@ -40,3 +40,3 @@ import { EventHandler } from "@evergis/sgis/EventHandler"; | ||
readonly initializationPromise: any; | ||
getFeatures({condition, offset, limit, orderBy, srid, attributesFilter, getAttributes, getGeometry, getAttributesDefinition, getTotalCount}: { | ||
getFeatures({condition, offset, limit, orderBy, srid, attributesFilter, getAttributes, getGeometry, getAttributesDefinition, getTotalCount, overrideFilterCondition}: { | ||
condition: any; | ||
@@ -52,3 +52,4 @@ offset: any; | ||
getTotalCount: any; | ||
overrideFilterCondition: any; | ||
}): Promise<any>; | ||
} |
@@ -134,6 +134,17 @@ import { EventHandler } from "@evergis/sgis/EventHandler"; | ||
get initializationPromise() { return null; } | ||
getFeatures({ condition, offset, limit, orderBy, srid, attributesFilter, getAttributes, getGeometry, getAttributesDefinition, getTotalCount }) { | ||
getFeatures({ condition, offset, limit, orderBy, srid, attributesFilter, getAttributes, getGeometry, getAttributesDefinition, getTotalCount, overrideFilterCondition }) { | ||
if (this.serviceInfo.capabilities.indexOf('get') < 0) | ||
error(new Error("The service is not a feature service")); | ||
let params = { condition, offset, limit, orderBy, srid, attributesFilter: attributesFilter && JSON.stringify(attributesFilter) || null, getAttributes, getGeometry, getAttributesDefinition, getTotalCount, | ||
let params = { | ||
condition, | ||
offset, | ||
limit, | ||
orderBy, | ||
srid, | ||
overrideFilterCondition, | ||
attributesFilter: attributesFilter && JSON.stringify(attributesFilter) || null, | ||
getAttributes, | ||
getGeometry, | ||
getAttributesDefinition, | ||
getTotalCount, | ||
_sb: this.connector.sid | ||
@@ -140,0 +151,0 @@ }; |
@@ -9,2 +9,4 @@ import { ServiceContainer } from "./ServiceContainer"; | ||
import { ConditionalTileLayer } from "../layers/ConditionalTileLayer"; | ||
import { ajaxp } from "../utils"; | ||
import { DataFilter } from "../DataFilter"; | ||
export class TileService extends MapService { | ||
@@ -49,3 +51,3 @@ constructor(name, connector, serviceInfo) { | ||
set activeTileSets(sets) { | ||
if (!sets) | ||
if (!sets || sets.length === 0) | ||
sets = null; | ||
@@ -56,2 +58,13 @@ this._activeTileSets = sets; | ||
this.fire('layerChange', { prevLayer: currLayer }); | ||
let condition = ""; | ||
if (sets !== null && sets.length > 0) { | ||
condition = `gid in [${sets.join(',')}]`; | ||
} | ||
let filter = new DataFilter({ condition }); | ||
let data = filter ? 'filterDescription=' + encodeURIComponent(JSON.stringify(filter.serialize())) : ''; | ||
ajaxp({ | ||
url: `${this.url}setTempDataFilter?_sb=${this.connector.sessionId}`, | ||
type: 'POST', | ||
data: data | ||
}); | ||
} | ||
@@ -58,0 +71,0 @@ get condition() { return this._condition; } |
{ | ||
"name": "@evergis/sp-api", | ||
"version": "0.4.15", | ||
"version": "0.4.16", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/compilation/everGis.js", |
@@ -130,2 +130,4 @@ import {ServiceGroup} from "./ServiceGroup"; | ||
} | ||
if (desc.activeTileSets) service.activeTileSets = desc.activeTileSets; | ||
} | ||
@@ -150,3 +152,4 @@ | ||
meta: container.service && container.service.meta, | ||
children: saveChildren(container.service) | ||
children: saveChildren(container.service), | ||
activeTileSets: container.service.activeTileSets | ||
}; | ||
@@ -153,0 +156,0 @@ } |
@@ -15,2 +15,3 @@ import {Layer} from "@evergis/sgis/layers/Layer"; | ||
import {Coordinates} from "@evergis/sgis/baseTypes"; | ||
import {StaticVectorImageRender} from "@evergis/sgis/renders/StaticVectorImageRender"; | ||
@@ -71,2 +72,3 @@ interface ClusterFeatureParams extends FeatureParams { | ||
}); | ||
renders.forEach(render => (<StaticVectorImageRender>render).opacity = this.opacity); | ||
return renders; | ||
@@ -73,0 +75,0 @@ } |
@@ -73,2 +73,3 @@ import {Layer} from "@evergis/sgis/layers/Layer"; | ||
this._dynamicLayer.opacity = opacity; | ||
this._resolutionGroups.forEach(group => group.layer.opacity = opacity); | ||
this.fire('propertyChange', {property: 'opacity'}); | ||
@@ -75,0 +76,0 @@ } |
@@ -159,6 +159,17 @@ import {EventHandler} from "@evergis/sgis/EventHandler"; | ||
getFeatures({condition, offset, limit, orderBy, srid, attributesFilter, getAttributes, getGeometry, getAttributesDefinition, getTotalCount}) { | ||
getFeatures({condition, offset, limit, orderBy, srid, attributesFilter, getAttributes, getGeometry, getAttributesDefinition, getTotalCount, overrideFilterCondition}) { | ||
if (this.serviceInfo.capabilities.indexOf('get') < 0) error(new Error("The service is not a feature service")); | ||
let params = {condition, offset, limit, orderBy, srid, attributesFilter: attributesFilter && JSON.stringify(attributesFilter) || null, getAttributes, getGeometry, getAttributesDefinition, getTotalCount, | ||
let params = { | ||
condition, | ||
offset, | ||
limit, | ||
orderBy, | ||
srid, | ||
overrideFilterCondition, | ||
attributesFilter: attributesFilter && JSON.stringify(attributesFilter) || null, | ||
getAttributes, | ||
getGeometry, | ||
getAttributesDefinition, | ||
getTotalCount, | ||
_sb: this.connector.sid | ||
@@ -165,0 +176,0 @@ }; |
@@ -9,2 +9,4 @@ import {ServiceContainer} from "./ServiceContainer"; | ||
import {ConditionalTileLayer} from "../layers/ConditionalTileLayer"; | ||
import {ajaxp} from "../utils"; | ||
import {DataFilter} from "../DataFilter"; | ||
@@ -58,3 +60,3 @@ export class TileService extends MapService { | ||
set activeTileSets(sets: number[] | null) { | ||
if (!sets) sets = null; | ||
if (!sets || sets.length === 0) sets = null; | ||
this._activeTileSets = sets; | ||
@@ -64,2 +66,17 @@ let currLayer = this._layer; | ||
this.fire('layerChange', {prevLayer: currLayer}); | ||
let condition = ""; | ||
if (sets !== null && sets.length > 0) { | ||
condition = `gid in [${sets.join(',')}]`; | ||
} | ||
let filter = new DataFilter({condition}); | ||
let data = filter ? 'filterDescription=' + encodeURIComponent(JSON.stringify(filter.serialize())) : ''; | ||
ajaxp({ | ||
url: `${this.url}setTempDataFilter?_sb=${this.connector.sessionId}`, | ||
type: 'POST', | ||
data: data | ||
}); | ||
} | ||
@@ -66,0 +83,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1706485
18607