Class
ShumateMap
Description [src]
final class Shumate.Map : Gtk.Widget {
/* No available fields */
}
The Map widget is a GtkWidget
that show and allows interaction with
the user.
This is the base widget and doesn’t have advanced features. You can check the
ShumateSimpleMap
for a ready-to-use widget.
By default, a ShumateViewport
is created and can be accessed with
shumate_map_get_viewport()
.
Unless created with shumate_map_new_simple()
, the widget doesn’t hold any
layer and won’t show anything. A ShumateLayer
can be added or removed
using the shumate_map_add_layer()
or shumate_map_remove_layer()
methods.
Constructors
shumate_map_new
Creates an instance of ShumateMap
.
shumate_map_new_simple
Instance methods
shumate_map_add_layer
Adds a new layer to the view.
shumate_map_center_on
Centers the map on these coordinates.
shumate_map_get_animate_zoom
Checks whether the view animates zoom level changes.
shumate_map_get_go_to_duration
Get the ‘go-to-duration’ property.
shumate_map_get_state
Gets the view’s state.
shumate_map_get_viewport
Get the ShumateViewport
used by this view.
shumate_map_get_zoom_on_double_click
Checks whether the view zooms on double click.
shumate_map_go_to
Move from the current position to these coordinates. All tiles in the intermediate view WILL be loaded!
shumate_map_go_to_full
Move from the current position to these coordinates and zoom to the given zoom level. All tiles in the intermediate view WILL be loaded!
shumate_map_go_to_full_with_duration
Move from the current position to these coordinates and zoom to the given
zoom level. The given duration is used instead of the map’s default ShumateMap:go-to-duration
.
All tiles in the intermediate view WILL be loaded!
shumate_map_insert_layer_above
Adds layer
to self
above next_sibling
or, if next_sibling
is NULL
, at
the bottom of the layer list.
shumate_map_insert_layer_behind
Adds layer
to self
behind next_sibling
or, if next_sibling
is NULL
, at
the top of the layer list.
shumate_map_remove_layer
Removes the given layer from the view.
shumate_map_set_animate_zoom
Should the view animate zoom level changes.
shumate_map_set_go_to_duration
Set the duration of the transition of shumate_map_go_to()
.
shumate_map_set_map_source
Changes the currently used map source. #g_object_unref()
will be called on
the previous one.
shumate_map_set_zoom_on_double_click
Should the view zoom in and recenter when the user double click on the map.
shumate_map_stop_go_to
Stop the go to animation. The view will stay where it was when the animation was stopped.
shumate_map_zoom_in
Zooms the map in. If ShumateMap:animate-zoom
is TRUE
, the change will be animated.
shumate_map_zoom_out
Zooms the map out. If ShumateMap:animate-zoom
is TRUE
, the change will be animated.
Properties
Shumate.Map:animate-zoom
Animate zoom change when zooming in/out.
Shumate.Map:go-to-duration
The duration of an animation when going to a location, in milliseconds. A value of 0 means that the duration is calculated automatically for you.
Shumate.Map:state
The view’s global state. Useful to inform using if the view is busy loading tiles or not.
Shumate.Map:viewport
The viewport, which contains information about the center, rotation, zoom, etc. of the map.
Shumate.Map:zoom-on-double-click
Should the view zoom in and recenter when the user double click on the map.
Signals
Shumate.Map::animation-completed
The ShumateMap::animation-completed
signal is emitted when any animation in the view
ends. This is a detailed signal. For example, if you want to be signaled
only for go-to animation, you should connect to
“animation-completed::go-to”. And for zoom, connect to “animation-completed::zoom”.