Git Product home page Git Product logo

graphhopper-maps's Introduction

GraphHopper Maps

A route planner user interface for the GraphHopper routing engine released under the Apache License 2.0.

Try it out!

GraphHopper Maps route planner

Turn-by-Turn navigation

There is an experimental navi branch that implements turn-by-turn navigation directly in the browser.

Start development:

  • Clone this repository.
  • Make sure node and npm are installed. We recommend using the iron LTS (node v20.14.0 and npm 10.7.0).
  • npm install
  • npm run serve
  • Open your browser at http://0.0.0.0:3000/.
  • Start development. The browser will update automatically when you change the code.
  • Format the code and run the tests using npm run format and npm run test.
  • Fork the repository and create a pull request. Contributions are welcome. Feel free to discuss your changes in our forum or the GitHub issues.
  • You can build the production bundle using npm run build.
  • If you use the Directions API edit the config to show profile icons properly (see 'Advanced configuration' section below).

Help with translations:

GraphHopper Maps is translated into many languages and you can help improve GraphHopper by adding or improving your language! See this spreadsheet to create a new or improve an existing language. Let us know if you changed something or submit a pull request with your changes after the following steps:

  • Edit the spreadsheet
  • Run python update-translations.py
  • Review your changes via e.g. http://localhost:3000/?locale=en and with git diff. Make sure that is the only one with git status.

Please note that the translations for the server-side turn instructions are located in a different repository.

Advanced configuration

You can point the app to a different url, like a local GraphHopper server, set your own API keys for the different map tile providers and more in the config.js file. For such changes it is best to create a copy of this file called config-local.js which will be ignored by git.

Further Notes

Every branch of this repository can be tested at https://graphhopper.com/maps-dev/<branch_name>/

Powered By

This project uses

graphhopper-maps's People

Contributors

easbar avatar janekdererste avatar karussell avatar kriegalex avatar oblonski avatar otbutz avatar ratrun avatar rokcarl avatar sachsenspieltcoding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphhopper-maps's Issues

Create better layout for mobile/small screens

The current approach looks good on large window sizes but takes up too much space on small screens.

  • The logo needs too much space (I think it takes up too much space in every case)
  • Route alternatives are displayed as rows. This takes too much horizontal screen space
  • The search box itself takes up too much space especially when more via points are displayed
  • close or hide elevation widget

Layout breaks on iOS/Safari

Some things are not rendered correclty on iOS/Safari. Have this issue here to not forget about it since I'm not developing on a mac

  • Add Point button doesn't layout correctly
  • Select element is not styled nicely
  • Can't select routes on the map with current event listener setup
  • Elevation widget doesn't work on small screens (it is too big and needs to be layout differently)
  • Map Style Switch is not visibile on small screens

Map query in url

update the url parameter in the browser window to make the query reproducible

Have only point coordinates until reverse geoconding is added

Add pretty markers

Add a marker symbol for query points.

Visually pick up markers to clarify which textbox changes which marker

Implement geocoding

We need two way geocoding.

  1. When markers are set on the map an adress close by needs to be searched and displayed in the search box
  2. When an adress is entered into the serach box an according coordiante needs to be resolved

The original gh-maps-client already did something on this topic probably @karussell kann give some insight on this.

Load multiple route alternatives

As qwant/google/bing maps we eventually want to display route alternatives.

To maintain a fast impressio maybe do two requests

  1. Request single route
  2. Request multiple routes after single route has been received

Maybe requesting multiple routes right away is also fast enough. This should be tested though

context menu

  • adding start and end points
  • insert? (dragging route?)
  • delete

Set up development server

I guess renting a box at Hetzner Cloud would suffice. Alternatively syncing the built app to an AWS Bucket would also work.

  • While at it, set up a continous deployment from travis.
  • Also, add a production webpack configuration with minification, tree shaking and all the other fuzz.

Add addresses to url

Currently the url only stores the coordinates of selected points. It should also store the addresstext of points if present

Display path details without elevation data

It would be nice to have the graph also available for debugging purposes even if no elevation data is present.

image

e.g display a flat 0m graph with color gradient for elevation=false + debug=true + details=

improvements towards via points

This is currently important (as the old GH maps allows a lot):

  • ability to add more than 3 via points
  • use scrollbar somehow if too many via points. Currently several elements disappear on Desktop if adding more and more via points.
  • insert via points in the correct order through right click
  • drag and drop of the points in the left panel to reorder points

related #143

Interactive custom model editor improvements

