[gnome-maps/wip/mlundblad/photon-geocode: 9/13] contextMenu: Use geocoder factory for "What's here"
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/photon-geocode: 9/13] contextMenu: Use geocoder factory for "What's here"
- Date: Sun, 2 Jun 2019 13:37:35 +0000 (UTC)
commit 7998e08f1372afa74ac3524f427df1cb54a9694d
Author: Marcus Lundblad <ml update uu se>
Date: Wed May 1 23:21:01 2019 +0200
contextMenu: Use geocoder factory for "What's here"
Use the geocoder factory for performing reverse geocoding.
src/contextMenu.js | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/contextMenu.js b/src/contextMenu.js
index 4e802a7..19b5b45 100644
--- a/src/contextMenu.js
+++ b/src/contextMenu.js
@@ -28,6 +28,7 @@ const Mainloop = imports.mainloop;
const Application = imports.application;
const ExportViewDialog = imports.exportViewDialog;
+const GeocodeFactory = imports.geocode;
const Location = imports.location;
const OSMAccountDialog = imports.osmAccountDialog;
const OSMEdit = imports.osmEdit;
@@ -120,11 +121,8 @@ var ContextMenu = GObject.registerClass({
}
_onWhatsHereActivated() {
- let location = new Location.Location({ latitude: this._latitude,
- longitude: this._longitude,
- accuracy: 0 });
-
- Application.geocodeService.reverse(location, null, (place) => {
+ GeocodeFactory.getGeocoder().reverse(this._latitude, this._longitude,
+ (place) => {
if (place) {
this._mapView.showPlace(place, false);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]