[gnome-maps/wip/mlundblad/photon-geocode: 3/8] WIP: placeEntry: Use geocoder factory
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/photon-geocode: 3/8] WIP: placeEntry: Use geocoder factory
- Date: Sat, 25 May 2019 10:26:00 +0000 (UTC)
commit 7dd7c3847273004a36a3c8569b012a951dae83dd
Author: Marcus Lundblad <ml update uu se>
Date: Tue Apr 23 23:13:39 2019 +0200
WIP: placeEntry: Use geocoder factory
src/placeEntry.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/placeEntry.js b/src/placeEntry.js
index 4a08859..c5f4e8d 100644
--- a/src/placeEntry.js
+++ b/src/placeEntry.js
@@ -22,13 +22,14 @@
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
-const Geocode = imports.gi.GeocodeGlib;
+const GeocodeGlib = imports.gi.GeocodeGlib;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const Application = imports.application;
const GeocodeFactory = imports.geocode;
const Location = imports.location;
+const PhotonGeocode = imports.photonGeocode;
const Place = imports.place;
const PlaceStore = imports.placeStore;
const PlacePopover = imports.placePopover;
@@ -41,7 +42,7 @@ var PlaceEntry = GObject.registerClass({
'The selected place',
GObject.ParamFlags.READABLE |
GObject.ParamFlags.WRITABLE,
- Geocode.Place)
+ GeocodeGlib.Place)
}
}, class PlaceEntry extends Gtk.SearchEntry {
@@ -178,7 +179,7 @@ var PlaceEntry = GObject.registerClass({
}
if (this.text.startsWith('geo:')) {
- let location = new Geocode.Location();
+ let location = new GeocodeGlib.Location();
try {
location.set_from_uri(this.text);
@@ -207,6 +208,7 @@ var PlaceEntry = GObject.registerClass({
let bbox = this._mapView.view.get_bounding_box();
this._popover.showSpinner();
+
this._cancellable = new Gio.Cancellable();
GeocodeFactory.getGeocoder().search(this.text,
this._mapView.view.latitude,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]