-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Map-in-Map overview box #2554
Map-in-Map overview box #2554
Conversation
Very cool. @bhousel what is left to do before this is in a state to merge? Also are all the d3 changes you made in and final? I'm having trouble getting this working locally. This is as far as loading gets me on
|
I want to have the mini-map capture some mouse events, rather than passing them all through to the main map. Right now you can actually edit stuff underneath the mini-map, which is kind of hack. I'm going to see how complicated it is would be to implement some reasonable zoom/pan behavior. I guess I can also try to do a nominatum lookup for some "Where am I" text (#2515) Anything else you can think of?
Ah, thanks for finding that, it's something I broke in 3308b55, not D3's fault. I'll fix it in master. |
Sounds great, looking forward to it. |
(e.g. a site relation with a fence in it) Also, updated the test graph to contain one of these. see #2554 (comment)
This is in pretty good shape now.. Panning the mini-map will recenter the main map, which is nice. I did experiment with using nominatim to reverse geocode a description of where the map is centered, but I wasn't happy with the results. Most of the time it would return a "hamlet" that is either too obscure or total fiction. I had to go all the way out to the state level just to get it to not do that. So I think we should just stick to the locator overlay tiles that we're displaying - they are better anyway. |
This works great, perfect. Should the left margin match the buttons in the top bar? @bhousel This just needs tests and it's good to merge? |
I guess we could? My thought was actually to just set aside this region where extra UI widgets/plugins could render themselves. Want to loop @samanpwbb in tomorrow and see what he thinks? The Mapillary photos render themselves to the bottom right corner.. Maybe there is a coherent way we could organize these widgety things.
We don't really have test coverage of any of the other UI classes.. I'm not sure how to do it. Also, I just realized - I think I need to pick a different hotkey. 'M' is used for move too. |
@@ -683,7 +683,7 @@ a:hover .icon.out-link { background-position: -500px -14px;} | |||
float: left; | |||
height: 100%; | |||
overflow: hidden; | |||
z-index: 2; | |||
z-index: 10; |
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.
Since this is a navigational aid, what about adding it as a fourth item in the navigation toolbar below 'show my location': I'd also suggest moving the mapillary overlay to the top right, with a higher z-index than the minimap, so it occupies the same space as the minimap when active. This will open up more workspace if user is using both minimap and mapillary. |
I don't have really strong feelings either way, but I was kind of thinking longer term of evolving it into something like this: Where plugins might include minimap, Mapillary, distance measurement tool, task manager integration, etc etc. It looks kind of like Photoshop I guess. Then we wouldn't add any more buttons to iD, except one for installing and managing the user's plugins/widgets/addons. With the goal eventually pulling more of these things out of iD. (yes I have plugins on the brain, and I'm probably getting ahead of myself) |
* press 'M' to toggle * shows current zoom-6 * with locator overlay and bounding box
Moving towards a plugin system will definitely be great for keeping complexity at bay for beginners but enabling features for power users. I am afraid the design sketch you posted would be a too inflexible though. Different plugins will need design solutions that take different forms. I guess we can cross that bridge when we need to. Anyway, if this work is going to be refactored soon, probably fine to ship the minimap without too much fuss over the specifics until then. |
Ok, didn't know that. This works really well, seems solid to me. If you're happy with it I say merge away. 👍 We don't need to worry about other plugins for a while, but good to think about for now. cc @jfirebaugh |
Also, a few optimizations: * don't redraw the minimap unless mainmap dispatched a full redraw event * don't recenter mainmap on zoomend unless minimap actually got panned
Thanks! @samanpwbb I agree that plugins will be need ability to hook into different parts of iD and have very different UI depending on what they do. Definitely needs more thought. One final thing I added today was making it so that you can zoom/unzoom with the mousewheel, to control how far zoomed out the minimap is. Very useful. |
(e.g. a site relation with a fence in it) Also, updated the test graph to contain one of these. see openstreetmap#2554 (comment)
Pretty sweet!
@aaronlidman