leaflet-js 0.7.9 → 0.8.dev2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (341) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.rdoc +0 -10
  3. data/Rakefile +3 -3
  4. data/leaflet-js.gemspec +7 -13
  5. data/lib/leaflet-js.rb +10 -2
  6. data/lib/leaflet.draw/BREAKINGCHANGES.md +54 -0
  7. data/lib/leaflet.draw/CHANGELOG.md +130 -0
  8. data/lib/leaflet.draw/Jakefile.js +48 -0
  9. data/lib/leaflet.draw/MIT-LICENCE.txt +20 -0
  10. data/lib/leaflet.draw/README.md +427 -0
  11. data/lib/leaflet.draw/TODO.md +62 -0
  12. data/lib/leaflet.draw/build/build.html +243 -0
  13. data/lib/leaflet.draw/build/build.js +187 -0
  14. data/lib/leaflet.draw/build/deps.js +76 -0
  15. data/lib/leaflet.draw/build/hintrc.js +39 -0
  16. data/lib/leaflet.draw/build/leaflet.draw-include.js +42 -0
  17. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/dist/images/spritesheet-2x.png +0 -0
  18. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/dist/images/spritesheet.png +0 -0
  19. data/lib/leaflet.draw/dist/leaflet.draw-src.js +2872 -0
  20. data/lib/leaflet.draw/dist/leaflet.draw.css +295 -0
  21. data/lib/leaflet.draw/dist/leaflet.draw.js +10 -0
  22. data/lib/leaflet.draw/examples/basic.html +113 -0
  23. data/lib/leaflet.draw/examples/edithandlers.html +66 -0
  24. data/{vendor/assets/Leaflet/dist → lib/leaflet.draw/examples/libs}/images/layers-2x.png +0 -0
  25. data/{vendor/assets/Leaflet/dist → lib/leaflet.draw/examples/libs}/images/layers.png +0 -0
  26. data/{vendor/assets/Leaflet/dist → lib/leaflet.draw/examples/libs}/images/marker-icon-2x.png +0 -0
  27. data/{vendor/assets/Leaflet/dist → lib/leaflet.draw/examples/libs}/images/marker-icon.png +0 -0
  28. data/lib/leaflet.draw/examples/libs/images/marker-icon@2x.png +0 -0
  29. data/{vendor/assets/Leaflet/dist → lib/leaflet.draw/examples/libs}/images/marker-shadow.png +0 -0
  30. data/lib/leaflet.draw/examples/libs/leaflet-src.js +9191 -0
  31. data/{vendor/assets/leaflet.css.erb → lib/leaflet.draw/examples/libs/leaflet.css} +2 -2
  32. data/lib/leaflet.draw/package.json +40 -0
  33. data/lib/leaflet.draw/spec/after.js +2 -0
  34. data/lib/leaflet.draw/spec/before.js +3 -0
  35. data/lib/leaflet.draw/spec/expect.js +1253 -0
  36. data/lib/leaflet.draw/spec/happen.js +93 -0
  37. data/lib/leaflet.draw/spec/index.html +38 -0
  38. data/lib/leaflet.draw/spec/karma.conf.js +72 -0
  39. data/lib/leaflet.draw/spec/sinon.js +4223 -0
  40. data/lib/leaflet.draw/spec/spec.hintrc.js +25 -0
  41. data/lib/leaflet.draw/spec/suites/DrawControlSpec.js +14 -0
  42. data/lib/leaflet.draw/spec/suites/GeometryUtilSpec.js +25 -0
  43. data/lib/leaflet.draw/spec/suites/LatLngUtilSpec.js +11 -0
  44. data/lib/leaflet.draw/spec/suites/SpecHelper.js +28 -0
  45. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/Control.Draw.js +9 -9
  46. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/Leaflet.draw.js +1 -2
  47. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/Toolbar.js +0 -0
  48. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/Tooltip.js +0 -0
  49. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/copyright.js +0 -0
  50. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/draw/DrawToolbar.js +0 -4
  51. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/draw/handler/Draw.Circle.js +1 -1
  52. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/draw/handler/Draw.Feature.js +2 -2
  53. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/draw/handler/Draw.Marker.js +0 -0
  54. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/draw/handler/Draw.Polygon.js +0 -0
  55. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/draw/handler/Draw.Polyline.js +0 -0
  56. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/draw/handler/Draw.Rectangle.js +1 -19
  57. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/draw/handler/Draw.SimpleShape.js +1 -7
  58. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/edit/EditToolbar.js +2 -9
  59. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/edit/handler/Edit.Circle.js +0 -0
  60. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/edit/handler/Edit.Poly.js +2 -14
  61. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/edit/handler/Edit.Rectangle.js +0 -0
  62. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/edit/handler/Edit.SimpleShape.js +3 -11
  63. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/edit/handler/EditToolbar.Delete.js +1 -4
  64. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/edit/handler/EditToolbar.Edit.js +83 -17
  65. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/ext/GeometryUtil.js +1 -1
  66. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/ext/LatLngUtil.js +0 -0
  67. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/ext/LineUtil.Intersect.js +0 -0
  68. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/ext/Polygon.Intersect.js +0 -0
  69. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/ext/Polyline.Intersect.js +0 -0
  70. data/{vendor/assets/Leaflet.draw → lib/leaflet.draw}/src/images/spritesheet.svg +0 -0
  71. data/lib/leaflet.label/CHANGELOG.md +67 -0
  72. data/lib/leaflet.label/Jakefile.js +21 -0
  73. data/lib/leaflet.label/MIT-LICENCE.txt +20 -0
  74. data/lib/leaflet.label/README.md +103 -0
  75. data/lib/leaflet.label/build/build.js +155 -0
  76. data/lib/leaflet.label/build/deps.js +26 -0
  77. data/lib/leaflet.label/build/hint.js +30 -0
  78. data/lib/leaflet.label/build/hintrc.js +51 -0
  79. data/lib/leaflet.label/dist/images/death.png +0 -0
  80. data/lib/leaflet.label/dist/leaflet.label-src.js +542 -0
  81. data/{vendor/assets → lib/leaflet.label/dist}/leaflet.label.css +0 -0
  82. data/lib/leaflet.label/dist/leaflet.label.js +9 -0
  83. data/lib/leaflet.label/example/label.html +85 -0
  84. data/lib/leaflet.label/libs/leaflet/images/layers-2x.png +0 -0
  85. data/lib/leaflet.label/libs/leaflet/images/layers.png +0 -0
  86. data/lib/leaflet.label/libs/leaflet/images/marker-icon-2x.png +0 -0
  87. data/lib/leaflet.label/libs/leaflet/images/marker-icon.png +0 -0
  88. data/lib/leaflet.label/libs/leaflet/images/marker-icon@2x.png +0 -0
  89. data/lib/leaflet.label/libs/leaflet/images/marker-shadow.png +0 -0
  90. data/lib/leaflet.label/libs/leaflet/leaflet-src.js +9108 -0
  91. data/lib/leaflet.label/libs/leaflet/leaflet.css +478 -0
  92. data/lib/leaflet.label/libs/leaflet/leaflet.js +9 -0
  93. data/lib/leaflet.label/package.json +19 -0
  94. data/{vendor/assets/Leaflet.label → lib/leaflet.label}/src/BaseMarkerMethods.js +0 -0
  95. data/{vendor/assets/Leaflet.label → lib/leaflet.label}/src/CircleMarker.Label.js +0 -0
  96. data/{vendor/assets/Leaflet.label → lib/leaflet.label}/src/FeatureGroup.Label.js +0 -0
  97. data/{vendor/assets/Leaflet.label → lib/leaflet.label}/src/Label.js +2 -5
  98. data/{vendor/assets/Leaflet.label → lib/leaflet.label}/src/Leaflet.label.js +1 -1
  99. data/{vendor/assets/Leaflet.label → lib/leaflet.label}/src/Map.Label.js +0 -0
  100. data/{vendor/assets/Leaflet.label → lib/leaflet.label}/src/Marker.Label.js +0 -0
  101. data/{vendor/assets/Leaflet.label → lib/leaflet.label}/src/Path.Label.js +0 -0
  102. data/{vendor/assets/Leaflet.label → lib/leaflet.label}/src/copyright.js +0 -0
  103. data/lib/leaflet/CHANGELOG.md +1007 -0
  104. data/lib/leaflet/CONTRIBUTING.md +155 -0
  105. data/lib/leaflet/FAQ.md +138 -0
  106. data/lib/leaflet/Jakefile.js +56 -0
  107. data/lib/leaflet/LICENSE +23 -0
  108. data/lib/leaflet/PLUGIN-GUIDE.md +127 -0
  109. data/lib/leaflet/README.md +34 -0
  110. data/lib/leaflet/build/build.html +227 -0
  111. data/lib/leaflet/build/build.js +190 -0
  112. data/lib/leaflet/build/deps.js +258 -0
  113. data/lib/leaflet/build/hintrc.js +40 -0
  114. data/lib/leaflet/debug/css/mobile.css +6 -0
  115. data/lib/leaflet/debug/css/screen.css +5 -0
  116. data/lib/leaflet/debug/hacks/jitter.html +42 -0
  117. data/lib/leaflet/debug/leaflet-include.js +59 -0
  118. data/lib/leaflet/debug/map/canvas.html +49 -0
  119. data/lib/leaflet/debug/map/controls.html +49 -0
  120. data/lib/leaflet/debug/map/geolocation.html +34 -0
  121. data/lib/leaflet/debug/map/grid.html +45 -0
  122. data/lib/leaflet/debug/map/iframe.html +11 -0
  123. data/lib/leaflet/debug/map/image-overlay.html +43 -0
  124. data/lib/leaflet/debug/map/map-mobile.html +34 -0
  125. data/lib/leaflet/debug/map/map.html +61 -0
  126. data/lib/leaflet/debug/map/max-bounds.html +38 -0
  127. data/lib/leaflet/debug/map/opacity.html +223 -0
  128. data/lib/leaflet/debug/map/scroll.html +41 -0
  129. data/lib/leaflet/debug/map/simple-proj.html +59 -0
  130. data/lib/leaflet/debug/map/wms-marble.html +30 -0
  131. data/lib/leaflet/debug/map/wms.html +40 -0
  132. data/lib/leaflet/debug/map/zoomlevels.html +45 -0
  133. data/lib/leaflet/debug/tests/add_remove_layers.html +87 -0
  134. data/lib/leaflet/debug/tests/bringtoback.html +37 -0
  135. data/lib/leaflet/debug/tests/canvasloop.html +47 -0
  136. data/lib/leaflet/debug/tests/click_on_canvas.html +58 -0
  137. data/lib/leaflet/debug/tests/click_on_canvas_broken.html +49 -0
  138. data/lib/leaflet/debug/tests/dragging_and_copyworldjump.html +61 -0
  139. data/lib/leaflet/debug/tests/opacity.html +56 -0
  140. data/lib/leaflet/debug/tests/popupcontextmenuclicks.html +59 -0
  141. data/lib/leaflet/debug/tests/remove_while_dragging.html +28 -0
  142. data/lib/leaflet/debug/tests/removetilewhilepan.html +41 -0
  143. data/lib/leaflet/debug/tests/reuse_popups.html +40 -0
  144. data/lib/leaflet/debug/tests/rtl.html +42 -0
  145. data/lib/leaflet/debug/tests/rtl2.html +27 -0
  146. data/lib/leaflet/debug/tests/set_icon_reuse_dom.html +43 -0
  147. data/lib/leaflet/debug/tests/svg_clicks.html +54 -0
  148. data/lib/leaflet/debug/vector/bounds-extend.html +88 -0
  149. data/lib/leaflet/debug/vector/feature-group-bounds.html +90 -0
  150. data/lib/leaflet/debug/vector/geojson-sample.js +53 -0
  151. data/lib/leaflet/debug/vector/geojson.html +173 -0
  152. data/lib/leaflet/debug/vector/rectangle.html +53 -0
  153. data/lib/leaflet/debug/vector/route.js +1 -0
  154. data/lib/leaflet/debug/vector/touchzoomemu.html +194 -0
  155. data/lib/leaflet/debug/vector/us-states.js +54 -0
  156. data/lib/leaflet/debug/vector/vector-bounds.html +69 -0
  157. data/lib/leaflet/debug/vector/vector-canvas.html +92 -0
  158. data/lib/leaflet/debug/vector/vector-mobile.html +38 -0
  159. data/lib/leaflet/debug/vector/vector-simple.html +47 -0
  160. data/lib/leaflet/debug/vector/vector.html +37 -0
  161. data/lib/leaflet/debug/vector/vector2.html +58 -0
  162. data/lib/leaflet/dist/images/layers-2x.png +0 -0
  163. data/lib/leaflet/dist/images/layers.png +0 -0
  164. data/lib/leaflet/dist/images/marker-icon-2x.png +0 -0
  165. data/lib/leaflet/dist/images/marker-icon.png +0 -0
  166. data/lib/leaflet/dist/images/marker-shadow.png +0 -0
  167. data/lib/leaflet/dist/leaflet.css +494 -0
  168. data/lib/leaflet/package.json +28 -0
  169. data/lib/leaflet/spec/after.js +2 -0
  170. data/lib/leaflet/spec/expect.js +1253 -0
  171. data/lib/leaflet/spec/index.html +87 -0
  172. data/lib/leaflet/spec/karma.conf.js +68 -0
  173. data/lib/leaflet/spec/sinon.js +4223 -0
  174. data/lib/leaflet/spec/spec.hintrc.js +25 -0
  175. data/lib/leaflet/spec/suites/SpecHelper.js +42 -0
  176. data/lib/leaflet/spec/suites/control/Control.AttributionSpec.js +68 -0
  177. data/lib/leaflet/spec/suites/control/Control.LayersSpec.js +67 -0
  178. data/lib/leaflet/spec/suites/control/Control.ScaleSpec.js +6 -0
  179. data/lib/leaflet/spec/suites/core/ClassSpec.js +166 -0
  180. data/lib/leaflet/spec/suites/core/EventsSpec.js +416 -0
  181. data/lib/leaflet/spec/suites/core/UtilSpec.js +237 -0
  182. data/lib/leaflet/spec/suites/dom/DomEventSpec.js +102 -0
  183. data/lib/leaflet/spec/suites/dom/DomUtilSpec.js +59 -0
  184. data/lib/leaflet/spec/suites/dom/PosAnimationSpec.js +27 -0
  185. data/lib/leaflet/spec/suites/geo/CRSSpec.js +151 -0
  186. data/lib/leaflet/spec/suites/geo/LatLngBoundsSpec.js +144 -0
  187. data/lib/leaflet/spec/suites/geo/LatLngSpec.js +102 -0
  188. data/lib/leaflet/spec/suites/geo/ProjectionSpec.js +96 -0
  189. data/lib/leaflet/spec/suites/geometry/BoundsSpec.js +87 -0
  190. data/lib/leaflet/spec/suites/geometry/LineUtilSpec.js +75 -0
  191. data/lib/leaflet/spec/suites/geometry/PointSpec.js +104 -0
  192. data/lib/leaflet/spec/suites/geometry/PolyUtilSpec.js +27 -0
  193. data/lib/leaflet/spec/suites/geometry/TransformationSpec.js +31 -0
  194. data/lib/leaflet/spec/suites/layer/FeatureGroupSpec.js +86 -0
  195. data/lib/leaflet/spec/suites/layer/GeoJSONSpec.js +282 -0
  196. data/lib/leaflet/spec/suites/layer/LayerGroupSpec.js +71 -0
  197. data/lib/leaflet/spec/suites/layer/PopupSpec.js +119 -0
  198. data/lib/leaflet/spec/suites/layer/marker/MarkerSpec.js +117 -0
  199. data/lib/leaflet/spec/suites/layer/tile/GridLayerSpec.js +70 -0
  200. data/lib/leaflet/spec/suites/layer/tile/TileLayerSpec.js +88 -0
  201. data/lib/leaflet/spec/suites/layer/vector/CircleMarkerSpec.js +53 -0
  202. data/lib/leaflet/spec/suites/layer/vector/CircleSpec.js +18 -0
  203. data/lib/leaflet/spec/suites/layer/vector/PolygonSpec.js +96 -0
  204. data/lib/leaflet/spec/suites/layer/vector/PolylineGeometrySpec.js +35 -0
  205. data/lib/leaflet/spec/suites/layer/vector/PolylineSpec.js +55 -0
  206. data/lib/leaflet/spec/suites/map/MapSpec.js +553 -0
  207. data/lib/leaflet/spec/suites/map/handler/Map.DragSpec.js +38 -0
  208. data/{vendor/assets/Leaflet → lib/leaflet}/src/Leaflet.js +16 -11
  209. data/{vendor/assets/Leaflet → lib/leaflet}/src/control/Control.Attribution.js +1 -23
  210. data/{vendor/assets/Leaflet → lib/leaflet}/src/control/Control.Layers.js +42 -57
  211. data/lib/leaflet/src/control/Control.Scale.js +102 -0
  212. data/{vendor/assets/Leaflet → lib/leaflet}/src/control/Control.Zoom.js +11 -18
  213. data/{vendor/assets/Leaflet → lib/leaflet}/src/control/Control.js +7 -9
  214. data/lib/leaflet/src/copyright.js +4 -0
  215. data/lib/leaflet/src/core/Browser.js +65 -0
  216. data/{vendor/assets/Leaflet → lib/leaflet}/src/core/Class.js +8 -13
  217. data/lib/leaflet/src/core/Events.js +226 -0
  218. data/{vendor/assets/Leaflet → lib/leaflet}/src/core/Handler.js +0 -0
  219. data/lib/leaflet/src/core/Util.js +196 -0
  220. data/{vendor/assets/Leaflet → lib/leaflet}/src/dom/DomEvent.DoubleTap.js +20 -27
  221. data/lib/leaflet/src/dom/DomEvent.Pointer.js +107 -0
  222. data/{vendor/assets/Leaflet → lib/leaflet}/src/dom/DomEvent.js +70 -59
  223. data/lib/leaflet/src/dom/DomUtil.js +213 -0
  224. data/{vendor/assets/Leaflet → lib/leaflet}/src/dom/Draggable.js +10 -19
  225. data/{vendor/assets/Leaflet → lib/leaflet}/src/dom/PosAnimation.Timer.js +0 -0
  226. data/{vendor/assets/Leaflet → lib/leaflet}/src/dom/PosAnimation.js +4 -3
  227. data/lib/leaflet/src/geo/LatLng.js +67 -0
  228. data/{vendor/assets/Leaflet → lib/leaflet}/src/geo/LatLngBounds.js +0 -0
  229. data/lib/leaflet/src/geo/crs/CRS.EPSG3395.js +13 -0
  230. data/lib/leaflet/src/geo/crs/CRS.EPSG3857.js +17 -0
  231. data/{vendor/assets/Leaflet → lib/leaflet}/src/geo/crs/CRS.EPSG4326.js +2 -3
  232. data/lib/leaflet/src/geo/crs/CRS.Earth.js +19 -0
  233. data/{vendor/assets/Leaflet → lib/leaflet}/src/geo/crs/CRS.Simple.js +10 -1
  234. data/lib/leaflet/src/geo/crs/CRS.js +63 -0
  235. data/{vendor/assets/Leaflet → lib/leaflet}/src/geo/projection/Projection.LonLat.js +5 -1
  236. data/lib/leaflet/src/geo/projection/Projection.Mercator.js +43 -0
  237. data/lib/leaflet/src/geo/projection/Projection.SphericalMercator.js +31 -0
  238. data/{vendor/assets/Leaflet → lib/leaflet}/src/geometry/Bounds.js +0 -0
  239. data/{vendor/assets/Leaflet → lib/leaflet}/src/geometry/LineUtil.js +16 -5
  240. data/{vendor/assets/Leaflet → lib/leaflet}/src/geometry/Point.js +10 -0
  241. data/{vendor/assets/Leaflet → lib/leaflet}/src/geometry/PolyUtil.js +0 -0
  242. data/{vendor/assets/Leaflet → lib/leaflet}/src/geometry/Transformation.js +0 -0
  243. data/{vendor/assets/Leaflet → lib/leaflet}/src/images/layers.svg +0 -0
  244. data/lib/leaflet/src/images/logo.svg +85 -0
  245. data/{vendor/assets/Leaflet → lib/leaflet}/src/images/marker.svg +0 -0
  246. data/{vendor/assets/Leaflet → lib/leaflet}/src/layer/FeatureGroup.js +3 -20
  247. data/lib/leaflet/src/layer/GeoJSON.js +275 -0
  248. data/lib/leaflet/src/layer/ImageOverlay.js +123 -0
  249. data/lib/leaflet/src/layer/Layer.Popup.js +87 -0
  250. data/lib/leaflet/src/layer/Layer.js +150 -0
  251. data/{vendor/assets/Leaflet → lib/leaflet}/src/layer/LayerGroup.js +12 -14
  252. data/{vendor/assets/Leaflet → lib/leaflet}/src/layer/Popup.js +65 -83
  253. data/{vendor/assets/Leaflet → lib/leaflet}/src/layer/marker/DivIcon.js +3 -8
  254. data/{vendor/assets/Leaflet → lib/leaflet}/src/layer/marker/Icon.Default.js +6 -12
  255. data/{vendor/assets/Leaflet → lib/leaflet}/src/layer/marker/Icon.js +8 -25
  256. data/{vendor/assets/Leaflet → lib/leaflet}/src/layer/marker/Marker.Drag.js +13 -11
  257. data/lib/leaflet/src/layer/marker/Marker.Popup.js +16 -0
  258. data/{vendor/assets/Leaflet → lib/leaflet}/src/layer/marker/Marker.js +52 -103
  259. data/lib/leaflet/src/layer/tile/GridLayer.js +536 -0
  260. data/lib/leaflet/src/layer/tile/TileLayer.WMS.js +79 -0
  261. data/lib/leaflet/src/layer/tile/TileLayer.js +148 -0
  262. data/lib/leaflet/src/layer/vector/Canvas.js +292 -0
  263. data/lib/leaflet/src/layer/vector/Circle.js +67 -0
  264. data/lib/leaflet/src/layer/vector/CircleMarker.js +72 -0
  265. data/lib/leaflet/src/layer/vector/Path.js +79 -0
  266. data/lib/leaflet/src/layer/vector/Polygon.js +75 -0
  267. data/lib/leaflet/src/layer/vector/Polyline.js +223 -0
  268. data/{vendor/assets/Leaflet → lib/leaflet}/src/layer/vector/Rectangle.js +27 -27
  269. data/lib/leaflet/src/layer/vector/Renderer.js +75 -0
  270. data/lib/leaflet/src/layer/vector/SVG.VML.js +134 -0
  271. data/lib/leaflet/src/layer/vector/SVG.js +189 -0
  272. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/Map.js +83 -199
  273. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/anim/Map.PanAnimation.js +0 -0
  274. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/anim/Map.ZoomAnimation.js +30 -38
  275. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/ext/Map.Geolocation.js +8 -8
  276. data/lib/leaflet/src/map/handler/Map.BoxZoom.js +105 -0
  277. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/handler/Map.DoubleClickZoom.js +0 -0
  278. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/handler/Map.Drag.js +12 -10
  279. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/handler/Map.Keyboard.js +19 -17
  280. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/handler/Map.ScrollWheelZoom.js +10 -6
  281. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/handler/Map.Tap.js +8 -6
  282. data/{vendor/assets/Leaflet → lib/leaflet}/src/map/handler/Map.TouchZoom.js +16 -32
  283. data/vendor/assets/images/layers-2x.png +0 -0
  284. data/vendor/assets/images/layers.png +0 -0
  285. data/vendor/assets/images/marker-icon-2x.png +0 -0
  286. data/vendor/assets/images/marker-icon.png +0 -0
  287. data/vendor/assets/images/marker-shadow.png +0 -0
  288. data/vendor/assets/images/spritesheet-2x.png +0 -0
  289. data/vendor/assets/images/spritesheet.png +0 -0
  290. data/vendor/assets/{leaflet-js.js → javascripts/leaflet-js.js} +2 -2
  291. data/vendor/assets/javascripts/leaflet.draw.js +37 -0
  292. data/vendor/assets/javascripts/leaflet.js +149 -0
  293. data/vendor/assets/javascripts/leaflet.label.js +11 -0
  294. data/vendor/assets/{leaflet-js.css → stylesheets/leaflet-js.css} +0 -0
  295. data/vendor/assets/stylesheets/leaflet.css.erb +478 -0
  296. data/vendor/assets/{leaflet.draw.css.erb → stylesheets/leaflet.draw.css.erb} +2 -2
  297. data/vendor/assets/{leaflet.draw.ie.css → stylesheets/leaflet.draw.ie.css} +0 -0
  298. data/vendor/assets/stylesheets/leaflet.label.css +52 -0
  299. metadata +298 -137
  300. data/lib/leaflet-js/engine.rb +0 -7
  301. data/lib/leaflet-js/version.rb +0 -3
  302. data/vendor/assets/Leaflet.draw/src/edit/handler/Edit.Marker.js +0 -75
  303. data/vendor/assets/Leaflet/src/control/Control.Scale.js +0 -112
  304. data/vendor/assets/Leaflet/src/copyright.js +0 -5
  305. data/vendor/assets/Leaflet/src/core/Browser.js +0 -66
  306. data/vendor/assets/Leaflet/src/core/Events.js +0 -178
  307. data/vendor/assets/Leaflet/src/core/Util.js +0 -182
  308. data/vendor/assets/Leaflet/src/dom/DomEvent.Pointer.js +0 -156
  309. data/vendor/assets/Leaflet/src/dom/DomUtil.js +0 -289
  310. data/vendor/assets/Leaflet/src/geo/LatLng.js +0 -99
  311. data/vendor/assets/Leaflet/src/geo/crs/CRS.EPSG3395.js +0 -14
  312. data/vendor/assets/Leaflet/src/geo/crs/CRS.EPSG3857.js +0 -21
  313. data/vendor/assets/Leaflet/src/geo/crs/CRS.js +0 -32
  314. data/vendor/assets/Leaflet/src/geo/projection/Projection.Mercator.js +0 -56
  315. data/vendor/assets/Leaflet/src/geo/projection/Projection.SphericalMercator.js +0 -27
  316. data/vendor/assets/Leaflet/src/geo/projection/Projection.js +0 -5
  317. data/vendor/assets/Leaflet/src/layer/GeoJSON.js +0 -286
  318. data/vendor/assets/Leaflet/src/layer/ImageOverlay.js +0 -141
  319. data/vendor/assets/Leaflet/src/layer/marker/Marker.Popup.js +0 -90
  320. data/vendor/assets/Leaflet/src/layer/tile/TileLayer.Anim.js +0 -110
  321. data/vendor/assets/Leaflet/src/layer/tile/TileLayer.Canvas.js +0 -61
  322. data/vendor/assets/Leaflet/src/layer/tile/TileLayer.WMS.js +0 -87
  323. data/vendor/assets/Leaflet/src/layer/tile/TileLayer.js +0 -597
  324. data/vendor/assets/Leaflet/src/layer/vector/Circle.js +0 -98
  325. data/vendor/assets/Leaflet/src/layer/vector/CircleMarker.js +0 -45
  326. data/vendor/assets/Leaflet/src/layer/vector/MultiPoly.js +0 -57
  327. data/vendor/assets/Leaflet/src/layer/vector/Path.Popup.js +0 -65
  328. data/vendor/assets/Leaflet/src/layer/vector/Path.SVG.js +0 -230
  329. data/vendor/assets/Leaflet/src/layer/vector/Path.VML.js +0 -135
  330. data/vendor/assets/Leaflet/src/layer/vector/Path.js +0 -119
  331. data/vendor/assets/Leaflet/src/layer/vector/Polygon.js +0 -92
  332. data/vendor/assets/Leaflet/src/layer/vector/Polyline.js +0 -164
  333. data/vendor/assets/Leaflet/src/layer/vector/canvas/Circle.Canvas.js +0 -18
  334. data/vendor/assets/Leaflet/src/layer/vector/canvas/CircleMarker.Canvas.js +0 -9
  335. data/vendor/assets/Leaflet/src/layer/vector/canvas/Path.Canvas.js +0 -204
  336. data/vendor/assets/Leaflet/src/layer/vector/canvas/Polygon.Canvas.js +0 -37
  337. data/vendor/assets/Leaflet/src/layer/vector/canvas/Polyline.Canvas.js +0 -30
  338. data/vendor/assets/Leaflet/src/map/handler/Map.BoxZoom.js +0 -118
  339. data/vendor/assets/leaflet.draw.js +0 -38
  340. data/vendor/assets/leaflet.js +0 -155
  341. data/vendor/assets/leaflet.label.js +0 -11
