Skip to content

riolties/wahlraumfinder-MP3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

190 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WahlRaumFinder for MasterPortal 3.x

MasterPortal License

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.

About

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.

Features

  • 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

Requirements

  • 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)

Quick Start

  1. Clone the repository

    git clone https://github.com/riolties/wahlraumfinder-MP3.git
  2. Copy the addon to your MasterPortal installation

    cp -r wahlRaumFinder /path/to/masterportal/addons/
  3. Configure your portal

  4. Start your MasterPortal development server

    cd /path/to/masterportal
    npm start

Documentation

Configuration Example

{
  "secondaryMenu": {
    "sections": [
      [
        {
          "type": "wahlRaumFinder",
          "name": "WahlRaumFinder",
          "addressLayerId": "adressen",
          "pollingStationLayerId": "wahlraeume",
          "pollingStationAttribute": "wbz"
        }
      ]
    ]
  }
}

See examples/config.json.example for complete configuration.

Activation Options

The addon can be activated in three ways:

  1. URL Parameter (Recommended)

    https://your-portal.com/?isinitopen=wahlRaumFinder
    
  2. Manual Activation

    • User clicks the tool in the menu
  3. Auto-Activation (Optional)

    • Requires core patch (see patches/)
    • Set "active": true in config.json

Data Structure

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": { ... }
}

Development

# Install dependencies (in your MasterPortal root)
npm install

# Start development server
npm start

# Build for production
npm run build

Browser Support

  • Chrome/Edge (Chromium) - Latest 2 versions
  • Firefox - Latest 2 versions
  • Safari - Latest 2 versions
  • Mobile browsers (iOS Safari, Chrome Mobile)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Attribution

This addon is based on the WahlRaumFinder addon originally developed for the Munich Geoportal. See NOTICE.md for full attribution.

Support

Changelog

See CHANGELOG.md for version history and changes.

Acknowledgments

  • Original WahlRaumFinder developers at Munich Geoportal
  • MasterPortal team at Geowerkstatt Hamburg
  • OpenLayers and Vue.js communities

About

WahlRaumFinder addon for MasterPortal 3.x - Find polling stations by address with distance calculation

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors