[gnome-maps/wip/mlundblad/photon-geocode: 5/9] 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: 5/9] contextMenu: Use geocoder factory for "What's here"
- Date: Mon, 27 May 2019 19:45:58 +0000 (UTC)
commit ac626e4cbef1991ae81e2a0ee366b9823aeb9a04
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]