Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.at(stopIndex)
.patchValue({ stopProposals: groupedLocations });
// TODO: Prefer another source?
if (results[0]) {
if (results[0].source.getId() === 'icherchereverse') {
// prefer address type.
let resultPos = 0;
for (let i = 0; i < results.length; i++) {
const feature: any = results[i].data;
if (feature.properties.type === 'adresse') {
resultPos = i;
break;
}
}
this.stops.at(stopIndex).patchValue({
stopPoint: getEntityTitle(results[resultPos])
});
if (results[resultPos].data.geometry.type === 'Point') {
this.stops.at(stopIndex).patchValue({
stopCoordinates:
results[resultPos].data.geometry.coordinates
});
} else {
// Not moving the translated point Only to suggest value into the UI.
}
} else if (results[0].source.getId() === 'coordinatesreverse') {
this.stops.at(stopIndex).patchValue({
stopPoint: [
results[0].data.geometry.coordinates[0].toFixed(5),
results[0].data.geometry.coordinates[1].toFixed(5)
].join(',')
});
get featureTitle(): string {
return this.feature ? getEntityTitle(this.feature) : undefined;
}
get title(): string {
return getEntityTitle(this.result);
}
export function featureToOl(
feature: Feature,
projectionOut: string,
getId?: (Feature) => EntityKey
): OlFeature {
getId = getId ? getId : getEntityId;
const olFormat = new OlFormatGeoJSON();
const olFeature = olFormat.readFeature(feature, {
dataProjection: feature.projection,
featureProjection: projectionOut
});
olFeature.setId(getId(feature));
const title = getEntityTitle(feature);
if (title !== undefined) {
olFeature.set('_title', title, true);
}
if (feature.extent !== undefined) {
olFeature.set('_extent', feature.extent, true);
}
if (feature.projection !== undefined) {
olFeature.set('_projection', feature.projection, true);
}
const mapTitle = getEntityProperty(feature, 'meta.mapTitle');
if (mapTitle !== undefined) {
olFeature.set('_mapTitle', mapTitle, true);
}
get title(): string {
return getEntityTitle(this.feature);
}
getTitle(result: SearchResult) {
return getEntityTitle(result);
}
}
get featureTitle(): string {
return this.feature ? getEntityTitle(this.feature) : undefined;
}
get title(): string { return getEntityTitle(this.catalog); }
get title(): string { return getEntityTitle(this.feature); }
get featureTitle(): string {
return this.feature ? getEntityTitle(this.feature) : undefined;
}