Layers mechanism

Skip to first unread message

Monte Bateman

Dec 17, 2014, 3:45:11 PM12/17/14

I need to plot some point data on a map. I need to do it in time slices so I can animate the data. What seems to make the most sense is to make a layer for each time slice, then "flip" the layers to animate the display.

  1. I can add a layer to a map with osm_gps_map_layer_add()  if it is created like this:
    Layer1 = g_object_new (OSM_TYPE_GPS_MAP_OSD, NULL);

    If I try to create it with OSM_TYPE_GPS_MAP_LAYER, I get a structure error. Is this the correct way?  Will I have problems adding 10-20 of these "OSD" layers?

  2. How can I draw on a specific layer? I've tried emulating the cairo calls in the render routines, such as osm_gps_map_print_track(), but I don't know how to connect the cairo surface (cairo_t *cr) to a layer. It seems to be passed in a structure element called "priv", but I can't make it work. If I do this:

    OsmGpsMapPrivate *priv = Layer1->priv;
    cr = cairo_create (priv->pixmap);

    I get compile-time errors:
        error: dereferencing pointer to incomplete type
    on both lines.

Any ideas?  Any/all help appreciated!

Best Regards,
Monte Bateman

Reply all
Reply to author
0 new messages