using-leaflet-sl-testing.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>OpenSimulator Map</title>
  6. <link rel="stylesheet" href="https://secondlife-maps-lecs.akamaized.net/agni/application-7923856e2569f11d86c377d1f0094783.css" type="text/css">
  7. <script type="text/javascript">
  8. // Set a global var assets_url for use by all the js libraries that follow
  9. assetsURL = 'https://secondlife-maps-lecs.akamaized.net/agni/';
  10. </script>
  11. <script
  12. src="https://code.jquery.com/jquery-3.4.1.min.js"
  13. integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
  14. crossorigin="anonymous"></script>
  15. <!-- <script src="https://raw.github.com/jonnyreeves/jquery-Mustache/master/jquery.mustache.js" crossorigin="anonymous"></script> -->
  16. <script src="mustache.js"></script>
  17. <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
  18. integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
  19. crossorigin=""/>
  20. <script src="https://unpkg.com/[email protected]/dist/leaflet.js"
  21. integrity="sha512-GffPMF3RvMeYyc1LWMHtK8EbPv0iNZ8/oTtHPx9/cc2ILxQ+u905qIwdpULaqDkyBKgOaB57QTMg7ztg8Jm2Og=="
  22. crossorigin="">
  23. </script>
  24. <script type="text/javascript" src="sl-application.js"></script>
  25. </head>
  26. <body data-region-coords-default="true">
  27. <div id="header">
  28. <div id='header_inner'>
  29. <div id='logo'>
  30. <a href="/">Second Life</a>
  31. </div>
  32. <ul id='navigation'>
  33. <li class='separator'></li>
  34. <li class='top_level'>
  35. <a href="https://secondlife.com/whatis?lang=en-US" target="_blank">What is Second Life?</a>
  36. </li>
  37. <li class='separator'></li>
  38. <li class='top_level'>
  39. <a href="https://secondlife.com/destinations?lang=en-US" target="_blank">Destinations</a>
  40. </li>
  41. <li class='separator'></li>
  42. <li class='top_level'>
  43. <a href="https://marketplace.secondlife.com?lang=en-US" target="_blank">Shopping</a>
  44. </li>
  45. <li class='separator'></li>
  46. </ul>
  47. <div id='search'>
  48. <form action='https://search.secondlife.com/web/search/' id='search_form' method='get' onsubmit="return removeDefault('#q');">
  49. <span class='search_button'><i></i></span>
  50. <input class='default_text' data-default='Search' id='q' maxlength='255' name='q' type='text' value='Search'>
  51. <input name='s' type='hidden' value='secondlife_com'>
  52. <input name='m' type='hidden' value='N'>
  53. <input name='lang' type='hidden' value='en-US'>
  54. </form>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="container showgrid">
  59. <div id="content">
  60. <div id="search-container" class="search collapse">
  61. <div id="map-search-results">
  62. <div id="collapse-new">
  63. <div id="btn-slidetoggle"></div>
  64. </div>
  65. <script type="text/javascript">
  66. var queryPage = '/showcase.php';
  67. var queryParams = urlParams;
  68. if (queryParams['q'] != undefined) {
  69. queryPage = '/search_results.php';
  70. } else {
  71. if (slurl_data['region']['default'] == false) {
  72. // Add in the location so we can click it in the sidebar if we get lost
  73. var originSidebar = '';
  74. originSidebar = "<h2 id=\"location-heading\">Your Location</h2>";
  75. originSidebar = "<div id=\"marker0\" class=\"original-location result\">";
  76. var imageurl = slurl_data['sidebarcontent']['img'];
  77. originSidebar += "<a href=\"\"><img src=\"" + assetsURL + "/images/default-new.jpg\" border=\"0\"></a>";
  78. originSidebar += "<h3><a class=\"sl-map-trigger-title\" href=\"\"></a></h3>";
  79. originSidebar += "<p></p>";
  80. originSidebar += "</div><br class=\"clear\" />";
  81. var $sidebar = $('#map-search-results').append(originSidebar);
  82. $sidebar.find('a.sl-map-trigger-title').text(slurl_data['sidebarcontent']['title']);
  83. var $img = $sidebar.find('img');
  84. $img.one('error', function () { $(this).attr('src', assetsURL + "/images/default-new.jpg") });
  85. $img.attr('src', imageurl);
  86. var $p = $sidebar.find('p');
  87. var msg = slurl_data['sidebarcontent']['msg'];
  88. // Preserve possible 'strong' tag in the default message, since we trust it.
  89. if (msg == $.sl.maps.config.default_msg) {
  90. $p.html(msg);
  91. }
  92. else {
  93. $p.text(msg);
  94. }
  95. queryPage = '/showcase.php';
  96. queryParams = 'null';
  97. }
  98. else {
  99. $('#map-search-results').append("<div id=\"marker0\" class=\"original-location result \" style='display:none;'></div>");
  100. }
  101. }
  102. </script>
  103. <div class="loader">
  104. <p>Loading</p>
  105. <img src="https://secondlife-maps-lecs.akamaized.net/agni/ajax-loader-523069e249e407b1e7c8a52542dd51ce.gif" width="32" height="32" alt="Please wait">
  106. </div>
  107. </div>
  108. </div>
  109. <div id="map-container" class="map-search-opened"></div>
  110. </div>
  111. <div id="head">
  112. <div id="map-header">
  113. <form method="get" action="/index.php" accept-charset="utf-8" id="SearchContainer">
  114. <div id="search-input-container">
  115. <div id="search-input-wrapper">
  116. <input type="text" name="q" value="" id="query_term" />
  117. </div>
  118. </div>
  119. <div id="searchcontrols">
  120. <select id="search_select" name="s">
  121. <option value="Places">SL Places</option>
  122. <option value="Events">SL Events</option>
  123. </select><button type="submit">Search</button>
  124. </div>
  125. </form>
  126. <ul class="slurl-info">
  127. <li class="slurl-info-tab">
  128. <a class="slurl-build" href="/build.php">Create Your<br />Own Map Link</a>
  129. </li>
  130. <li class="slurl-info-tab">
  131. <a href="/about.php">About Second Life Maps</a>
  132. </li>
  133. </ul>
  134. </div>
  135. </div>
  136. </div>
  137. <div id="fanced">
  138. <div id="fanced-content"></div>
  139. </div>
  140. <script type="text/javascript">
  141. //<![CDATA[
  142. var $map = SLMap(document.getElementById('map-container'));
  143. $(function() {
  144. mapExtensions();
  145. loadmap();
  146. loadquery(queryPage, queryParams);
  147. $(".slurl-info-tab a").click(function (e) {
  148. var $link = $(this);
  149. var href = $link.attr('href');
  150. $.ajax({
  151. url: href,
  152. type: "GET",
  153. success: function(data) {
  154. if (!data) return;
  155. $('#fanced-content').empty().append(data);
  156. $('#fanced').show();
  157. }
  158. });
  159. return false;
  160. });
  161. $('#fanced').click(function (e) {
  162. $('#fanced').hide();
  163. return false;
  164. });
  165. $('#fanced-content').click(function (e) {
  166. e.stopPropagation();
  167. return true;
  168. });
  169. });
  170. //]]>
  171. </script>
  172. </body>
  173. </html>