-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stop layer to new Debug UI #5602
Merged
leonardehrenfried
merged 27 commits into
opentripplanner:dev-2.x
from
leonardehrenfried:vector-debug
Jan 11, 2024
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
2218c1a
Add new debug vector tiles
leonardehrenfried 176187c
Add stop layer to tile.json
leonardehrenfried 7aaf79f
Move classes into their own packages
leonardehrenfried 033000a
Move styles into separate class
leonardehrenfried 57f07dd
Use style.json from server
leonardehrenfried 71f7393
Refactor dependencies of map style classes
leonardehrenfried ffd8ae6
Add popup data
leonardehrenfried da28cf2
Remove edge layer builder
leonardehrenfried 18eb243
Make styles a but prettier
leonardehrenfried 7cfbae8
Add test for debug style spec
leonardehrenfried c7395d8
Save a JSON round trip
leonardehrenfried 934b809
Add attribution, remove client side style
leonardehrenfried 826a842
Add documentation, fix frontend code
leonardehrenfried c864200
Make TS compiler happy
leonardehrenfried a18d77d
Convert from class to type
leonardehrenfried 1cbce1f
Use optional chaining
leonardehrenfried bed4eff
Rename the feature flag DebugClient to DebugUi, remove separate one f…
leonardehrenfried c4523af
Merge remote-tracking branch 'upstream/dev-2.x' into vector-debug
leonardehrenfried 4b98891
Update comment
leonardehrenfried 2b65d57
Make mapStyle configurable
leonardehrenfried 756a289
Use proper copyright symbol
leonardehrenfried 0503e9f
Merge remote-tracking branch 'upstream/dev-2.x' into vector-debug
leonardehrenfried 5972e5d
Resolve merge artifacts
leonardehrenfried 4fd4325
Update docs
leonardehrenfried c5dc289
Apply review feedback
leonardehrenfried 24d5929
Remove extra function definition
leonardehrenfried cf5d875
Remove extra method call indirection
leonardehrenfried File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
VITE_API_URL=/otp/routers/default/transmodel/index/graphql | ||
VITE_API_URL=/otp/routers/default/transmodel/index/graphql | ||
VITE_DEBUG_STYLE_URL=/otp/routers/default/inspector/vectortile/style.json |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
VITE_API_URL=http://localhost:8080/otp/routers/default/transmodel/index/graphql | ||
VITE_API_URL=http://localhost:8080/otp/routers/default/transmodel/index/graphql | ||
VITE_DEBUG_STYLE_URL=http://localhost:8080/otp/routers/default/inspector/vectortile/style.json |
27 changes: 27 additions & 0 deletions
27
client-next/src/components/MapView/GeometryPropertyPopup.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { LngLat, Popup } from 'react-map-gl'; | ||
import { Table } from 'react-bootstrap'; | ||
|
||
export function GeometryPropertyPopup({ | ||
coordinates, | ||
properties, | ||
onClose, | ||
}: { | ||
coordinates: LngLat; | ||
properties: { [s: string]: string }; | ||
onClose: () => void; | ||
}) { | ||
return ( | ||
<Popup latitude={coordinates.lat} longitude={coordinates.lng} closeButton={true} onClose={() => onClose()}> | ||
<Table bordered> | ||
<tbody> | ||
{Object.entries(properties).map(([key, value]) => ( | ||
<tr key={key}> | ||
<th scope="row">{key}</th> | ||
<td>{value}</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</Table> | ||
</Popup> | ||
); | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's neat. A potential improvement could be to instead zoom in one level if you encounter a cluster? Not critical for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if that would be a good or bad UX but I'm willing to try it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's something I've seen in other map implementations at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We agreed that we will implement in an upcoming PR.