Changeset 738 for trunk/Modules/Map
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- Location:
- trunk/Modules/Map
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Map/Map.php
r721 r738 15 15 if(count($this->System->PathItems) > 1) 16 16 { 17 if($this->System->PathItems[1] == 'show-position') return($this->ShowPosition()); 17 if($this->System->PathItems[1] == 'show-position') return($this->ShowPosition()); 18 18 else return(PAGE_NOT_FOUND); 19 19 } else return($this->ShowMain()); 20 20 } 21 21 22 22 function ShowPosition() 23 23 { … … 37 37 } else return('Položka nenalezena'); 38 38 } 39 39 40 40 function ShowMain() 41 41 { … … 49 49 var tinyIcon; 50 50 51 function initialize() 52 { 53 if (GBrowserIsCompatible()) 51 function initialize() 52 { 53 if (GBrowserIsCompatible()) 54 54 { 55 55 map = new GMap2(document.getElementById("map_canvas")); … … 58 58 map.setUIToDefault(); 59 59 map.addControl(new GOverviewMapControl(new GSize(128, 96))); 60 60 61 61 62 62 // Create our "tiny" marker icon … … 68 68 tinyIcon.iconAnchor = new GPoint(5, 5); 69 69 tinyIcon.infoWindowAnchor = new GPoint(5, 1); 70 71 72 73 74 $Output .= ' 75 } 76 } 77 78 function toggleLabel(id) 79 { 80 81 82 83 } 84 85 function UpdateNetworkLinks() 86 { 87 if ((document.getElementById("NetworkLinks")).checked == true) 88 { 89 70 71 toggleLabel(\'NetworkLinks\'); 72 toggleLabel(\'NetworkDevices\');'; 73 74 $Output .= ' 75 } 76 } 77 78 function toggleLabel(id) 79 { 80 var ele = document.getElementById(id); 81 ele.checked = !ele.checked; 82 ele.onclick( ); 83 } 84 85 function UpdateNetworkLinks() 86 { 87 if ((document.getElementById("NetworkLinks")).checked == true) 88 { 89 NetworkLinks = ['; 90 90 $DbResult = $this->Database->query('SELECT * FROM NetworkLink WHERE Interface1 <> 0 AND Interface2 <> 0'); 91 91 while($Link = $DbResult->fetch_assoc()) … … 114 114 } 115 115 116 117 118 { 119 120 121 122 123 } 124 125 function toggleLabel(id) 126 { 127 128 129 130 } 131 132 function UpdateNetworkDevices() 133 { 134 if ((document.getElementById("NetworkDevices")).checked == true) 135 { 136 116 } else { //checkbox turned off 117 for (var i in NetworkLinks) 118 { 119 map.removeOverlay(NetworkLinks[i]); 120 NetworkLinks[i] = null; 121 } 122 } 123 } 124 125 function toggleLabel(id) 126 { 127 var ele = document.getElementById(id); 128 ele.checked = !ele.checked; 129 ele.onclick( ); 130 } 131 132 function UpdateNetworkDevices() 133 { 134 if ((document.getElementById("NetworkDevices")).checked == true) 135 { 136 NetworkDevices = ['; 137 137 138 138 $DbResult = $this->Database->query('SELECT GROUP_CONCAT(NetworkDevice.Name SEPARATOR ",") AS Name, '. … … 153 153 } 154 154 155 156 157 { 158 159 160 161 } 155 } else { //checkbox turned off 156 for (var i in NetworkDevices) 157 { 158 map.removeOverlay(NetworkDevices[i]); 159 NetworkDevices[i] = null; 160 } 161 } 162 162 } 163 163 … … 165 165 $Output .= '<table style="margin-left: auto; margin-right: auto; width: 100%; height: 80%;"> 166 166 <tr> 167 <td style="width: 80%; height: 100%;"> 167 <td style="width: 80%; height: 100%;"> 168 168 <div id="map_canvas" style="width: 100%; height: 100%;"></div></td> 169 169 <td style="width: 20%"> … … 208 208 $this->SupportedModels = array(); 209 209 } 210 210 211 211 function DoStart() 212 212 { … … 225 225 )); 226 226 $this->System->FormManager->RegisterFormType('TMapPosition', array( 227 228 229 230 231 227 'Type' => 'Reference', 228 'Table' => 'MapPosition', 229 'Id' => 'Id', 230 'Name' => 'Name', 231 'Filter' => '1', 232 232 )); 233 234 } 235 } 233 234 } 235 } -
trunk/Modules/Map/MapAPI.php
r574 r738 1 1 <?php 2 2 3 class MapApi extends Model 3 class MapApi extends Model 4 4 { 5 5 var $Position; … … 9 9 var $ShowMarker; 10 10 var $MarkerText; 11 11 12 12 function __construct($System) 13 13 { 14 14 parent::__construct($System); 15 $this->Zoom = 2; 15 $this->Zoom = 2; 16 16 $this->Position = array('Lat' => 40.178873, 'Lng' => 65.039062); 17 17 $this->Key = ''; 18 18 $this->ShowMarker = false; 19 $this->MarkerText = ''; 19 $this->MarkerText = ''; 20 20 } 21 21 22 22 function Show() 23 23 { … … 39 39 </script>'; 40 40 $Output .= '<script type="text/javascript"> 41 41 42 42 var map; 43 43 var tinyIcon; 44 44 45 45 function initialize() 46 46 { … … 52 52 map.setUIToDefault(); 53 53 map.addControl(new GOverviewMapControl(new GSize(128, 96))); 54 54 55 55 GEvent.addListener(map,"click",function(overlay, point) 56 56 { … … 61 61 }); 62 62 } 63 63 64 64 // Create our "tiny" marker icon 65 65 var tinyIcon = new GIcon(); … … 84 84 class MapApiSeznam extends MapApi 85 85 { 86 86 87 87 }
Note:
See TracChangeset
for help on using the changeset viewer.