summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Danielsson <jonas@threetimestwo.org>2016-08-16 21:41:39 +0200
committerJonas Danielsson <jonas@threetimestwo.org>2016-08-22 20:11:49 +0200
commitacc70208adaaef2ac1296bbea8a3a9f622088809 (patch)
tree68c52ca39fcd980890357578bf2866a48b77ccc0
parent6a6a17ecb8ff83543891375ebd591d197830869e (diff)
downloadgnome-maps-acc70208adaaef2ac1296bbea8a3a9f622088809.tar.gz
Add print tile service
Use the print style from the service.json file for the print source. Right now it is same as street style. But gives us the possibility of having a special print style later. https://bugzilla.gnome.org/show_bug.cgi?id=769352
-rw-r--r--src/mapSource.js4
-rw-r--r--src/printLayout.js2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mapSource.js b/src/mapSource.js
index d7b82c45..f7f8df42 100644
--- a/src/mapSource.js
+++ b/src/mapSource.js
@@ -150,3 +150,7 @@ function createAerialSource() {
function createStreetSource() {
return _createCachedSource(_getTileService().street);
}
+
+function createPrintSource() {
+ return _createCachedSource(_getTileService().print);
+}
diff --git a/src/printLayout.js b/src/printLayout.js
index 64dd6c77..45868e9a 100644
--- a/src/printLayout.js
+++ b/src/printLayout.js
@@ -149,7 +149,7 @@ const PrintLayout = new Lang.Class({
let pageNum = this.numPages - 1;
let x = this._cursorX;
let y = this._cursorY;
- let mapSource = MapSource.createStreetSource();
+ let mapSource = MapSource.createPrintSource();
let locations = [];
let markerLayer = new Champlain.MarkerLayer();
let view = new Champlain.View({ width: width,