PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/testInstagram.html

https://github.com/JackDougherty/bikemapcode
HTML | 135 lines | 122 code | 5 blank | 8 comment | 0 complexity | 224b33137a5427a9038658b3348344f4 MD5 | raw file
  1. <!DOCTYPE html>
  2. <html lang='en'>
  3. <head>
  4. <title>bikemapcode</title>
  5. <meta charset="utf-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  7. <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
  8. <link rel="shortcut icon" href="favicon.ico">
  9. <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
  10. <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
  11. <link rel="stylesheet" href="css/bootstrap.min.css"/>
  12. <script src="src/Control.Geocoder.js"></script>
  13. <link rel="stylesheet" href="css/Control.Geocoder.css"/>
  14. <script src="layer/vector/GPX.js"></script>
  15. <script src="layer/vector/KML.js"></script>
  16. <!-- trying to make Google tile work <script src="layer/tile/Google.js"></script>-->
  17. <!-- Load Esri Leaflet from CDN, rather than local: <script src="lib/esri-leaflet/esri-leaflet.js"></script>-->
  18. <script src="http://cdn-geoweb.s3.amazonaws.com/esri-leaflet/1.0.0-rc.2/esri-leaflet.js"></script>
  19. <script src="src/L.Control.Locate.js"></script>
  20. <link rel="stylesheet" href="css/L.Control.Locate.css"/>
  21. <script src="src/leaflet-compass.js"></script>
  22. <link rel="stylesheet" href="css/leaflet-compass.css"/>
  23. <script src="src/leaflet-sidebar.js"></script>
  24. <link rel="stylesheet" href="css/leaflet-sidebar.css" />
  25. <link rel="stylesheet" href="src/cluster/MarkerCluster.css" />
  26. <link rel="stylesheet" href="css/Leaflet.Instagram.css" />
  27. <script src="src/reqwest.min.js"></script>
  28. <script src="src/cluster/leaflet.markercluster.js"></script>
  29. <script src="src/Leaflet.Instagram.Cluster.js"></script>
  30. <!--[if lt IE 9]>
  31. <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.ie.css" />
  32. <link rel="stylesheet" href="css/L.Control.Locate.ie.css"/>
  33. <![endif]-->
  34. <link rel="stylesheet" href="css/custom.css"/>
  35. </head>
  36. <body>
  37. <div id="sidebar" class="sidebar collapsed">
  38. <!-- Nav tabs -->
  39. <ul class="sidebar-tabs" role="tablist">
  40. <li><a href="#home" role="tab"><i class="fa fa-question-circle"></i></a></li>
  41. </ul>
  42. <!-- Tab panes -->
  43. <div class="sidebar-content active">
  44. <div class="sidebar-pane" id="home">
  45. <strong>bikemapcode</strong> displays mobile-friendly cycling maps on your website with easy-to-modify <a href="https://github.com/JackDougherty/bikemapcode#bikemapcode" target="_blank">open-source code</a>.
  46. <p>Layer Control:</br>
  47. <ul>
  48. <li>Select a basemap such as <a href="http://opencyclemap.org/" target="_blank">Open Cycle Map</a>, a user-edited layer that features bike routes and facilities from <a href="http://www.openstreetmap.org/" target="_blank">Open Street Map</a>.</li>
  49. <li>Select overlay maps to display a bike ride from a GPX or KML file, or a network of routes from an ArcGIS server. </li>
  50. </ul>
  51. </p>
  52. <p>Show your current location</p>
  53. <p>Search for any place </p>
  54. <p>Compass directions (with mobile devices)</p>
  55. <p>Learn how to modify and host your own version online.</p>
  56. <p>Distributed as-is with no warranty under an MIT license. Feedback and code contributions welcome on <a href="https://github.com/JackDougherty/bikemapcode" target="_blank">GitHub</a> or email to jack.dougherty@trincoll.edu</p>
  57. </div>
  58. </div>
  59. </div>
  60. <div id="map"></div>
  61. <script>
  62. var ocmUrl = 'http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png',
  63. ocmAttr = 'Map data &copy; <a href="http://www.opencyclemap.org">OpenCycleMap</a> and <a href="http://openstreetmap.org">OpenStreetMap</a> contributors <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
  64. osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
  65. osmAttr = 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>';
  66. var ocm = L.tileLayer(ocmUrl, {attribution: ocmAttr}),
  67. osm = L.tileLayer(osmUrl, {attribution: osmAttr}),
  68. esriStreets = L.esri.basemapLayer("Streets"),
  69. // TO DO: add this Google layer
  70. // ggl = new L.Google(),
  71. // ggl2 = new L.Google('TERRAIN'),
  72. HartfordGISBikeRoutes = L.esri.featureLayer('http://gis1.hartford.gov/arcgis/rest/services/OpenData_Community/MapServer/9',{
  73. style: function () {
  74. return { color: "#70ca49", opacity: 0.7, weight: 5};
  75. }
  76. }),
  77. TrinGISPrimaryRoutes = L.esri.featureLayer('http://services1.arcgis.com/5rblLCKLgS4Td60j/ArcGIS/rest/services/PrimaryRoutes/FeatureServer/0',{
  78. style: function () {
  79. return { color: "#4BACC6", opacity: 0.7, weight: 5};
  80. }
  81. }),
  82. TrinGISMuniBikeLanes = L.esri.featureLayer('http://services1.arcgis.com/5rblLCKLgS4Td60j/ArcGIS/rest/services/HartfordMuniBikeLanes/FeatureServer/0',{
  83. style: function () {
  84. return { color: "#00FF00", opacity: 0.7, weight: 5 };
  85. }
  86. }),
  87. TrinGISMuniBikeLanes_Connex = L.esri.featureLayer('http://services1.arcgis.com/5rblLCKLgS4Td60j/ArcGIS/rest/services/HartfordMuniBikeLanes_Connex/FeatureServer/0',{
  88. style: function () {
  89. return { color: "#9BBB59", opacity: 0.7, weight: 5 };
  90. }
  91. }),
  92. FVTC = new L.GPX("routes/FVTCJune28loop.gpx", {async: true, display_wpt:false}); // semicolor for last variable
  93. var map = L.map('map', {
  94. center: [41.77, -72.69],
  95. zoom: 14,
  96. zoomControl: false, // add new zoom control further below, after layer control
  97. layers: [ocm] //default display can be base + overlays [ocm, arcGIS, track]
  98. });
  99. var baseMaps = {
  100. "OpenCycleMap": ocm,
  101. "OpenStreetMap": osm,
  102. // "Google Terrain": ggl2,
  103. // "Google Satellite": ggl,
  104. "ESRI StreetMap": esriStreets
  105. };
  106. var overlayMaps = {
  107. "Hartford city bike lanes (City of Hartford ArcGIS)": HartfordGISBikeRoutes,
  108. "Hartford area primary routes (Trinity ArcGIS)": TrinGISPrimaryRoutes,
  109. "Hartford city bike lanes (Trinity ArcGIS)": TrinGISMuniBikeLanes,
  110. "Hartford city bike lanes connex (Trinity ArcGIS)": TrinGISMuniBikeLanes_Connex,
  111. "Farmington Valley Canal Trail loop (GPX)": FVTC //no comma after last layer
  112. };
  113. // TO DO: improve positioning of controls with custom.css
  114. var sidebar = L.control.sidebar('sidebar').addTo(map);
  115. //sidebar.open('home'); -- option to open on startup
  116. layerControl = L.control.layers(baseMaps, overlayMaps, {position: 'topleft'});
  117. layerControl.addTo(map);
  118. map.addControl(L.control.locate({locateOptions: {maxZoom: 16}}));
  119. L.Control.geocoder({position: 'topleft'}).addTo(map);
  120. new L.Control.Zoom({position: 'topleft'}).addTo(map);
  121. map.addControl( new L.Control.Compass() );
  122. //esri-leaflet popup
  123. TrinGISPrimaryRoutes.bindPopup(function (feature) {
  124. return L.Util.template('<p>Primary Route<br>FID: {FID}</p>', feature.properties);
  125. });
  126. L.instagram.cluster('https://api.instagram.com/v1/users/1420892972/media/recent?access_token=1420892972.1fb234f.b85fa08f0a7947488abaff2687d46b1d'
  127. ).addTo(map);
  128. </script>
  129. </body>
  130. </html>