Continuing from graphhopper/graphhopper#2239 the following things could/should be improved:

  • allow negating areas using == false
  • check syntax for areas section (geojson)
  • support boolean encoded values without ==/!= true/false? This is important especially for, e.g. if: true, limit to: 100
  • auto-convert tabs to spaces, visualize space characters -> no longer needed since we use json now
  • fix missing auto completion for e.g. road_class ==| MOTORWAY && in_berlin
  • support negation operator !
  • support heading penalty
  • enable soft wraps? disable line numbers, disable error icons in left gutter
  • full screen for editor?
  • show 'no suggestions' popup instead of not showing anything when there are no suggestions?
  • auto-complete some values, like empty lists for speed/priority, type: Polygon/Feature, else: "" etc.
  • support areas defined in server-side profiles, does this even work?
  • auto-complete for YAML JSON, especially speed/priority/areas/distance_influence/limit_to/multiply_by would be nice
  • give better feedback for hard-to-find indentation errors (maybe use match brackets api to find closing bracket) -> not as critical for JSON anymore, we use match brackets though
  • enable close-brackets: https://codemirror.net/demo/closebrackets.html
  • catch YAML JSON syntax errors that aren't caught currently, e.g. {}[].
  • maybe trigger autocomplete automatically without pressing Ctrl+Space? At least in certain cases? This way maybe users not familiar with auto-complete get to know it more easily.
  • probably related to above: update (or close?) auto-complete popup when user keeps typing after it was opened?
  • auto-complete for numeric encoded values? maybe just show a hint saying that one needs to enter a number? show "type a number" as suggestion and insert nothing when user presses enter
  • tweak CM 'mode' especially indentation is not useful at all, e.g. for almost all cases it does the opposite of what we want, see here: https://codemirror.net/doc/manual.html#modeapi -> not as critical for json, and we use a black font for now since the default (red) seems a bit too much
  • simplify error messages (now that they are shown at their origin) ?
  • maybe use tooltips to provide some documentation, e.g. for speed/priority/distance_influence
  • make it easy to translate error messages? but first make them as simple as possible.
  • maybe use code mirror bracket matching
  • adjust colors, theme and styles
  • check code mirror options to see if we need anything besides the defaults, maybe customize the 'mode'?
  • handle YAML multiline syntax like >+ and |... https://stackoverflow.com/a/21699210 we use JSON now
  • dark theme and VIM keybindings (just kidding...)

Import/export request json

There should be a way to initialize the app with some (route request) state and also export the current state. Low-level editing of the request state would also be useful. So far this was possible by editing the URL in the browser's address box, but especially with custom models the URL will become too long.

Maybe there should be a (somewhat hidden) text box that displays the route request as JSON. This way users can easily copy the request to include it somewhere else in their application (use it against the Directions API for example) or share it somewhere to report a routing related problem etc.

Editing this text box would allow setting low-level parameters that are not covered elsewhere in the UI and this way we could also import the JSON that was exported by someone else. We probably need some basic validation for this such that the UI won't be in a broken state in case invalid JSON is inserted.

Not sure yet, just leaving this here for discussion.

Feature Request: center-on-location search box

I'd find it convenient to be able to center the map view to a specific latitude/longitude, as in the simple search box seen on common mapping services. In particular, when working with a route that has dozens of points covering hundreds of kilometers, it's difficult to home in on a specific place (e.g. a customer location) to see how the map routes nearby.

add unit testing

This is something peter requested as well. Find a suitable unit testing framework and test things right from the beginning

Convert api into class

While starting unit testing on QueryStore I had trouble mocking the api functions. To make things easier when testing convert the collection of api functions into a class which can be injected into e.g. the QueryStore. This way it can be easily mocked with jest

  • Convert Api into class
  • inject api object where needed
  • Maybe divide Api types and Api implementation into separate files?
  • Fix api unit tests
  • Write up Unit tests for Query Store

leaving input with tab should work (keyboard navigation)

When I type a location in the first input, then "tab" into second, then type a location in the second input and hit return it should show the route. Currently it is required that I select a location from both suggestion lists to update the route.

Also when copy and pasting a location as coordinate it does not route although no geocoding needs to be done.

gpx support

without dialog - create it client-side as we could need it for all alternatives.

Implement marker handling

Add markers when clicking onto the map. Implementing the folowing behaviour for now:

  1. First left click: Place from marker
  2. Second left click: Place to marker and send query
  3. Next Click remove Markers and route go to 1.

Improve bounding box for route

There are several things we can improve:

Do styling

Pretty buttons and stuff like that
Logo

Build is rather slow

Adding a single line of code requires more than 10s to rebuild on my laptop. Do we have to expect this is going to get worse? Is there something we can do about it? If not could it even be worth looking into other build tools like snowpack or vite for example?

select vehicle

Select the vehicle used for the routing request. The following options are avaliable "car" "bike" "foot" "hike" "mtb" "racingbike" "scooter" "truck" "small_truck"

The info endpoint of the GH Server gives information about the supported vehicles by this very instance.

This issue inlcudes:

  • Parsing the supported vehicles from the info endpoint
  • Giving the user a way to choose a vehicle for routing from the supported vehicles
  • Add the vehicle parameter to the routing request
  • Add vehicle parameter to url

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.