From 92ee374494b83c47115f6f479530e7e9678ad562 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 25 May 2013 08:28:35 -0700 Subject: Find Google maps in Subsurface's source tree This way the user doesn't need to move the two folders googlemaps and googlesat around in the filesystem. This only works if Subsurface is started from the build directory - it doesn't work when Subsurface is installed (and it doesn't at all address the need to install these files and bundle them as well). I'd consider this a hack to show how the real solution should work. There is one more part of this that is a hack: Marble no longer searches its default data directory; the path we set replaces the Marble system search path. Sadly, Marble doesn't support paths the way Unix thinks of them with multiple directories, separated by ':'. So this means that Marble no longer finds any of its default icons. For most of them that seems fine as I don't think lacking the icons for "manned_landing", "robotic_rover", "unmanned_hard_landing" or the various types of places of worship that Marble supports is necessarily a big issues for Subsurface, but at least the default_location icon seemed important. And since we now need to carry our own, I replaced the boring circle with a tiny dive flag. Signed-off-by: Dirk Hohndel --- googlemaps/0/0/0.png | Bin 159 -> 0 bytes googlemaps/googlemaps.dgml | 80 ------------- googlemaps/preview.png | Bin 22138 -> 0 bytes googlesat/0/0/0.jpg | Bin 10036 -> 0 bytes googlesat/bicycle/0/0/0.png | Bin 191 -> 0 bytes googlesat/googlesat.dgml | 130 ---------------------- googlesat/preview.png | Bin 28358 -> 0 bytes googlesat/streets/0/0/0.png | Bin 191 -> 0 bytes marbledata/bitmaps/default_location.png | Bin 0 -> 400 bytes marbledata/maps/earth/googlemaps/0/0/0.png | Bin 0 -> 159 bytes marbledata/maps/earth/googlemaps/googlemaps.dgml | 80 +++++++++++++ marbledata/maps/earth/googlemaps/preview.png | Bin 0 -> 22138 bytes marbledata/maps/earth/googlesat/0/0/0.jpg | Bin 0 -> 10036 bytes marbledata/maps/earth/googlesat/bicycle/0/0/0.png | Bin 0 -> 191 bytes marbledata/maps/earth/googlesat/googlesat.dgml | 130 ++++++++++++++++++++++ marbledata/maps/earth/googlesat/preview.png | Bin 0 -> 28358 bytes marbledata/maps/earth/googlesat/streets/0/0/0.png | Bin 0 -> 191 bytes qt-ui/globe.cpp | 4 + 18 files changed, 214 insertions(+), 210 deletions(-) delete mode 100644 googlemaps/0/0/0.png delete mode 100644 googlemaps/googlemaps.dgml delete mode 100644 googlemaps/preview.png delete mode 100644 googlesat/0/0/0.jpg delete mode 100644 googlesat/bicycle/0/0/0.png delete mode 100644 googlesat/googlesat.dgml delete mode 100644 googlesat/preview.png delete mode 100644 googlesat/streets/0/0/0.png create mode 100644 marbledata/bitmaps/default_location.png create mode 100644 marbledata/maps/earth/googlemaps/0/0/0.png create mode 100644 marbledata/maps/earth/googlemaps/googlemaps.dgml create mode 100644 marbledata/maps/earth/googlemaps/preview.png create mode 100644 marbledata/maps/earth/googlesat/0/0/0.jpg create mode 100644 marbledata/maps/earth/googlesat/bicycle/0/0/0.png create mode 100644 marbledata/maps/earth/googlesat/googlesat.dgml create mode 100644 marbledata/maps/earth/googlesat/preview.png create mode 100644 marbledata/maps/earth/googlesat/streets/0/0/0.png diff --git a/googlemaps/0/0/0.png b/googlemaps/0/0/0.png deleted file mode 100644 index f7ab669ca..000000000 Binary files a/googlemaps/0/0/0.png and /dev/null differ diff --git a/googlemaps/googlemaps.dgml b/googlemaps/googlemaps.dgml deleted file mode 100644 index 01a63864b..000000000 --- a/googlemaps/googlemaps.dgml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - Google Maps - earth - googlemaps - - true - A global roadmap provided by Google.]]> - - 900 - 3700 - true - - - - - - - - - - earth/googlemaps - - - - - - - - cityplacemarks.kml - placemark - - - baseplacemarks.kml - placemark - - - elevplacemarks.kml - placemark - - - otherplacemarks.kml - placemark - - - boundaryplacemarks - placemark - - - - - - true - true - - - true - true - - - true - true - - - true - true - - - -
- Coordinate Grid -
-
-
-
diff --git a/googlemaps/preview.png b/googlemaps/preview.png deleted file mode 100644 index aa3181d29..000000000 Binary files a/googlemaps/preview.png and /dev/null differ diff --git a/googlesat/0/0/0.jpg b/googlesat/0/0/0.jpg deleted file mode 100644 index 4b9b73295..000000000 Binary files a/googlesat/0/0/0.jpg and /dev/null differ diff --git a/googlesat/bicycle/0/0/0.png b/googlesat/bicycle/0/0/0.png deleted file mode 100644 index febf01a9c..000000000 Binary files a/googlesat/bicycle/0/0/0.png and /dev/null differ diff --git a/googlesat/googlesat.dgml b/googlesat/googlesat.dgml deleted file mode 100644 index 0b70f14da..000000000 --- a/googlesat/googlesat.dgml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - Google Satellite - earth - googlesat - - true - A global roadmap provided by Google.]]> - - 900 - 3700 - true - - - - - - - - - - earth/googlesat - - - - - - earth/googlesat/streets - - - - - - - earth/googlesat/bicycle - - - - - - - - - cityplacemarks.kml - placemark - - - baseplacemarks.kml - placemark - - - elevplacemarks.kml - placemark - - - otherplacemarks.kml - placemark - - - boundaryplacemarks.kml - placemark - - - - - - true - true - - - true - true - - - true - true - - - true - true - - - - true - true - - - false - false - - - false - false - - - false - false - - - - - true - true - - - false - true - - - - -
- Transportation -
-
- Bicycle Routes -
-
- Coordinate Grid -
-
- Places of Interest -
-
-
-
diff --git a/googlesat/preview.png b/googlesat/preview.png deleted file mode 100644 index 5048d0a0f..000000000 Binary files a/googlesat/preview.png and /dev/null differ diff --git a/googlesat/streets/0/0/0.png b/googlesat/streets/0/0/0.png deleted file mode 100644 index febf01a9c..000000000 Binary files a/googlesat/streets/0/0/0.png and /dev/null differ diff --git a/marbledata/bitmaps/default_location.png b/marbledata/bitmaps/default_location.png new file mode 100644 index 000000000..3d4f3b5c3 Binary files /dev/null and b/marbledata/bitmaps/default_location.png differ diff --git a/marbledata/maps/earth/googlemaps/0/0/0.png b/marbledata/maps/earth/googlemaps/0/0/0.png new file mode 100644 index 000000000..f7ab669ca Binary files /dev/null and b/marbledata/maps/earth/googlemaps/0/0/0.png differ diff --git a/marbledata/maps/earth/googlemaps/googlemaps.dgml b/marbledata/maps/earth/googlemaps/googlemaps.dgml new file mode 100644 index 000000000..01a63864b --- /dev/null +++ b/marbledata/maps/earth/googlemaps/googlemaps.dgml @@ -0,0 +1,80 @@ + + + + + + Google Maps + earth + googlemaps + + true + A global roadmap provided by Google.]]> + + 900 + 3700 + true + + + + + + + + + + earth/googlemaps + + + + + + + + cityplacemarks.kml + placemark + + + baseplacemarks.kml + placemark + + + elevplacemarks.kml + placemark + + + otherplacemarks.kml + placemark + + + boundaryplacemarks + placemark + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + +
+ Coordinate Grid +
+
+
+
diff --git a/marbledata/maps/earth/googlemaps/preview.png b/marbledata/maps/earth/googlemaps/preview.png new file mode 100644 index 000000000..aa3181d29 Binary files /dev/null and b/marbledata/maps/earth/googlemaps/preview.png differ diff --git a/marbledata/maps/earth/googlesat/0/0/0.jpg b/marbledata/maps/earth/googlesat/0/0/0.jpg new file mode 100644 index 000000000..4b9b73295 Binary files /dev/null and b/marbledata/maps/earth/googlesat/0/0/0.jpg differ diff --git a/marbledata/maps/earth/googlesat/bicycle/0/0/0.png b/marbledata/maps/earth/googlesat/bicycle/0/0/0.png new file mode 100644 index 000000000..febf01a9c Binary files /dev/null and b/marbledata/maps/earth/googlesat/bicycle/0/0/0.png differ diff --git a/marbledata/maps/earth/googlesat/googlesat.dgml b/marbledata/maps/earth/googlesat/googlesat.dgml new file mode 100644 index 000000000..0b70f14da --- /dev/null +++ b/marbledata/maps/earth/googlesat/googlesat.dgml @@ -0,0 +1,130 @@ + + + + + + Google Satellite + earth + googlesat + + true + A global roadmap provided by Google.]]> + + 900 + 3700 + true + + + + + + + + + + earth/googlesat + + + + + + earth/googlesat/streets + + + + + + + earth/googlesat/bicycle + + + + + + + + + cityplacemarks.kml + placemark + + + baseplacemarks.kml + placemark + + + elevplacemarks.kml + placemark + + + otherplacemarks.kml + placemark + + + boundaryplacemarks.kml + placemark + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + + true + true + + + false + false + + + false + false + + + false + false + + + + + true + true + + + false + true + + + + +
+ Transportation +
+
+ Bicycle Routes +
+
+ Coordinate Grid +
+
+ Places of Interest +
+
+
+
diff --git a/marbledata/maps/earth/googlesat/preview.png b/marbledata/maps/earth/googlesat/preview.png new file mode 100644 index 000000000..5048d0a0f Binary files /dev/null and b/marbledata/maps/earth/googlesat/preview.png differ diff --git a/marbledata/maps/earth/googlesat/streets/0/0/0.png b/marbledata/maps/earth/googlesat/streets/0/0/0.png new file mode 100644 index 000000000..febf01a9c Binary files /dev/null and b/marbledata/maps/earth/googlesat/streets/0/0/0.png differ diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 0bd8f3d83..014a84a09 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #if INCOMPLETE_MARBLE #include "marble/GeoDataTreeModel.h" #else @@ -18,6 +19,9 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0) { + // this will find the Google maps when running from your build directory + // TODO: all the magic to find the install path (and actually install/bundle these files) + MarbleDirs::setMarbleDataPath(QDir("./marbledata").absolutePath()); messageWidget = new KMessageWidget(this); messageWidget->setCloseButtonVisible(false); messageWidget->setHidden(true); -- cgit v1.2.3-70-g09d2