Skip to content

Itinerary - Itinerary/Direction plugin #11387

@dsuren1

Description

@dsuren1

Introduction

The goal of this tool is to enable users to compute and visualize itineraries using both proprietary and open-source APIs. The solution is intended to provide a user-friendly interface, configuration options, and compatibility with MapStore’s existing geospatial tools.

The plugin will be composed of a generic host, which will be a container and provider of common functionality to specific Itinerary service implementations, and a specific implementation for the GraphHopper platform.

GraphHopper is a fast and flexible open-source routing engine designed for road network and geographic data. It is built in Java and supports routing features such as turn restrictions, elevation data, public transport, and customizable vehicle profiles (e.g., car, bike, foot). GraphHopper uses OpenStreetMap (OSM) data and is widely used in logistics, mobility platforms, and mapping services.

Technical Solution

The plugin will be implemented as a MapStore Core plugin, and a list of child core plugins and extensions implementations for the different APIs.

  • Generic host: This component provides the generic functionality and will host the client component that implements the specific APis.
  • GrapHopper: This component implements the GraphHopper Routing API.

The plugin implements shared functionality and abstractions that specific components, like the one for GrapHopper, implement and extend. In the future additional components (services APIs) can be added to the plugin.

Specific configurations for child components will be available through the dedicated configuration section or the plugin configuration inside map viewers.

Where requested / available, a configuration key will be provided to add an API Key for service authentication.

Itinerary/Directions Core plugin

This plugin implementation serves as the main container and provides core shared functionalities, including:

  • Input fields for two or more locations, that can be set either via a geocoding service (to be configured in MapStore) or by selecting a point on the map.
  • Business logic to support the integration of itinerary / directions provider components
  • Tools to initiate the request workflow
  • Management of the last generated itinerary, with the following available actions:
  • Delete: Remove the selected run from the list of saved runs
  • Save as Layer: Convert the current run into a MapStore vector layer embedded in the map configuration
  • Export: Export the selected run as a GeoJSON file

Note

The itinerary is temporarily saved in the panel. After refreshing or changing the page, runs will be reset. Only a run converted to a layer will be persisted inside the map
Some theming aspects proposed for the panel in the mockup could be different in the final delivery to follow the overall MapStore theme

GraphHopper Provider

This component is an itinerary provider that implements the GraphHopper Routing API, which is an open-source implementation offering free and commercial cloud services, as well as the option to set up an on-premise instance.

The provider functions as a child component of the main Isochrone plugin and includes the following elements:

  • A React component capable of registering the API. This component reads and utilizes selected parameters from the main Routing plugin and returns a vector layer object compatible with MapStore for each Routing request
  • Selection of transportation mode and restrictions, according to the features implemented by the GraphHopper Routing Profiles
  • Configurable API Key

Integration of the Itinerary plugin in GeoNode

After the implementation is merged into MapStore Core, the GeoNode Client will be updated to integrate it.

Acceptance Criteria

  • GeoNode administrators can configure the Itinerary plugin for a MapViewer
  • The selectable plugin will show the generic "Itinerary" label, and will automatically select the GraphHopper plugin being the only implementation currently available. In the future, when multiple services will be available, the user will select the specific sub-plugin
  • Final users will be able to activate the tool and perform the expected functional
  • Location fields will implement:
    • Geocoding search (Nominatim or whatever geocoding service is default). When the user selects a result, the label for the result will be placed inside the field
    • Click on the map location, using the location marker placed to the right of the field
    • (nice to have, optional for now) accept a location when clicking on the marker set by the standard nominatim search bar. This could be useful to leverage the lat/lon location provided by the search bar. This will be done if we have time and budget

Optimization: Use the default options from GraphHopper. We won't expose the options for a custom model to the end user
Constraints: only expose those valuable to end users. The more technical options will be left out

  • For the visualization of the itinerary results, I would place the distance (time) as a separator between two locations, like Google does, instead of placing it right before a location as in the mockups. The latter doesn't make the meaning of this time distance clear, while a separator clarifies that it identifies the distance (time) between two locations
Image

Metadata

Metadata

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions