columbus3 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (344) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/README.md +122 -0
  4. data/bin/console +0 -0
  5. data/bin/setup +0 -0
  6. data/bower.json +25 -0
  7. data/bower_components/jquery/.bower.json +7 -20
  8. data/bower_components/jquery/AUTHORS.txt +301 -0
  9. data/bower_components/jquery/{MIT-LICENSE.txt → LICENSE.txt} +17 -2
  10. data/bower_components/jquery/README.md +67 -0
  11. data/bower_components/jquery/bower.json +2 -16
  12. data/bower_components/jquery/dist/core.js +476 -0
  13. data/bower_components/jquery/dist/jquery.js +3861 -2818
  14. data/bower_components/jquery/dist/jquery.min.js +4 -5
  15. data/bower_components/jquery/dist/jquery.min.map +1 -1
  16. data/bower_components/jquery/dist/jquery.slim.js +8160 -0
  17. data/bower_components/jquery/dist/jquery.slim.min.js +4 -0
  18. data/bower_components/jquery/dist/jquery.slim.min.map +1 -0
  19. data/bower_components/jquery/external/sizzle/LICENSE.txt +36 -0
  20. data/bower_components/jquery/{src → external}/sizzle/dist/sizzle.js +445 -240
  21. data/bower_components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  22. data/bower_components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  23. data/bower_components/jquery/src/.eslintrc.json +5 -0
  24. data/bower_components/jquery/src/ajax.js +174 -105
  25. data/bower_components/jquery/src/ajax/jsonp.js +27 -14
  26. data/bower_components/jquery/src/ajax/load.js +24 -23
  27. data/bower_components/jquery/src/ajax/parseXML.js +8 -6
  28. data/bower_components/jquery/src/ajax/script.js +25 -12
  29. data/bower_components/jquery/src/ajax/var/location.js +5 -0
  30. data/bower_components/jquery/src/ajax/var/nonce.js +4 -2
  31. data/bower_components/jquery/src/ajax/var/rquery.js +5 -3
  32. data/bower_components/jquery/src/ajax/xhr.js +76 -43
  33. data/bower_components/jquery/src/attributes.js +4 -2
  34. data/bower_components/jquery/src/attributes/attr.js +60 -60
  35. data/bower_components/jquery/src/attributes/classes.js +87 -71
  36. data/bower_components/jquery/src/attributes/prop.js +81 -32
  37. data/bower_components/jquery/src/attributes/support.js +11 -13
  38. data/bower_components/jquery/src/attributes/val.js +66 -37
  39. data/bower_components/jquery/src/callbacks.js +119 -90
  40. data/bower_components/jquery/src/core.js +108 -134
  41. data/bower_components/jquery/src/core/DOMEval.js +16 -0
  42. data/bower_components/jquery/src/core/access.js +21 -11
  43. data/bower_components/jquery/src/core/init.js +33 -28
  44. data/bower_components/jquery/src/core/nodeName.js +13 -0
  45. data/bower_components/jquery/src/core/parseHTML.js +39 -13
  46. data/bower_components/jquery/src/core/ready-no-deferred.js +96 -0
  47. data/bower_components/jquery/src/core/ready.js +40 -51
  48. data/bower_components/jquery/src/core/readyException.js +13 -0
  49. data/bower_components/jquery/src/core/stripAndCollapse.js +14 -0
  50. data/bower_components/jquery/src/core/support.js +20 -0
  51. data/bower_components/jquery/src/core/var/rsingleTag.js +5 -3
  52. data/bower_components/jquery/src/css.js +146 -158
  53. data/bower_components/jquery/src/css/addGetHookIf.js +7 -3
  54. data/bower_components/jquery/src/css/adjustCSS.js +71 -0
  55. data/bower_components/jquery/src/css/curCSS.js +22 -14
  56. data/bower_components/jquery/src/css/hiddenVisibleSelectors.js +8 -8
  57. data/bower_components/jquery/src/css/showHide.js +105 -0
  58. data/bower_components/jquery/src/css/support.js +69 -76
  59. data/bower_components/jquery/src/css/var/cssExpand.js +4 -2
  60. data/bower_components/jquery/src/css/var/getStyles.js +11 -6
  61. data/bower_components/jquery/src/css/var/isHiddenWithinTree.js +34 -0
  62. data/bower_components/jquery/src/css/var/rmargin.js +5 -3
  63. data/bower_components/jquery/src/css/var/rnumnonpx.js +4 -2
  64. data/bower_components/jquery/src/css/{swap.js → var/swap.js} +5 -7
  65. data/bower_components/jquery/src/data.js +67 -66
  66. data/bower_components/jquery/src/data/Data.js +87 -107
  67. data/bower_components/jquery/src/data/{accepts.js → var/acceptData.js} +6 -7
  68. data/bower_components/jquery/src/data/var/{data_priv.js → dataPriv.js} +4 -2
  69. data/bower_components/jquery/src/data/var/{data_user.js → dataUser.js} +4 -2
  70. data/bower_components/jquery/src/deferred.js +314 -72
  71. data/bower_components/jquery/src/deferred/exceptionHook.js +21 -0
  72. data/bower_components/jquery/src/deprecated.js +36 -9
  73. data/bower_components/jquery/src/dimensions.js +16 -10
  74. data/bower_components/jquery/src/effects.js +257 -206
  75. data/bower_components/jquery/src/effects/Tween.js +18 -9
  76. data/bower_components/jquery/src/effects/animatedSelector.js +7 -5
  77. data/bower_components/jquery/src/event.js +297 -419
  78. data/bower_components/jquery/src/event/ajax.js +13 -4
  79. data/bower_components/jquery/src/event/alias.js +13 -23
  80. data/bower_components/jquery/src/event/focusin.js +55 -0
  81. data/bower_components/jquery/src/event/support.js +5 -3
  82. data/bower_components/jquery/src/event/trigger.js +185 -0
  83. data/bower_components/jquery/src/exports/amd.js +5 -3
  84. data/bower_components/jquery/src/exports/global.js +8 -6
  85. data/bower_components/jquery/src/jquery.js +6 -2
  86. data/bower_components/jquery/src/manipulation.js +218 -310
  87. data/bower_components/jquery/src/manipulation/_evalUrl.js +9 -4
  88. data/bower_components/jquery/src/manipulation/buildFragment.js +104 -0
  89. data/bower_components/jquery/src/manipulation/getAll.js +32 -0
  90. data/bower_components/jquery/src/manipulation/setGlobalEval.js +22 -0
  91. data/bower_components/jquery/src/manipulation/support.js +11 -8
  92. data/bower_components/jquery/src/manipulation/var/rcheckableType.js +5 -3
  93. data/bower_components/jquery/src/manipulation/var/rscriptType.js +5 -0
  94. data/bower_components/jquery/src/manipulation/var/rtagName.js +5 -0
  95. data/bower_components/jquery/src/manipulation/wrapMap.js +29 -0
  96. data/bower_components/jquery/src/offset.js +75 -53
  97. data/bower_components/jquery/src/queue.js +26 -23
  98. data/bower_components/jquery/src/queue/delay.js +8 -6
  99. data/bower_components/jquery/src/selector-native.js +133 -68
  100. data/bower_components/jquery/src/selector-sizzle.js +10 -5
  101. data/bower_components/jquery/src/selector.js +3 -1
  102. data/bower_components/jquery/src/serialize.js +52 -33
  103. data/bower_components/jquery/src/traversing.js +61 -69
  104. data/bower_components/jquery/src/traversing/findFilter.js +37 -31
  105. data/bower_components/jquery/src/traversing/var/dir.js +22 -0
  106. data/bower_components/jquery/src/traversing/var/rneedsContext.js +4 -2
  107. data/bower_components/jquery/src/traversing/var/siblings.js +17 -0
  108. data/bower_components/jquery/src/var/ObjectFunctionString.js +7 -0
  109. data/bower_components/jquery/src/var/arr.js +4 -2
  110. data/bower_components/jquery/src/var/class2type.js +4 -2
  111. data/bower_components/jquery/src/var/concat.js +4 -2
  112. data/bower_components/jquery/src/var/document.js +5 -0
  113. data/bower_components/jquery/src/var/documentElement.js +7 -0
  114. data/bower_components/jquery/src/var/fnToString.js +7 -0
  115. data/bower_components/jquery/src/var/getProto.js +5 -0
  116. data/bower_components/jquery/src/var/hasOwn.js +4 -2
  117. data/bower_components/jquery/src/var/indexOf.js +4 -2
  118. data/bower_components/jquery/src/var/pnum.js +5 -3
  119. data/bower_components/jquery/src/var/push.js +4 -2
  120. data/bower_components/jquery/src/var/rcssNum.js +9 -0
  121. data/bower_components/jquery/src/var/rnothtmlwhite.js +8 -0
  122. data/bower_components/jquery/src/var/slice.js +4 -2
  123. data/bower_components/jquery/src/var/support.js +4 -2
  124. data/bower_components/jquery/src/var/toString.js +4 -2
  125. data/bower_components/jquery/src/wrap.js +24 -26
  126. data/bower_components/leaflet-providers/.bower.json +6 -7
  127. data/bower_components/leaflet-providers/CHANGELOG.md +62 -0
  128. data/bower_components/leaflet-providers/README.md +12 -3
  129. data/bower_components/leaflet-providers/bower.json +1 -1
  130. data/bower_components/leaflet-providers/leaflet-providers.js +133 -92
  131. data/bower_components/leaflet-providers/package.json +14 -7
  132. data/bower_components/leaflet/.bower.json +10 -14
  133. data/bower_components/leaflet/CHANGELOG.md +648 -3
  134. data/bower_components/leaflet/CONTRIBUTING.md +88 -33
  135. data/bower_components/leaflet/ISSUE_TEMPLATE.md +25 -0
  136. data/bower_components/leaflet/Jakefile.js +73 -14
  137. data/bower_components/leaflet/LICENSE +1 -1
  138. data/bower_components/leaflet/PLUGIN-GUIDE.md +97 -3
  139. data/bower_components/leaflet/README.md +6 -8
  140. data/bower_components/leaflet/bower.json +3 -9
  141. data/bower_components/leaflet/dist/images/layers-2x.png +0 -0
  142. data/bower_components/leaflet/dist/images/layers.png +0 -0
  143. data/bower_components/leaflet/dist/images/marker-icon-2x.png +0 -0
  144. data/bower_components/leaflet/dist/images/marker-icon.png +0 -0
  145. data/bower_components/leaflet/dist/images/marker-shadow.png +0 -0
  146. data/bower_components/leaflet/dist/leaflet-src.js +12301 -7898
  147. data/bower_components/leaflet/dist/leaflet-src.js.map +1 -0
  148. data/bower_components/leaflet/dist/leaflet.css +196 -43
  149. data/bower_components/leaflet/dist/leaflet.js +6 -9
  150. data/bower_components/leaflet/dist/leaflet.js.map +1 -0
  151. data/bower_components/leaflet/docs/CNAME +1 -0
  152. data/bower_components/leaflet/docs/Gemfile +4 -0
  153. data/bower_components/leaflet/docs/_config.yml +19 -0
  154. data/bower_components/leaflet/docs/_includes/frame.html +9 -0
  155. data/bower_components/leaflet/docs/_includes/tutorial_link.html +8 -0
  156. data/bower_components/leaflet/docs/_layouts/post.html +30 -0
  157. data/bower_components/leaflet/docs/_layouts/redirected.html +14 -0
  158. data/bower_components/leaflet/docs/_layouts/tutorial.html +9 -0
  159. data/bower_components/leaflet/docs/_layouts/tutorial_frame.html +32 -0
  160. data/bower_components/leaflet/docs/_layouts/tutorial_v2.html +9 -0
  161. data/bower_components/leaflet/docs/_layouts/v2.html +159 -0
  162. data/bower_components/leaflet/docs/_posts/2012-07-30-leaflet-0-4-released.md +240 -0
  163. data/bower_components/leaflet/docs/_posts/2012-08-07-leaflet-0-4-3-and-a-new-tutorial.md +47 -0
  164. data/bower_components/leaflet/docs/_posts/2012-08-20-guest-post-markerclusterer-0-1-released.md +112 -0
  165. data/bower_components/leaflet/docs/_posts/2012-10-25-leaflet-0-4-5-bugfix-release-and-plans-for-0.5.md +36 -0
  166. data/bower_components/leaflet/docs/_posts/2013-01-17-leaflet-0-5-released.md +24 -0
  167. data/bower_components/leaflet/docs/_posts/2013-02-20-guest-post-draw.md +146 -0
  168. data/bower_components/leaflet/docs/_posts/2013-06-26-leaflet-0-6-released-dc-code-sprint-mapbox.md +31 -0
  169. data/bower_components/leaflet/docs/_posts/2013-06-28-leaflet-plugin-authoring-guide.md +111 -0
  170. data/bower_components/leaflet/docs/_posts/2013-11-18-leaflet-0-7-released-plans-for-future.md +56 -0
  171. data/bower_components/leaflet/docs/_posts/2015-07-01-leaflet-is-alive-and-kicking.md +21 -0
  172. data/bower_components/leaflet/docs/_posts/2015-07-15-leaflet-1.0-beta1-released.md +60 -0
  173. data/bower_components/leaflet/docs/_posts/2015-09-01-leaflet-0.7.4-released.md +29 -0
  174. data/bower_components/leaflet/docs/_posts/2015-10-14-leaflet-1.0-beta2-released.md +35 -0
  175. data/bower_components/leaflet/docs/_posts/2016-03-20-debugging-touch-interactions.md +101 -0
  176. data/bower_components/leaflet/docs/_posts/2016-04-18-leaflet-1.0-rc1.md +78 -0
  177. data/bower_components/leaflet/docs/_posts/2016-07-16-leaflet-1.0-rc2.md +60 -0
  178. data/bower_components/leaflet/docs/_posts/2016-08-05-leaflet-1.0-rc3.md +53 -0
  179. data/bower_components/leaflet/docs/_posts/2016-09-27-leaflet-1.0-final.md +50 -0
  180. data/bower_components/leaflet/docs/_posts/2016-11-21-leaflet-1.0.2.md +25 -0
  181. data/bower_components/leaflet/docs/_posts/2017-01-23-leaflet-1.0.3.md +27 -0
  182. data/bower_components/leaflet/docs/atom.xml +29 -0
  183. data/bower_components/leaflet/docs/blog.md +24 -0
  184. data/bower_components/leaflet/docs/docs/css/main.css +1092 -0
  185. data/bower_components/leaflet/docs/docs/css/normalize.css +426 -0
  186. data/bower_components/leaflet/docs/docs/highlight/LICENSE +24 -0
  187. data/bower_components/leaflet/docs/docs/highlight/highlight.pack.js +1 -0
  188. data/bower_components/leaflet/docs/docs/highlight/styles/github-gist.css +211 -0
  189. data/bower_components/leaflet/docs/docs/images/2016-03-20-prosthetic-hand-zooming.gif +0 -0
  190. data/bower_components/leaflet/docs/docs/images/2016-04-18-inheritances.gif +0 -0
  191. data/bower_components/leaflet/docs/docs/images/2016-04-18-leaflet-toilet-paper.jpeg +0 -0
  192. data/bower_components/leaflet/docs/docs/images/2016-04-18-madrid-leaflet-864px.jpg +0 -0
  193. data/bower_components/leaflet/docs/docs/images/2016-07-18-remote-session.png +0 -0
  194. data/bower_components/leaflet/docs/docs/images/2016-07-18-tooltip.png +0 -0
  195. data/bower_components/leaflet/docs/docs/images/2016-08-03-iraq-hacking.jpg +0 -0
  196. data/bower_components/leaflet/docs/docs/images/favicon.ico +0 -0
  197. data/bower_components/leaflet/docs/docs/images/forum-round.png +0 -0
  198. data/bower_components/leaflet/docs/docs/images/github-round.png +0 -0
  199. data/bower_components/leaflet/docs/docs/images/logo.png +0 -0
  200. data/bower_components/leaflet/docs/docs/images/logos.png +0 -0
  201. data/bower_components/leaflet/docs/docs/images/sprite.png +0 -0
  202. data/bower_components/leaflet/docs/docs/images/sprite.svg +75 -0
  203. data/bower_components/leaflet/docs/docs/images/twitter-round.png +0 -0
  204. data/bower_components/leaflet/docs/docs/images/twitter.png +0 -0
  205. data/bower_components/leaflet/docs/docs/js/docs.js +52 -0
  206. data/bower_components/leaflet/docs/download.md +95 -0
  207. data/bower_components/leaflet/docs/examples.md +125 -0
  208. data/bower_components/leaflet/docs/examples/choropleth-example.md +5 -0
  209. data/bower_components/leaflet/docs/examples/choropleth.md +5 -0
  210. data/bower_components/leaflet/docs/examples/choropleth/example-basic.md +20 -0
  211. data/bower_components/leaflet/docs/examples/choropleth/example-color.md +46 -0
  212. data/bower_components/leaflet/docs/examples/choropleth/example.md +159 -0
  213. data/bower_components/leaflet/docs/examples/choropleth/index.md +232 -0
  214. data/bower_components/leaflet/docs/examples/choropleth/thumbnail.png +0 -0
  215. data/bower_components/leaflet/docs/examples/choropleth/us-states.js +54 -0
  216. data/bower_components/leaflet/docs/examples/crs-simple/crs-simple-example1.md +16 -0
  217. data/bower_components/leaflet/docs/examples/crs-simple/crs-simple-example2.md +20 -0
  218. data/bower_components/leaflet/docs/examples/crs-simple/crs-simple-example3.md +38 -0
  219. data/bower_components/leaflet/docs/examples/crs-simple/crs-simple.md +117 -0
  220. data/bower_components/leaflet/docs/examples/crs-simple/thumbnail.png +0 -0
  221. data/bower_components/leaflet/docs/examples/crs-simple/uqm_map_400px.png +0 -0
  222. data/bower_components/leaflet/docs/examples/crs-simple/uqm_map_detail.png +0 -0
  223. data/bower_components/leaflet/docs/examples/crs-simple/uqm_map_full.png +0 -0
  224. data/bower_components/leaflet/docs/examples/custom-icons-example.md +5 -0
  225. data/bower_components/leaflet/docs/examples/custom-icons.md +5 -0
  226. data/bower_components/leaflet/docs/examples/custom-icons/example-one-icon.md +27 -0
  227. data/bower_components/leaflet/docs/examples/custom-icons/example.md +31 -0
  228. data/bower_components/leaflet/docs/examples/custom-icons/index.md +79 -0
  229. data/bower_components/leaflet/docs/examples/custom-icons/leaf-green.png +0 -0
  230. data/bower_components/leaflet/docs/examples/custom-icons/leaf-orange.png +0 -0
  231. data/bower_components/leaflet/docs/examples/custom-icons/leaf-red.png +0 -0
  232. data/bower_components/leaflet/docs/examples/custom-icons/leaf-shadow.png +0 -0
  233. data/bower_components/leaflet/docs/examples/custom-icons/thumbnail.png +0 -0
  234. data/bower_components/leaflet/docs/examples/extending/canvascircles.md +37 -0
  235. data/bower_components/leaflet/docs/examples/extending/class-diagram.md +24 -0
  236. data/bower_components/leaflet/docs/examples/extending/class-diagram.png +0 -0
  237. data/bower_components/leaflet/docs/examples/extending/class-diagram.txt +100 -0
  238. data/bower_components/leaflet/docs/examples/extending/extending-1-classes.md +196 -0
  239. data/bower_components/leaflet/docs/examples/extending/extending-2-layers.md +210 -0
  240. data/bower_components/leaflet/docs/examples/extending/extending-3-controls.md +100 -0
  241. data/bower_components/leaflet/docs/examples/extending/gridcoords.md +32 -0
  242. data/bower_components/leaflet/docs/examples/extending/kittenlayer.md +29 -0
  243. data/bower_components/leaflet/docs/examples/extending/pixelorigin.md +90 -0
  244. data/bower_components/leaflet/docs/examples/extending/thumbnail-1.png +0 -0
  245. data/bower_components/leaflet/docs/examples/extending/thumbnail-2.png +0 -0
  246. data/bower_components/leaflet/docs/examples/extending/thumbnail-3.png +0 -0
  247. data/bower_components/leaflet/docs/examples/extending/tilt.md +59 -0
  248. data/bower_components/leaflet/docs/examples/extending/watermark.md +36 -0
  249. data/bower_components/leaflet/docs/examples/geojson-example.md +5 -0
  250. data/bower_components/leaflet/docs/examples/geojson.md +5 -0
  251. data/bower_components/leaflet/docs/examples/geojson/baseball-marker.png +0 -0
  252. data/bower_components/leaflet/docs/examples/geojson/example.md +78 -0
  253. data/bower_components/leaflet/docs/examples/geojson/geojson-example.html +89 -0
  254. data/bower_components/leaflet/docs/examples/geojson/geojson.html +281 -0
  255. data/bower_components/leaflet/docs/examples/geojson/index.md +205 -0
  256. data/bower_components/leaflet/docs/examples/geojson/sample-geojson.js +248 -0
  257. data/bower_components/leaflet/docs/examples/geojson/thumbnail.png +0 -0
  258. data/bower_components/leaflet/docs/examples/layers-control-example.md +5 -0
  259. data/bower_components/leaflet/docs/examples/layers-control.md +5 -0
  260. data/bower_components/leaflet/docs/examples/layers-control/example.md +38 -0
  261. data/bower_components/leaflet/docs/examples/layers-control/index.md +72 -0
  262. data/bower_components/leaflet/docs/examples/layers-control/thumbnail.png +0 -0
  263. data/bower_components/leaflet/docs/examples/map-panes-example.md +5 -0
  264. data/bower_components/leaflet/docs/examples/map-panes.md +5 -0
  265. data/bower_components/leaflet/docs/examples/map-panes/eu-countries.js +79 -0
  266. data/bower_components/leaflet/docs/examples/map-panes/example.md +38 -0
  267. data/bower_components/leaflet/docs/examples/map-panes/index.md +105 -0
  268. data/bower_components/leaflet/docs/examples/map-panes/thumbnail.png +0 -0
  269. data/bower_components/leaflet/docs/examples/mobile-example.md +5 -0
  270. data/bower_components/leaflet/docs/examples/mobile.md +5 -0
  271. data/bower_components/leaflet/docs/examples/mobile/example.md +42 -0
  272. data/bower_components/leaflet/docs/examples/mobile/index.md +72 -0
  273. data/bower_components/leaflet/docs/examples/mobile/thumbnail.png +0 -0
  274. data/bower_components/leaflet/docs/examples/quick-start-example.md +5 -0
  275. data/bower_components/leaflet/docs/examples/quick-start.md +5 -0
  276. data/bower_components/leaflet/docs/examples/quick-start/example-basic.md +19 -0
  277. data/bower_components/leaflet/docs/examples/quick-start/example-overlays.md +35 -0
  278. data/bower_components/leaflet/docs/examples/quick-start/example-popups.md +37 -0
  279. data/bower_components/leaflet/docs/examples/quick-start/example.md +46 -0
  280. data/bower_components/leaflet/docs/examples/quick-start/index.md +143 -0
  281. data/bower_components/leaflet/docs/examples/quick-start/thumbnail.png +0 -0
  282. data/bower_components/leaflet/docs/examples/video-overlay/example-bounds.md +23 -0
  283. data/bower_components/leaflet/docs/examples/video-overlay/example-nocontrols.md +31 -0
  284. data/bower_components/leaflet/docs/examples/video-overlay/example.md +58 -0
  285. data/bower_components/leaflet/docs/examples/video-overlay/index.md +122 -0
  286. data/bower_components/leaflet/docs/examples/video-overlay/thumbnail.gif +0 -0
  287. data/bower_components/leaflet/docs/examples/wms/qgis-wms-layers.png +0 -0
  288. data/bower_components/leaflet/docs/examples/wms/thumbnail.png +0 -0
  289. data/bower_components/leaflet/docs/examples/wms/wms-example-crs.md +18 -0
  290. data/bower_components/leaflet/docs/examples/wms/wms-example1.md +16 -0
  291. data/bower_components/leaflet/docs/examples/wms/wms-example2.md +16 -0
  292. data/bower_components/leaflet/docs/examples/wms/wms-example3.md +34 -0
  293. data/bower_components/leaflet/docs/examples/wms/wms-example4.md +29 -0
  294. data/bower_components/leaflet/docs/examples/wms/wms.md +157 -0
  295. data/bower_components/leaflet/docs/examples/zoom-levels/example-delta.md +40 -0
  296. data/bower_components/leaflet/docs/examples/zoom-levels/example-fractional.md +56 -0
  297. data/bower_components/leaflet/docs/examples/zoom-levels/example-scale.md +29 -0
  298. data/bower_components/leaflet/docs/examples/zoom-levels/example-setzoom.md +44 -0
  299. data/bower_components/leaflet/docs/examples/zoom-levels/example-zero.md +19 -0
  300. data/bower_components/leaflet/docs/examples/zoom-levels/index.md +275 -0
  301. data/bower_components/leaflet/docs/examples/zoom-levels/thumbnail.png +0 -0
  302. data/bower_components/leaflet/docs/index.html +218 -0
  303. data/bower_components/leaflet/docs/plugins.md +3854 -0
  304. data/bower_components/leaflet/docs/reference-0.7.7.html +6424 -0
  305. data/bower_components/leaflet/docs/reference-1.0.0.html +22889 -0
  306. data/bower_components/leaflet/docs/reference-1.0.2.html +23382 -0
  307. data/bower_components/leaflet/docs/reference-1.0.3.html +23495 -0
  308. data/bower_components/leaflet/docs/reference-tpl.html +89 -0
  309. data/bower_components/leaflet/docs/reference-versions.html +16 -0
  310. data/bower_components/leaflet/docs/reference.html +3 -0
  311. data/bower_components/leaflet/package.json +77 -16
  312. data/columbus3.gemspec +1 -1
  313. data/doc/ChangeLog.org +10 -0
  314. data/doc/manual.txt +122 -0
  315. data/doc/todo.org +63 -0
  316. data/exe/columbus3 +2 -246
  317. data/lib/columbus3.rb +12 -7
  318. data/lib/columbus3/cli/command_semantics.rb +352 -0
  319. data/lib/columbus3/cli/command_syntax.rb +103 -0
  320. data/lib/columbus3/metadata/query_parser.racc +21 -7
  321. data/lib/columbus3/metadata/query_parser.tab.rb +34 -34
  322. data/lib/columbus3/metadata/sidecar.rb +1 -1
  323. data/lib/columbus3/renderer/flot_renderer.rb +3 -8
  324. data/lib/columbus3/renderer/leaflet_renderer.rb +18 -29
  325. data/lib/columbus3/renderer/sanitizer.rb +8 -0
  326. data/lib/columbus3/v900track/gpx2v900.rb +31 -0
  327. data/lib/columbus3/v900track/v900track.rb +34 -8
  328. data/lib/columbus3/v900track/v900waypoint.rb +9 -0
  329. data/lib/columbus3/version.rb +1 -1
  330. data/lib/html/flot.html.erb +6 -6
  331. data/lib/html/show.html.erb +53 -76
  332. data/lib/html/track.js.erb +58 -12
  333. metadata +222 -23
  334. data/README.textile +0 -67
  335. data/bower_components/jquery/src/ajax/parseJSON.js +0 -13
  336. data/bower_components/jquery/src/css/defaultDisplay.js +0 -70
  337. data/bower_components/jquery/src/css/var/isHidden.js +0 -13
  338. data/bower_components/jquery/src/intro.js +0 -44
  339. data/bower_components/jquery/src/outro.js +0 -1
  340. data/bower_components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
  341. data/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
  342. data/bower_components/jquery/src/var/rnotwhite.js +0 -3
  343. data/bower_components/jquery/src/var/strundefined.js +0 -3
  344. data/bower_components/leaflet/component.json +0 -20
