yjfcool / morisoliver

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

Add a buffer tool that can be an abutters list generator #191

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add a buffer tool that can be an abutters list generator

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

GoogleCodeExporter commented 9 years ago
Looks good! 

Original comment by Aleda.Fr...@state.ma.us on 15 May 2013 at 5:15

GoogleCodeExporter commented 9 years ago
I demoed this tool in two formats (select parcels, get parcels) and (select 
road segments, get parcels) to our Assistant Director Neil MacGaffey.  He likes 
it and has two changes he'd like if possible.

- It would be easier to distinguish which line is the buffer line if it was a 
dashed line.
- It would be easier for the user if we could customize the message the gets 
displayed when features are dropped from the select data layer and the buffer 
results data layer.
Currently you have a generic message "The number of eligible features has been 
automatically reduced due to filtering".  However, since we customize this tool 
for different situations it would be nice to be able in the 
toolConfig_oliver.js to have a more specific message.  "Parcels which are type 
ROW have been dropped from your selected set."  You are using from 
toolConfig_oliver.js the max number of parcels selected and using that in a 
popup so hopefully this concept is doable.  It would probably also be good to 
popup a message we specific in the toolConfig_oliver.js for the buffer result 
if drops have happened. 

Otherwise we think we can put this out for users and it will be useful.

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

GoogleCodeExporter commented 9 years ago
Aleda, I'm trying to see what I could do (easily) w/ the dashed lines.  No 
promises, but I can't test anything because GeoServer WFS is timeing out.  
Anything busted?

Original comment by cpl...@gmail.com on 16 May 2013 at 6:07

GoogleCodeExporter commented 9 years ago
One of the 3 is a little busy, but not too bad... 
If dashed doesn't work maybe we can pick a different color.

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

GoogleCodeExporter commented 9 years ago
See comments for r476 to see a toolconfig change.

Original comment by cpl...@gmail.com on 16 May 2013 at 6:18

GoogleCodeExporter commented 9 years ago
The dashed line looks nice.

For testing the message for dropped features, I'm getting a pop up that says 
"buffer query  undefined"

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

GoogleCodeExporter commented 9 years ago
This is my toolConfig_oliver.js: 
http://maps.massgis.state.ma.us/map_ol_to5/js/toolConfig_oliver.js

Original comment by Aleda.Fr...@state.ma.us on 16 May 2013 at 7:22

GoogleCodeExporter commented 9 years ago
We are also looking for 2 separate messages.  The first one you are doing - if 
a drop is going to happen in the select data layer, show the select data layer 
drop message.  Than, if a drop is going to happen in the buffer result data 
layer, show the result data layer drop message.

Original comment by Aleda.Fr...@state.ma.us on 16 May 2013 at 7:27

GoogleCodeExporter commented 9 years ago
I have changed the config to look for

toolSettings.identifyBuffer.droppedSelectFeaturesMessage
toolSettings.identifyBuffer.droppedBufferFeaturesMessage

Maybe that will address your comment 56.  Otherwise, I need some more detail.  
What parcel did you click on and at what point did you see that error message?

Original comment by cpl...@gmail.com on 16 May 2013 at 7:55

GoogleCodeExporter commented 9 years ago
My messages are working this morning! 

Original comment by Aleda.Fr...@state.ma.us on 17 May 2013 at 1:38

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Charlton, I started pulling everything together for the big deploy of all these 
OLIVER enhancements and started configuring the viewers in their final form.  I 
have a problem with viewers that use the filter tool.  In those viewers the 
simple identify works and simple buffer works and abutter's list tool works 
(and I hide the regular box and poly identifies).
See this: http://maps.massgis.state.ma.us/map_ol_to5/abington.php
To try the filter tool click the funnel tool.
Leave Town at All
For Property Type select 101 and 102
For total value put between 0 and 150000
When I click Apply I get an error:

TypeError: Ext.getCmp(...) is undefined
[Break On This Error]   

Ext.getCmp('queryBox').toggle(true);

http://maps.massgis.state.ma.us/map_ol_to5/js/toolConfig_sample_filter_abington.
js (line 1053)

Is this a problem with the ways tools are working together or a 
misconfiguration on my part?  I suspect the former because:

When I don't hide regular identify and poly identify I get bad filter behavior 
as well - it does a regular identify type of result.

To compare apples to apples look at 
http://maps.massgis.state.ma.us/map_ol/abington.php

These tools in my mind are separate from each other in that they can be 
shown/hidden independently (even though they may share code underneath to do 
their job).

Let me know if you want to do a JoinMe, this can be hard to explain. 

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

