MassGIS / morisoliver

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

Add a simple identify tool #192

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To streamline the identify process and link it to one layer only. 

Original issue reported on code.google.com by Aleda.Fr...@state.ma.us on 26 Dec 2012 at 9:07

GoogleCodeExporter commented 9 years ago
See r443.

I came up w/ something a bit different than the enhancement spec because I 
wanted to reuse as much of the query code as possible as well as keep from 
breaking the existing query functionality.

There is a new info-1 button that can either be pressed or not pressed.  It is 
a split button in that it also has a menu.  This menu mirrors what appears in 
the active data layers panel.  An entry will be grayed out if it is not visible 
/ scale is a problem / not queryable.  If you select a value from this menu AND 
have the button pressed, your subsequent queries will be effected.

Say you have school labels and buildings both checked ON and visible on your 
map.  Select the buildings from the info-1 menu.  This will cause the info-1 
button to be pressed.  Now perform either a bbox or a poly query.  You will 
notice that the query window has the same contents as before, but there is a 
difference.  Since you selected buildings, it is the ONLY layer to appear in 
the upper box.  AND the actual WFS GetFeature is automatically fired for you.  
This approach allowed me to keep the query window almost completely intact.  
And it also opens itself up to allowing you to UNCHECK the info-1 and have all 
the layers appear as normal.  If I had created an entirely new query window, 
handling this nuances would have been painful.

Let me know what you think.

I also included a change in the toolConfig_oliver.js for this new button.  I 
didn't really know what I was doing, but I followed the other buttons as a 
template.

Original comment by cpl...@gmail.com on 19 Apr 2013 at 7:00

GoogleCodeExporter commented 9 years ago
This corresponds to Task Order 5 enhancement 2. 

Original comment by Aleda.Fr...@state.ma.us on 22 Apr 2013 at 1:02

GoogleCodeExporter commented 9 years ago
I'm trying this in Firefox 20.0.1 and I'm getting pan behavior, whether I pick 
a layer from the list or not. Or zoom behavior, whichever tool I used last... 

For example:

open map_ol_to5/oliver.php
add a vector layer such as schools
pick the schools layer in the info-1 button
try to draw a box on the map... 

Original comment by Aleda.Fr...@state.ma.us on 22 Apr 2013 at 8:56

GoogleCodeExporter commented 9 years ago
I don't think this approach works for us exactly.
This is the thing - some viewers will have the info-1 and not the current 
identify (info-many?) or the polygon-info.  So I don't think we can have one 
tool influencing another.  I think we just want something simpler.  I don't 
mind the list and the grayed out layers, that's fine.  Just if someone wants 
info-1 and info-many and info-poly say... info-many and info-poly should work 
just as they do now... 

Original comment by Aleda.Fr...@state.ma.us on 22 Apr 2013 at 9:03

GoogleCodeExporter commented 9 years ago
Please give r449 a try.

Original comment by cpl...@gmail.com on 23 Apr 2013 at 6:25

GoogleCodeExporter commented 9 years ago
Tested in FF 20.0.1

It seems to work great in all my testing so far.
I identify on one layer and it works.
I do it again and it works again without me having to retouch the layer.
I can then switch to the identify-many button or the identify-by-poly button 
and that works properly.
I can switch back to query on one layer and it works. 
"Query" is greyed out if the layer is out of scale which is correct.
"Query" is greyed out for tilesets which is correct.
If I select more than 500 features it doesn't give me the table which is 
correct.
Query on rasters works.

Original comment by Aleda.Fr...@state.ma.us on 23 Apr 2013 at 7:15

GoogleCodeExporter commented 9 years ago
For consistency I think we should change the label from "Query" to "Identify" 
because that's what the other tool is called and it is an "i" icon.  

Original comment by Aleda.Fr...@state.ma.us on 23 Apr 2013 at 7:21

GoogleCodeExporter commented 9 years ago
Done in r450.

Original comment by cpl...@gmail.com on 23 Apr 2013 at 7:37

GoogleCodeExporter commented 9 years ago
I think I found a minor thing which I saw since we did this but I just wrote 
down the steps.

Open the new OLIVER.
Add a vector layer such as Hospitals
Right click on the layer in the "Active Data Layers" and choose Identify.
Draw a box on the map.
After you see the results close the identify window using the x in the upper 
right.
The thin line red box on the map is still there.
However, if you start OLIVER over fresh and do a multi-identify or 
poly-identify and THEN do a simple identify the box will disappear like it does 
with the multi-identify or poly-identify.  It's only when the single-identify 
is done first that it leaves the box behind.  I saw this in both FF 20 and IE 
10. 

Original comment by Aleda.Fr...@state.ma.us on 25 Apr 2013 at 4:11

GoogleCodeExporter commented 9 years ago
This is related I'm sure to the leftover thin red box.  
- Open OLIVER
- Add Schools
- Right click on Schools and choose Identify
- Draw a box to identify
- Afterwards, close the window
(red box will still be there)
- Choose the zoom in tool and draw a box to zoom in 
(map zooms)
- Right click on Schools and choose Identify
- Draw a box to identify
(map zooms instead of identifies)

There's just some stuck mode in there somehow.

Original comment by Aleda.Fr...@state.ma.us on 25 Apr 2013 at 4:56

GoogleCodeExporter commented 9 years ago
See if r453 does the trick.

Original comment by cpl...@gmail.com on 25 Apr 2013 at 6:02

GoogleCodeExporter commented 9 years ago
Yes, r453 took care of both issues.

Original comment by Aleda.Fr...@state.ma.us on 25 Apr 2013 at 6:15

GoogleCodeExporter commented 9 years ago
Emily caught this one:

In any non-custom basemap if I right click a layer and choose identify and then 
draw a box repeatedly on the map, the identify sticks to the one layer I 
choose.  If I switch to Custom it goes back to identifying on all the layers on 
the map. 

Original comment by Aleda.Fr...@state.ma.us on 10 May 2013 at 6:24

GoogleCodeExporter commented 9 years ago
Emily needs to stop changing projections!  :)

Original comment by cpl...@gmail.com on 10 May 2013 at 6:32

GoogleCodeExporter commented 9 years ago
Sorry, Emily.  I can't reproduce this.  Could you give me a few bullets?

Original comment by cpl...@gmail.com on 10 May 2013 at 6:36

GoogleCodeExporter commented 9 years ago
Sure, I'm testing with a map of Massachusetts towns and school buildings with 
the Google Satellite basemap.

If I right-click schools, choose identify, and then draw a box on the map, I 
get the identify results for the schools layer.

If I then change the basemap to Bing Hybrid, my cursor is still the identify 
tool. I can draw an identify box on the map and get the results for the schools 
layer.

If I change the basemap to Custom and draw the identify box on the map, I get 
results for both the towns and schools.

Original comment by emily.hu...@state.ma.us on 10 May 2013 at 6:48

GoogleCodeExporter commented 9 years ago
Very helpful.  Thank you much.

r465 should do it.

Original comment by cpl...@gmail.com on 10 May 2013 at 6:57

GoogleCodeExporter commented 9 years ago
r465 preserves single layer select across projection changes for me.... 

Original comment by Aleda.Fr...@state.ma.us on 10 May 2013 at 8:29

GoogleCodeExporter commented 9 years ago

Original comment by Aleda.Fr...@state.ma.us on 13 May 2013 at 3:21