GisPluginSrtm *self = _self;
g_mutex_lock(self->mutex);
gdouble lat, lon, elev;
- gis_view_get_location(self->view, &lat, &lon, &elev);
+ gis_viewer_get_location(self->viewer, &lat, &lon, &elev);
gis_tile_update(self->tiles,
MAX_RESOLUTION, TILE_WIDTH, TILE_WIDTH,
lat, lon, elev,
/*************
* Callbacks *
*************/
-static void _on_location_changed(GisView *view, gdouble lat, gdouble lon, gdouble elev,
- GisPluginSrtm *self)
+static void _on_location_changed(GisViewer *viewer,
+ gdouble lat, gdouble lon, gdouble elev, GisPluginSrtm *self)
{
g_thread_create(_update_tiles, self, FALSE, NULL);
}
/***********
* Methods *
***********/
-GisPluginSrtm *gis_plugin_srtm_new(GisWorld *world, GisView *view, GisOpenGL *opengl)
+GisPluginSrtm *gis_plugin_srtm_new(GisViewer *viewer, GisOpenGL *opengl)
{
g_debug("GisPluginSrtm: new");
GisPluginSrtm *self = g_object_new(GIS_TYPE_PLUGIN_SRTM, NULL);
- self->view = view;
+ self->viewer = viewer;
self->opengl = opengl;
/* Load initial tiles */
g_thread_create(_update_tiles, self, FALSE, NULL);
/* Connect signals */
- self->sigid = g_signal_connect(self->view, "location-changed",
+ self->sigid = g_signal_connect(self->viewer, "location-changed",
G_CALLBACK(_on_location_changed), self);
return self;
g_debug("GisPluginSrtm: dispose");
GisPluginSrtm *self = GIS_PLUGIN_SRTM(gobject);
/* Drop references */
- g_signal_handler_disconnect(self->view, self->sigid);
+ g_signal_handler_disconnect(self->viewer, self->sigid);
if (LOAD_BIL)
gis_opengl_clear_height_func(self->opengl);
G_OBJECT_CLASS(gis_plugin_srtm_parent_class)->dispose(gobject);