[gnome-maps/gnome-3-20] Print: Use new MapSource class



commit a033aada05e1d2b2cbb02f012d4754e08f437b62
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Thu Aug 4 00:07:40 2016 +0200

    Print: Use new MapSource class
    
    Use the new MapSource class to create the map source for printing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769491

 src/printLayout.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/printLayout.js b/src/printLayout.js
index 3d6da1c..64dd6c7 100644
--- a/src/printLayout.js
+++ b/src/printLayout.js
@@ -29,6 +29,7 @@ const PangoCairo = imports.gi.PangoCairo;
 const Application = imports.application;
 const InstructionRow = imports.instructionRow;
 const MapView = imports.mapView;
+const MapSource = imports.mapSource;
 const TurnPointMarker = imports.turnPointMarker;
 
 /* Following constant has unit as meters */
@@ -148,8 +149,7 @@ const PrintLayout = new Lang.Class({
         let pageNum = this.numPages - 1;
         let x = this._cursorX;
         let y = this._cursorY;
-        let factory = Champlain.MapSourceFactory.dup_default();
-        let mapSource = factory.create_cached_source(MapView.MapType.STREET);
+        let mapSource = MapSource.createStreetSource();
         let locations = [];
         let markerLayer = new Champlain.MarkerLayer();
         let view = new Champlain.View({ width: width,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]