[gnome-maps/wip/routing2] Sidebar: use geocodeService in mapView
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/routing2] Sidebar: use geocodeService in mapView
- Date: Tue, 10 Jun 2014 04:31:03 +0000 (UTC)
commit 114ec0e25abfbfd3392caff5803b431cd0c7fda8
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date: Tue Jun 10 02:45:44 2014 +0200
Sidebar: use geocodeService in mapView
src/mapView.js | 24 +++---------------------
1 files changed, 3 insertions(+), 21 deletions(-)
---
diff --git a/src/mapView.js b/src/mapView.js
index 53354e4..65e8acb 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -115,27 +115,9 @@ const MapView = new Lang.Class({
},
geocodeSearch: function(searchString, searchCompleteCallback) {
- let forward = Geocode.Forward.new_for_string(searchString);
- let places = [];
- let answerCount = Application.settings.get('max-search-results');
- let bbox = this.view.get_bounding_box();
-
- forward.search_area = new Geocode.BoundingBox({
- top: bbox.top,
- left: bbox.left,
- bottom: bbox.bottom,
- right: bbox.right
- });
- forward.bounded = false;
- forward.set_answer_count(answerCount);
- forward.search_async (null, (function(forward, res) {
- try {
- places = forward.search_finish(res);
- } catch (e) {
- places = null;
- }
- searchCompleteCallback(places);
- }).bind(this));
+ Application.geocodeService.search(searchString,
+ this.view.get_bounding_box(),
+ searchCompleteCallback);
},
ensureLocationsVisible: function(locations) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]