GtkWidget *zoomer=(GtkWidget *)data;
gtk_range_set_value(GTK_RANGE(zoomer), zoom);
-return TRUE;
+return;
}
static gboolean
map=gtk_map_new();
gtk_map_set_tile_repository(map, rd);
+gtk_map_set_center_latlon(map, 64.25, 22.00);
gtk_box_pack_start(GTK_BOX(hbox), map, TRUE, TRUE, 0);
zoomer=gtk_vscale_new_with_range(0,17,1);
-g_signal_connect(G_OBJECT(zoomer), "value-changed", G_CALLBACK(map_zoom), NULL);
-g_signal_connect(G_OBJECT(map), "zoom-changed", G_CALLBACK(map_zoom_changed), zoomer);
-
gtk_box_pack_start(GTK_BOX(hbox), zoomer, FALSE, FALSE, 0);
btn_left=gtk_button_new_with_label("L");
btn_up=gtk_button_new_with_label("U");
btn_down=gtk_button_new_with_label("D");
-g_signal_connect(G_OBJECT(btn_up), "clicked", G_CALLBACK(map_pan_up), NULL);
-g_signal_connect(G_OBJECT(btn_down), "clicked", G_CALLBACK(map_pan_down), NULL);
-g_signal_connect(G_OBJECT(btn_left), "clicked", G_CALLBACK(map_pan_left), NULL);
-g_signal_connect(G_OBJECT(btn_right), "clicked", G_CALLBACK(map_pan_right), NULL);
-
gtk_box_pack_start(GTK_BOX(vbox), btn_left, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), btn_right, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), btn_up, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), btn_down, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
-
gtk_box_pack_start(GTK_BOX(dialog->vbox), hbox, TRUE, TRUE, 0);
+g_signal_connect(G_OBJECT(zoomer), "value-changed", G_CALLBACK(map_zoom), NULL);
+g_signal_connect(G_OBJECT(map), "zoom-changed", G_CALLBACK(map_zoom_changed), zoomer);
+
+g_signal_connect(G_OBJECT(btn_up), "clicked", G_CALLBACK(map_pan_up), NULL);
+g_signal_connect(G_OBJECT(btn_down), "clicked", G_CALLBACK(map_pan_down), NULL);
+g_signal_connect(G_OBJECT(btn_left), "clicked", G_CALLBACK(map_pan_left), NULL);
+g_signal_connect(G_OBJECT(btn_right), "clicked", G_CALLBACK(map_pan_right), NULL);
+
+gtk_map_set_zoom(map, 12);
+
gtk_widget_show_all(GTK_WIDGET(dialog));
gtk_dialog_run(dialog);