-
Notifications
You must be signed in to change notification settings - Fork 39
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
Dem text bounds #491
Dem text bounds #491
Conversation
Looking good @bnordgren. You can see the thumbnail icon here for an example of what the previous implementation looked like (the second tutorial from the bottom, Downloading an Elevation File). Only that one image shows the old implementation, the actual tutorial has screen captures from the current one. Our new implementation doesn't have to be as elegant, since we are working on a total GUI overhaul in the coming year. I think adding text boxes like you have in map.htm is fine. It'd be nice to have options to both define the area based on bbox and a point and radius. The point and radius is really handy for some users. Can we group them somehow to make it clear that the bbox required entries and the point and radius entries are separate and can't both be defined? |
Well if you're having me do it's its going to be ugly. ;) I can just have the center+radius compute a bounding box, populate the N/S/E/W boxes and draw the rectangle. It should turn out to be three ways of looking at the same info. If someone manually defines a new bounding box, I can erase the center/radius. I do plan on just doing a rough conversion from radius to delta_lat and delta_lon based on a spherical earth. It should get them in the ballpark without trying to do crazy things in javascript. I'll look at grouping them. It'll just be a matter of tweaking the HTML and CSS until it doesn't look as barfy. |
I think this is working with the center+radius but the interaction is a little complex. Again, the conversion from miles to degrees is approximate. The user can always drag a box or type in a field:
Note: if there's no numbers in the bounding box fields, you're not ready to hit "download data". Being HTML, the arrangement of fields is somewhat dynamic and changes as you resize the window. It looks better if you make it wide enough that the grouped fields are one line a piece instead of "wrapping". Also, if you type a bounding box that's "off screen", you gotta go hunting for it with the map...If you care. |
This is looking good, but I noticed one issue - the edit and delete buttons on the map aren't working anymore. Can we fix these so the user can edit or delete the bounding box once it's on the map? Maybe we could add a little helper text in small font above the N/S/E/W boxes that says something like: Define your bounding box using one of the following methods. 1. Draw a box on the map using the box icon in the upper right corner of the map. 2. Enter bounding box coordinates in decimal degrees. 3. Specify a center lat/lon in decimal degrees and a radius. Once a bounding box is specified, the box will appear on the map and the coordinates will be displayed in the bounding box fields. Maybe we can provide labels for the bbox entry and the point and radius entry to denote that they are two separate things: Bounding Box Coordinates: Point and Radius: |
I made the changes we discussed. It's a very busy page with all the explanatory text in there. However, we got scroll bars back (they were explicitly turned off before.) If you want to edit the text, go all the way to the bottom and edit. Editing the style is way up at the top in a I got rid of the edit and delete buttons. We're not displaying the L.Draw element anymore, it's an L.rectangle which I construct from either the drawn object, the N/S/W/E bounds, or the Center/Radius boxes. It may be possible to make it editable but it's likely not worth the time to hone my Leaflet-fu unless you really need to graphically tweak the box. Can always draw another box. |
I just merged this into the master branch with only a few small changes. I got rid of the helper text, it was too cluttered like you said. I added some placeholder text in the text boxes to guide the user on how to input values. I'll update the relevant tutorials with screen captures and instructions on how to use the new functionality. Once this is done, I'll prepare the 3.9.0 release. |
This addresses part of #336, involving reinstating some functionality removed a while back.
I did not see the functionality previously. I chose to put the text fields in the
map.htm
file instead of the C++/QT code. There's four new boxes at the bottom of the downloader window which you can type lat/lon extents into.The box on the map updates with any change to the text fields or by the user drawing a new box. The text fields always display the extents to grab, whether the user typed them or drew a box.
I do not have a center point and radius implemented. Check it out to see if this is what you want. If it is, we can add in more boxes.