daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest Jan 5th, 2015 221 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <!DOCTYPE html>
  2. <html >
  3. <head>
  4.     <title>essai</title>
  5.     <meta charset="utf-8" />
  6.     <link rel="stylesheet" href="js_css/leaflet.css"  />
  7.                  <style>
  8. html, body, #map {
  9. font-family:tahoma;
  10. font-size:13px;
  11.               height:100%;
  12.               width:100%;
  13.               padding:0px;
  14.               margin:0px;
  15.            }
  16.  </style>
  17. </head>
  18. <script src="js_css/leaflet.js"> </script>
  19. <script src="js_css/jquery.js"> </script>
  20.  <script src="js_css/LeafletToWKT.js"> </script>
  21. <body >
  22.     <div id="map" style="width: 100%; height: 100%"></div>
  23.     <script>
  24.        
  25.        
  26.         var map = L.map('map').setView([44, 5.9], 13);
  27.         mtb = L.tileLayer('http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png', {
  28.                 attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> &amp; USGS',
  29.         continuousWorld: true
  30. });
  31.                 mtb.addTo(map);
  32.        
  33.        
  34.         <?php
  35.         $username = "nom_utilisateur";
  36.     $password = "mdp";  
  37.     $host = "localhost";
  38.     $database="nom_base";
  39.    
  40.     $server = mysql_connect($host, $username, $password);
  41.     $connection = mysql_select_db($database, $server);
  42.          
  43.   $requete = mysql_query("SELECT distance,d_plus,d_moins, AsText(geom) as wkt FROM gpx where nom= 'pyramide cassini' " );
  44.        
  45. if($requete)
  46. {
  47.   $res=mysql_fetch_assoc($requete);
  48.   $distance= $res['distance'];
  49.   $d_plus= $res['d_plus'];
  50.   $d_moins=$res['d_moins'];
  51.   $wkt=$res['wkt'];
  52.  
  53.   echo 'omnivore.wkt.parse('.$wkt.').addTo(map);';
  54.  
  55. }
  56. ?>
  57.  
  58.     </script>
  59.         <div style="position:absolute;top:70px;left:10px; background:#000;color:#fff;border-radius:8px;opacity:0.8; padding:10px;"><?php
  60.          echo '<p>Distance: '.$distance.' kms</p>';  
  61.          echo '<p>D+: '.$d_plus.' m</p>';  
  62.          echo '<p>D-: '.$d_moins.' m</p>';  
  63.           ?> </div>
  64. </body>
  65. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top