"The level of zoom of the map",
0,
20,
- 1.0f,
+ 3,
CHAMPLAIN_PARAM_READWRITE));
/**
- * ChamplainView:zoom-level:
+ * ChamplainView:map-source:
*
- * The level of zoom of the content.
+ * The #ChamplainMapSource being displayed
*
- * Since: 0.1
+ * Since: 0.2
*/
g_object_class_install_property(object_class, PROP_MAP_SOURCE,
g_param_spec_int("map-source",
CHAMPLAIN_PARAM_READWRITE));
/**
- * ChamplainView:offline:
+ * ChamplainView:decel-rate:
*
- * If true, will fetch tiles from the Internet, otherwise, will only use cached content.
+ * The deceleration rate for the kinetic mode.
*
* Since: 0.2
*/
"Rate at which the view "
"will decelerate in "
"kinetic mode.",
- CLUTTER_FIXED_TO_FLOAT (CFX_ONE + CFX_MIN),
- CLUTTER_FIXED_TO_FLOAT (CFX_MAX),
+ 1.0,
+ 2.0,
1.1,
G_PARAM_READWRITE));
}
ChamplainViewPrivate *priv = CHAMPLAIN_VIEW_GET_PRIVATE (champlainView);
priv->mapSource = CHAMPLAIN_MAP_SOURCE_OPENSTREETMAP;
- priv->zoomLevel = 0;
+ priv->zoomLevel = 3;
priv->offline = FALSE;
}
/**
* champlain_view_new:
- *
+ * @mode: a #ChamplainViewMode, the scrolling mode
* Returns a new #ChamplainWidget ready to be used as a #GtkWidget.
*
* Since: 0.1
anchor->y = 0;
}
- //FIXME: Inform tiles that there is a new anchor
int i;
for (i = 0; i < priv->map->current_level->tiles->len; i++)
{
/**
* champlain_view_zoom_in:
- * @view: a #ChamplainView
+ * @champlainView: a #ChamplainView
*
* Zoom in the map by one level.
*
/**
* champlain_view_zoom_out:
- * @view: a #ChamplainView
+ * @champlainView: a #ChamplainView
*
* Zoom out the map by one level.
*
#include <glib-object.h>
#include <gtk/gtk.h>
+/**
+ * ChamplainMapSource:
+ * @CHAMPLAIN_MAP_SOURCE_DEBUG: Debug map, untested as of 0.2
+ * @CHAMPLAIN_MAP_SOURCE_OPENSTREETMAP: Open Street Map - Mapnick tiles
+ * @CHAMPLAIN_MAP_SOURCE_OPENARIALMAP: Open Arial Map
+ * @CHAMPLAIN_MAP_SOURCE_MAPSFORFREE_RELIEF: Maps for free - Relief tiles
+ *
+ * Type of scrolling.
+ */
typedef enum
{
CHAMPLAIN_MAP_SOURCE_DEBUG,
CHAMPLAIN_MAP_SOURCE_OPENSTREETMAP,
CHAMPLAIN_MAP_SOURCE_OPENARIALMAP,
- //CHAMPLAIN_MAP_SOURCE_GOOGLE_MAP,
- //CHAMPLAIN_MAP_SOURCE_GOOGLE_TERRAIN,
- //CHAMPLAIN_MAP_SOURCE_GOOGLE_SATELITE
CHAMPLAIN_MAP_SOURCE_MAPSFORFREE_RELIEF,
CHAMPLAIN_MAP_SOURCE_COUNT
} ChamplainMapSource;
};
-CHAMPLAIN_API GType champlain_view_get_type (void);
+GType champlain_view_get_type (void);
-CHAMPLAIN_API GtkWidget *champlain_view_new (ChamplainViewMode mode);
+GtkWidget *champlain_view_new (ChamplainViewMode mode);
-CHAMPLAIN_API void champlain_view_center_on (ChamplainView *view, gdouble longitude, gdouble latitude);
+void champlain_view_center_on (ChamplainView *view, gdouble longitude, gdouble latitude);
-CHAMPLAIN_API void champlain_view_zoom_in (ChamplainView *champlainView);
+void champlain_view_zoom_in (ChamplainView *champlainView);
-CHAMPLAIN_API void champlain_view_zoom_out (ChamplainView *champlainView);
+void champlain_view_zoom_out (ChamplainView *champlainView);
#endif
# Extra options to supply to gtkdoc-scan.
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
-SCAN_OPTIONS=
+SCAN_OPTIONS=--deprecated-guards="CHAMPLAIN_OBSOLETE_API"
# Extra options to supply to gtkdoc-mkdb.
# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
-HFILE_GLOB=
-CFILE_GLOB=
+HFILE_GLOB=$(top_srcdir)/champlain/*.h
+CFILE_GLOB=$(top_srcdir)/champlain/*.c
# Header files to ignore when scanning.
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
<bookinfo>
<title>libchamplain Reference Manual</title>
<releaseinfo>
- for libchamplain [VERSION]
+ for libchamplain 0.2
The latest version of this documentation can be found on-line at
- <ulink role="online-location" url="http://[SERVER]/libchamplain/index.html">http://[SERVER]/libchamplain/</ulink>.
+ <ulink role="online-location" url="http://blog.squidy.info/projects/libchamplain/">http://blog.squidy.info/projects/libchamplain/</ulink>.
</releaseinfo>
</bookinfo>
<SECTION>
<FILE>champlainview</FILE>
+<TITLE>ChamplainView</TITLE>
+<INCLUDE>champlain/champlainview.h</INCLUDE>
ChamplainMapSource
+ChamplainViewMode
CHAMPLAIN_CLASS
CHAMPLAIN_GET_CLASS
ChamplainViewPrivate
-<TITLE>ChamplainView</TITLE>
ChamplainView
+champlain_view_get_type
+champlain_view_new
+champlain_view_center_on
+champlain_view_zoom_in
+champlain_view_zoom_out
<SUBSECTION Standard>
CHAMPLAIN_VIEW
CHAMPLAIN_IS_VIEW
CHAMPLAIN_MAX_LONG
</SECTION>
-<SECTION>
-<FILE>champlain_defines</FILE>
-CHAMPLAIN_API
-CHAMPLAIN_OBSOLETE_API
-ChamplainView
-ChamplainViewClass
-Map
-</SECTION>
-
-<SECTION>
-<FILE>zoomlevel</FILE>
-zoom_level_get_width
-zoom_level_get_height
-zoom_level_new
-</SECTION>
-
-<SECTION>
-<FILE>map</FILE>
-Map
-map_load_visible_tiles
-map_zoom_in
-</SECTION>
-
-<SECTION>
-<FILE>champlain-marshal</FILE>
-champlain_marshal_VOID__OBJECT_OBJECT
-</SECTION>
-
-<SECTION>
-<FILE>tile</FILE>
-</SECTION>
-
-<SECTION>
-<FILE>openstreetmap</FILE>
-osm_init
-</SECTION>
-
-<SECTION>
-<FILE>debugmap</FILE>
-debugmap_init
-</SECTION>