A MasterPortal 3.x addon for finding and displaying polling stations (Wahlräume) on an interactive map, with automatic distance calculation and address search integration.
This addon helps citizens find their assigned polling station by searching for their address. The tool displays:
- The searched address marked on the map
- The assigned polling station (Wahlraum)
- A connecting line showing the direct distance
- Detailed information about the polling station
This is a MasterPortal 3.x compatible version of the WahlRaumFinder addon originally developed for the Munich Geoportal. See NOTICE.md for attribution.
- Address Search Integration: Works with MasterPortal's SearchBar for seamless address lookup
- Automatic Polling Station Assignment: Finds the assigned polling station based on address data
- Distance Calculation: Shows aerial distance between address and polling station
- Interactive Map Visualization:
- Red marker for searched address
- Teal marker for polling station
- Dashed line with distance label
- Hover Tooltips: Hover over polling station markers to see basic information
- Mobile Responsive: Optimized layout for mobile devices
- Multilingual Support: German and English translations included
- MasterPortal: Version 3.15.0 or higher
- Node.js: Version 14+ (for development)
- Data Layers:
- Address layer (WMS with GetFeatureInfo) with polling station assignments
- Polling station layer (GeoJSON) with station details
- Optional: Electoral district layer (GeoJSON)
-
Clone the repository
git clone https://github.com/riolties/wahlraumfinder-MP3.git
-
Copy the addon to your MasterPortal installation
cp -r wahlRaumFinder /path/to/masterportal/addons/
-
Configure your portal
- See docs/INSTALL.md for detailed installation instructions
- See examples/ for configuration snippets
-
Start your MasterPortal development server
cd /path/to/masterportal npm start
- Installation Guide - Step-by-step setup instructions
- Configuration Reference - All configuration options explained
- MasterPortal Setup - Required MasterPortal configuration changes
- Migration Guide - Migrating from MasterPortal 2.x version
{
"secondaryMenu": {
"sections": [
[
{
"type": "wahlRaumFinder",
"name": "WahlRaumFinder",
"addressLayerId": "adressen",
"pollingStationLayerId": "wahlraeume",
"pollingStationAttribute": "wbz"
}
]
]
}
}See examples/config.json.example for complete configuration.
The addon can be activated in three ways:
-
URL Parameter (Recommended)
https://your-portal.com/?isinitopen=wahlRaumFinder -
Manual Activation
- User clicks the tool in the menu
-
Auto-Activation (Optional)
- Requires core patch (see patches/)
- Set
"active": truein config.json
Your data layers must follow this structure:
Address Layer (WMS):
The address layer must be a WMS service that supports GetFeatureInfo. The addon queries it via GFI to retrieve the polling station assignment attribute (e.g. kommunalwahl) for a given coordinate.
{
"id": "adressen",
"typ": "WMS",
"url": "https://your-geoserver.example.com/geoserver/wms",
"layers": "your_workspace:address_layer",
"gfiFormat": "text/xml",
"gfiAttributes": "showAll"
}Polling Station Layer:
{
"type": "Feature",
"properties": {
"wbz": "001-01",
"wahllokal_name": "School Gym",
"stranam": "School Street 1",
"plz": "80331",
"ort": "Munich"
},
"geometry": { ... }
}# Install dependencies (in your MasterPortal root)
npm install
# Start development server
npm start
# Build for production
npm run build- Chrome/Edge (Chromium) - Latest 2 versions
- Firefox - Latest 2 versions
- Safari - Latest 2 versions
- Mobile browsers (iOS Safari, Chrome Mobile)
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This addon is based on the WahlRaumFinder addon originally developed for the Munich Geoportal. See NOTICE.md for full attribution.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- MasterPortal Documentation: https://bitbucket.org/geowerkstatt-hamburg/masterportal/
See CHANGELOG.md for version history and changes.
- Original WahlRaumFinder developers at Munich Geoportal
- MasterPortal team at Geowerkstatt Hamburg
- OpenLayers and Vue.js communities