Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const geometry = olFormat.writeGeometryObject(olFeature.getGeometry(), {
dataProjection: projectionOut,
featureProjection: projectionIn
});
if (olLayer) {
title = olLayer.get('title');
if (olLayer.get('sourceOptions')) {
exclude = olLayer.get('sourceOptions').excludeAttribute;
excludeOffline = olLayer.get('sourceOptions').excludeAttributeOffline;
}
} else {
title = olFeature.get('_title');
}
const mapTitle = olFeature.get('_mapTitle');
const id = olFeature.getId() ? olFeature.getId() : uuid();
return {
type: FEATURE,
projection: projectionOut,
extent: olFeature.get('_extent'),
meta: {
id,
title: title ? title : mapTitle ? mapTitle : id,
mapTitle,
revision: olFeature.getRevision(),
style: olFeature.get('_style'),
excludeAttribute: exclude,
excludeAttributeOffline: excludeOffline
},
properties,
geometry,
const shownProperties = {};
this.allowedProperties.forEach(key => {
if (properties.hasOwnProperty(key)) {
const aliasProperty = this.propertiesAlias.filter(f => f.name === key)[0];
shownProperties[aliasProperty.alias] = properties[key];
}
});
delete properties.id;
delete properties.recherche;
delete properties.type;
delete properties.coord_x;
delete properties.coord_y;
delete properties.cote;
return {
id: uuid(),
source: ReseauTransportsQuebecSearchSource._name,
sourceType: SourceFeatureType.Search,
order: 1,
zoomMaxOnSelect,
type: FeatureType.Feature,
format: FeatureFormat.GeoJSON,
title: properties.title,
titleHtml,
icon,
projection: 'EPSG:4326',
properties: shownProperties,
geometry: result.geometry,
extent: result.bbox
};
}
}
private buildForm(): void {
const id = uuid();
let title = 'Partage ';
title += this.userId ? `(${this.userId}-${id})` : `(${id})`;
this.form = this.formBuilder.group({
title: [title],
uri: [id]
});
}
}
protected generateId() {
if (!this.options.url) {
return uuid();
}
const chain = 'feature' + this.options.url;
return Md5.hashStr(chain) as string;
}
protected generateId() {
return uuid();
}
protected generateId() {
return uuid();
}
public addInterfaceFilter(
igoOgcFilterObject?,
geometryName?,
level = 0,
parentLogical = 'Or'
): OgcInterfaceFilterOptions {
if (!igoOgcFilterObject) {
igoOgcFilterObject = { operator: 'PropertyIsEqualTo' };
}
const f = {
propertyName: '',
operator: '',
active: '',
filterid: uuid(),
begin: '',
end: '',
lowerBoundary: '',
upperBoundary: '',
expression: '',
pattern: '',
wildCard: '*',
singleChar: '.',
escapeChar: '!',
matchCase: true,
igoSpatialSelector: '',
geometryName: '',
geometry: '',
wkt_geometry: '',
extent: '',
srsName: '',
private addFilterProperties(
igoOgcFilterObject: OgcInterfaceFilterOptions,
fieldNameGeometry,
active = false
) {
const filterid = igoOgcFilterObject.hasOwnProperty('filterid')
? igoOgcFilterObject.filterid
: uuid();
const status = igoOgcFilterObject.hasOwnProperty('active')
? igoOgcFilterObject.active
: active;
return Object.assign(
{},
{
filterid,
active: status,
igoSpatialSelector: 'fixedExtent'
},
igoOgcFilterObject,
{ geometryName: fieldNameGeometry }
);
}
protected generateId() {
if (!this.options.url) {
return uuid();
}
const chain = 'feature' + this.options.url;
return Md5.hashStr(chain) as string;
}
addFilter(clause: EntityFilterClause): string {
const id = uuid();
this.filterIndex.set(id, clause);
this.filters$.next(Array.from(this.filterIndex.values()));
return id;
}