My GitHub (http://github.com/rnorris/viking/commits/AutoZoom) has been updated 
in light of Greg's comments and my own continuing efforts.

>>>
>>> Robert Norris writes:
>
>>>> Options have been added to the Layer's menus to zoom to view the layer
>>>> / individual track / all waypoints.
>>>
>>>> NB if in the current zoom level, it can cover the view - then it does
>>>> not attempt to zoom in to find the 'best' zoom level.
>>>
>>> I don't understand that choice. In my case, I have a waypoints file
>>> with a waypoints in far away places (near Boston, near San Diego, and a
>>> few others). I want to see waypoints when they're near what I'm looking
>>> at, but if I say "show me the track gpx" I would like it to zoom to just
>>> fit the gpx data in that layer.
>>
>> This is an ease/simplicity of implementation.
>> The core algorithm just steps through zoom level until it finds one the 
>> covers the desired view.
>> ATM If the view is big enough it does not attempt closer match - I will look 
>> into doing this - perhaps a binary tree search through the zoom levels would 
>> produce the best match and could be faster.
>
> I suspect compared to rendering maps this takes 0 time even just linear.
> I would code linear and leave it until proven slow (had I spare time :-)).

Updated: It's still a linear search, but it's not slow and so always starting 
from a zoom factor of 1, it will find the best view (and never zoom in too 
close)

>>>> Possible improvements can be:
>>>>
>>>> . Set the view upon getting info from a GPS.
>>>
>>> probably that should be a checkable/sticky "keep GPS position onscreen",
>>> and it should then cause panning gps to center when gps goes outside of
>>> some area. not clear what it should do about zoom; my vote is don't touch.
>>
>> I haven't changed the realtime tracking mode.
>>
>> I've now been able to do it for acquire & gps layer download methods
>> auto view the new data. ATM there's no choice in the matter (although
>> if in realtime tracking mode - it doesn't auto view the downloaded gps
>> layer data - since it just jump to the GPS current position anyway)
>
> I guess I meant that "acquire and show gps real-time track" and "follow
> it" are logically separate things to want to do.

Updated: View is automatically updated on GPS / Google date acquires.

>>> 'view waypoints' is attached to a single waypoint menu-wise, but is
>>> about the layer. 'view waypoint'
>>
>> True, I thought it's a waypoint thing so I put it in the waypoint menu.
>> I will move it to the Layer menu.

Done.

>>> 'view track' is cool, and it might be useful to have 'view tracks' on the
>>> tracks part of the gpx.
>>

New: View All Tracks option.

>> Thanks, and yes but I that would involve reworking the layers menu system, 
>> since it has no menu!
>> However I can create some thing to go into the Layer menu.
>> [Also requires an extra internal maxmin of all tracks function - no problem]
>
> From a UI viewpoint, what I meant is that right-clicking on the name of
> the gpx file should let me view the file. Putting tracks/waypoints
> specific stuff in the global layer menu feels too crowded, but whatever
> is ok really.

The menu's are getting a little full - but hopefully better :)

                                          
_________________________________________________________________
http://clk.atdmt.com/UKM/go/195013117/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Viking-devel mailing list
Viking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/

Reply via email to