]> git.street.me.uk Git - andy/viking.git/blobdiff - src/bluemarble.c
Support all values of GPS Mode fixType.
[andy/viking.git] / src / bluemarble.c
index bfc710a0ccdbbcd1cac6a032c2eb16f4d4fc2546..a56068dff7d4336cc331d13e1711f5574389a8e9 100644 (file)
 
 #include "bluemarble.h"
 #include "vikmapslayer.h"
-#include "slippy-map-type.h"
+#include "vikslippymapsource.h"
+#include "map_ids.h"
 
 /* initialisation */
-void bluemarble_init () {
-  VikMapType *bluemarble_type = VIK_MAP_TYPE(slippy_map_type_new_with_id( 15, "s3.amazonaws.com", "/com.modestmaps.bluemarble/%d-r%3$d-c%2$d.jpg" ));
+void bluemarble_init ()
+{
+  VikMapSource *bluemarble_type = VIK_MAP_SOURCE(g_object_new(VIK_TYPE_SLIPPY_MAP_SOURCE,
+                                                             "id", MAP_ID_BLUE_MARBLE,
+                                                             "name", "BlueMarble",
+                                                             "label", "BlueMarble",
+                                                             "hostname", "s3.amazonaws.com",
+                                                             "url", "/com.modestmaps.bluemarble/%d-r%3$d-c%2$d.jpg",
+                                                             "zoom-min", 0,
+                                                             "zoom-max", 9,
+                                                             "copyright", "© NASA's Earth Observatory",
+                                                             "license", "NASA Terms of Use",
+                                                             "license-url", "http://visibleearth.nasa.gov/useterms.php",
+                                                             NULL));
+  /* Credit/Copyright from: http://earthobservatory.nasa.gov/Features/BlueMarble/ */
+  /* BlueMarble image hosting is courtesy of the Modest Maps project: http://modestmaps.com/ */
 
-  maps_layer_register_map_type("BlueMarble", bluemarble_type);
+  maps_layer_register_map_source (bluemarble_type);
 }