GoogleCodeExporter commented 9 years ago
A confirmation, I went back to this viewer in which I tested the abutters list:
http://maps.massgis.state.ma.us/map_ol_to5/becket_abutters.php
and the filter problem is there too.  I just never tried the filter, so I'm 
just discovering the problem. 

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

GoogleCodeExporter commented 9 years ago
A screen share sounds good to me.  I just ran through your steps in comment62 
and I don't seen an error.

Original comment by cpl...@gmail.com on 29 May 2013 at 3:30

GoogleCodeExporter commented 9 years ago
I thought about the cases and when it makes sense to drop the filter.  
Currently the filter is never dropped, only replaced with a new filter that the 
user specifies.  This doesn't work well with our abutter's tool and I think is 
an oversight in terms of how it interacts with other identifies.  

I think the only thing that makes sense (and hopefully is simple to do?) is for 
any filter to stay (through print, export, wms, permalink) active UNTIL another 
identify tool is clicked (there are 4 possible - regular, poly, simple or 
identifyBuffer). Currently those 4 act upon the filtered features.  For 
example, if the user does a filter to look for single family homes sold for < 
$100,000 then tries to do an abutter's list the abutter's list tool will only 
act on the filtered featureset.  When another identify tool such as abutter's 
list (identifyBuffer) is clicked the user will wanting logically to start 
without a filter and query on everything. (If they really want a different 
filter they can refine their filter.) 

The alternative to dropping the filter for them is to have a clear filter 
button but the user would need to remember to use this and it would be 
particularly difficult for them to remember in our case of transparent parcels 
polys when they can't easily see the filter affecting the map.  (it does affect 
the map, if we use the change symbology color swatches we can see that).

So, when regular, poly, simple or abutters "identify" tools are activated, the 
filter should be dropped from the filtered layer (only one filtered layer, 
specified in toolConfig_sample_filter.js) and the map should be redrawn to show 
all features in the filtered layer. 

That would mean that in this viewer: 
http://maps.massgis.state.ma.us/map_ol/dor_la3.php after a filter is done for, 
say, only single family homes between 0 and 150,000 and only red dots that fit 
the filter are on the map, when the user clicks regular identify tool "i" the 
map should redraw to show all the dots again.

If that is possible! Does that make sense?  Any other concerns? 

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

GoogleCodeExporter commented 9 years ago
r480 should return the filterbuilder to its original behavior (only one layer 
will be queried).  I noticed that if you do the normal filterbuilder query and 
THEN do a bbox query (w/ the results still open), it will fire a normal bbox 
query for all active layers.  I checked, and this matches production.

So the toolconfig will need to have a couple of lines changed (including the 
queryBox change you and I made together earlier):

if (Ext.getCmp('queryBox')) {Ext.getCmp('queryBox').toggle(true);}
runQueryStats(map.getExtent().toGeometry(),false,map.getLayersByName(toolSetting
s.filter.wmsLayerName)[0]);

Original comment by cpl...@gmail.com on 29 May 2013 at 5:19

GoogleCodeExporter commented 9 years ago
Re comment 65.  I think this should be promoted to its own issue.  In my mind 
it's not abutters-specific, and it MAY open up a can of worms that should be 
captured under its own issue.

Original comment by cpl...@gmail.com on 29 May 2013 at 5:21

GoogleCodeExporter commented 9 years ago
Yes, filter is locked down to the one layer again.  Tried both
http://maps.massgis.state.ma.us/map_ol_to5/dor_la3.php and
http://maps.massgis.state.ma.us/map_ol_to5/becket_abutters.php
Yes, and in dor_la3.php I can see that if I do the normal filterbuilder query 
and THEN do a bbox query (w/ the results still open), it will fire a normal 
bbox query for all active layers.

I'll make #65 a new issue.

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

GoogleCodeExporter commented 9 years ago
Showed this to Paul and he had one request (if possible).  Currently when the 
abutter's list tool is clicked the default units are meters. Any chance we 
could have feet be the default?  That's what we know most towns will be using.  
This is just a small convenience thing, it's perfectly fine without. 

Original comment by Aleda.Fr...@state.ma.us on 4 Jun 2013 at 5:07

GoogleCodeExporter commented 9 years ago
r481

Original comment by cpl...@gmail.com on 4 Jun 2013 at 5:54

GoogleCodeExporter commented 9 years ago
That's great - feet is the default now.. 

Original comment by Aleda.Fr...@state.ma.us on 4 Jun 2013 at 5:57

GoogleCodeExporter commented 9 years ago
r483 works to clear the filter if the abutters dropdown is clicks

