Letractively / morisoliver

Automatically exported from code.google.com/p/morisoliver
0 stars 0 forks source link

Add red exclamation point icon for "no_project" layergroups when not in Custom basemap #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When you switch from Custom to a different basemap, a "no_project" layergroup 
is removed from the active data layers window. Instead, we'd like the 
layergroup to not be removed and for its icon to be a red exclamation point 
icon. For an example of a "no_project" layergroup, see the MassGIS Basemap in 
OLIVER.

Original issue reported on code.google.com by emily.hu...@state.ma.us on 29 Jul 2011 at 5:40

GoogleCodeExporter commented 9 years ago
This looks like it relates to Bug 735 on the scope of work.  "Don't allow 
layergroups in non-Blank basemaps if attribute = 'no_project'."  The red 
exclamation doesn't sound like it's exactly what the SOW outlined, but I'll see 
what I can do.  (Part of the trouble is that a red exclamation would be doing 
double duty:  an error and now a no_project.)

In any case, I can't see a no_project in any of the foldersets I have here.  
Can you point me to the specific layer, and if I don't have it here, I may need 
you to wrap up and send along some more slice_getcaps output, Aleda.

Original comment by cpl...@gmail.com on 19 Sep 2011 at 1:23

GoogleCodeExporter commented 9 years ago
The "no_project" layer is the layergroup "massgis_basemap" that is in the 
OLIVER folderset.  

<Folder title="MassGIS Basemap"><Layer title="MassGIS Basemap" style="" 
name="massgis_basemap" type="layergroup" only_project="EPSG:26986"/></Folder>

I can send you the slice_getcaps output for this.

Original comment by Aleda.Fr...@state.ma.us on 19 Sep 2011 at 4:09

GoogleCodeExporter commented 9 years ago
How does this relate to "only_project" which appears in the current codebase?  
I can't remember exactly what it does, thought.

Original comment by cpl...@gmail.com on 19 Sep 2011 at 5:11

GoogleCodeExporter commented 9 years ago
I thought "no_project" was for us to denote layergroups in GeoServer because 
they contain so many layers that they take too much time to reproject.  I don't 
remember an "only_project".  What part of the code are you finding that in, 
what does it do?

Original comment by Aleda.Fr...@state.ma.us on 19 Sep 2011 at 6:18

GoogleCodeExporter commented 9 years ago
only_project lists the only projection that is supported for the given layer.  
If a user attempts to add that layer to something other than its only_project 
value, an alert is shown and the layer is not added.  That sounds like the 
functionality that this issue is after.

It's also in the example you posted in your comment 2!

Original comment by cpl...@gmail.com on 19 Sep 2011 at 6:38

GoogleCodeExporter commented 9 years ago
You're right!  Sheesh.  I see it as only_project in my comment #2 now as well - 
I copied and pasted that from the folderset without reading it.  I guess it my 
mind it had changed to "no_project".  We are talking about the same thing then. 
 I think the layer "massgis_basemap" is the only example of this right now.  

Original comment by Aleda.Fr...@state.ma.us on 19 Sep 2011 at 6:41

GoogleCodeExporter commented 9 years ago
OK, testing OLIVER now.  I see the popup when I change basemaps. And the 
"massgis_basemap" is removed.  Was this a change in philosophy? That instead of 
the popup we'd do a red exclamation mark instead?  I'm confused about what CZM 
was thinking here, I don't remember.  Let me see if I can get them to look at 
this one. 

Original comment by Aleda.Fr...@state.ma.us on 19 Sep 2011 at 6:49

GoogleCodeExporter commented 9 years ago
The only_project has been around long before this wave of development began.

Original comment by cpl...@gmail.com on 19 Sep 2011 at 6:53

GoogleCodeExporter commented 9 years ago
Talked with Emily.  We are on the same page.  What we're looking for is no 
popup message, don't take the GeoServer layergroup away, but use a yellow icon. 
 That way if the user starts in OLIVER with the basemap they can switch to a 
different basemap but switch back and have their layergroup again.

Original comment by Aleda.Fr...@state.ma.us on 19 Sep 2011 at 6:59

GoogleCodeExporter commented 9 years ago
Hmm.  In order for the layer to appear in the active layer list, it *has* to be 
added to the map.  I could add it and have it unchecked and red-iconed perhaps. 
 But if the user were then to switch back to something no_project-happy, I 
