-
Notifications
You must be signed in to change notification settings - Fork 89
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
Geoscribble #1373
Geoscribble #1373
Conversation
Wow thank you Ben for taking this on! I have a few suggestions:
|
Thanks for the great suggestions @Zverik - I've translated them into a series of to-dos in a comment on #1372. I have a couple of questions to ask if you have the time:
I'm not sure what you mean- can you explain more fully? Also, I noticed there is a UPDATE: Ah, now I see in the example swagger response that there's a 'text' field that can be rendered too. So that would be something for us to potentially throw at the label system. @bhousel comic sans for the label font? lolol |
Whoa cool - an |
Okay I've updated to include many of the suggestions. New video: Screen.Recording.2024-04-17.at.12.27.15.PM.mov |
Wow, thanks for iterating so quickly, I did not expect that!
|
Looking at the video I wonder, that it will be very important to quickly toggle the layers via shortcuts. This will be important to better focus/see the scribble and then draw something in the editor. Do all those layers/actions already have shortcuts? And speaking of those toggle-shortcuts, it might be a good idea to have a feature to show them (subtly) right in the UI (maybe flex+justify between on the right side of the box). I always struggle to remember the shortcuts and looking them up in the help menu is a big break in my mapping flow. There are branch previews now in rapid, right? Maybe only fro non-draft PRs? I could not find the preview link… |
Completely agree- imagery switching, enabling/disabling different layers/modes etc. will be made much better with more shortcuts. Yet, there are only so many keys on the keyboard, so I think that to enable something like this, a dynamic keyboard rebinding system might be the way to go.
There are, but because this branch has conflicts, the PR build-and-deploy doesn't fire. This is by design on github's part. I need to reconcile this branch with the massive changes that got landed yesterday, then the branch should deploy again. |
Refactor the geojson extent calc out of custom data and into the util class, get the Geoscribbles populated in an Rbush. Geoscribbles now appear on the map! Remove polygon rendering code from the geoscribble layer. Add thick/thin and color support for the scribbles. Add dashed line support to the scribbles. Only add dashes to lines that have dashed:true Move the scribbles layer between the background and the map data, so it appears under OSM. Also remove interactivity for the layer so no more inspection panel popup.
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.
This looks pretty good! Let's get it merged 🚀
@@ -20,6 +20,68 @@ export function utilTotalExtent(vals, graph) { | |||
return extent; | |||
} | |||
|
|||
/** |
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.
Good call refactoring these into util/ - we are starting to use them everywhere.
Maybe we will move them into the rapid-sdk later 🤔
I've tested it juno now — lines work good, already made some improvements to the map based on my recent survey. But I could not find how to read labels for point notes. Hovering over or clicking did not work, even with the OSM data layer turned off. Am I missing something? |
ah yeah I'm seeing this too - I'll figure out what's going on |
(re: #1373) - indent, documentation - some simplification where we can use Extent's builtin functions to do things (.bbox, .rectangle, .extendSelf) - remove a few unused things (inflightPost)
For now , in 0c32a17 I restored the interactivity so that users can see the data associated with the scribbles, and we can render any text through the existing labeling code. We can improve it more later, but this seems ok for today.. It will be interesting to see how users use this! ![]() |
Thank you Bryan! Good enough! Added the editor to the wiki list :) |
re: osmlab/editor-layer-index#2312 We built a service for this in #1373, so we don't want it to also show up as a raster overlay
There are a number of things in play here! Built this after conferring with @bhousel and @tannerwuster on strategy. I copied some of the code from the existing custom data layer and trimmed out all the extras (file loading, mouse event handling, etc) and created a new endpoint to obtain the geojson for the scribbles.
Area shown at lng/lat 59.32609/24.78173:
https://github.com/facebook/Rapid/assets/1887955/5eaf632a-d544-4240-b4c4-e8b94dcece9d