]> git.street.me.uk Git - andy/viking.git/blobdiff - test/gpx2gpx.c
A Mapnik Rendering layer
[andy/viking.git] / test / gpx2gpx.c
index 4799dca176bf1c2420e77d3222f07a88cb5bb499..e9a6b8aa9d7e8b6334915862118c31462ecff14f 100644 (file)
@@ -1,13 +1,17 @@
 #include <stdio.h>
 #include <gpx.h>
 #include <stdio.h>
 #include <gpx.h>
+#include <viklayer.h>
 
 int main(int argc, char *argv[])
 {
 
 int main(int argc, char *argv[])
 {
-  VikTrwLayer *trw = NULL;
-  g_type_init ();
-  trw = vik_trw_layer_new(0);
+#if !GLIB_CHECK_VERSION (2, 36, 0)
+  g_type_init();
+#endif
+  VikLayer *vl = vik_layer_create (VIK_LAYER_TRW, NULL, FALSE);
+  VikTrwLayer *trw = VIK_TRW_LAYER (vl);
   a_gpx_read_file(trw, stdin);
   a_gpx_read_file(trw, stdin);
-  a_gpx_write_file(trw, stdout);
-  vik_trw_layer_free (trw);
+  a_gpx_write_file(trw, stdout, NULL);
+  // NB no layer_free functions directly visible anymore
+  //  automatically called by layers_panel_finalize cleanup in full Viking program
   return 0;
 }
   return 0;
 }