Commits

stefano cudini  committed 46f3e9b Draft

update TODO list

  • Participants
  • Parent commits a2f1edc

Comments (0)

Files changed (3)

 
 . problem with jsonp/ajax when remote filter has different behavior of this._filterRecords, row 296
 
-. removeClass .search-load apparently executed before callData!! A BIG MYSTERY!, row 527
+. removeClass .search-load apparently executed before callData!! A BIG MYSTERY!, row 531
 
-. _handleAutoresize Should resize max search box size when map is resized., row 558
+. _handleAutoresize Should resize max search box size when map is resized., row 562
 
-. if collapse in _handleSubmit hide _markerLoc!, row 619
+. if collapse in _handleSubmit hide _markerLoc!, row 623
 
-. autoCollapse option hide this._markerLoc before that visualized!!, row 648
+. autoCollapse option hide this._markerLoc before that visualized!!, row 652
 
-. implement sub property filter for propertyName option like this value:  "pro1.subprop.title", row 26
+. implement sub property filter for propertyName,propertyLoc like this:  "prop.subprop.title", row 28
 
 . add option for persist markerLoc after collapse!, row 41
 
 
 . return also marker! in _recordsFromLayer, row 405
 
-. implements autype without selection(useful for mobile device), row 419
+. write support for GeoJson Layer features, row 409
 
-. important optimization!!! always append data in this._recordsCache, row 506
+. for GeoJSON not using: getLatLng(), row 413
 
-. here insert function that search inputText FIRST in _recordsCache keys and if not find results.. , row 509
+. implements autype without selection(useful for mobile device), row 423
 
-. change structure of _recordsCache, row 512
+. important optimization!!! always append data in this._recordsCache, row 510
 
-. refact _handleAutoresize now is not accurate, row 560
+. here insert function that search inputText FIRST in _recordsCache keys and if not find results.. , row 513
 
-. showLocation: start animation after setView or panTo, maybe with map.on('moveend')...	, row 644
+. change structure of _recordsCache, row 516
 
-. add custom icon!	, row 666
+. refact _handleAutoresize now is not accurate, row 564
 
-. add inner circle, row 674
+. showLocation: start animation after setView or panTo, maybe with map.on('moveend')...	, row 648
 
-. refact animate() more smooth! like this: http://goo.gl/DDlRs, row 730
+. add custom icon!	, row 670
 
-. use create event 'animateEnd' in SearchMarker , row 752
+. add inner circle, row 678
 
+. refact animate() more smooth! like this: http://goo.gl/DDlRs, row 734
+
+. use create event 'animateEnd' in SearchMarker , row 756
+

File leaflet-search.js

 	//	search_locationfound	{latlng, title}		fired after moved and show markerLocation
 	//
 	options: {
-		layer: null,				//layer where search markers(is a L.LayerGroup)
+		url: '',					//url for search by ajax request, ex: "search.php?q={s}"
+		layer: null,				//layer where search markers(is a L.LayerGroup)		
 		propertyName: 'title',		//property in marker.options trough filter elements in layer
-		//TODO implement sub property filter for propertyName option like this value:  "pro1.subprop.title"
 		propertyLoc: 'loc',			//field name for remapping location, using array: ['latname','lonname'] for select double fields(ex. ['lat','lon'] )
+		//TODO implement sub property filter for propertyName,propertyLoc like this:  "prop.subprop.title"
 		callData: null,				//function that fill _recordsCache, passed searching text by first param
 		callTip: null,				//function that return row tip html node, receive text tooltip in first param
-		url: '',					//url for search by ajax request, ex: "search.php?q={s}"
 		jsonpParam: null,			//jsonp param name for search by jsonp service, ex: "callback"
 		filterJSON: null,			//callback for filtering data to _recordsCache
 		minLength: 1,				//minimal text length for autocomplete
 		text: 'Search...',			//placeholder value	
 		textCancel: 'Cancel',		//title in cancel button
 		textErr: 'Location not found',	//error message
-		position: 'topleft'
+		position: 'topleft',
 		//TODO add option collapsed, like control.layers
 	},
 	
 		//TODO return also marker! in _recordsFromLayer
 		
 		this._layer.eachLayer(function(marker) {
-			if(marker.options.hasOwnProperty(propName))
+
+			//TODO write support for GeoJson Layer features
+		
+			if(marker.hasOwnProperty('options') && marker.options.hasOwnProperty(propName))
 				retRecords[ marker.options[propName] ] = marker.getLatLng();
+				//TODO for GeoJSON not using: getLatLng()
 			else
-				throw new Error("propertyName '"+propName+"' not found in marker");				
+				console.log("propertyName '"+propName+"' not found in marker");				
 		},this);
 		
 		return retRecords;