@@ -75,6 +75,16 @@ L.Point.prototype = {
75
75
  return this;
76
76
  },
77
77
 
78
+ ceil: function () {
79
+ return this.clone()._ceil();
80
+ },
81
+
82
+ _ceil: function () {
83
+ this.x = Math.ceil(this.x);
84
+ this.y = Math.ceil(this.y);
85
+ return this;
86
+ },
87
+
78
88
  distanceTo: function (point) {
79
89
  point = L.point(point);
80
90
 
@@ -0,0 +1,85 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2000" height="3000">
2
+ <rect x="920.813" y="774" fill="#ECECEC" width="128" height="128"/>
3
+ <path d="M706.129 1530.633c-16.973 17.26-34.34 25.889-52.1 25.889-5.156 0-10.116-.664-14.878-1.988-4.764-1.324-10.564-3.561-17.402-6.713-6.84-3.15-12.874-5.441-18.101-6.875-9.668 10.6-18.406 15.898-26.211 15.898-2.723 0-4.979-.896-6.768-2.686-1.791-1.789-2.686-3.975-2.686-6.553 0-5.441 2.667-10.223 8.003-14.342 5.334-4.117 12.872-6.963 22.612-8.539 4.082-5.586 6.695-11.047 7.842-16.383 1.145-5.334 2.041-14.125 2.686-26.372 1.217-25.207 7.966-44.956 20.249-59.243 12.281-14.287 25.62-21.431 40.015-21.431 9.883 0 17.993 3.134 24.331 9.399 6.338 6.268 9.507 14.271 9.507 24.009 0 11.244-3.33 21.092-9.99 29.541-6.66 8.451-14.324 12.676-22.988 12.676-4.512 0-8.057-1.235-10.635-3.706s-3.867-5.854-3.867-10.151c0-2.219.43-4.797 1.289-7.734 1.934 2.221 4.367 3.33 7.305 3.33 4.869 0 9.131-2.9 12.783-8.701s5.479-12.711 5.479-20.732c0-6.158-1.396-11.011-4.186-14.556s-6.617-5.317-11.481-5.317c-5.868 0-10.428 2.113-13.683 6.338-3.254 4.227-5.525 9.275-6.813 15.148-1.289 5.873-2.662 15.363-4.119 28.469-1.457 13.105-3.892 24.726-7.303 34.858-3.413 10.133-9.787 20.068-19.125 29.807 6.086-.43 11.368-.07 15.845 1.074 4.475 1.146 10.885 3.313 19.229 6.498 8.342 3.188 15.522 4.781 21.538 4.781 11.744 0 22.951-6.016 33.623-18.047v12.354zm80.244 0c-9.096 8.953-17.26 15.559-24.492 19.818-7.234 4.26-15.219 6.393-23.955 6.393-9.74 0-17.601-3.115-23.579-9.346-5.98-6.23-8.97-14.43-8.97-24.6 0-15.182 5.264-28.914 15.791-41.197 10.527-12.281 22.199-18.423 35.02-18.423 6.66 0 11.994 1.719 16.006 5.156 4.01 3.438 6.016 7.949 6.016 13.535 0 14.824-15.756 26.856-47.266 36.094 2.863 13.965 10.348 20.947 22.451 20.947 4.727 0 9.238-1.271 13.535-3.814 4.297-2.541 10.777-8.18 19.443-16.918v12.355zm-56.289-19.873c18.332-5.156 27.5-14.68 27.5-28.575 0-6.875-2.508-10.313-7.52-10.313-4.727 0-9.238 3.599-13.535 10.796s-6.445 16.562-6.445 28.092zm171.016 19.873c-11.459 10.887-19.658 17.977-24.6 21.27s-9.668 4.941-14.18 4.941c-11.316 0-16.65-9.99-16.006-29.971-7.162 10.242-13.769 17.797-19.819 22.666-6.053 4.869-12.3 7.305-18.745 7.305-6.303 0-11.655-2.955-16.06-8.863s-6.606-13.158-6.606-21.752c0-10.742 2.954-20.982 8.862-30.723 5.908-9.738 13.481-17.617 22.72-23.633s17.402-9.023 24.492-9.023c8.951 0 15.217 4.119 18.799 12.354l21.956-12.139h6.027l-9.475 31.476c-4.881 15.828-7.321 26.679-7.321 32.551 0 6.157 2.182 9.235 6.549 9.235 2.792 0 5.87-1.486 9.233-4.459 3.363-2.971 8.088-7.5 14.173-13.588v12.353zm-78.633 5.908c7.16 0 13.911-6.105 20.249-18.316 6.338-12.209 9.507-23.471 9.507-33.784 0-4.01-.896-7.144-2.686-9.399-1.791-2.256-4.189-3.384-7.197-3.384-7.162 0-13.948 6.088-20.356 18.262-6.41 12.176-9.614 23.383-9.614 33.624 0 3.867.948 7 2.847 9.398 1.895 2.4 4.312 3.599 7.25 3.599zm165.752-5.908c-7.439 8.379-14.808 14.842-22.104 19.389-7.296 4.547-13.806 6.822-19.529 6.822-2.719 0-6.438-1.036-11.158-3.104-3.021 15.748-5.682 32.752-7.983 51.008-7.456 1.004-16.417 2.545-26.882 4.625 2.291-19.623 6.266-45.082 11.922-76.376-.789-1.359-2.186-4.798-4.189-10.313l-7.196 7.949h-2.471v-9.668l20.479-21.235c3.892-19.215 7.056-33.121 9.492-41.715 2.434-8.594 5.836-18.101 10.205-28.521 4.367-10.42 7.125-16.398 8.271-17.939 1.145-1.539 3.921-3.008 8.325-4.404s9.112-2.721 14.126-3.975c5.012-1.252 7.697-1.88 8.057-1.88 2.721 0 4.941 1.771 6.66 5.313s2.578 8.209 2.578 14.003c0 10.017-2.644 19.675-7.931 28.975-5.287 9.301-15.288 20.746-30.004 34.338l-9.028 44.896c3.501 7.51 8.756 11.264 15.762 11.264 10.007 0 20.874-7.268 32.598-21.807v12.355zm-36.077-61.228c8.373-7.305 14.938-15.164 19.699-23.579 4.76-8.416 7.14-16.169 7.14-23.26 0-3.008-.554-5.479-1.66-7.412-1.107-1.934-2.48-2.9-4.122-2.9-3.142 0-6.338 4.121-9.586 12.36-3.25 8.239-7.073 23.169-11.471 44.791zm107.083 61.228c-9.74 8.953-18.28 15.559-25.62 19.818-7.342 4.26-14.341 6.393-21.001 6.393-7.664 0-13.841-2.971-18.53-8.916-4.691-5.943-7.036-13.928-7.036-23.955 0-15.039 3.258-33.086 9.775-54.141 6.516-21.055 14.43-40.461 23.74-58.223l27.285-10.098c.859-.285 1.504-.43 1.934-.43 2.076 0 3.776 1.522 5.103 4.565 1.324 3.045 1.987 7.144 1.987 12.3 0 14.609-3.367 28.754-10.098 42.432-6.732 13.68-17.26 28.289-31.582 43.829-.574 7.449-.859 12.568-.859 15.361 0 6.23 1.145 11.172 3.438 14.824 2.291 3.652 5.334 5.479 9.131 5.479 3.867 0 7.984-1.396 12.354-4.189 4.367-2.793 11.027-8.594 19.98-17.402v12.353zm-41.143-42.003c9.094-10.111 16.471-21.442 22.129-33.994 5.656-12.55 8.486-23.342 8.486-32.379 0-2.654-.395-4.787-1.182-6.402-.789-1.613-1.791-2.42-3.008-2.42-2.65 0-6.499 6.598-11.548 19.794-5.048 13.196-10.008 31.665-14.877 55.401zm121.494 42.003c-9.096 8.953-17.26 15.559-24.492 19.818-7.234 4.26-15.219 6.393-23.955 6.393-9.74 0-17.601-3.115-23.579-9.346-5.98-6.23-8.97-14.43-8.97-24.6 0-15.182 5.264-28.914 15.791-41.197 10.527-12.281 22.199-18.423 35.02-18.423 6.66 0 11.994 1.719 16.006 5.156 4.01 3.438 6.016 7.949 6.016 13.535 0 14.824-15.756 26.856-47.266 36.094 2.863 13.965 10.348 20.947 22.451 20.947 4.727 0 9.238-1.271 13.535-3.814 4.297-2.541 10.777-8.18 19.443-16.918v12.355zm-56.289-19.873c18.332-5.156 27.5-14.68 27.5-28.575 0-6.875-2.508-10.313-7.52-10.313-4.727 0-9.238 3.599-13.535 10.796s-6.445 16.562-6.445 28.092zm118.164 19.873c-9.023 8.953-16.83 15.559-23.418 19.818-6.59 4.26-12.855 6.393-18.799 6.393-6.16 0-11.155-2.596-14.985-7.789-3.832-5.191-5.747-12.012-5.747-20.463 0-7.447 1.836-17.28 5.512-29.5l4.558-16.263-8.243.43 3.44-16.865 10.214-.43 10.086-33.516 28.696-5.89-11.103 37.364 15.17-.859-3.548 16.543-16.664 1.289-7.155 24.071c-2.487 8.363-3.729 15.02-3.729 19.964 0 3.368.843 6.109 2.527 8.225 1.686 2.114 3.854 3.171 6.509 3.171 3.658 0 7.28-1.164 10.865-3.492 3.585-2.326 8.857-7.178 15.814-14.555v12.354z" fill="#6F6F6E"/>
4
+ <linearGradient id="a" gradientUnits="userSpaceOnUse" x1="1603.924" y1="1483.083" x2="1698.034" y2="1483.083" gradientTransform="matrix(.986 .168 -.168 .986 -102.747 -206.353)">
5
+ <stop offset="0" stop-color="#89C442"/>
6
+ <stop offset="1" stop-color="#74B844"/>
7
+ </linearGradient>
8
+ <path fill="url(#a)" d="M1238.301 1472.395c2.234 2.608 46.097 17.218 61.347 34.97 15.249 17.754 21.907 33.598 19.754 48.832-2.149 15.234-11.468 14.982-15.532 20.529-4.068 5.548-9.689 12.389-20.484 11.662-14.139-.949-28.721-8.015-39.248-32.541-10.528-24.527-9.721-47.567-8.88-60.35.842-12.781 3.043-23.102 3.043-23.102z"/>
9
+ <linearGradient id="b" gradientUnits="userSpaceOnUse" x1="1606.047" y1="1478.166" x2="1687.254" y2="1478.166" gradientTransform="matrix(.986 .168 -.168 .986 -102.747 -206.353)">
10
+ <stop offset="0" stop-color="#74B844"/>
11
+ <stop offset="1" stop-color="#4A9634"/>
12
+ </linearGradient>
13
+ <polygon fill="url(#b)" points="1239.667,1476.602 1305.357,1574.529 1302.329,1577.914"/>
14
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#3C3C3B" d="M987.905 1612.713l.618-4.337c17.52-9.335 39.344-12.934 57.105-21.945 5.328 2.396 7.697-1.062 13.379-.747 2.063 1.861-2.593 4.344 2.975 3.963 12.655 1.676 24.973-.678 37.413-1.746 13.118-1.127 26.154.129 39.024-.631 4.116-.244 10.445-5.931 15.484-3.102 2.28 4.126-7.433 4.485-4.827 9.045 25.759 6.053 90.194 31.682 101.216 3.81.15 1.694-1.924 5.059 1.117 4.583 21.725-9.726 58.632-30.711 65.132-36.211 7.146-6.045 16.668-5.854 26-8 16.828-3.868 34.771-7.816 49.336-16.288 9.002 6.247 27.84 9.36 37.911 7.173 10.517-2.283 26.821-19.729 35.549-25.902 3.429-2.428 8.456-7.135 12.139-4.464-2.477 1.702.444 6.675-2.6 5.823-1.588-3.038-4.752.466-7.063-.121-8.787 7.207-17.921 13.959-26.875 20.945-4.18 2.561 4.035 5.223-.867 6.07-23.141 4.596-58.378-6.927-72.966 9.064-23.113 7.906-44.978 9.914-67.76 22.197-13.088 7.057-29.106 19.897-42.732 26.648-2.308 1.145-5.693 1.549-8.423 3.224-3.323 2.04-4.136 4.603-6.937 5.206-6.979 1.504-21.402-2.141-30.477-3.459-30.281-4.402-62.614-16.746-91.187-18.308-11.298-.618-24.639 1.171-37.413 1.745-27.151 1.222-44.135 1.87-65.905 9.188-8.9 2.995-22.593 10.932-28.366 6.577z"/>
15
+ <linearGradient id="c" gradientUnits="userSpaceOnUse" x1="1280.966" y1="1562.831" x2="1438.704" y2="1562.831" gradientTransform="matrix(-.948 .318 .318 .948 2154.282 -427.134)">
16
+ <stop offset="0" stop-color="#C1EA71"/>
17
+ <stop offset="1" stop-color="#ACDA55"/>
18
+ </linearGradient>
19
+ <path fill="url(#c)" d="M1407.444 1376c-3.051 4.944-72.601 40.807-93.476 74.472-20.873 33.665-26.828 60.172-19.26 85.089 7.566 24.915 22.03 23.793 30.275 32.009 8.246 8.219 19.432 18.193 37.299 14.166 23.396-5.275 45.941-20.891 57.156-64.65 11.214-43.762 3.86-82.083-.879-103.242-4.739-21.157-11.115-37.844-11.115-37.844z"/>
20
+ <linearGradient id="d" gradientUnits="userSpaceOnUse" x1="1284.556" y1="1554.398" x2="1422.002" y2="1554.398" gradientTransform="matrix(-.948 .318 .318 .948 2154.282 -427.134)">
21
+ <stop offset="0" stop-color="#ACDA55"/>
22
+ <stop offset="1" stop-color="#89C442"/>
23
+ </linearGradient>
24
+ <polygon fill="url(#d)" points="1406.26,1383.391 1321.922,1564.283 1326.873,1569.254"/>
25
+ <rect x="965" y="550" fill="#1D1D1B" width="16" height="16"/>
26
+ <linearGradient id="e" gradientUnits="userSpaceOnUse" x1="1182.112" y1="576.99" x2="1189.046" y2="576.99" gradientTransform="matrix(.986 .168 -.168 .986 -102.747 -206.353)">
27
+ <stop offset="0" stop-color="#89C442"/>
28
+ <stop offset="1" stop-color="#74B844"/>
29
+ </linearGradient>
30
+ <path fill="url(#e)" d="M966.313 557.154c.165.193 3.396 1.269 4.52 2.577 1.124 1.308 1.614 2.476 1.456 3.598-.158 1.122-.845 1.104-1.145 1.513-.299.409-.713.913-1.509.859-1.042-.07-2.116-.591-2.892-2.397-.776-1.808-.716-3.505-.654-4.446.062-.944.224-1.704.224-1.704z"/>
31
+ <linearGradient id="f" gradientUnits="userSpaceOnUse" x1="1182.27" y1="576.628" x2="1188.252" y2="576.628" gradientTransform="matrix(.986 .168 -.168 .986 -102.747 -206.353)">
32
+ <stop offset="0" stop-color="#74B844"/>
33
+ <stop offset="1" stop-color="#4A9634"/>
34
+ </linearGradient>
35
+ <polygon fill="url(#f)" points="966.414,557.464 971.253,564.679 971.03,564.928"/>
36
+ <linearGradient id="g" gradientUnits="userSpaceOnUse" x1="1425.042" y1="559.62" x2="1436.663" y2="559.62" gradientTransform="matrix(-.948 .318 .318 .948 2154.282 -427.134)">
37
+ <stop offset="0" stop-color="#C1EA71"/>
38
+ <stop offset="1" stop-color="#ACDA55"/>
39
+ </linearGradient>
40
+ <path fill="url(#g)" d="M978.774 550.052c-.225.365-5.349 3.006-6.887 5.487-1.538 2.48-1.977 4.433-1.419 6.269.557 1.836 1.624 1.753 2.23 2.358.607.605 1.432 1.341 2.748 1.043 1.724-.388 3.385-1.539 4.211-4.763s.285-6.047-.064-7.606c-.348-1.558-.819-2.788-.819-2.788z"/>
41
+ <linearGradient id="h" gradientUnits="userSpaceOnUse" x1="1425.307" y1="558.999" x2="1435.433" y2="558.999" gradientTransform="matrix(-.948 .318 .318 .948 2154.282 -427.134)">
42
+ <stop offset="0" stop-color="#ACDA55"/>
43
+ <stop offset="1" stop-color="#89C442"/>
44
+ </linearGradient>
45
+ <polygon fill="url(#h)" points="978.688,550.597 972.474,563.924 972.839,564.29"/>
46
+ <linearGradient id="i" gradientUnits="userSpaceOnUse" x1="1409.067" y1="565.301" x2="1421.354" y2="565.301" gradientTransform="matrix(-.948 .318 .318 .948 2154.282 -427.134)">
47
+ <stop offset="0" stop-color="#C1EA71"/>
48
+ <stop offset="1" stop-color="#ACDA55"/>
49
+ </linearGradient>
50
+ <path fill="url(#i)" d="M995.605 550c-.237.386-5.655 3.179-7.282 5.801-1.625 2.622-2.09 4.688-1.5 6.628.589 1.941 1.716 1.854 2.358 2.494s1.514 1.418 2.905 1.104c1.823-.411 3.579-1.627 4.453-5.037.874-3.409.301-6.394-.068-8.042-.368-1.648-.866-2.948-.866-2.948z"/>
51
+ <linearGradient id="j" gradientUnits="userSpaceOnUse" x1="1418.784" y1="563.802" x2="1410.712" y2="565.448" gradientTransform="matrix(-.948 .318 .318 .948 2154.282 -427.134)">
52
+ <stop offset="0" stop-color="#74B844"/>
53
+ <stop offset="1" stop-color="#74B844"/>
54
+ </linearGradient>
55
+ <polygon fill="url(#j)" points="995.514,550.576 988.943,564.667 990,565"/>
56
+ <defs>
57
+ <rect id="k" x="920.813" y="774" width="128" height="128"/>
58
+ </defs>
59
+ <clipPath id="l">
60
+ <use xlink:href="#k" overflow="visible"/>
61
+ </clipPath>
62
+ <g clip-path="url(#l)">
63
+ <linearGradient id="m" gradientUnits="userSpaceOnUse" x1="1197.898" y1="881.267" x2="1247.528" y2="881.267" gradientTransform="matrix(.986 .168 -.168 .986 -102.747 -206.353)">
64
+ <stop offset="0" stop-color="#89C442"/>
65
+ <stop offset="1" stop-color="#74B844"/>
66
+ </linearGradient>
67
+ <path fill="url(#m)" d="M934.865 835.836c1.178 1.375 24.31 9.081 32.353 18.443 8.042 9.363 11.553 17.718 10.417 25.752-1.134 8.034-6.048 7.902-8.191 10.827-2.146 2.926-5.11 6.534-10.803 6.15-7.456-.501-15.146-4.227-20.698-17.161-5.553-12.935-5.126-25.086-4.683-31.828.445-6.739 1.605-12.183 1.605-12.183z"/>
68
+ <linearGradient id="n" gradientUnits="userSpaceOnUse" x1="1199.018" y1="878.674" x2="1241.845" y2="878.674" gradientTransform="matrix(.986 .168 -.168 .986 -102.747 -206.353)">
69
+ <stop offset="0" stop-color="#74B844"/>
70
+ <stop offset="1" stop-color="#4A9634"/>
71
+ </linearGradient>
72
+ <polygon fill="url(#n)" points="935.586,838.055 970.229,889.7 968.632,891.484"/>
73
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#6F6F6E" d="M802.813 909.836l.326-2.287c9.24-4.923 20.75-6.82 30.116-11.573 2.81 1.264 4.059-.56 7.056-.394 1.088.982-1.367 2.292 1.569 2.091 6.674.883 13.17-.357 19.73-.921 6.918-.594 13.793.068 20.58-.332 2.171-.129 5.509-3.128 8.167-1.637 1.203 2.176-3.919 2.366-2.545 4.77 13.584 3.193 47.566 16.708 53.378 2.009.079.894-1.015 2.668.589 2.417 11.458-5.129 30.921-16.196 34.349-19.097 3.768-3.188 8.79-3.087 13.711-4.219 8.875-2.04 18.337-4.122 26.019-8.59 4.747 3.295 14.682 4.937 19.993 3.783 5.546-1.205 14.146-10.405 18.747-13.661 1.809-1.279 4.461-3.762 6.402-2.353-1.306.897.234 3.52-1.371 3.071-.838-1.603-2.506.246-3.725-.064-4.634 3.801-9.451 7.361-14.174 11.046-2.203 1.35 2.129 2.754-.457 3.201-12.203 2.424-30.787-3.652-38.48 4.78-12.188 4.169-23.719 5.229-35.734 11.707-6.902 3.722-15.35 10.494-22.536 14.054-1.217.604-3.003.817-4.442 1.7-1.752 1.076-2.181 2.427-3.658 2.747-3.681.792-11.287-1.13-16.073-1.825-15.969-2.322-33.021-8.831-48.089-9.655-5.958-.326-12.994.618-19.73.921-14.319.644-23.275.986-34.757 4.845-4.695 1.577-11.917 5.763-14.961 3.466z"/>
74
+ <linearGradient id="o" gradientUnits="userSpaceOnUse" x1="1456.706" y1="837.86" x2="1539.894" y2="837.86" gradientTransform="matrix(-.948 .318 .318 .948 2154.282 -427.134)">
75
+ <stop offset="0" stop-color="#C1EA71"/>
76
+ <stop offset="1" stop-color="#ACDA55"/>
77
+ </linearGradient>
78
+ <path fill="url(#o)" d="M1024.066 785c-1.608 2.607-38.287 21.521-49.296 39.275-11.008 17.754-14.148 31.734-10.157 44.874 3.991 13.14 11.619 12.548 15.967 16.88 4.349 4.334 10.248 9.594 19.67 7.471 12.339-2.781 24.229-11.018 30.143-34.095 5.914-23.079 2.036-43.289-.463-54.447-2.5-11.158-5.864-19.958-5.864-19.958z"/>
79
+ <linearGradient id="p" gradientUnits="userSpaceOnUse" x1="1458.601" y1="833.413" x2="1531.085" y2="833.413" gradientTransform="matrix(-.948 .318 .318 .948 2154.282 -427.134)">
80
+ <stop offset="0" stop-color="#ACDA55"/>
81
+ <stop offset="1" stop-color="#89C442"/>
82
+ </linearGradient>
83
+ <polygon fill="url(#p)" points="1023.441,788.898 978.965,884.296 981.576,886.918"/>
84
+ </g>
85
+ </svg>
@@ -4,20 +4,13 @@
4
4
  */
5
5
 
6
6
  L.FeatureGroup = L.LayerGroup.extend({
7
- includes: L.Mixin.Events,
8
-
9
- statics: {
10
- EVENTS: 'click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose'
11
- },
12
7
 
13
8
  addLayer: function (layer) {
14
9
  if (this.hasLayer(layer)) {
15
10
  return this;
16
11
  }
17
12
 
18
- if ('on' in layer) {
19
- layer.on(L.FeatureGroup.EVENTS, this._propagateEvent, this);
20
- }
13
+ layer.addEventParent(this);
21
14
 
22
15
  L.LayerGroup.prototype.addLayer.call(this, layer);
23
16
 
@@ -36,9 +29,7 @@ L.FeatureGroup = L.LayerGroup.extend({
36
29
  layer = this._layers[layer];
37
30
  }
38
31
 
39
- if ('off' in layer) {
40
- layer.off(L.FeatureGroup.EVENTS, this._propagateEvent, this);
41
- }
32
+ layer.removeEventParent(this);
42
33
 
43
34
  L.LayerGroup.prototype.removeLayer.call(this, layer);
44
35
 
@@ -80,18 +71,10 @@ L.FeatureGroup = L.LayerGroup.extend({
80
71
  var bounds = new L.LatLngBounds();
81
72
 
82
73
  this.eachLayer(function (layer) {
83
- bounds.extend(layer instanceof L.Marker ? layer.getLatLng() : layer.getBounds());
74
+ bounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng());
84
75
  });
85
76
 
86
77
  return bounds;
87
- },
88
-
89
- _propagateEvent: function (e) {
90
- e = L.extend({
91
- layer: e.target,
92
- target: this
93
- }, e);
94
- this.fire(e.type, e);
95
78
  }
96
79
  });
97
80
 
@@ -0,0 +1,275 @@
1
+ /*
2
+ * L.GeoJSON turns any GeoJSON data into a Leaflet layer.
3
+ */
4
+
5
+ L.GeoJSON = L.FeatureGroup.extend({
6
+
7
+ initialize: function (geojson, options) {
8
+ L.setOptions(this, options);
9
+
10
+ this._layers = {};
11
+
12
+ if (geojson) {
13
+ this.addData(geojson);
14
+ }
15
+ },
16
+
17
+ addData: function (geojson) {
18
+ var features = L.Util.isArray(geojson) ? geojson : geojson.features,
19
+ i, len, feature;
20
+
21
+ if (features) {
22
+ for (i = 0, len = features.length; i < len; i++) {
23
+ // Only add this if geometry or geometries are set and not null
24
+ feature = features[i];
25
+ if (feature.geometries || feature.geometry || feature.features || feature.coordinates) {
26
+ this.addData(feature);
27
+ }
28
+ }
29
+ return this;
30
+ }
31
+
32
+ var options = this.options;
33
+
34
+ if (options.filter && !options.filter(geojson)) { return; }
35
+
36
+ var layer = L.GeoJSON.geometryToLayer(geojson, options);
37
+ layer.feature = L.GeoJSON.asFeature(geojson);
38
+
39
+ layer.defaultOptions = layer.options;
40
+ this.resetStyle(layer);
41
+
42
+ if (options.onEachFeature) {
43
+ options.onEachFeature(geojson, layer);
44
+ }
45
+
46
+ return this.addLayer(layer);
47
+ },
48
+
49
+ resetStyle: function (layer) {
50
+ // reset any custom styles
51
+ layer.options = layer.defaultOptions;
52
+ this._setLayerStyle(layer, this.options.style);
53
+ },
54
+
55
+ setStyle: function (style) {
56
+ this.eachLayer(function (layer) {
57
+ this._setLayerStyle(layer, style);
58
+ }, this);
59
+ },
60
+
61
+ _setLayerStyle: function (layer, style) {
62
+ if (typeof style === 'function') {
63
+ style = style(layer.feature);
64
+ }
65
+ if (layer.setStyle) {
66
+ layer.setStyle(style);
67
+ }
68
+ }
69
+ });
70
+
71
+ L.extend(L.GeoJSON, {
72
+ geometryToLayer: function (geojson, options) {
73
+ var geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,
74
+ coords = geometry.coordinates,
75
+ layers = [],
76
+ coordsToLatLng = options.coordsToLatLng || this.coordsToLatLng,
77
+ latlng, latlngs, i, len;
78
+
79
+ switch (geometry.type) {
80
+ case 'Point':
81
+ latlng = coordsToLatLng(coords);
82
+
83
+ return options.pointToLayer ?
84
+ options.pointToLayer(geojson, latlng) :
85
+ new L.Marker(latlng);
86
+
87
+ case 'MultiPoint':
88
+ for (i = 0, len = coords.length; i < len; i++) {
89
+ latlng = coordsToLatLng(coords[i]);
90
+
91
+ layers.push(options.pointToLayer ?
92
+ options.pointToLayer(geojson, latlng) :
93
+ new L.Marker(latlng));
94
+ }
95
+ return new L.FeatureGroup(layers);
96
+
97
+ case 'LineString':
98
+ case 'MultiLineString':
99
+ latlngs = this.coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, coordsToLatLng);
100
+ return new L.Polyline(latlngs, options);
101
+
102
+ case 'Polygon':
103
+ case 'MultiPolygon':
104
+ latlngs = this.coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, coordsToLatLng);
105
+ return new L.Polygon(latlngs, options);
106
+
107
+ case 'GeometryCollection':
108
+ for (i = 0, len = geometry.geometries.length; i < len; i++) {
109
+
110
+ layers.push(this.geometryToLayer({
111
+ geometry: geometry.geometries[i],
112
+ type: 'Feature',
113
+ properties: geojson.properties
114
+ }, options));
115
+ }
116
+ return new L.FeatureGroup(layers);
117
+
118
+ default:
119
+ throw new Error('Invalid GeoJSON object.');
120
+ }
121
+ },
122
+
123
+ coordsToLatLng: function (coords) {
124
+ return new L.LatLng(coords[1], coords[0], coords[2]);
125
+ },
126
+
127
+ coordsToLatLngs: function (coords, levelsDeep, coordsToLatLng) {
128
+ var latlngs = [];
129
+
130
+ for (var i = 0, len = coords.length, latlng; i < len; i++) {
131
+ latlng = levelsDeep ?
132
+ this.coordsToLatLngs(coords[i], levelsDeep - 1, coordsToLatLng) :
133
+ (coordsToLatLng || this.coordsToLatLng)(coords[i]);
134
+
135
+ latlngs.push(latlng);
136
+ }
137
+
138
+ return latlngs;
139
+ },
140
+
141
+ latLngToCoords: function (latlng) {
142
+ return latlng.alt !== undefined ?
143
+ [latlng.lng, latlng.lat, latlng.alt] :
144
+ [latlng.lng, latlng.lat];
145
+ },
146
+
147
+ latLngsToCoords: function (latlngs, levelsDeep, closed) {
148
+ var coords = [];
149
+
150
+ for (var i = 0, len = latlngs.length; i < len; i++) {
151
+ coords.push(levelsDeep ?
152
+ L.GeoJSON.latLngsToCoords(latlngs[i], levelsDeep - 1, closed):
153
+ L.GeoJSON.latLngToCoords(latlngs[i]));
154
+ }
155
+
156
+ if (!levelsDeep && closed) {
157
+ coords.push(coords[0]);
158
+ }
159
+
160
+ return coords;
161
+ },
162
+
163
+ getFeature: function (layer, newGeometry) {
164
+ return layer.feature ?
165
+ L.extend({}, layer.feature, {geometry: newGeometry}) :
166
+ L.GeoJSON.asFeature(newGeometry);
167
+ },
168
+
169
+ asFeature: function (geoJSON) {
170
+ if (geoJSON.type === 'Feature') {
171
+ return geoJSON;
172
+ }
173
+
174
+ return {
175
+ type: 'Feature',
176
+ properties: {},
177
+ geometry: geoJSON
178
+ };
179
+ }
180
+ });
181
+
182
+ var PointToGeoJSON = {
183
+ toGeoJSON: function () {
184
+ return L.GeoJSON.getFeature(this, {
185
+ type: 'Point',
186
+ coordinates: L.GeoJSON.latLngToCoords(this.getLatLng())
187
+ });
188
+ }
189
+ };
190
+
191
+ L.Marker.include(PointToGeoJSON);
192
+ L.Circle.include(PointToGeoJSON);
193
+ L.CircleMarker.include(PointToGeoJSON);
194
+
195
+ L.Polyline.prototype.toGeoJSON = function () {
196
+ var multi = !this._flat(this._latlngs);
197
+
198
+ var coords = L.GeoJSON.latLngsToCoords(this._latlngs, multi ? 1 : 0);
199
+
200
+ return L.GeoJSON.getFeature(this, {
201
+ type: (multi ? 'Multi' : '') + 'LineString',
202
+ coordinates: coords
203
+ });
204
+ };
205
+
206
+ L.Polygon.prototype.toGeoJSON = function () {
207
+ var holes = !this._flat(this._latlngs),
208
+ multi = holes && !this._flat(this._latlngs[0]);
209
+
210
+ var coords = L.GeoJSON.latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true);
211
+
212
+ if (holes && this._latlngs.length === 1) {
213
+ multi = true;
214
+ coords = [coords];
215
+ }
216
+ if (!holes) {
217
+ coords = [coords];
218
+ }
219
+
220
+ return L.GeoJSON.getFeature(this, {
221
+ type: (multi ? 'Multi' : '') + 'Polygon',
222
+ coordinates: coords
223
+ });
224
+ };
225
+
226
+
227
+ L.LayerGroup.include({
228
+ toMultiPoint: function () {
229
+ var coords = [];
230
+
231
+ this.eachLayer(function (layer) {
232
+ coords.push(layer.toGeoJSON().geometry.coordinates);
233
+ });
234
+
235
+ return L.GeoJSON.getFeature(this, {
236
+ type: 'MultiPoint',
237
+ coordinates: coords
238
+ });
239
+ },
240
+
241
+ toGeoJSON: function () {
242
+
243
+ var type = this.feature && this.feature.geometry && this.feature.geometry.type;
244
+
245
+ if (type === 'MultiPoint') {
246
+ return this.toMultiPoint();
247
+ }
248
+
249
+ var isGeometryCollection = type === 'GeometryCollection',
250
+ jsons = [];
251
+
252
+ this.eachLayer(function (layer) {
253
+ if (layer.toGeoJSON) {
254
+ var json = layer.toGeoJSON();
255
+ jsons.push(isGeometryCollection ? json.geometry : L.GeoJSON.asFeature(json));
256
+ }
257
+ });
258
+
259
+ if (isGeometryCollection) {
260
+ return L.GeoJSON.getFeature(this, {
261
+ geometries: jsons,
262
+ type: 'GeometryCollection'
263
+ });
264
+ }
265
+
266
+ return {
267
+ type: 'FeatureCollection',
268
+ features: jsons
269
+ };
270
+ }
271
+ });
272
+
273
+ L.geoJson = function (geojson, options) {
274
+ return new L.GeoJSON(geojson, options);
275
+ };
@@ -0,0 +1,123 @@
1
+ /*
2
+ * L.ImageOverlay is used to overlay images over the map (to specific geographical bounds).
3
+ */
4
+
5
+ L.ImageOverlay = L.Layer.extend({
6
+
7
+ options: {
8
+ opacity: 1
9
+ },
10
+
11
+ initialize: function (url, bounds, options) { // (String, LatLngBounds, Object)
12
+ this._url = url;
13
+ this._bounds = L.latLngBounds(bounds);
14
+
15
+ L.setOptions(this, options);
16
+ },
17
+
18
+ onAdd: function () {
19
+ if (!this._image) {
20
+ this._initImage();
21
+
22
+ if (this.options.opacity < 1) {
23
+ this._updateOpacity();
24
+ }
25
+ }
26
+
27
+ this.getPane().appendChild(this._image);
28
+
29
+ this._reset();
30
+ },
31
+
32
+ onRemove: function () {
33
+ L.DomUtil.remove(this._image);
34
+ },
35
+
36
+ setOpacity: function (opacity) {
37
+ this.options.opacity = opacity;
38
+
39
+ if (this._image) {
40
+ this._updateOpacity();
41
+ }
42
+ return this;
43
+ },
44
+
45
+ bringToFront: function () {
46
+ if (this._map) {
47
+ L.DomUtil.toFront(this._image);
48
+ }
49
+ return this;
50
+ },
51
+
52
+ bringToBack: function () {
53
+ if (this._map) {
54
+ L.DomUtil.toBack(this._image);
55
+ }
56
+ return this;
57
+ },
58
+
59
+ setUrl: function (url) {
60
+ this._url = url;
61
+
62
+ if (this._image) {
63
+ this._image.src = url;
64
+ }
65
+ return this;
66
+ },
67
+
68
+ getAttribution: function () {
69
+ return this.options.attribution;
70
+ },
71
+
72
+ getEvents: function () {
73
+ var events = {
74
+ viewreset: this._reset
75
+ };
76
+
77
+ if (this._zoomAnimated) {
78
+ events.zoomanim = this._animateZoom;
79
+ }
80
+
81
+ return events;
82
+ },
83
+
84
+ _initImage: function () {
85
+ var img = this._image = L.DomUtil.create('img',
86
+ 'leaflet-image-layer ' + (this._zoomAnimated ? 'leaflet-zoom-animated' : ''));
87
+
88
+ img.onselectstart = L.Util.falseFn;
89
+ img.onmousemove = L.Util.falseFn;
90
+
91
+ img.onload = L.bind(this.fire, this, 'load');
92
+ img.src = this._url;
93
+ },
94
+
95
+ _animateZoom: function (e) {
96
+ var topLeft = this._map._latLngToNewLayerPoint(this._bounds.getNorthWest(), e.zoom, e.center),
97
+ size = this._map._latLngToNewLayerPoint(this._bounds.getSouthEast(), e.zoom, e.center).subtract(topLeft),
98
+ offset = topLeft.add(size._multiplyBy((1 - 1 / e.scale) / 2));
99
+
100
+ L.DomUtil.setTransform(this._image, offset, e.scale);
101
+ },
102
+
103
+ _reset: function () {
104
+ var image = this._image,
105
+ bounds = new L.Bounds(
106
+ this._map.latLngToLayerPoint(this._bounds.getNorthWest()),
107
+ this._map.latLngToLayerPoint(this._bounds.getSouthEast())),
108
+ size = bounds.getSize();
109
+
110
+ L.DomUtil.setPosition(image, bounds.min);
111
+
112
+ image.style.width = size.x + 'px';
113
+ image.style.height = size.y + 'px';
114
+ },
115
+
116
+ _updateOpacity: function () {
117
+ L.DomUtil.setOpacity(this._image, this.options.opacity);
118
+ }
119
+ });
120
+
121
+ L.imageOverlay = function (url, bounds, options) {
122
+ return new L.ImageOverlay(url, bounds, options);
123
+ };