[gnome-maps] mapView: only clear existing markers if needed
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] mapView: only clear existing markers if needed
- Date: Sun, 31 Mar 2013 18:26:25 +0000 (UTC)
commit 8080b3fb5492ca38bcd4965a51d3944697beca3f
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sun Mar 31 21:24:07 2013 +0300
mapView: only clear existing markers if needed
Only clear existing markers if there is new ones to show (i-e successful
search results).
src/mapView.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/mapView.js b/src/mapView.js
index b6b061a..9afb683 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -61,7 +61,6 @@ const MapView = new Lang.Class({
geocodeSearch: function(string) {
let forward = Geocode.Forward.new_for_string(string);
- this._markerLayer.remove_all();
forward.search_async (null, Lang.bind(this,
function(forward, res) {
@@ -95,6 +94,7 @@ const MapView = new Lang.Class({
_showLocations: function(locations) {
if (locations.length == 0)
return;
+ this._markerLayer.remove_all();
locations.forEach(Lang.bind(this,
function(location) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]