wouldn't know to check it back on.

Original comment by cpl...@gmail.com on 19 Sep 2011 at 7:02

GoogleCodeExporter commented 9 years ago
If the user switched back, it would be unchecked but no red exclamation point?  
We could let the user check it back on.

Original comment by Aleda.Fr...@state.ma.us on 19 Sep 2011 at 7:06

GoogleCodeExporter commented 9 years ago
Is there any particular reason why this layer's name isn't 'massgis:' . . .?  I 
look for that in order to lump it in w/ a lot of the icon functionality (scale 
OK, raster OK, etc.), and it would make life much simpler if it were called 
that for this case, too.

Original comment by cpl...@gmail.com on 19 Sep 2011 at 8:01

GoogleCodeExporter commented 9 years ago
It's a "layergroup" in GeoServer which is different and the massgis: doesn't 
seem to apply.  I don't have control over the "massgis" that's the schema I 
think. It's too bad, it would be a lot more consistent.

Original comment by Aleda.Fr...@state.ma.us on 19 Sep 2011 at 8:02

GoogleCodeExporter commented 9 years ago
Give this a try.

Committed revision 124.

Original comment by cpl...@gmail.com on 19 Sep 2011 at 8:19

GoogleCodeExporter commented 9 years ago

Original comment by cpl...@gmail.com on 19 Sep 2011 at 8:20

GoogleCodeExporter commented 9 years ago
Bugger.  This is buggy.  Stay tuned.

Original comment by cpl...@gmail.com on 19 Sep 2011 at 8:30

GoogleCodeExporter commented 9 years ago
Sorry about that.  Should be worth testing now!

Committed revision 125.

Original comment by cpl...@gmail.com on 19 Sep 2011 at 8:35

GoogleCodeExporter commented 9 years ago
Charlton, could we have it yellow instead of red?  We changed our minds, so the 
title of this enhancement is not longer accurate. :) We think that red is too 
strong - it means "something is broken on the server".  Yellow sends more of a 
message of "you are not in the correct environment (scale, basemap) to see this 
feature).

Original comment by Aleda.Fr...@state.ma.us on 22 Sep 2011 at 2:45

GoogleCodeExporter commented 9 years ago
Other than the color it works fine here in FF 6 - it comes on when I switch 
away to a non-Custom basemap and I can turn it back on again when I go back to 
Custom. 

Original comment by Aleda.Fr...@state.ma.us on 22 Sep 2011 at 2:46

GoogleCodeExporter commented 9 years ago
That makes my stomach turn a bit since it was convenient for the same red icon 
to do double-duty.  To introduce 2 levels of caution would require extra checks 
throughout the code.

If you want to go ahead and make a yellow icon set for me, I can add it to the 
queue, but I don't want to promise it 100%.  Maybe we should put this off for 
now?

Original comment by cpl...@gmail.com on 22 Sep 2011 at 2:57

GoogleCodeExporter commented 9 years ago
Icon created

Original comment by Aleda.Fr...@state.ma.us on 22 Sep 2011 at 4:26

Attachments:

GoogleCodeExporter commented 9 years ago
I think I have integrated this OK.  If it turns out to be buggy, I might ask 
that we revert back to this issue's original request which was to show the red 
icon only.

This will only work for layergroups that have only_project defined.

v. 0.83
r215

Original comment by cpl...@gmail.com on 21 Nov 2011 at 4:15

GoogleCodeExporter commented 9 years ago
We now see the yellow exclamation points when changing from Custom to the other 
basemaps, but layer groups are no longer remembered in permalinks.

Original comment by emily.hu...@state.ma.us on 6 Dec 2011 at 6:54

GoogleCodeExporter commented 9 years ago
I'm not sure what you mean.  Could you give me a quick set of repeatable 
instructions?

Original comment by cpl...@gmail.com on 6 Dec 2011 at 7:06

GoogleCodeExporter commented 9 years ago
Hold the phone... I see it working in both map_ol and map_ol_mop on maps.  So 
the fact that it's not working on staging map be something else.  Let me check. 

Original comment by Aleda.Fr...@state.ma.us on 6 Dec 2011 at 7:18

GoogleCodeExporter commented 9 years ago
Verified. Only_project layer groups get yellow exclamation points when changing 
from custom to other basemaps and layer groups are included in the permalinks.

Original comment by emily.hu...@state.ma.us on 20 Dec 2011 at 8:20