Merged
Conversation
Member
|
Nice! This looks much better and works already great. One question I have this config: profiles: {
car_delivery: {},
car: {},
car_avoid_some: {},
small_truck_1: {},
something: {},
}And somehow it starts counting at 0 for car and small_truck: And should we include "car" in the list of "car* prefixes"? I.e. in the case above it would then result in a list "car 1","car 2","car 3"? |
Contributor
Author
|
Oh, that is a bug, right. |
Contributor
Author
|
@karussell Should be fixed now |
Contributor
Author
* separate empty key from default profile name * a little less code
ZeroGxMax
pushed a commit
to minhhpkp/graphhopper-maps
that referenced
this pull request
Nov 12, 2024
* added translations * added german translation for towerslope * update german translations * replaced questions marks with numbers and added custom icon option * reformat code * added batch numbers to prevent duplicate icons * removed icon option in config; improved visabillity of batchNumbers * moved icons to seperate files; optimization * bug fix * separate empty key from default profile name * a little less code * improved key selection while creating customProfiles Record * separate empty key from default profile name (#1) * separate empty key from default profile name * a little less code --------- Co-authored-by: Peter <graphhopper@gmx.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


fixes #376
Better profile icons
This PR changes the behaviour of the profile icons, which is an addition to #368.
Icons can be added simpler
From now on, the icons are defined with a map inside the
profileIcons.ts. Every available SVG get's mapped to a specific key, so it will automatically be used, without any further code changes.Replaced question marks with numbers
When there is no icon available for that profile, an incremental number will be displayed.
Icons based on prefix
Icons now get their icons, based on their prefix. While standard profiles like
carorfootstill get their default icon, every profile with one of those as a prefix also gets the same base icon, but with a small number in the top right corner. Therefore, icons for custom profiles are now supported in a way.Example

... car_delivery, car_avoid_ferry, car_avoid_motorway, car_avoid_toll, small_truck_delivery, ...