From c79fed3c4304e3a049434484e87d40bd6a915bbd Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Mon, 25 Jan 2010 08:55:29 +0000 Subject: [PATCH] Add markers for WSR88D locations --- src/aweather-gui.c | 1 + src/plugins/radar.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/aweather-gui.c b/src/aweather-gui.c index 060e8ec..7cc9454 100644 --- a/src/aweather-gui.c +++ b/src/aweather-gui.c @@ -493,6 +493,7 @@ static void aweather_gui_init(AWeatherGui *self) GtkWidget *paned = aweather_gui_get_widget(self, "main_paned"); gtk_widget_destroy(gtk_paned_get_child1(GTK_PANED(paned))); gtk_paned_pack1(GTK_PANED(paned), GTK_WIDGET(self->viewer), TRUE, FALSE); + gtk_widget_show_all(GTK_WIDGET(self)); /* Plugins */ GtkTreeIter iter; diff --git a/src/plugins/radar.c b/src/plugins/radar.c index 13922f8..5a1fcef 100644 --- a/src/plugins/radar.c +++ b/src/plugins/radar.c @@ -635,6 +635,17 @@ GisPluginRadar *gis_plugin_radar_new(GisViewer *viewer, GisPrefs *prefs) self->location_changed_id = g_signal_connect(viewer, "location-changed", G_CALLBACK(_on_location_changed), self); + for (city_t *city = cities; city->type; city++) { + if (city->type != LOCATION_CITY) + continue; + g_debug("Adding marker for %s %s", city->code, city->label); + GisMarker *marker = gis_marker_new(city->label); + gis_point_set_lle(gis_object_center(GIS_OBJECT(marker)), + city->lat, city->lon, city->elev); + GIS_OBJECT(marker)->lod = EARTH_R/2; + gis_viewer_add(self->viewer, GIS_OBJECT(marker), GIS_LEVEL_OVERLAY, FALSE); + } + /* Add renderers */ GisCallback *callback; -- 2.43.2