Original comment by Aleda.Fr...@state.ma.us on 4 Jun 2013 at 8:21

GoogleCodeExporter commented 9 years ago
I think the way you've done it is something that works. 
I'll keep poking at it tomorrow to see if I can find any bugs but it looks good 
to me.

Original comment by Aleda.Fr...@state.ma.us on 4 Jun 2013 at 8:30

GoogleCodeExporter commented 9 years ago
OK, so I replaced the map.js and toolConfig_sample_filter_prisons.js and now I 
have http://maps.massgis.state.ma.us/map_ol_to5/prisons_filter.php

The filter has a drop down with 2 choices just like we talked about. 
I can modify the tool tip.
The filter builder tool stays "mashed" looking until I say "clear filter".
When I do say "clear filter" all the prisons show up on the map again. 
And after clearing the filter the regular identify and poly identify and simple 
identify use all the features again.

This is all great.

Now let me try the abutter's example:

http://maps.massgis.state.ma.us/map_ol_to5/avon.php

This is the one where we're using blue instead of transparent so we can see 
what's happening better with the filter.
It seems to work well.  The filter gets dropped when the abutters list tool is 
clicked.
The filter tool isn't mashed anymore and the map redraws all the features.
The abutter's list tool then works properly. 

I like this even more than what I was suggesting because I can see based on the 
Filter tool whether the filter is active.

I'm going to put it onto another town but with the transparent... 
http://maps.massgis.state.ma.us/map_ol_to5/bourne.php
That seems to work well too.

EXCEPT - I'm getting that error when I do an abutter's then I do a filter and 
it still thinks I'm in abutter's mode and gives me the error about > 3 
features. 
Except I can't seem to figure out how to reproduce it! 

Original comment by Aleda.Fr...@state.ma.us on 4 Jun 2013 at 8:39

GoogleCodeExporter commented 9 years ago
I see where this is an issue.

* bourne.php
* Zoom in to see parcels.
* Perform a filter builder request for type 101 and click apply.
* Close filter builder.
* Perform abutter request for 100 ft around a parcel.
* Now go back and click filter builder.  Since your abutter tool is still 
pressed, it thinks that the identify that the filter builder kicks off is an 
abutter query.

So should the filter builder unclick the abutter tool in all cases?

Original comment by cpl...@gmail.com on 4 Jun 2013 at 8:47

GoogleCodeExporter commented 9 years ago
I went ahead and made that happen in r484.

I also made several bug fixes that appeared w/ the previous mod.

Original comment by cpl...@gmail.com on 4 Jun 2013 at 9:00

GoogleCodeExporter commented 9 years ago
Yes, filter builder should unclick the abutter tool in all cases.
Strange I couldn't see that yesterday but I was pretty tired.
I'll test it now.

Original comment by Aleda.Fr...@state.ma.us on 5 Jun 2013 at 1:21

GoogleCodeExporter commented 9 years ago
I updated that map.js but I'm still getting the error message as described in 
#75.
* bourne.php
* Zoom in to see parcels.
* Perform a filter builder request for type 101 and click apply.
* Close filter builder.
* Perform abutter request for 100 ft around a parcel.
* Now go back and click filter builder.  Since your abutter tool is still 
pressed, it thinks that the identify that the filter builder kicks off is an 
abutter query.
At this point I see "We're sorry, but you have exceeded the maximum number of 
features (3) that you may select to buffer. Please reduce your selection and 
try again."

Original comment by Aleda.Fr...@state.ma.us on 5 Jun 2013 at 6:07

Attachments:

GoogleCodeExporter commented 9 years ago
I cleared my cache and closed and reopened FF as well... still getting the 
behavior.
This is the map.js: http://maps.massgis.state.ma.us/map_ol_to5/js/map.js 
Can you see your changes?

Original comment by Aleda.Fr...@state.ma.us on 5 Jun 2013 at 6:13

GoogleCodeExporter commented 9 years ago
You're missing some lines in your filter toolconfig which I forgot to commit 
until just now!  Sorry.

r485

Original comment by cpl...@gmail.com on 5 Jun 2013 at 7:38

GoogleCodeExporter commented 9 years ago
That does the trick! Works like a charm now.
I'll can do a little more testing in the morning and then I'll prep all my 
toolConfigs again and test like crazy on Monday for the final time, just in 
case... Thanks! 

Original comment by Aleda.Fr...@state.ma.us on 5 Jun 2013 at 8:28

GoogleCodeExporter commented 9 years ago

Original comment by Aleda.Fr...@state.ma.us on 19 Jun 2013 at 8:07