Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4a5daa3
add poi filter ui to library
d4v3000 Mar 18, 2026
428b8fe
add example poi filter
d4v3000 Mar 18, 2026
4e156fd
add filtering to ng stadtplan
d4v3000 Mar 27, 2026
183a54a
fix filtering for clustered items
d4v3000 Mar 27, 2026
57132c2
add poi filtering without dummy data
d4v3000 Mar 27, 2026
0d59078
fix filter resets after unmount
d4v3000 Mar 27, 2026
724acb3
fix filter restore after refresh
d4v3000 Mar 27, 2026
c3ba748
create ng stadtplan topicmap
d4v3000 Mar 27, 2026
3fe74a5
add ng stadtplan to deployment
d4v3000 Mar 27, 2026
fb9c5d1
move piechart component
d4v3000 Mar 27, 2026
6bae2a1
fix ui jumps
d4v3000 Mar 27, 2026
21c5cd2
change filter panel title
d4v3000 Mar 27, 2026
11a0adf
use correct number of visible pois
d4v3000 Apr 8, 2026
4de3104
add crosslink apps
d4v3000 Apr 8, 2026
fb90839
update styling
d4v3000 Apr 8, 2026
744ec2e
remove css import
d4v3000 Apr 9, 2026
169dd8c
dont create infobox on gazetteer search
d4v3000 Apr 9, 2026
ab33051
add types
d4v3000 Apr 9, 2026
828ad1d
add option to show filter title
d4v3000 Apr 9, 2026
ef09016
save filtering to local storage
d4v3000 Apr 9, 2026
e755408
fix feature flickering on map movement
d4v3000 Apr 9, 2026
646266b
fix flickering on marker size changes
d4v3000 Apr 9, 2026
7909920
add switch to neutral state
d4v3000 Apr 10, 2026
3a9f27f
change background config
d4v3000 Apr 10, 2026
d9326c8
fix builds
d4v3000 Apr 15, 2026
f69224b
optimize leaflet-snap dependency
d4v3000 Apr 15, 2026
5504c56
optimize more dependencies
d4v3000 Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 8 additions & 50 deletions apps/geoportal/src/app/components/layers/GeoportalLayerButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ import "./tabs.css";
import {
LayerButton,
LayerIcon,
buildFilterExpression,
captureOriginalFilters,
useRestoreLayerFilter,
} from "@carma-mapping/components";
import { Badge, Spin } from "antd";
import { LoadingOutlined } from "@ant-design/icons";
Expand Down Expand Up @@ -156,54 +155,13 @@ const GeoportalLayerButton = ({
}
}, [layersLength]);

const filterAppliedRef = useRef(false);
useEffect(() => {
if (!layer.filterConfig || !layer.filterState || filterAppliedRef.current)
return;

const mapEntry = maplibreMaps?.find((entry) => entry.id === id);
if (!mapEntry?.map) return;

const libreMap = mapEntry.map;
try {
const originals = captureOriginalFilters(
layer.filterConfig.layerPattern,
libreMap
);

const filterExpression = buildFilterExpression(
layer.filterConfig,
layer.filterState
);

Object.keys(originals).forEach((layerId) => {
try {
const origFilter = originals[layerId];
let combinedFilter = filterExpression;

if (origFilter && filterExpression) {
combinedFilter = ["all", origFilter, filterExpression];
} else if (origFilter && !filterExpression) {
combinedFilter = origFilter;
}

libreMap.setFilter(layerId, combinedFilter);
} catch (error) {
console.error(
`[FilterRestore] Error setting filter on layer ${layerId}:`,
error
);
}
});

filterAppliedRef.current = true;
} catch (error) {
console.error(
`[FilterRestore] Error restoring filters for ${id}:`,
error
);
}
}, [layer.filterConfig, layer.filterState, maplibreMaps, id]);
const layerMaplibreMap =
maplibreMaps?.find((entry) => entry.id === id)?.map ?? null;
useRestoreLayerFilter(
layer.filterConfig,
layer.filterState,
layerMaplibreMap
);

