ncsco / pinemap-dss-help

Issue tracker for PINEMAP DSS
0 stars 0 forks source link

Climate risk tool: panning after click #6

Closed hadinon closed 9 years ago

hadinon commented 9 years ago

Note: This bug occurs for me with both climate risk tools (summer precip and extreme min temp). I am using Firefox 38.0.1. Here's the bug:

When clicking on the map, after the time series loads, I am unable to pan around (and sometimes the zoom is also disabled).

daviswx commented 9 years ago

I was able to replicate this in Firefox, although for me, panning and zooming was slow or nearly unresponsive both before and after clicking the map to display the timeseries.

The slowness is apparently caused by the Firefox renderer, which can't seem to handle the detail in the counties GeoJSON layer.

I made a couple changes to that layer that seemed to help:

These reduced the layer file size from almost 6 MB to about 1 MB. I definitely notice improved performance on my end, although panning/zooming the map can still be a bit laggy in Firefox compared to other browsers.

If you have a chance to test this, let me know if you think the updates are acceptable, and whether any other states (maybe MO/IL/IN/OH/etc.) should be added to this layer.

Also, I could potentially add in a check that would detect the user's browser and choose which county layer to display, e.g., we could show the higher resolution version for Chrome and IE, and the low res one in Firefox.

Let me know what you think and feel free to close this issue once you think it's resolved.

hadinon commented 9 years ago

Hmmm interesting! Yes, it is definitely better but still a bit laggy. I like the idea of adding more states (maybe all states that fall within the "default" zoom extent) but would that slow it down even more? If yes, I guess there are a few options... you could keep as it is, or disable the county layer entirely if the user's browser is Firefox (until the issue is fixed). However, do you think they will fix the issue in future updates of Firefox? Either way, I like your idea of adding a check to see which browser is being used. Thanks!

daviswx commented 9 years ago

I just updated the layer to include all states in the default view, which basically adds a one-state northern buffer. It increased the file size to 1.7 MB, so it's not much larger, and I don't notice the lag is appreciably worse than before (but to be sure, it's still present).

I can imagine three reasonable options for handling the county layer:

Rather than running this by the beta testers, I wonder if we could ask a few folks from our office, plus maybe John Hastings, to test it in a few different browsers and to send their feedback about whether the lag is acceptable or too much for the map to be usable.

Also, maybe we could ask whether the low-res county lines are of sufficient detail to be useful, or if only the higher-res version should be used.

hadinon commented 9 years ago

Yes, I think that's a great plan of action! Do you want to send a quick note to a few SCO folks and John Hastings? Based on their feedback to the items in your last two paragraphs, we can decide which action items to pursue in your bulleted list. Sound good?

daviswx commented 9 years ago

Yep I'll contact a handful of folks later this week to get their feedback. Once I get the "no data" errors working from issue #9, I'll commit the recent updates and pull them down on the alpha site for that bit of testing.

I may set up a few different county line layers for them to try (basic, interactive low-res, and interactive high-res) so they can see the options we're considering.

daviswx commented 9 years ago

After alpha tester feedback, low-res county lines are displayed at wide zoom levels and high-res lines are displayed at close zoom levels.

Based on further testing and Ryan's feedback, I will turn off the county lines at the wide zoom levels since lag is still present in Firefox.

daviswx commented 9 years ago

The alpha site is now updated with our initial county line solution: Showing low-res lines at wide zoom levels and high-res lines at close zoom levels.

The dev site is updated with the newer solution we discussed: Disabling county lines altogether at wide zoom levels and enabling the high-res lines at close zoom levels.

I'm not a huge fan of this because to the end user, it might seem very arbitrary to have a layer unavailable in some cases, especially when it's an important layer like county lines. Feel free to explore the updated maps on the dev site, and maybe we can demonstrate and discuss this at our next meeting.

daviswx commented 9 years ago

New approach we discussed today: Have the basic county lines available far out, then switch to (high-res) interactive lines closer in.

It's on my to-do list.

daviswx commented 9 years ago

The new approach (basic county lines at wide zoom levels, high-res interactive lines at close zoom levels) is now working on the dev site.

The functionality seems to work fairly well in both Chrome and Firefox, and the transition from one set of county lines to the other is surprisingly seamless. The county name can be a little slow to pop up in Firefox, but it's not too bad, IMO.

However, I feel like the tooltip may not be enough to explain why the hover feature doesn't work at wide zoom levels. For instance, if a user is zoomed in and using the hover feature, then they zoom out and it doesn't work, it might not be obvious why.

One idea is that in the map layers legend, beneath or next to "County lines", there could be another bit of text that changes from "Basic" to "Interactive", depending on which one is available.

Another idea is to only show the navigation tooltip when the interactive lines are available.

Could you test out the new functionality and let me know if you encounter any problems, and also if you have any thoughts about explaining the difference in the legend?

hadinon commented 9 years ago

When testing in Chrome and Firefox, it seems pretty seamless to me, too!

Since at the widest zoom level, it is displaying the basic layer, do you think we should show the county lines by default? Or, did we decide against that? I forget.

Regarding the difference in the legend, what if we did both your ideas? Only show tooltip when interactive lines are available and also add basic or interactive next to the "County lines" text.

daviswx commented 9 years ago

I have added this functionality. By default, only "County lines" shows up in the menu. Once you zoom in on the map, the "Interactive" descriptor and tooltip are added.

I also can't remember what we decided about showing county lines by default. I'm fine with it either way, so if you have a preference, let me know and I can set it up that way.

daviswx commented 9 years ago

The "Basic" descriptor and tooltip have now been added to the legend. I'm not sure whether "basic" is the best descriptor. I also considered "simple" and "static", but those might not be any more meaningful to the user.

hadinon commented 9 years ago

Leaving the county lines off by default is fine with me.

I was just trying to think about this another way... what if we removed both tooltips and just said "County Lines (without names)" and "County Lines (with names)"? The only potential issue with this is, will people know to mouse over the zoomed in lines in order to display the names?! Sorry for going back and forth on this. Let me know what you think.

daviswx commented 9 years ago

To me, the description "with names" implies that the names will appear automatically on top of the counties. Also, "without names" may leave some doubt about why there aren't names, at least without a tooltip.

This may be another good question for Aim6. How do you succinctly and intuitively explain why the hover-over county names are only activated at a certain zoom level?

hadinon commented 9 years ago

Yes, good points! I will add this to the Aim 6 list of questions, which I plan to share with you shortly on Google Drive. :)

daviswx commented 9 years ago

Our latest discussion about the map layer options (ncsco/pinemap-dss-help/issues/21) recommends removing multiple county line options and only showing the interactive county lines layer when zoomed in to a certain level.

I will close this issue but if any other questions arise about the county layer labeling or county lines not working/being slow in some browsers, please re-open it.