When typing a gridsquare in the field on the QSO page it will only get bearing and when the field has 4 chars saves useless calculation
这个提交包含在:
		
							父节点
							
								
									6aa0e5dfcc
								
							
						
					
					
						当前提交
						6ef6680aaa
					
				
					共有  1 个文件被更改,包括 15 次插入 和 16 次删除
				
			
		|  | @ -345,23 +345,22 @@ $(document).ready(function(){ | ||||||
|       /* On Key up Calculate Bearing and Distance */ |       /* On Key up Calculate Bearing and Distance */ | ||||||
|     $("#locator").keyup(function(){ |     $("#locator").keyup(function(){ | ||||||
|       if ($(this).val()) { |       if ($(this).val()) { | ||||||
|          $.getJSON('logbook/qralatlngjson/' + $(this).val(), function(result) |         var qra_input = $(this).val(); | ||||||
|          { |  | ||||||
|             console.log(result[0]); |  | ||||||
| 
 | 
 | ||||||
|               // Set Map to Lat/Long
 |         if(qra_input.length > 3) { | ||||||
|               markers.clearLayers(); |           $.getJSON('logbook/qralatlngjson/' + $(this).val(), function(result) | ||||||
|               if (typeof result !== "undefined") { |           { | ||||||
|                 console.log("defined!"); |             // Set Map to Lat/Long
 | ||||||
|                 var marker = L.marker([result[0], result[1]]); |             markers.clearLayers(); | ||||||
|                 mymap.setView([result[0], result[1]], 8); |             if (typeof result !== "undefined") { | ||||||
|               } |               var marker = L.marker([result[0], result[1]]); | ||||||
|  |               mymap.setView([result[0], result[1]], 8); | ||||||
|  |             } | ||||||
|  |             markers.addLayer(marker).addTo(mymap); | ||||||
|  |           }) | ||||||
|            |            | ||||||
|               markers.addLayer(marker).addTo(mymap); |           $('#locator_info').load("logbook/searchbearing/" + $(this).val()).fadeIn("slow"); | ||||||
| 
 |         } | ||||||
|          }) |  | ||||||
| 
 |  | ||||||
|         $('#locator_info').load("logbook/searchbearing/" + $(this).val()).fadeIn("slow"); |  | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用