[gnome-maps/wip/mlundblad/shape-layer-fixes: 8/9] gpxShapeLayer: Use util function to get string from buffer
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/shape-layer-fixes: 8/9] gpxShapeLayer: Use util function to get string from buffer
- Date: Mon, 18 Feb 2019 17:35:06 +0000 (UTC)
commit 915e2c4977de5f3a453b0c91650316e0a0bf2e41
Author: Marcus Lundblad <ml update uu se>
Date: Fri Feb 15 22:48:15 2019 +0100
gpxShapeLayer: Use util function to get string from buffer
src/gpxShapeLayer.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gpxShapeLayer.js b/src/gpxShapeLayer.js
index 6154b82..e3a23b9 100644
--- a/src/gpxShapeLayer.js
+++ b/src/gpxShapeLayer.js
@@ -21,6 +21,7 @@ const GObject = imports.gi.GObject;
const GeoJSONSource = imports.geoJSONSource;
const ShapeLayer = imports.shapeLayer;
+const Utils = imports.utils;
const Togeojson = imports.togeojson.togeojson;
const Domparser = imports.xmldom.domparser;
@@ -37,7 +38,7 @@ class GpxShapeLayer extends ShapeLayer.ShapeLayer {
}
_parseContent() {
- let s = this._fileContents.toString();
+ let s = Utils.getBufferText(this._fileContents);
let parser = new Domparser.DOMParser();
let json = Togeojson.toGeoJSON.gpx(parser.parseFromString(s));
this._mapSource.parse(json);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]