]> Pileus Git - grits/blobdiff - src/plugins/map.c
Document GisPluginMap
[grits] / src / plugins / map.c
index 7edc1ce64cc951d7b3ab909486bfb21c11e79a96..7395ef7792c7598d4220f356090550be70ecade5 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/**
+ * SECTION:map
+ * @short_description: Map plugin
+ *
+ * #GisPluginMap provides map overlays. Much of this data is obtained from the
+ * OpenStreetMap project.
+ */
+
 #include <time.h>
+#include <stdlib.h>
 #include <glib/gstdio.h>
 #include <GL/gl.h>
 
@@ -27,7 +36,7 @@
 #define TILE_WIDTH     1024
 #define TILE_HEIGHT    512
 
-const guchar colormap[][2][4] = {
+static const guchar colormap[][2][4] = {
        {{0x73, 0x91, 0xad}, {0x73, 0x91, 0xad, 0x20}}, // Oceans
        {{0xf6, 0xee, 0xee}, {0xf6, 0xee, 0xee, 0x00}}, // Ground
        {{0xff, 0xff, 0xff}, {0xff, 0xff, 0xff, 0xff}}, // Borders
@@ -40,7 +49,6 @@ struct _LoadTileData {
        GisTile      *tile;
        GdkPixbuf    *pixbuf;
 };
-#include <stdlib.h>
 static gboolean _load_tile_cb(gpointer _data)
 {
        struct _LoadTileData *data = _data;
@@ -151,6 +159,14 @@ static void _on_location_changed(GisViewer *viewer,
 /***********
  * Methods *
  ***********/
+/**
+ * gis_plugin_map_new:
+ * @viewer: the #GisViewer to use for drawing
+ *
+ * Create a new instance of the map plugin.
+ *
+ * Returns: the new #GisPluginMap
+ */
 GisPluginMap *gis_plugin_map_new(GisViewer *viewer)
 {
        g_debug("GisPluginMap: new");