Rob Norris [Mon, 4 Mar 2013 18:54:31 +0000 (18:54 +0000)]
Optimize: Calculate associated icon of a waypoint only on change.
Instead of looking up a hash table on every waypoint draw on every layer draw;
store the icon reference in the waypoint itself and update only when necessary:
1. When the waypoint icon is changed directly by the user.
or
2. When implicitly changed via the size preference,
so add method to update all windows and then all waypoints to switch between
small<->large icons.
Rob Norris [Sun, 21 Oct 2012 17:59:10 +0000 (18:59 +0100)]
Make vik_viewport_coord_to_screen() calculation faster.
Since this function is used for every drawn trackpoint, this can be called
hundreds or thousands of times.
Thus calculate the fixed factors separately only when the dependent values change:
. factors dependent on the zoom level - set when the zoom level changes
. factors dependent on the screen size - set when the screen is resized.
Rob Norris [Sun, 21 Oct 2012 16:27:09 +0000 (17:27 +0100)]
Only attempt to draw waypoints when they are in the screens bounding box.
Store bounding box of all the waypoints in a TrackWaypoint layer.
Waypoints bounds are calculated on layer create and whenever the waypoints positions have changed.
Bump minimum glib due to usage of g_hash_table_iter_init ()
Rob Norris [Fri, 19 Oct 2012 11:32:05 +0000 (12:32 +0100)]
Store track bounding box and only attempt to draw it if some part of it
is visible on screen.
Bounds are calculated on TrackWaypoint creation (i.e. loading tracks
from a file or acquiring from an external source).
Bounds are recalculated on trackpoint changes.
Where 'simple' this is done within the vik_track update functions,
however much direct trackpoint list manipulation is performed by the TrackWaypoint layer,
such as the various merge and split functions, so the recalculation is called there.
Thus with multiple tracks, this skips attempting to draw all trackpoints
of every marked visible track when no part of the track is within the
current screen bounds.
This should mean Viking is much faster in drawing.
Note this still attempts to draw all trackpoints of a track should you
zoom 'inside' it. But this is not much of a penalty.
Rob Norris [Sat, 9 Mar 2013 10:29:46 +0000 (10:29 +0000)]
Extend map scales down to support 1/32 zoom level.
Refactor all usage of 'GZ()' and *_mpp_to_scale() to use common definitions.
Including the addition of map_utils_mpp_to_zoom_level() and use it with WebToolCenter.
Rob Norris [Wed, 6 Mar 2013 19:50:53 +0000 (19:50 +0000)]
Fix use of scaled tile image when tile image not present.
Due to the two stage initialization of the VIK_MAP_SOURCE the tilesize was actually set to zero.
This leads to the mapslayer redraw *not* trying differing tile zooms to get a pixbuf for the current zoom level.
First vik_map_source_init is performed (such as vik_slippy_map_source_init(),
which sets a specific tilesize value in the first g_object_new() call.
However since the tilesize parameter is 'G_PARAM_CONSTRUCT | G_PARAM_READWRITE',
on the second g_object_new() such as in osm_init(), since the tilesize is not specified
it seems it is then 'constructed' with the default g_param value - which in this case is 0.
Thus to prevent the resetting of the tilesize, set it to 'G_PARAM_READWRITE'
and hence the extra (re)construction is avoided.
Greg Troxel [Thu, 15 Dec 2011 19:12:11 +0000 (14:12 -0500)]
Allow zoom to 1/32.
Sometimes I want to look at a track in fine detail, perhaps to
understand quantization. I find the default limit of 1/8 meter per
pixel too constraining, and I don't find allowing the user to zoom in
a bit to be problematic.
Rob Norris [Tue, 26 Feb 2013 23:15:31 +0000 (23:15 +0000)]
Fix datasource acquiring waypoints from geotag images.
Still need to return something for the 'command'.
I think in some personnel reworking to the acquire.c method I stopped requiring the command to have a value, thus I removed it.
Unfortunately I shouldn't have checked in this change to the geotag datasource, as in the end the acquire rework didn't include this hoped for simplification.
Rob Norris [Wed, 23 Jan 2013 21:14:50 +0000 (21:14 +0000)]
Add default values for layers.
Add functions to set the default layer parameter data, which is used on initialization.
This uses the GKeyFile mechanism to read and write files.
Using the group type offers a straightforward way to map to the layer name.
Enable GUI access to change the default values.
Rework the layer initialization to use the current default value for each parameter.
Rob Norris [Sun, 10 Feb 2013 22:26:26 +0000 (22:26 +0000)]
Fix crashing if creating a DEM layer with no files.
Ensure the layer is realized before accepting updates, as VIK_GTK_WINDOW_FROM_LAYER will fail.
In the DEM case: since there's no files, the thread exits and generates a layer update before the layer is realized.
So it's better not to bother with a thread if there's no files to use.
Rob Norris [Sat, 9 Feb 2013 03:25:13 +0000 (03:25 +0000)]
Need more files for Windows packaging.
Put locale files in right place.
Add our text files and COPYING notices.
Setup to package GTK2.24.10
When creating via Wine - ensure production of items not known how on Windows:
. ChangeLog.txt
. Help PDF
. configure script
Rob Norris [Sun, 3 Feb 2013 22:13:30 +0000 (22:13 +0000)]
Windows: Script full generation of Windows build from scratch for version 1.4.
Aim to be able to automate the generation of Windows Viking Installer executable from scratch.
[Preferably from a Linux System using Wine]
Script to setup full Windows build environment (including various work-a-rounds),
using old but known to work MinGW5.1.6 + gcc3.4.5 compiler and various dependencies.
Miscellaneous scripts to make this work via Wine.
TODO: In the future look to using the current MinGW (Dev System) with gcc4.6+
This should hopefully simplify the auto build environment.
Since it is possible to change the zoom level from the status bar,
there is no more need for an other zoom level selector.
Furthermore, it is always better to have a GUI as clean as possible.
This patch remove the combo box allowing to select the zoom level
from the tool bar.
This patch also refactor the zoom levels related list.
A single click on zoom indicator on status bar opens a zoom selector.
It seems quite natural to click on the indicator to change the corresponding
value. As zoom level is displayed on statusbar, a click on statusbar should
open a zoom selector.
Rob Norris [Fri, 7 Dec 2012 22:45:51 +0000 (22:45 +0000)]
Add map layer option to only download missing tiles.
Useful for low bandwidth and/or pay for data services yet you want the convenience of the autodownload.
Also useful for map types which hardly ever change e.g. BlueMarble,
so no need to bother the server to ask if there are newer tiles!