[Dashboard] Map now follows user selection for showing icon and colour
Visual decision to not show home marker or locs on the dashboard
这个提交包含在:
		
							父节点
							
								
									1cf2b3cd41
								
							
						
					
					
						当前提交
						3788a84ee9
					
				
					共有  1 个文件被更改,包括 38 次插入 和 2 次删除
				
			
		|  | @ -806,6 +806,37 @@ if ($this->session->userdata('user_id') != null) { | ||||||
| <?php if ($this->uri->segment(1) == "" || $this->uri->segment(1) == "dashboard") { ?>
 | <?php if ($this->uri->segment(1) == "" || $this->uri->segment(1) == "dashboard") { ?>
 | ||||||
|     <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.Maidenhead.js"></script> |     <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.Maidenhead.js"></script> | ||||||
| 
 | 
 | ||||||
|  |     <script> | ||||||
|  |         var iconsList = { | ||||||
|  |             'qso': { | ||||||
|  |                 'color': '#FF0000', | ||||||
|  |                 'icon': 'fas fa-dot-circle' | ||||||
|  |             } | ||||||
|  |         }; | ||||||
|  |     </script> | ||||||
|  | 
 | ||||||
|  |     <script> | ||||||
|  |         // jquery onready
 | ||||||
|  |         $(document).ready(function() { | ||||||
|  |             $.ajax({ | ||||||
|  |                 url: base_url + 'index.php/user_options/get_map_custom', | ||||||
|  |                 type: 'GET', | ||||||
|  |                 dataType: 'json', | ||||||
|  |                 error: function() { | ||||||
|  |                     console.log('[ERROR] ajax get_map_custom() function return error.'); | ||||||
|  |                 }, | ||||||
|  |                 success: function(json_mapinfo) { | ||||||
|  |                     console.log(json_mapinfo); | ||||||
|  |                     if (typeof json_mapinfo.qso !== "undefined") { | ||||||
|  |                         iconsList = json_mapinfo; | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             }); | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  |         console.log(iconsList); | ||||||
|  |     </script> | ||||||
|  | 
 | ||||||
|     <script type="text/javascript"> |     <script type="text/javascript"> | ||||||
|         $(function() { |         $(function() { | ||||||
|             $('[data-bs-toggle="tooltip"]').tooltip() |             $('[data-bs-toggle="tooltip"]').tooltip() | ||||||
|  | @ -869,9 +900,14 @@ if ($this->session->userdata('user_id') != null) { | ||||||
|                             var key = `${marker.lat},${marker.lng}`; |                             var key = `${marker.lat},${marker.lng}`; | ||||||
|                             newMarkers[key] = marker; |                             newMarkers[key] = marker; | ||||||
|                             if (!markers[key]) { |                             if (!markers[key]) { | ||||||
|  |                                 var icon = L.divIcon({ | ||||||
|  |                                     className: 'custom-icon', | ||||||
|  |                                     html: `<i class="${iconsList.qso.icon}" style="color:${iconsList.qso.color}"></i>` | ||||||
|  |                                 }); | ||||||
|                                 L.marker([marker.lat, marker.lng], { |                                 L.marker([marker.lat, marker.lng], { | ||||||
|                                         icon: redIconImg |                                         icon: icon | ||||||
|                                     }).addTo(map) |                                     }) | ||||||
|  |                                     .addTo(map) | ||||||
|                                     .bindPopup(marker.html); |                                     .bindPopup(marker.html); | ||||||
|                             } |                             } | ||||||
|                         }); |                         }); | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用