summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ipmap.html4
-rw-r--r--ui/gtk/hostlist_table.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/ipmap.html b/ipmap.html
index 0ea1864236..c1686206ce 100644
--- a/ipmap.html
+++ b/ipmap.html
@@ -55,9 +55,9 @@
new OpenLayers.Control.ZoomBox(),
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.MousePosition(),
- new OpenLayers.Control.MouseDefaults(),
+ new OpenLayers.Control.Navigation(),
new OpenLayers.Control.Attribution()
- ],
+ ]
//projection: new OpenLayers.Projection("EPSG:900913"),
//displayProjection: new OpenLayers.Projection("EPSG:4326"),
//maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34, 20037508.34, 20037508.34),
diff --git a/ui/gtk/hostlist_table.c b/ui/gtk/hostlist_table.c
index c903fb1e1c..2f3e9f73f7 100644
--- a/ui/gtk/hostlist_table.c
+++ b/ui/gtk/hostlist_table.c
@@ -937,6 +937,7 @@ static gboolean
map_handle(GtkTreeModel *model, GtkTreePath *path _U_, GtkTreeIter *iter,
gpointer data)
{
+ static char *opener = "{\n";
map_t *map = (map_t *)data;
gchar *table_entry, *esc_entry;
guint64 value;
@@ -962,7 +963,7 @@ map_handle(GtkTreeModel *model, GtkTreePath *path _U_, GtkTreeIter *iter,
},
*/
- fputs("{\n", map->out_file);
+ fputs(opener, map->out_file);
fputs(" 'type': 'Feature', 'geometry': { 'type': 'Point', 'coordinates': [", map->out_file);
/* Longitude */
@@ -1027,7 +1028,9 @@ map_handle(GtkTreeModel *model, GtkTreePath *path _U_, GtkTreeIter *iter,
/* XXX - we could add specific icons, e.g. depending on the amount of packets or bytes */
fputs("' }\n", map->out_file);
- fputs("},\n", map->out_file); /* XXX - Trim the comma from the last item */
+ fputs("}", map->out_file);
+ opener = ",\n{\n";
+
map->hosts_written = TRUE;
return FALSE;