[gnome-maps/wip/mlundblad/shape-layer-fixes: 2/3] 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: 2/3] gpxShapeLayer: Use util function to get string from buffer
- Date: Fri, 15 Feb 2019 21:52:53 +0000 (UTC)
commit 6c4e191accb3a268318f33f4486d02d737b172f8
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]