]> Pileus Git - grits/blobdiff - src/plugins/map.c
Add outline to markers
[grits] / src / plugins / map.c
index d30439187dfe13b3cbd67d58f2c9ea4a8d01e3c4..a0f28dcc454b6b3e1952098e26095c81920622dc 100644 (file)
@@ -134,12 +134,12 @@ static gpointer _update_tiles(gpointer _map)
 {
        g_debug("GisPluginMap: _update_tiles");
        GisPluginMap *map = _map;
-       g_mutex_lock(map->mutex);
-       gdouble lat, lon, elev;
-       gis_viewer_get_location(map->viewer, &lat, &lon, &elev);
-       gis_tile_update(map->tiles,
+       if (!g_mutex_trylock(map->mutex))
+               return NULL;
+       GisPoint eye;
+       gis_viewer_get_location(map->viewer, &eye.lat, &eye.lon, &eye.elev);
+       gis_tile_update(map->tiles, &eye,
                        MAX_RESOLUTION, TILE_WIDTH, TILE_WIDTH,
-                       lat, lon, elev,
                        _load_tile, map);
        gis_tile_gc(map->tiles, time(NULL)-10,
                        _free_tile, map);
@@ -188,7 +188,7 @@ GisPluginMap *gis_plugin_map_new(GisViewer *viewer)
                        G_CALLBACK(_on_location_changed), map);
 
        /* Add renderers */
-       gis_viewer_add(viewer, GIS_OBJECT(map->tiles), GIS_LEVEL_OVERLAY, 0);
+       gis_viewer_add(viewer, GIS_OBJECT(map->tiles), GIS_LEVEL_OVERLAY-1, 0);
 
        return map;
 }