Skip to content

Commit

Permalink
fix generic links from mapping not showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
d4v3000 committed Oct 1, 2024
1 parent b516f9e commit 4e2cb77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,18 @@ const onSelectionChangedVector = (
const featureProperties = result.includes("function")
? functionToFeature(properties, result)
: objectToFeature(properties, result);
const genericLinks = featureProperties.properties.genericLinks || [];

const feature = {
properties: {
...featureProperties.properties,
genericLinks: [
genericLinks: genericLinks.concat([
{
url: imgUrl,
tooltip: "Alte Sachdatenabfrage",
icon: createElement(FeatureInfoIcon),
},
],
]),
},
id: layer.id,
showMarker: selectedVectorFeature.geometry.type === "Polygon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,18 @@ export const getFeatureForLayer = async (layer, pos) => {
const feature = result.includes("function")
? functionToFeature(output, result)
: objectToFeature(output, result);
const genericLinks = feature.properties.genericLinks || [];

return {
properties: {
...feature.properties,
genericLinks: [
genericLinks: genericLinks.concat([
{
url: imgUrl,
tooltip: "Alte Sachdatenabfrage",
icon: <FeatureInfoIcon />,
},
],
]),
},
id: layer.id,
};
Expand Down

0 comments on commit 4e2cb77

Please sign in to comment.