Permalink
Browse files

image to readme file, restyle .search-tip elements

  • Loading branch information...
stefanocudini committed May 20, 2014
1 parent 75ab103 commit 4a3754138d6893b1a55256e3697eaea4574641df
View
@@ -15,7 +15,7 @@ grunt.initConfig({
meta: {
banner:
'/* \n'+
' * Leaflet Search Control v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n'+
' * Leaflet Control Search v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n'+
' * \n'+
' * Copyright 2014 <%= pkg.author.name %> \n'+
' * <%= pkg.author.email %> \n'+
View
@@ -1,13 +1,14 @@
Leaflet.Control.Search
Leaflet Control Search
============
A leaflet control that search markers/features location by custom property.<br />
With ajax/jsonp autocompletion and JSON fields filter/remap
A Leaflet control that search markers/features location by custom property.<br />
Support ajax/jsonp autocompletion and JSON data filter/remapping.
Copyright 2014 [Stefano Cudini](http://labs.easyblog.it/stefano-cudini/)
Tested in Leaflet 0.7.2
![Image](https://raw.githubusercontent.com/stefanocudini/leaflet-search/master/images/leaflet-search.jpg)
#Where
@@ -20,16 +21,6 @@ Tested in Leaflet 0.7.2
[NPM](https://npmjs.org/package/leaflet-search)
[Atmosphere](https://atmosphere.meteor.com/package/leaflet-search)
#Build
Since Version 1.4.7 this plugin support [Grunt](http://gruntjs.com/) for building process.
Therefore the deployment require [NPM](https://npmjs.org/) installed in your system.
After you've made sure to have npm working, run this in command line:
```bash
npm install
grunt
```
#Examples
(require src/leaflet-search.css)
@@ -64,6 +55,7 @@ map.addControl( new L.Control.Search({
Search and color features vector in GeoJSON layer:
```javascript
var searchControl = new L.Control.Search({layer: geojsonLayer, circleLocation:false});
searchControl.on('search_locationfound', function(e) {
e.layer.setStyle({fillColor: '#3f0'});
@@ -74,6 +66,7 @@ searchControl.on('search_locationfound', function(e) {
featuresLayer.resetStyle(layer);
});
});
map.addControl(searchControl);
```
@@ -96,3 +89,12 @@ map.addControl(new L.Control.Search({
}) );
```
#Build
Since Version 1.4.7 this plugin support [Grunt](http://gruntjs.com/) for building process.
Therefore the deployment require [NPM](https://npmjs.org/) installed in your system.
After you've made sure to have npm working, run this in command line:
```bash
npm install
grunt
```
View
30 TODO
@@ -27,33 +27,3 @@ Tasks found in: src/leaflet-search.js
[Line: 358] [med] //FIXME problem with jsonp/ajax when remote filter has different behavior of this._filterRecords
[Line: 731] [med] //FIXME if collapse in _handleSubmit hide _markerLoc!
[Line: 761] [med] //FIXME autoCollapse option hide this._markerLoc before that visualized!!
Tasks found in: src/leaflet-search_collapsed.js
[Line: 22] [low] //TODO important! implements uniq option 'sourceData' that recognizes source type: url,array,callback or layer
[Line: 23] [low] //TODO implement can do research on multiple sources
[Line: 37] [low] //TODO add option for persist markerLoc after collapse!
[Line: 47] [low] //TODO add option collapsed, like control.layers
[Line: 52] [low] //TODO important optimization!!! always append data in this._recordsCache
[Line: 56] [low] //TODO here insert function that search inputText FIRST in _recordsCache keys and if not find results..
[Line: 59] [low] //TODO change structure of _recordsCache
[Line: 87] [low] // TODO: touch
[Line: 358] [low] //TODO add option for case sesitive search, also showLocation
[Line: 361] [low] //TODO use .filter or .map
[Line: 423] [low] //TODO throw new Error("propertyName '"+propName+"' not found in JSON data");
[Line: 428] [low] //TODO remove script node after call run
[Line: 437] [low] //TODO add rnd param or randomize callback name! in recordsFromJsonp
[Line: 457] [low] //TODO add rnd param or randomize callback name! in recordsFromAjax
[Line: 520] [low] //TODO implements autype without selection(useful for mobile device)
[Line: 620] [low] //TODO important optimization!!! always append data in this._recordsCache
[Line: 624] [low] //TODO here insert function that search inputText FIRST in _recordsCache keys and if not find results..
[Line: 627] [low] //TODO change structure of _recordsCache
[Line: 678] [low] //TODO refact _handleAutoresize now is not accurate
[Line: 774] [low] //TODO showLocation: start animation after setView or panTo, maybe with map.on('moveend')...
[Line: 795] [low] //TODO add custom icon!
[Line: 803] [low] //TODO add inner circle
[Line: 859] [low] //TODO refact animate() more smooth! like this: http://goo.gl/DDlRs
[Line: 881] [low] //TODO use create event 'animateEnd' in SearchMarker
[Line: 49] [med] //FIXME option condition problem {autoCollapse: true, markerLocation: true} not show location
[Line: 50] [med] //FIXME option condition problem {autoCollapse: false }
[Line: 374] [med] //FIXME problem with jsonp/ajax when remote filter has different behavior of this._filterRecords
[Line: 747] [med] //FIXME if collapse in _handleSubmit hide _markerLoc!
[Line: 777] [med] //FIXME autoCollapse option hide this._markerLoc before that visualized!!
View
@@ -1,6 +1,6 @@
{
"name": "leaflet-search",
"version": "1.5.1",
"version": "1.5.2",
"main": "leaflet-search.js",
"ignore": [
"**/.*",

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,5 +1,5 @@
/*
* Leaflet Search Control v1.5.1 - 2014-05-12
* Leaflet Control Search v1.5.2 - 2014-05-21
*
* Copyright 2014 Stefano Cudini
* stefano.cudini@gmail.com
@@ -1,5 +1,5 @@
/*
* Leaflet Search Control v1.5.1 - 2014-05-12
* Leaflet Control Search v1.5.2 - 2014-05-21
*
* Copyright 2014 Stefano Cudini
* stefano.cudini@gmail.com
@@ -1,5 +1,5 @@
/*
* Leaflet Search Control v1.5.1 - 2014-05-12
* Leaflet Control Search v1.5.2 - 2014-05-21
*
* Copyright 2014 Stefano Cudini
* stefano.cudini@gmail.com
@@ -91,31 +91,23 @@
top:100%;
left:0;
float:left;
min-width:80px;
max-height:106px;/*(.search-tip height * 5)*/
box-shadow: 0 0 8px rgba(0,0,0,0.4);
-webkit-border-radius: 5px;
-webkit-border-top-left-radius: 0;
-moz-border-radius: 5px;
-moz-border-radius-topleft: 0;
border-radius: 5px;
border-top-left-radius: 0;
min-width:120px;
max-height:122px;
box-shadow: 1px 1px 6px rgba(0,0,0,0.4);
background-color: rgba(0, 0, 0, 0.25);
z-index:1010;
overflow-y:auto;
overflow-x:hidden;
}
.leaflet-control-search .search-tip {
font-size:.85em;
margin:2px;
padding:2px;
padding:2px 4px;
display:block;
color:black;
background: #ddd;
background: #eee;
border-radius:.25em;
text-decoration:none;
white-space:nowrap;
font-size:.85em;
vertical-align:center;
}
.leaflet-control-search .search-tip-select,
@@ -1,5 +1,5 @@
/*
* Leaflet Search Control v1.5.1 - 2014-05-12
* Leaflet Control Search v1.5.2 - 2014-05-21
*
* Copyright 2014 Stefano Cudini
* stefano.cudini@gmail.com
View
Binary file not shown.
View
@@ -1,6 +1,6 @@
{
"name": "leaflet-search",
"version": "1.5.1",
"version": "1.5.2",
"description": "Leaflet Control for searching markers/features by attribute on map or remote searching in jsonp/ajax",
"repository": {
"type": "git",
View
@@ -3,6 +3,6 @@
"description": "Leaflet Control for searching markers/features by attribute on map or remote searching in jsonp/ajax",
"homepage": "http://labs.easyblog.it/maps/leaflet-search/",
"author": "Stefano Cudini <stefano.cudini@gmail.com>",
"version": "1.5.1",
"version": "1.5.2",
"git": "https://github.com/stefanocudini/leaflet-search.git"
}
View
@@ -75,31 +75,23 @@
top:100%;
left:0;
float:left;
min-width:80px;
max-height:106px;/*(.search-tip height * 5)*/
box-shadow: 0 0 8px rgba(0,0,0,0.4);
-webkit-border-radius: 5px;
-webkit-border-top-left-radius: 0;
-moz-border-radius: 5px;
-moz-border-radius-topleft: 0;
border-radius: 5px;
border-top-left-radius: 0;
min-width:120px;
max-height:122px;
box-shadow: 1px 1px 6px rgba(0,0,0,0.4);
background-color: rgba(0, 0, 0, 0.25);
z-index:1010;
overflow-y:auto;
overflow-x:hidden;
}
.leaflet-control-search .search-tip {
font-size:.85em;
margin:2px;
padding:2px;
padding:2px 4px;
display:block;
color:black;
background: #ddd;
background: #eee;
border-radius:.25em;
text-decoration:none;
white-space:nowrap;
font-size:.85em;
vertical-align:center;
}
.leaflet-control-search .search-tip-select,

0 comments on commit 4a37541

Please sign in to comment.