const isCurrentlyVisible = () => {
if (zoom >= layer?.props?.maxZoom || zoom <= layer?.props?.minZoom) {
Expand Down
48 changes: 45 additions & 3 deletions apps/geoportal/src/app/components/layers/InteractionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
createFilterButtons,
FilterInfo,
FilterState,
PoiFilterPanel,
} from "@carma-mapping/components";
import {
getSelectedFeature,
Expand All @@ -26,6 +27,7 @@ import { useFilterBackground } from "./useFilterBackground";
import FilterBackdrop from "./FilterBackdrop";

const InteractionView = ({ isDragging }: { isDragging?: boolean }) => {
const [filterState, setFilterState] = useState<FilterState | undefined>();
const dispatch = useDispatch();
const activeInteractionLayerID = useSelector(getActiveInteractionLayerID);
const layers = useSelector(getLayers);
Expand All @@ -44,13 +46,53 @@ const InteractionView = ({ isDragging }: { isDragging?: boolean }) => {
isDragging
);

const filterType = layer?.filterConfig?.filterType;

const FilterComponent = useMemo(
() =>
layer?.filterConfig ? createFilterButtons(layer.filterConfig) : null,
[layer?.filterConfig]
layer?.filterConfig && filterType !== "poi"
? createFilterButtons(layer.filterConfig)
: null,
[layer?.filterConfig, filterType]
);

if (!layer) {
if (!layer || !layer.filterConfig) {
return null;
}

if (filterType === "poi") {
return (
<div ref={wrapperRef} className="relative">
{validBg && !isDragging && <FilterBackdrop bgData={validBg} />}
<div className="pt-3 w-full flex justify-center">
<div
ref={filterRef}
style={{
maxWidth: 700,
background: "rgba(255, 255, 255, 0.9)",
borderRadius: 12,
padding: "8px 12px",
}}
>
<PoiFilterPanel
maplibreMap={maplibreMap}
initialFilterState={layer.filterState}
onFilterChange={(info, state) => {
dispatch(
setLayerFilterState({ id: layer.id, filterState: state })
);
dispatch(
setLayerFilterInfo({ id: layer.id, filterInfo: info })
);
}}
/>
</div>
</div>
</div>
);
}

if (!FilterComponent) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/topicmaps/e-auto-ladestation/src/app/PieChart.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useContext } from "react";
import { FeatureCollectionContext } from "react-cismap/contexts/FeatureCollectionContextProvider";
import { getColorForProperties } from "./helper/styler";
import { PieChart } from "@carma-appframeworks/portals";
import { PieChart } from "@carma-mapping/components";

const ChartComp = ({ visible = true }) => {
const { filteredItems } = useContext(FeatureCollectionContext);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useContext } from "react";
import { FeatureCollectionContext } from "react-cismap/contexts/FeatureCollectionContextProvider";
import { getColorForProperties } from "../../../helper/styler";
import { PieChart } from "@carma-appframeworks/portals";
import { PieChart } from "@carma-mapping/components";

const EBikesPieChart = ({ visible = true }) => {
const { filteredItems } = useContext<typeof FeatureCollectionContext>(
Expand Down
2 changes: 1 addition & 1 deletion apps/topicmaps/kita-finder/src/app/KitasPieChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useContext } from "react";
import { FeatureCollectionContext } from "react-cismap/contexts/FeatureCollectionContextProvider";
import { useSelector } from "react-redux";
import { getFeatureRenderingOption } from "./store/slices/ui";
import { PieChart } from "@carma-appframeworks/portals";
import { PieChart } from "@carma-mapping/components";

const KitasPieChart = ({ visible = true }) => {
const { filteredItems } = useContext(FeatureCollectionContext);
Expand Down
4 changes: 4 additions & 0 deletions apps/topicmaps/klimaorte/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export default defineConfig({

plugins: [react(), nxViteTsPaths()],

optimizeDeps: {
include: ['leaflet', 'leaflet-snap'],
},

// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getColorFromMainlocationTypeName,
textConversion,
} from "../../../helper/styler";
import { PieChart } from "@carma-appframeworks/portals";
import { PieChart } from "@carma-mapping/components";

const KulturPieChart = ({ visible = true }) => {
const { filteredItems } = useContext<typeof FeatureCollectionContext>(
Expand Down
4 changes: 4 additions & 0 deletions apps/topicmaps/luftmessstationen/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export default defineConfig({

plugins: [react(), nxViteTsPaths()],

optimizeDeps: {
include: ['leaflet', 'leaflet-snap'],
},

// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
Expand Down
22 changes: 22 additions & 0 deletions apps/topicmaps/ng-stadtplan/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>Online-Stadtplan Wuppertal</title>
<base href="/" />

<link rel="icon" href="/favicon.ico" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1,viewport-fit=cover, user-scalable=no"
/>
<meta name="theme-color" content="#000000" />
<meta name="description" content="Online-Stadtplan Wuppertal" />

<link rel="stylesheet" href="/src/styles.css" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions apps/topicmaps/ng-stadtplan/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* postcss.config.cjs */
const path = require("path");

module.exports = {
plugins: {
"postcss-import": {},
"tailwindcss/nesting": {},
tailwindcss: {
config: path.join(__dirname, "tailwind.config.cjs"),
},
autoprefixer: {},
},
};
69 changes: 69 additions & 0 deletions apps/topicmaps/ng-stadtplan/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "ng-stadtplan",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/topicmaps/ng-stadtplan/src",
"projectType": "application",
"tags": [],
"targets": {
"build": {
"executor": "@nx/vite:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/apps/topicmaps/ng-stadtplan"
},
"configurations": {
"development": {
"mode": "development"
},
"production": {
"mode": "production"
}
}
},
"serve": {
"executor": "@nx/vite:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "ng-stadtplan:build",
"host": "0.0.0.0"
},
"configurations": {
"development": {
"buildTarget": "ng-stadtplan:build:development",
"hmr": true
},
"production": {
"buildTarget": "ng-stadtplan:build:production",
"hmr": false
}
}
},
"preview": {
"executor": "@nx/vite:preview-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "ng-stadtplan:build"
},
"configurations": {
"development": {
"buildTarget": "ng-stadtplan:build:development"
},
"production": {
"buildTarget": "ng-stadtplan:build:production"
}
},
"dependsOn": ["build"]
},
"test": {
"executor": "@nx/vite:test",
"outputs": ["{options.reportsDirectory}"],
"options": {
"reportsDirectory": "../../../coverage/apps/topicmaps/ng-stadtplan"
}
},
"lint": {
"executor": "@nx/eslint:lint"
}
}
}
Binary file added apps/topicmaps/ng-stadtplan/public/favicon.ico
Binary file not shown.
Loading
Loading