* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+ /**
+ * SECTION:viktmsmapsource
+ * @short_description: the class for TMS oriented map sources
+ *
+ * The #VikTmsMapSource class handles TMS oriented map sources.
+ *
+ * The tiles are in 'equirectangular'.
+ * http://en.wikipedia.org/wiki/Equirectangular_projection
+ *
+ * Such service is also a type of TMS (Tile Map Service) as defined in
+ * OSGeo's wiki.
+ * http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification
+ * Following this specification, the protocol handled by this class
+ * follows the global-geodetic profile.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
static gboolean _coord_to_mapcoord ( VikMapSource *self, const VikCoord *src, gdouble xzoom, gdouble yzoom, MapCoord *dest );
static void _mapcoord_to_center_coord ( VikMapSource *self, MapCoord *src, VikCoord *dest );
-static gboolean _supports_download_only_new (VikMapSource *self );
+static gboolean _supports_download_only_new ( VikMapSource *self );
+static gboolean _is_direct_file_access ( VikMapSource *self );
static gchar *_get_uri( VikMapSourceDefault *self, MapCoord *src );
static gchar *_get_hostname( VikMapSourceDefault *self );
grandparent_class->coord_to_mapcoord = _coord_to_mapcoord;
grandparent_class->mapcoord_to_center_coord = _mapcoord_to_center_coord;
grandparent_class->supports_download_only_new = _supports_download_only_new;
+ grandparent_class->is_direct_file_access = _is_direct_file_access;
parent_class->get_uri = _get_uri;
parent_class->get_hostname = _get_hostname;
return 255;
}
-gboolean
-_supports_download_only_new (VikMapSource *self)
+static gboolean
+_is_direct_file_access ( VikMapSource *self )
+{
+ return FALSE;
+}
+
+static gboolean
+_supports_download_only_new ( VikMapSource *self )
{
g_return_val_if_fail (VIK_IS_TMS_MAP_SOURCE(self), FALSE);
g_return_val_if_fail (VIK_IS_TMS_MAP_SOURCE(self), NULL);
VikTmsMapSourcePrivate *priv = VIK_TMS_MAP_SOURCE_PRIVATE(self);
- gdouble socalled_mpp;
- if (src->scale >= 0)
- socalled_mpp = GZ(src->scale);
- else
- socalled_mpp = 1.0/GZ(-src->scale);
/* We should restore logic of viking:
* tile index on Y axis follow a screen logic (top -> down)
*/