Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
support Leaflet 1.1.0 and solved issue 167
  • Loading branch information
stefanocudini committed Aug 22, 2017
1 parent f1ee102 commit 02ec2c1
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -10,7 +10,7 @@ Support ajax/jsonp autocompletion and JSON data filter/remapping.

*Copyright [Stefano Cudini](http://labs.easyblog.it/stefano-cudini/)*

Tested in Leaflet 0.7.7,1.0
Tested in Leaflet 0.7.7 and 1.1.1

![Image](https://raw.githubusercontent.com/stefanocudini/leaflet-search/master/images/leaflet-search.jpg)

Expand Down
24 changes: 12 additions & 12 deletions TODO
Expand Up @@ -6,17 +6,17 @@ Tasks found in: src/leaflet-search.js
[Line: 26] [low] //TODO important optimization!!! always append data in this._recordsCache
[Line: 30] [low] //TODO here insert function that search inputText FIRST in _recordsCache keys and if not find results..
[Line: 33] [low] //TODO change structure of _recordsCache
[Line: 77] [low] //TODO implements uniq option 'sourceData' that recognizes source type: url,array,callback or layer
[Line: 412] [low] //TODO use .filter or .map
[Line: 475] [low] //TODO throw new Error("propertyName '"+propName+"' not found in JSON data");
[Line: 484] [low] //TODO add rnd param or randomize callback name! in recordsFromJsonp
[Line: 505] [low] //TODO add rnd param or randomize callback name! in recordsFromAjax
[Line: 610] [low] //TODO implements autype without selection(useful for mobile device)
[Line: 741] [low] //TODO _recordsFromLayer must return array of objects, formatted from _formatData
[Line: 762] [low] //TODO refact!
[Line: 776] [low] //TODO refact _handleAutoresize now is not accurate
[Line: 944] [low] //TODO refact animate() more smooth! like this: http://goo.gl/DDlRs
[Line: 968] [low] //TODO use create event 'animateEnd' in L.Control.Search.Marker
[Line: 79] [low] //TODO implements uniq option 'sourceData' that recognizes source type: url,array,callback or layer
[Line: 414] [low] //TODO use .filter or .map
[Line: 477] [low] //TODO throw new Error("propertyName '"+propName+"' not found in JSON data");
[Line: 486] [low] //TODO add rnd param or randomize callback name! in recordsFromJsonp
[Line: 507] [low] //TODO add rnd param or randomize callback name! in recordsFromAjax
[Line: 612] [low] //TODO implements autype without selection(useful for mobile device)
[Line: 743] [low] //TODO _recordsFromLayer must return array of objects, formatted from _formatData
[Line: 764] [low] //TODO refact!
[Line: 778] [low] //TODO refact _handleAutoresize now is not accurate
[Line: 946] [low] //TODO refact animate() more smooth! like this: http://goo.gl/DDlRs
[Line: 970] [low] //TODO use create event 'animateEnd' in L.Control.Search.Marker
[Line: 17] [med] //FIXME option condition problem {autoCollapse: true, markerLocation: true} not show location
[Line: 18] [med] //FIXME option condition problem {autoCollapse: false }
[Line: 875] [med] //FIXME autoCollapse option hide self._markerSearch before that visualized!!
[Line: 877] [med] //FIXME autoCollapse option hide self._markerSearch before that visualized!!
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "leaflet-search",
"version": "2.3.0",
"version": "2.3.2",
"main": [
"dist/leaflet-search.src.js",
"dist/leaflet-search.src.css"
Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet-search.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/leaflet-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/leaflet-search.mobile.min.css
@@ -1,5 +1,5 @@
/*
* Leaflet Control Search v2.3.0 - 2017-08-22
* Leaflet Control Search v2.3.2 - 2017-08-22
*
* Copyright 2017 Stefano Cudini
* stefano.cudini@gmail.com
Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet-search.mobile.src.css
@@ -1,5 +1,5 @@
/*
* Leaflet Control Search v2.3.0 - 2017-08-22
* Leaflet Control Search v2.3.2 - 2017-08-22
*
* Copyright 2017 Stefano Cudini
* stefano.cudini@gmail.com
Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet-search.src.css
@@ -1,5 +1,5 @@
/*
* Leaflet Control Search v2.3.0 - 2017-08-22
* Leaflet Control Search v2.3.2 - 2017-08-22
*
* Copyright 2017 Stefano Cudini
* stefano.cudini@gmail.com
Expand Down
8 changes: 5 additions & 3 deletions dist/leaflet-search.src.js
@@ -1,5 +1,5 @@
/*
* Leaflet Control Search v2.3.0 - 2017-08-22
* Leaflet Control Search v2.3.2 - 2017-08-22
*
* Copyright 2017 Stefano Cudini
* stefano.cudini@gmail.com
Expand Down Expand Up @@ -85,7 +85,9 @@ function _isObject(obj) {
}

L.Control.Search = L.Control.extend({
includes: L.Mixin.Events,

includes: L.version[0]==='1' ? L.Evented.prototype : L.Mixin.Events,

options: {
url: '', //url for search by ajax request, ex: "search.php?q={s}". Can be function that returns string for dynamic parameter setting
layer: null, //layer where search markers(is a L.LayerGroup)
Expand Down Expand Up @@ -898,7 +900,7 @@ L.Control.Search = L.Control.extend({

L.Control.Search.Marker = L.Marker.extend({

includes: L.Mixin.Events,
includes: L.version[0]==='1' ? L.Evented.prototype : L.Mixin.Events,

options: {
icon: new L.Icon.Default(),
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "leaflet-search",
"version": "2.3.0",
"version": "2.3.2",
"description": "Leaflet Control for searching markers/features by attribute on map or remote searching in jsonp/ajax",
"repository": {
"type": "git",
Expand Down
6 changes: 4 additions & 2 deletions src/leaflet-search.js
Expand Up @@ -69,7 +69,9 @@ function _isObject(obj) {
}

L.Control.Search = L.Control.extend({
includes: L.Mixin.Events,

includes: L.version[0]==='1' ? L.Evented.prototype : L.Mixin.Events,

options: {
url: '', //url for search by ajax request, ex: "search.php?q={s}". Can be function that returns string for dynamic parameter setting
layer: null, //layer where search markers(is a L.LayerGroup)
Expand Down Expand Up @@ -882,7 +884,7 @@ L.Control.Search = L.Control.extend({

L.Control.Search.Marker = L.Marker.extend({

includes: L.Mixin.Events,
includes: L.version[0]==='1' ? L.Evented.prototype : L.Mixin.Events,

options: {
icon: new L.Icon.Default(),
Expand Down

0 comments on commit 02ec2c1

Please sign in to comment.