loleaflet: now the 'search' event has a 'highlightAll' property
Change-Id: I2fffe54d1474d4dea3fd2d69f5cadc8ff7a0f459
This commit is contained in:
parent
8145ac71af
commit
2a95b7dea3
1 changed files with 2 additions and 1 deletions
|
@ -519,6 +519,7 @@ L.TileLayer = L.GridLayer.extend({
|
|||
var obj = JSON.parse(textMsg);
|
||||
var originalPhrase = obj.searchString;
|
||||
var count = obj.searchResultSelection.length;
|
||||
var highlightAll = obj.highlightAll;
|
||||
var results = [];
|
||||
for (var i = 0; i < obj.searchResultSelection.length; i++) {
|
||||
results.push({
|
||||
|
@ -536,7 +537,7 @@ L.TileLayer = L.GridLayer.extend({
|
|||
this._map.setPart(results[0].part); // go to first result.
|
||||
}
|
||||
this._searchTerm = originalPhrase;
|
||||
this._map.fire('search', {originalPhrase: originalPhrase, count: count, results: results});
|
||||
this._map.fire('search', {originalPhrase: originalPhrase, count: count, highlightAll: highlightAll, results: results});
|
||||
},
|
||||
|
||||
_clearSearchResults: function() {
|
||||
|
|
Loading…
Reference in a new issue