@@ -0,0 +1,125 @@
1
+ ---
2
+ layout: v2
3
+ title: Tutorials
4
+ bodyclass: examples
5
+ ---
6
+
7
+ ## Leaflet Tutorials
8
+
9
+ Every tutorial here comes with step-by-step code explanation and is easy enough even for beginner JavaScript developers.
10
+
11
+
12
+ {% include tutorial_link.html
13
+ page="quick-start/"
14
+ thumbnail="quick-start/thumbnail.png"
15
+ title="Leaflet Quick Start Guide"
16
+ description="A simple step-by-step guide that will quickly get you started with Leaflet basics, including setting up a Leaflet map (with Mapbox tiles) on your page, working with markers, polylines and popups, and dealing with events."
17
+ %}
18
+
19
+
20
+ {% include tutorial_link.html
21
+ page="mobile/"
22
+ thumbnail="mobile/thumbnail.png"
23
+ title="Leaflet on Mobile"
24
+ description="In this tutorial, you'll learn how to create a fullscreen map tuned for mobile devices like iPhone, iPad or Android phones, and how to easily detect and use the current user location."
25
+ %}
26
+
27
+
28
+ {% include tutorial_link.html
29
+ page="custom-icons/"
30
+ thumbnail="custom-icons/thumbnail.png"
31
+ title="Markers with Custom Icons"
32
+ description="In this pretty tutorial, you'll learn how to easily define your own icons for use by the markers you put on the map."
33
+ %}
34
+
35
+
36
+ {% include tutorial_link.html
37
+ page="geojson/"
38
+ thumbnail="geojson/thumbnail.png"
39
+ title="Using GeoJSON with Leaflet"
40
+ description="In this tutorial, you'll learn how to create and interact with map vectors created from [GeoJSON](http://geojson.org/) objects."
41
+ %}
42
+
43
+
44
+ {% include tutorial_link.html
45
+ page="choropleth/"
46
+ thumbnail="choropleth/thumbnail.png"
47
+ title="Interactive Choropleth Map"
48
+ description="A case study of creating a colorful interactive [choropleth map](http://en.wikipedia.org/wiki/Choropleth_map) of US States Population Density with GeoJSON and some custom controls. News websites will love this."
49
+ %}
50
+
51
+
52
+ {% include tutorial_link.html
53
+ page="layers-control/"
54
+ thumbnail="layers-control/thumbnail.png"
55
+ title="Layer Groups and Layers Control"
56
+ description="A tutorial on how to manage groups of layers and use the layer switching control."
57
+ %}
58
+
59
+
60
+ {% include tutorial_link.html
61
+ page="zoom-levels/"
62
+ thumbnail="zoom-levels/thumbnail.png"
63
+ title="Zoom levels"
64
+ description="A deeper look into what zoom levels are."
65
+ %}
66
+
67
+ {% include tutorial_link.html
68
+ page="crs-simple/crs-simple.html"
69
+ thumbnail="crs-simple/thumbnail.png"
70
+ title="Non-geographical maps"
71
+ description="A primer on `L.CRS.Simple`, how to make maps with no concept of \"latitude\" or \"longitude\"."
72
+ %}
73
+
74
+
75
+ {% include tutorial_link.html
76
+ page="wms/wms.html"
77
+ thumbnail="wms/thumbnail.png"
78
+ title="WMS and TMS"
79
+ description="How to integrate with WMS and TMS services from professional GIS software."
80
+ %}
81
+
82
+
83
+ {% include tutorial_link.html
84
+ page="map-panes/"
85
+ thumbnail="map-panes/thumbnail.png"
86
+ title="Working with map panes"
87
+ description="How the default map panes work to display overlays on top of tiles, and how to override that."
88
+ %}
89
+
90
+
91
+ {% include tutorial_link.html
92
+ page="video-overlay/"
93
+ thumbnail="video-overlay/thumbnail.gif"
94
+ title="Showing video files"
95
+ description="Leaflet can help you display videos somewhere on the map."
96
+ %}
97
+
98
+ ***
99
+
100
+ The following tutorials cover how to create plugins for Leaflet, and are intended only for developers experienced in Javascript:
101
+
102
+
103
+ {% include tutorial_link.html
104
+ page="extending/extending-1-classes.html"
105
+ thumbnail="extending/thumbnail-1.png"
106
+ title="Extending Leaflet: Class Theory"
107
+ description="An overview of Leaflet's classes, class inheritance, and conventions."
108
+ %}
109
+
110
+
111
+ {% include tutorial_link.html
112
+ page="extending/extending-2-layers.html"
113
+ thumbnail="extending/thumbnail-2.png"
114
+ title="Extending Leaflet: Layers"
115
+ description="How to extend layers or create new ones, using specific entry points for doing so."
116
+ %}
117
+
118
+
119
+ {% include tutorial_link.html
120
+ page="extending/extending-3-controls.html"
121
+ thumbnail="extending/thumbnail-3.png"
122
+ title="Extending Leaflet: Handlers and Controls"
123
+ description="How to extend or create non-layers."
124
+ %}
125
+
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: redirected
3
+ sitemap: false
4
+ redirect_to: choropleth/example.html
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: redirected
3
+ sitemap: false
4
+ redirect_to: choropleth/
5
+ ---
@@ -0,0 +1,20 @@
1
+ ---
2
+ layout: tutorial_frame
3
+ title: Choropleth Tutorial
4
+ ---
5
+ <script type="text/javascript" src="us-states.js"></script>
6
+ <script type="text/javascript">
7
+
8
+ var map = L.map('map').setView([37.8, -96], 4);
9
+
10
+ L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
11
+ maxZoom: 18,
12
+ attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
13
+ '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
14
+ 'Imagery © <a href="http://mapbox.com">Mapbox</a>',
15
+ id: 'mapbox.light'
16
+ }).addTo(map);
17
+
18
+ var geojson = L.geoJson(statesData).addTo(map);
19
+
20
+ </script>
@@ -0,0 +1,46 @@
1
+ ---
2
+ layout: tutorial_frame
3
+ title: Choropleth Tutorial
4
+ ---
5
+
6
+ <script type="text/javascript" src="us-states.js"></script>
7
+ <script type="text/javascript">
8
+
9
+ var map = L.map('map').setView([37.8, -96], 4);
10
+
11
+ L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
12
+ maxZoom: 18,
13
+ attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
14
+ '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
15
+ 'Imagery © <a href="http://mapbox.com">Mapbox</a>',
16
+ id: 'mapbox.light'
17
+ }).addTo(map);
18
+
19
+ // get color depending on population density value
20
+ function getColor(d) {
21
+ return d > 1000 ? '#800026' :
22
+ d > 500 ? '#BD0026' :
23
+ d > 200 ? '#E31A1C' :
24
+ d > 100 ? '#FC4E2A' :
25
+ d > 50 ? '#FD8D3C' :
26
+ d > 20 ? '#FEB24C' :
27
+ d > 10 ? '#FED976' :
28
+ '#FFEDA0';
29
+ }
30
+
31
+ function style(feature) {
32
+ return {
33
+ weight: 2,
34
+ opacity: 1,
35
+ color: 'white',
36
+ dashArray: '3',
37
+ fillOpacity: 0.7,
38
+ fillColor: getColor(feature.properties.density)
39
+ };
40
+ }
41
+
42
+ var geojson = L.geoJson(statesData, {
43
+ style: style,
44
+ }).addTo(map);
45
+
46
+ </script>
@@ -0,0 +1,159 @@
1
+ ---
2
+ layout: tutorial_frame
3
+ title: Choropleth Tutorial
4
+ css: "#map {
5
+ width: 800px;
6
+ height: 500px;
7
+ }
8
+
9
+ .info {
10
+ padding: 6px 8px;
11
+ font: 14px/16px Arial, Helvetica, sans-serif;
12
+ background: white;
13
+ background: rgba(255,255,255,0.8);
14
+ box-shadow: 0 0 15px rgba(0,0,0,0.2);
15
+ border-radius: 5px;
16
+ }
17
+ .info h4 {
18
+ margin: 0 0 5px;
19
+ color: #777;
20
+ }
21
+
22
+ .legend {
23
+ text-align: left;
24
+ line-height: 18px;
25
+ color: #555;
26
+ }
27
+ .legend i {
28
+ width: 18px;
29
+ height: 18px;
30
+ float: left;
31
+ margin-right: 8px;
32
+ opacity: 0.7;
33
+ }"
34
+ ---
35
+
36
+ <script type="text/javascript" src="us-states.js"></script>
37
+ <script type="text/javascript">
38
+
39
+ var map = L.map('map').setView([37.8, -96], 4);
40
+
41
+ L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
42
+ maxZoom: 18,
43
+ attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
44
+ '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
45
+ 'Imagery © <a href="http://mapbox.com">Mapbox</a>',
46
+ id: 'mapbox.light'
47
+ }).addTo(map);
48
+
49
+
50
+ // control that shows state info on hover
51
+ var info = L.control();
52
+
53
+ info.onAdd = function (map) {
54
+ this._div = L.DomUtil.create('div', 'info');
55
+ this.update();
56
+ return this._div;
57
+ };
58
+
59
+ info.update = function (props) {
60
+ this._div.innerHTML = '<h4>US Population Density</h4>' + (props ?
61
+ '<b>' + props.name + '</b><br />' + props.density + ' people / mi<sup>2</sup>'
62
+ : 'Hover over a state');
63
+ };
64
+
65
+ info.addTo(map);
66
+
67
+
68
+ // get color depending on population density value
69
+ function getColor(d) {
70
+ return d > 1000 ? '#800026' :
71
+ d > 500 ? '#BD0026' :
72
+ d > 200 ? '#E31A1C' :
73
+ d > 100 ? '#FC4E2A' :
74
+ d > 50 ? '#FD8D3C' :
75
+ d > 20 ? '#FEB24C' :
76
+ d > 10 ? '#FED976' :
77
+ '#FFEDA0';
78
+ }
79
+
80
+ function style(feature) {
81
+ return {
82
+ weight: 2,
83
+ opacity: 1,
84
+ color: 'white',
85
+ dashArray: '3',
86
+ fillOpacity: 0.7,
87
+ fillColor: getColor(feature.properties.density)
88
+ };
89
+ }
90
+
91
+ function highlightFeature(e) {
92
+ var layer = e.target;
93
+
94
+ layer.setStyle({
95
+ weight: 5,
96
+ color: '#666',
97
+ dashArray: '',
98
+ fillOpacity: 0.7
99
+ });
100
+
101
+ if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) {
102
+ layer.bringToFront();
103
+ }
104
+
105
+ info.update(layer.feature.properties);
106
+ }
107
+
108
+ var geojson;
109
+
110
+ function resetHighlight(e) {
111
+ geojson.resetStyle(e.target);
112
+ info.update();
113
+ }
114
+
115
+ function zoomToFeature(e) {
116
+ map.fitBounds(e.target.getBounds());
117
+ }
118
+
119
+ function onEachFeature(feature, layer) {
120
+ layer.on({
121
+ mouseover: highlightFeature,
122
+ mouseout: resetHighlight,
123
+ click: zoomToFeature
124
+ });
125
+ }
126
+
127
+ geojson = L.geoJson(statesData, {
128
+ style: style,
129
+ onEachFeature: onEachFeature
130
+ }).addTo(map);
131
+
132
+ map.attributionControl.addAttribution('Population data &copy; <a href="http://census.gov/">US Census Bureau</a>');
133
+
134
+
135
+ var legend = L.control({position: 'bottomright'});
136
+
137
+ legend.onAdd = function (map) {
138
+
139
+ var div = L.DomUtil.create('div', 'info legend'),
140
+ grades = [0, 10, 20, 50, 100, 200, 500, 1000],
141
+ labels = [],
142
+ from, to;
143
+
144
+ for (var i = 0; i < grades.length; i++) {
145
+ from = grades[i];
146
+ to = grades[i + 1];
147
+
148
+ labels.push(
149
+ '<i style="background:' + getColor(from + 1) + '"></i> ' +
150
+ from + (to ? '&ndash;' + to : '+'));
151
+ }
152
+
153
+ div.innerHTML = labels.join('<br>');
154
+ return div;
155
+ };
156
+
157
+ legend.addTo(map);
158
+
159
+ </script>
@@ -0,0 +1,232 @@
1
+ ---
2
+ layout: tutorial_v2
3
+ title: Interactive Choropleth Map
4
+ ---
5
+
6
+ ## Interactive Choropleth Map
7
+
8
+ This is a case study of creating a colorful interactive [choropleth map](http://en.wikipedia.org/wiki/Choropleth_map) of US States Population Density with the help of [GeoJSON](../geojson/) and some [custom controls](../../reference.html#control) (that will hopefully convince all the remaining major news and government websites that do not use Leaflet yet to start doing so).
9
+
10
+ The tutorial was inspired by the [Texas Tribune US Senate Runoff Results map](http://www.texastribune.org/library/data/us-senate-runoff-results-map/) (also powered by Leaflet), created by [Ryan Murphy](http://www.texastribune.org/about/staff/ryan-murphy/).
11
+
12
+ {% include frame.html url="example.html" width=816 height=516 %}
13
+
14
+ ### Data Source
15
+
16
+ We'll be creating a visualization of population density per US state. As the amount of data (state shapes and the density value for each state) is not very big, the most convenient and simple way to store and then display it is [GeoJSON](../geojson/).
17
+
18
+ Each feature of our GeoJSON data ([us-states.js](us-states.js)) will look like this:
19
+
20
+ {
21
+ "type": "Feature",
22
+ "properties": {
23
+ "name": "Alabama",
24
+ "density": 94.65
25
+ },
26
+ "geometry": ...
27
+ ...
28
+ }
29
+
30
+ The GeoJSON with state shapes was kindly shared by [Mike Bostock](http://bost.ocks.org/mike) of [D3](http://d3js.org/) fame, extended with density values from [this Wikipedia article](http://en.wikipedia.org/wiki/List_of_U.S._states_by_population_density) based on July 1st 2011 data from [US Census Bureau](http://www.census.gov/) and assigned to `statesData` JS variable.
31
+
32
+ ### Basic States Map
33
+
34
+ Let's display our states data on a map with a custom Mapbox style for nice grayscale tiles that look perfect as a background for visualizations:
35
+
36
+ var mapboxAccessToken = {your access token here};
37
+ var map = L.map('map').setView([37.8, -96], 4);
38
+
39
+ L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=' + mapboxAccessToken, {
40
+ id: 'mapbox.light',
41
+ attribution: ...
42
+ }).addTo(map);
43
+
44
+ L.geoJson(statesData).addTo(map);
45
+
46
+ {% include frame.html url="example-basic.html" %}
47
+
48
+
49
+ ### Adding Some Color
50
+
51
+ Now we need to color the states according to their population density. Choosing nice colors for a map can be tricky, but there's a great tool that can help with it --- [ColorBrewer](http://colorbrewer2.org/). Using the values we got from it, we create a function that returns a color based on population density:
52
+
53
+ function getColor(d) {
54
+ return d > 1000 ? '#800026' :
55
+ d > 500 ? '#BD0026' :
56
+ d > 200 ? '#E31A1C' :
57
+ d > 100 ? '#FC4E2A' :
58
+ d > 50 ? '#FD8D3C' :
59
+ d > 20 ? '#FEB24C' :
60
+ d > 10 ? '#FED976' :
61
+ '#FFEDA0';
62
+ }
63
+
64
+ Next we define a styling function for our GeoJSON layer so that its `fillColor` depends on `feature.properties.density` property, also adjusting the appearance a bit and adding a nice touch with dashed stroke.
65
+
66
+ function style(feature) {
67
+ return {
68
+ fillColor: getColor(feature.properties.density),
69
+ weight: 2,
70
+ opacity: 1,
71
+ color: 'white',
72
+ dashArray: '3',
73
+ fillOpacity: 0.7
74
+ };
75
+ }
76
+
77
+ L.geoJson(statesData, {style: style}).addTo(map);
78
+
79
+ Looks much better now!
80
+
81
+ {% include frame.html url="example-color.html" %}
82
+
83
+
84
+ ### Adding Interaction
85
+
86
+ Now let's make the states highlighted visually in some way when they are hovered with a mouse. First we'll define an event listener for layer `mouseover` event:
87
+
88
+ function highlightFeature(e) {
89
+ var layer = e.target;
90
+
91
+ layer.setStyle({
92
+ weight: 5,
93
+ color: '#666',
94
+ dashArray: '',
95
+ fillOpacity: 0.7
96
+ });
97
+
98
+ if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) {
99
+ layer.bringToFront();
100
+ }
101
+ }
102
+
103
+ Here we get access to the layer that was hovered through `e.target`, set a thick grey border on the layer as our highlight effect, also bringing it to the front so that the border doesn't clash with nearby states (but not for IE, Opera or Edge, since they have problems doing `bringToFront` on `mouseover`).
104
+
105
+ Next we'll define what happens on `mouseout`:
106
+
107
+ function resetHighlight(e) {
108
+ geojson.resetStyle(e.target);
109
+ }
110
+
111
+ The handy `geojson.resetStyle` method will reset the layer style to its default state (defined by our `style` function). For this to work, make sure our GeoJSON layer is accessible through the `geojson` variable by defining it before our listeners and assigning the layer to it later:
112
+
113
+ var geojson;
114
+ // ... our listeners
115
+ geojson = L.geoJson(...);
116
+
117
+ As an additional touch, let's define a `click` listener that zooms to the state:
118
+
119
+ function zoomToFeature(e) {
120
+ map.fitBounds(e.target.getBounds());
121
+ }
122
+
123
+ Now we'll use the `onEachFeature` option to add the listeners on our state layers:
124
+
125
+ function onEachFeature(feature, layer) {
126
+ layer.on({
127
+ mouseover: highlightFeature,
128
+ mouseout: resetHighlight,
129
+ click: zoomToFeature
130
+ });
131
+ }
132
+
133
+ geojson = L.geoJson(statesData, {
134
+ style: style,
135
+ onEachFeature: onEachFeature
136
+ }).addTo(map);
137
+
138
+ This makes the states highlight nicely on hover and gives us the ability to add other interactions inside our listeners.
139
+
140
+ ### Custom Info Control
141
+
142
+ We could use the usual popups on click to show information about different states, but we'll choose a different route --- showing it on state hover inside a [custom control](../../reference.html#icontrol).
143
+
144
+ Here's the code for our control:
145
+
146
+ var info = L.control();
147
+
148
+ info.onAdd = function (map) {
149
+ this._div = L.DomUtil.create('div', 'info'); // create a div with a class "info"
150
+ this.update();
151
+ return this._div;
152
+ };
153
+
154
+ // method that we will use to update the control based on feature properties passed
155
+ info.update = function (props) {
156
+ this._div.innerHTML = '<h4>US Population Density</h4>' + (props ?
157
+ '<b>' + props.name + '</b><br />' + props.density + ' people / mi<sup>2</sup>'
158
+ : 'Hover over a state');
159
+ };
160
+
161
+ info.addTo(map);
162
+
163
+ We need to update the control when the user hovers over a state, so we'll also modify our listeners as follows:
164
+
165
+ function highlightFeature(e) {
166
+ ...
167
+ info.update(layer.feature.properties);
168
+ }
169
+
170
+ function resetHighlight(e) {
171
+ ...
172
+ info.update();
173
+ }
174
+
175
+ The control also needs some CSS styles to look nice:
176
+
177
+ {: .css}
178
+ .info {
179
+ padding: 6px 8px;
180
+ font: 14px/16px Arial, Helvetica, sans-serif;
181
+ background: white;
182
+ background: rgba(255,255,255,0.8);
183
+ box-shadow: 0 0 15px rgba(0,0,0,0.2);
184
+ border-radius: 5px;
185
+ }
186
+ .info h4 {
187
+ margin: 0 0 5px;
188
+ color: #777;
189
+ }
190
+
191
+ ### Custom Legend Control
192
+
193
+ Creating a control with a legend is easier, since it is static and doesn't change on state hover. JavaScript code:
194
+
195
+ var legend = L.control({position: 'bottomright'});
196
+
197
+ legend.onAdd = function (map) {
198
+
199
+ var div = L.DomUtil.create('div', 'info legend'),
200
+ grades = [0, 10, 20, 50, 100, 200, 500, 1000],
201
+ labels = [];
202
+
203
+ // loop through our density intervals and generate a label with a colored square for each interval
204
+ for (var i = 0; i < grades.length; i++) {
205
+ div.innerHTML +=
206
+ '<i style="background:' + getColor(grades[i] + 1) + '"></i> ' +
207
+ grades[i] + (grades[i + 1] ? '&ndash;' + grades[i + 1] + '<br>' : '+');
208
+ }
209
+
210
+ return div;
211
+ };
212
+
213
+ legend.addTo(map);
214
+
215
+ CSS styles for the control (we also reuse the `info` class defined earlier):
216
+
217
+ {: .css}
218
+ .legend {
219
+ line-height: 18px;
220
+ color: #555;
221
+ }
222
+ .legend i {
223
+ width: 18px;
224
+ height: 18px;
225
+ float: left;
226
+ margin-right: 8px;
227
+ opacity: 0.7;
228
+ }
229
+
230
+ Enjoy the result on the top of this page, or on a [separate page](example.html).
231
+
232
+