]> git.street.me.uk Git - andy/viking.git/blobdiff - src/terraserver.c
Fix bug that causes crashes when click at the right of the track graph.
[andy/viking.git] / src / terraserver.c
index 9ddcb1af63728cda292abe65ae66520702267e1b..a28325a3fd1f6c3bef261f1cb27d8f172b6adfed 100644 (file)
 
 #include <gtk/gtk.h>
 #include <math.h>
 
 #include <gtk/gtk.h>
 #include <math.h>
+#include "viking.h"
 #include "coords.h"
 #include "vikcoord.h"
 #include "mapcoord.h"
 #include "http.h"
 #include "coords.h"
 #include "vikcoord.h"
 #include "mapcoord.h"
 #include "http.h"
+#include "vikmapslayer.h"
+
+#include "terraserver.h"
+
+void terraserver_init () {
+  VikMapsLayer_MapType map_type_1 = { 2, 200, 200, VIK_VIEWPORT_DRAWMODE_UTM, terraserver_topo_coord_to_mapcoord, terraserver_mapcoord_to_center_coord, terraserver_topo_download };
+  VikMapsLayer_MapType map_type_2 = { 1, 200, 200, VIK_VIEWPORT_DRAWMODE_UTM, terraserver_aerial_coord_to_mapcoord, terraserver_mapcoord_to_center_coord, terraserver_aerial_download };
+  VikMapsLayer_MapType map_type_3 = { 4, 200, 200, VIK_VIEWPORT_DRAWMODE_UTM, terraserver_urban_coord_to_mapcoord, terraserver_mapcoord_to_center_coord, terraserver_urban_download };
+
+  maps_layer_register_type("Terraserver Topos", 2, &map_type_1);
+  maps_layer_register_type("Terraserver Aerials", 1, &map_type_2);
+  maps_layer_register_type("Terraserver Urban Areas", 4, &map_type_3);
+}
 
 #define TERRASERVER_SITE "terraserver-usa.com"
 #define MARGIN_OF_ERROR 0.001
 
 #define TERRASERVER_SITE "terraserver-usa.com"
 #define MARGIN_OF_ERROR 0.001