-/* 1 << (x) is like a 2**(x) */
-#define GZ(x) ((1<<x))
-
-static const gdouble scale_mpps[] = { GZ(0), GZ(1), GZ(2), GZ(3), GZ(4), GZ(5), GZ(6), GZ(7), GZ(8), GZ(9),
- GZ(10), GZ(11), GZ(12), GZ(13), GZ(14), GZ(15), GZ(16), GZ(17) };
-
-static const gint num_scales = (sizeof(scale_mpps) / sizeof(scale_mpps[0]));
-
-static const gdouble scale_neg_mpps[] = { 1.0/GZ(0), 1.0/GZ(1), 1.0/GZ(2), 1.0/GZ(3) };
-static const gint num_scales_neg = (sizeof(scale_neg_mpps) / sizeof(scale_neg_mpps[0]));
-
-#define ERROR_MARGIN 0.01
-static gint slippy_zoom ( gdouble mpp ) {
- gint i;
- for ( i = 0; i < num_scales; i++ ) {
- if ( ABS(scale_mpps[i] - mpp) < ERROR_MARGIN ) {
- return i;
- }
- }
- for ( i = 0; i < num_scales_neg; i++ ) {
- if ( ABS(scale_neg_mpps[i] - mpp) < 0.000001 ) {
- return -i;
- }
- }
-
- return 255;
-}
-
-gchar *
-vik_slippy_map_source_get_uri( VikSlippyMapSource *self, MapCoord *src )
-{
- VikSlippyMapSourceClass *klass;
- g_return_val_if_fail (self != NULL, 0);
- g_return_val_if_fail (VIK_IS_SLIPPY_MAP_SOURCE (self), 0);
- klass = VIK_SLIPPY_MAP_SOURCE_GET_CLASS(self);
-
- g_return_val_if_fail (klass->get_uri != NULL, 0);
-
- return (*klass->get_uri)(self, src);
-}
-
-gchar *
-vik_slippy_map_source_get_hostname( VikSlippyMapSource *self )