Commits

stefano cudini committed 0179309 Draft

image to readme file, restyle .search-tip elements

  • Participants
  • Parent commits 50abc7c

Comments (0)

Files changed (14)

File Gruntfile.js

 	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'+
-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
 
 [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)
 
 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'});
 		featuresLayer.resetStyle(layer);
 	});	
 });
+
 map.addControl(searchControl);
 ```
 
 }) );
 ```
 
+#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
+```
     [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!!
 {
   "name": "leaflet-search",
-  "version": "1.5.1",
+  "version": "1.5.2",
   "main": "leaflet-search.js",
   "ignore": [
     "**/.*",

File dist/leaflet-search.min.css

 /* 
- * 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 
  * 
  */
 
-.leaflet-container .leaflet-control-search{position:relative;float:left;background:#fff;color:#1978cf;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:rgba(255,255,255,.8);z-index:1000;box-shadow:0 1px 7px rgba(0,0,0,.65);margin-left:10px;margin-top:10px}.leaflet-control-search.search-exp{box-shadow:0 1px 7px #999;background:#fff}.leaflet-control-search .search-input{display:block;float:left;background:#fff;border:1px solid #666;border-radius:2px;height:18px;padding:0 18px 0 2px;margin:3px 0 3px 3px}.leaflet-control-search.search-load .search-input{background:url(../images/loader.gif) no-repeat center right #fff}.leaflet-control-search.search-load .search-cancel{visibility:hidden}.leaflet-control-search .search-cancel{display:block;width:22px;height:18px;position:absolute;right:22px;margin:3px 0;background:url(../images/search-icon.png) no-repeat 0 -46px;text-decoration:none;filter:alpha(opacity=80);opacity:.8}.leaflet-control-search .search-cancel:hover{filter:alpha(opacity=100);opacity:1}.leaflet-control-search .search-cancel span{display:none;font-size:18px;line-height:20px;color:#ccc;font-weight:700}.leaflet-control-search .search-cancel:hover span{color:#aaa}.leaflet-control-search .search-button{display:block;float:left;width:26px;height:26px;background:url(../images/search-icon.png) no-repeat 2px 2px;border-radius:4px}.leaflet-control-search .search-button:hover{background:url(../images/search-icon.png) no-repeat 2px -22px}.leaflet-control-search .search-tooltip{position:absolute;top:100%;left:0;float:left;min-width:80px;max-height:106px;box-shadow:0 0 8px rgba(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;background-color:rgba(0,0,0,.25);z-index:1010;overflow-y:auto;overflow-x:hidden}.leaflet-control-search .search-tip{margin:2px;padding:2px;display:block;color:#000;background:#ddd;border-radius:.25em;text-decoration:none;white-space:nowrap;font-size:.85em;vertical-align:center}.leaflet-control-search .search-button:hover,.leaflet-control-search .search-tip-select,.leaflet-control-search .search-tip:hover{background-color:#fff}.leaflet-control-search .search-alert{cursor:pointer;clear:both;font-size:.75em;margin-bottom:5px;padding:0 .25em;color:#e00;font-weight:700;border-radius:.25em}
+.leaflet-container .leaflet-control-search{position:relative;float:left;background:#fff;color:#1978cf;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:rgba(255,255,255,.8);z-index:1000;box-shadow:0 1px 7px rgba(0,0,0,.65);margin-left:10px;margin-top:10px}.leaflet-control-search.search-exp{box-shadow:0 1px 7px #999;background:#fff}.leaflet-control-search .search-input{display:block;float:left;background:#fff;border:1px solid #666;border-radius:2px;height:18px;padding:0 18px 0 2px;margin:3px 0 3px 3px}.leaflet-control-search.search-load .search-input{background:url(../images/loader.gif) no-repeat center right #fff}.leaflet-control-search.search-load .search-cancel{visibility:hidden}.leaflet-control-search .search-cancel{display:block;width:22px;height:18px;position:absolute;right:22px;margin:3px 0;background:url(../images/search-icon.png) no-repeat 0 -46px;text-decoration:none;filter:alpha(opacity=80);opacity:.8}.leaflet-control-search .search-cancel:hover{filter:alpha(opacity=100);opacity:1}.leaflet-control-search .search-cancel span{display:none;font-size:18px;line-height:20px;color:#ccc;font-weight:700}.leaflet-control-search .search-cancel:hover span{color:#aaa}.leaflet-control-search .search-button{display:block;float:left;width:26px;height:26px;background:url(../images/search-icon.png) no-repeat 2px 2px;border-radius:4px}.leaflet-control-search .search-button:hover{background:url(../images/search-icon.png) no-repeat 2px -22px}.leaflet-control-search .search-tooltip{position:absolute;top:100%;left:0;float:left;min-width:120px;max-height:122px;box-shadow:1px 1px 6px rgba(0,0,0,.4);background-color:rgba(0,0,0,.25);z-index:1010;overflow-y:auto;overflow-x:hidden}.leaflet-control-search .search-tip{margin:2px;padding:2px 4px;display:block;color:#000;background:#eee;border-radius:.25em;text-decoration:none;white-space:nowrap;vertical-align:center}.leaflet-control-search .search-button:hover,.leaflet-control-search .search-tip-select,.leaflet-control-search .search-tip:hover{background-color:#fff}.leaflet-control-search .search-alert{cursor:pointer;clear:both;font-size:.75em;margin-bottom:5px;padding:0 .25em;color:#e00;font-weight:700;border-radius:.25em}

File dist/leaflet-search.min.js

 /* 
- * 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 

File dist/leaflet-search.mobile.min.css

 /* 
- * 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 

File dist/leaflet-search.mobile.src.css

 /* 
- * 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 

File dist/leaflet-search.src.css

 /* 
- * 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 
 	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,

File dist/leaflet-search.src.js

 /* 
- * 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 

File images/leaflet-search.jpg

Added
New image

File package.json

 {
   "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",
 	"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"
 }

File src/leaflet-search.css

 	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,