osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.67k stars 1.02k forks source link

Misleading tooltip for API Key field in Graphhopper online routing engine settings #18972

Open Max1234-Ita opened 9 months ago

Max1234-Ita commented 9 months ago

Description

In the settings of the Graphhopper routing engine, the API Key textbox contains the suggestion: "Keep it empty if not".

One might think that field should be kept empty. If I do that, however, the route calculation will never succeed, and when the "Test route calculation" button is tapped, it will return asn error message as a result --> "Server error: No API key specified. Please register and see documentation: https://www.graphhopper.com/developers" (see attached picture)

The route calculation actually works only if the user has a Graphhopper account, performs login to it and generates at least one API key at the https://graphhopper.com/dashboard/#/apikeys page.

I think the Graphhopper setting screen should be updated with better information for the user, i.e.

Steps to reproduce

  1. Launch OsmAnd.
  2. Select anhy navigation profile (i.e. "Car").
  3. Open the main menu and go to Configure profile -> Navigation settings -> Navigation type -> Online -> Add online routing engine .
  4. Choose the Graphhopper engine.
  5. Observe that the API key textbox contains the tooltip "Keep it empty if not".
  6. Without changing anything in this screen, tap the Test route calculation button; an error message is displayed, informing that the API key has not been specified.
  7. Paste an API key from Graphhopper (register to the site and generate one from any valid account, if missing).
  8. Test the route calculation again: this time it will return "Ok" as a result.

Actual result

The current information is misleading for the user, as he/she might think no API key is required and he/she might not succeed in properly configuring the online service.

Expected result

User should be informed that a Graphhopper account is required in order to get an API key; A direct link to the login/register page of that site would also help to get the key more easily.

Your Environment (required)

WARNING Crash-Logs MAY contain information you deem sensitive. Review this CAREFULLY before posting your issue!

OsmAnd Version: OsmAnd Plus v. 4.6.13
Android/iOS version: Android 11
Device model: Samsung Galaxy A50
Crash-Logs: None
yuriiurshuliak commented 9 months ago

This behavior was reproduced. If you select Graphhopper online routing type, the API Key textbox displays the prompt: "Keep it empty if not." Nevertheless, an API key is mandatory for this field.

Navigation settings -> Navigation type -> Online -> Add online routing engine

OsmAnd~ 4.7.0#1471m, released: 2024-01-30