[Geoprisma-dev] Highlight on shortcut

Yves Moisan yves.moisan at boreal-is.com
Wed Feb 24 14:30:48 EST 2010


Alexandre Dube a écrit :
> Hey,
>
>  Thanks for the new feature and your hard work.
>
>  I think there might be a small issue on the way it's done.  See at :
>
> http://www.geoprisma.org/samples/shortcut/activateresources/index.php
>
>  * from the first combobox, select 111.  The road gets highlighted.
>  * click on map, the road is unhighlighted.
>  * from the first combobox, select 113.
>  * from the first combobox, select 111.  The road doesn't get 
> highlighted.
>  * from the first combobox, select 138.
>  * from the first combobox, select 111.  The road gets highlighted.
>
>  Weird.  I guess it's a map "move" event problem...
Hi Alexandre,

I noticed some roads get highlighted and some don't depending on the 
zoom level you're at.  When you select a road # and the road doesn't get 
highlighted, try zooming in one level and you'll see the road gets 
highlighted.  Zoom out again and it's not anymore but zoom in and there 
it is.  Click on the map and it's not highlighted even when zooming in 
(which is the behaviour we want).  So there's something with the zoom 
level the map zooms to when shortcut is called.

Try it with 138 : the first occurrence will highlight (oMap.getScale() = 
24999.9999999999), but the second (oMap.getScale() =
500000.00000000006) won't.  Zoom in then and pan.  You'll see the whole 
138 is indeed highlighted.  Same for 393, they all highlight except the 
last one

Yves

>
> Alexandre
>
>
> Yves Moisan wrote:
>> Hi Folks,
>>
>> r798 closes a first pass on feature highlighting.  With that commit, 
>> the ShortCut widget behaves like the InitialView : if an existing 
>> vector (featureserver) layer exists, it uses that for highlighting, 
>> else it creates a temporary one.  The way it's implemented is a bit 
>> different than in InitialView so maybe we'll be due for some code 
>> refactoring soon.  Also, I'm pretty sure we could do better than 
>> create/destroy the temps layer on evert zoomTo event triggered by the 
>> ShortCut.
>>
>> Like for the InitialView, highlighting is optional (in the ShortCut 
>> options in the configuration file).  I changed the 3 config.xml files 
>> for the ShortCut examples to include highlighting.  Also : the 
>> unhighlight (or temp vector layer destruction) is triggered on click 
>> now rather than on moveend both for ShortCut and InitialView.  This 
>> allows users to zoom in/out and still see the feature highlighted.  I 
>> thought pan would work too, but it seems the mouse drag ends up as a 
>> click so panning unhighlights features.
>> Cheers,
>>
>> Yves
>> _______________________________________________
>> Geoprisma-dev mailing list
>> Geoprisma-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geoprisma-dev
>
>




More information about the Geoprisma-dev mailing list