X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/a29212b08440e5a50314a40f33f343942fcbcc51..0eb26799f0090b0a294cf0a61d17ba94b8d19132:/src/google.c?ds=sidebyside diff --git a/src/google.c b/src/google.c index e055dc85..de20d08e 100644 --- a/src/google.c +++ b/src/google.c @@ -24,20 +24,21 @@ #include +#include "globals.h" #include "google.h" -#include "google-map-type.h" -#include "google-kh-map-type.h" -#include "vikmapslayer.h" - +#include "vikexttools.h" +#include "vikwebtoolcenter.h" +#include "vikgoto.h" +#include "googlesearch.h" void google_init () { - VikMapType *google_1 = VIK_MAP_TYPE(google_map_type_new_with_id(7, TYPE_GOOGLE_MAPS)); - VikMapType *google_2 = VIK_MAP_TYPE(google_map_type_new_with_id(10, TYPE_GOOGLE_TRANS)); - VikMapType *google_3 = VIK_MAP_TYPE(google_kh_map_type_new_with_id(11)); - VikMapType *google_4 = VIK_MAP_TYPE(google_map_type_new_with_id(16, TYPE_GOOGLE_TERRAIN)); + // Webtools + VikWebtoolCenter *webtool = vik_webtool_center_new_with_members ( _("Google"), "http://maps.google.com/maps?f=q&geocode=&ie=UTF8&ll=%s,%s&z=%d&iwloc=addr" ); + vik_ext_tools_register ( VIK_EXT_TOOL ( webtool ) ); + g_object_unref ( webtool ); - maps_layer_register_type(_("Google Maps"), 7, google_1); - maps_layer_register_type(_("Transparent Google Maps"), 10, google_2); - maps_layer_register_type(_("Google Satellite Images"), 11, google_3); - maps_layer_register_type(_("Google Terrain Maps"), 16, google_4); + // Goto + GoogleGotoTool *gototool = google_goto_tool_new ( ); + vik_goto_register ( VIK_GOTO_TOOL ( gototool ) ); + g_object_unref ( gototool ); }