leaflet-js 0.7.0.4 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +10 -3
- data/Rakefile +3 -3
- data/leaflet-js.gemspec +13 -7
- data/lib/leaflet-js.rb +2 -10
- data/lib/leaflet-js/engine.rb +7 -0
- data/lib/leaflet-js/version.rb +3 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/dist/images/spritesheet-2x.png +0 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/dist/images/spritesheet.png +0 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/Control.Draw.js +21 -19
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/Leaflet.draw.js +8 -3
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/Toolbar.js +75 -14
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/Tooltip.js +0 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/copyright.js +0 -0
- data/vendor/assets/Leaflet.draw/src/draw/DrawToolbar.js +87 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/draw/handler/Draw.Circle.js +2 -3
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/draw/handler/Draw.Feature.js +4 -4
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/draw/handler/Draw.Marker.js +0 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/draw/handler/Draw.Polygon.js +9 -7
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/draw/handler/Draw.Polyline.js +86 -36
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/draw/handler/Draw.Rectangle.js +19 -1
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/draw/handler/Draw.SimpleShape.js +18 -4
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/edit/EditToolbar.js +34 -43
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/edit/handler/Edit.Circle.js +0 -0
- data/vendor/assets/Leaflet.draw/src/edit/handler/Edit.Marker.js +75 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/edit/handler/Edit.Poly.js +16 -2
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/edit/handler/Edit.Rectangle.js +3 -3
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/edit/handler/Edit.SimpleShape.js +13 -3
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/edit/handler/EditToolbar.Delete.js +11 -7
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/edit/handler/EditToolbar.Edit.js +26 -94
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/ext/GeometryUtil.js +3 -3
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/ext/LatLngUtil.js +0 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/ext/LineUtil.Intersect.js +0 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/ext/Polygon.Intersect.js +0 -0
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/ext/Polyline.Intersect.js +3 -3
- data/{lib/leaflet.draw → vendor/assets/Leaflet.draw}/src/images/spritesheet.svg +0 -0
- data/{lib/leaflet.label → vendor/assets/Leaflet.label}/src/BaseMarkerMethods.js +0 -0
- data/{lib/leaflet.label → vendor/assets/Leaflet.label}/src/CircleMarker.Label.js +0 -0
- data/{lib/leaflet.label → vendor/assets/Leaflet.label}/src/FeatureGroup.Label.js +0 -0
- data/{lib/leaflet.label → vendor/assets/Leaflet.label}/src/Label.js +5 -2
- data/{lib/leaflet.label → vendor/assets/Leaflet.label}/src/Leaflet.label.js +1 -1
- data/{lib/leaflet.label → vendor/assets/Leaflet.label}/src/Map.Label.js +0 -0
- data/{lib/leaflet.label → vendor/assets/Leaflet.label}/src/Marker.Label.js +0 -0
- data/{lib/leaflet.label → vendor/assets/Leaflet.label}/src/Path.Label.js +0 -0
- data/{lib/leaflet.label → vendor/assets/Leaflet.label}/src/copyright.js +0 -0
- data/{lib/leaflet.draw/examples/libs → vendor/assets/Leaflet/dist}/images/layers-2x.png +0 -0
- data/{lib/leaflet.draw/examples/libs → vendor/assets/Leaflet/dist}/images/layers.png +0 -0
- data/{lib/leaflet.draw/examples/libs → vendor/assets/Leaflet/dist}/images/marker-icon-2x.png +0 -0
- data/{lib/leaflet.draw/examples/libs → vendor/assets/Leaflet/dist}/images/marker-icon.png +0 -0
- data/{lib/leaflet.draw/examples/libs → vendor/assets/Leaflet/dist}/images/marker-shadow.png +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/Leaflet.js +1 -1
- data/{lib/leaflet → vendor/assets/Leaflet}/src/control/Control.Attribution.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/control/Control.Layers.js +2 -2
- data/{lib/leaflet → vendor/assets/Leaflet}/src/control/Control.Scale.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/control/Control.Zoom.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/control/Control.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/copyright.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/core/Browser.js +5 -36
- data/{lib/leaflet → vendor/assets/Leaflet}/src/core/Class.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/core/Events.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/core/Handler.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/core/Util.js +9 -14
- data/{lib/leaflet → vendor/assets/Leaflet}/src/dom/DomEvent.DoubleTap.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/dom/DomEvent.Pointer.js +3 -2
- data/{lib/leaflet → vendor/assets/Leaflet}/src/dom/DomEvent.js +7 -18
- data/{lib/leaflet → vendor/assets/Leaflet}/src/dom/DomUtil.js +0 -5
- data/{lib/leaflet → vendor/assets/Leaflet}/src/dom/Draggable.js +10 -4
- data/{lib/leaflet → vendor/assets/Leaflet}/src/dom/PosAnimation.Timer.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/dom/PosAnimation.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/LatLng.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/LatLngBounds.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/crs/CRS.EPSG3395.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/crs/CRS.EPSG3857.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/crs/CRS.EPSG4326.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/crs/CRS.Simple.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/crs/CRS.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/projection/Projection.LonLat.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/projection/Projection.Mercator.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/projection/Projection.SphericalMercator.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geo/projection/Projection.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geometry/Bounds.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geometry/LineUtil.js +1 -1
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geometry/Point.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geometry/PolyUtil.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/geometry/Transformation.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/images/layers.svg +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/images/marker.svg +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/FeatureGroup.js +5 -3
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/GeoJSON.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/ImageOverlay.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/LayerGroup.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/Popup.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/marker/DivIcon.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/marker/Icon.Default.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/marker/Icon.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/marker/Marker.Drag.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/marker/Marker.Popup.js +1 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/marker/Marker.js +2 -4
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/tile/TileLayer.Anim.js +5 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/tile/TileLayer.Canvas.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/tile/TileLayer.WMS.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/tile/TileLayer.js +3 -5
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/Circle.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/CircleMarker.js +1 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/MultiPoly.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/Path.Popup.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/Path.SVG.js +1 -1
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/Path.VML.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/Path.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/Polygon.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/Polyline.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/Rectangle.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/canvas/Circle.Canvas.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/canvas/CircleMarker.Canvas.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/canvas/Path.Canvas.js +13 -6
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/canvas/Polygon.Canvas.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/layer/vector/canvas/Polyline.Canvas.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/Map.js +9 -8
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/anim/Map.PanAnimation.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/anim/Map.ZoomAnimation.js +25 -16
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/ext/Map.Geolocation.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/handler/Map.BoxZoom.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/handler/Map.DoubleClickZoom.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/handler/Map.Drag.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/handler/Map.Keyboard.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/handler/Map.ScrollWheelZoom.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/handler/Map.Tap.js +0 -0
- data/{lib/leaflet → vendor/assets/Leaflet}/src/map/handler/Map.TouchZoom.js +1 -1
- data/vendor/assets/{stylesheets/leaflet-js.css → leaflet-js.css} +0 -0
- data/vendor/assets/{javascripts/leaflet-js.js → leaflet-js.js} +2 -2
- data/{lib/leaflet.label/libs/leaflet/leaflet.css → vendor/assets/leaflet.css.erb} +2 -2
- data/vendor/assets/{stylesheets/leaflet.draw.css.erb → leaflet.draw.css.erb} +2 -2
- data/{lib/leaflet.draw/dist → vendor/assets}/leaflet.draw.ie.css +0 -0
- data/vendor/assets/leaflet.draw.js +38 -0
- data/vendor/assets/leaflet.js +155 -0
- data/{lib/leaflet.label/dist → vendor/assets}/leaflet.label.css +0 -0
- data/vendor/assets/leaflet.label.js +11 -0
- metadata +139 -302
- data/lib/leaflet.draw/BREAKINGCHANGES.md +0 -54
- data/lib/leaflet.draw/CHANGELOG.md +0 -118
- data/lib/leaflet.draw/Jakefile.js +0 -26
- data/lib/leaflet.draw/MIT-LICENCE.txt +0 -20
- data/lib/leaflet.draw/README.md +0 -411
- data/lib/leaflet.draw/TODO.md +0 -62
- data/lib/leaflet.draw/build/build.html +0 -243
- data/lib/leaflet.draw/build/build.js +0 -189
- data/lib/leaflet.draw/build/deps.js +0 -76
- data/lib/leaflet.draw/build/hintrc.js +0 -47
- data/lib/leaflet.draw/build/leaflet.draw-include.js +0 -42
- data/lib/leaflet.draw/dist/leaflet.draw-src.js +0 -2782
- data/lib/leaflet.draw/dist/leaflet.draw.css +0 -244
- data/lib/leaflet.draw/dist/leaflet.draw.js +0 -10
- data/lib/leaflet.draw/examples/basic.html +0 -113
- data/lib/leaflet.draw/examples/edithandlers.html +0 -67
- data/lib/leaflet.draw/examples/libs/images/marker-icon@2x.png +0 -0
- data/lib/leaflet.draw/examples/libs/leaflet-src.js +0 -9108
- data/lib/leaflet.draw/examples/libs/leaflet.css +0 -478
- data/lib/leaflet.draw/package.json +0 -37
- data/lib/leaflet.draw/spec/after.js +0 -2
- data/lib/leaflet.draw/spec/before.js +0 -3
- data/lib/leaflet.draw/spec/expect.js +0 -1253
- data/lib/leaflet.draw/spec/happen.js +0 -93
- data/lib/leaflet.draw/spec/index.html +0 -36
- data/lib/leaflet.draw/spec/karma.conf.js +0 -69
- data/lib/leaflet.draw/spec/sinon.js +0 -4223
- data/lib/leaflet.draw/spec/suites/DrawControlSpec.js +0 -15
- data/lib/leaflet.draw/spec/suites/GeometryUtilSpec.js +0 -25
- data/lib/leaflet.draw/spec/suites/LatLngUtilSpec.js +0 -9
- data/lib/leaflet.draw/spec/suites/SpecHelper.js +0 -26
- data/lib/leaflet.draw/src/draw/DrawToolbar.js +0 -111
- data/lib/leaflet.label/CHANGELOG.md +0 -67
- data/lib/leaflet.label/Jakefile.js +0 -21
- data/lib/leaflet.label/MIT-LICENCE.txt +0 -20
- data/lib/leaflet.label/README.md +0 -103
- data/lib/leaflet.label/build/build.js +0 -155
- data/lib/leaflet.label/build/deps.js +0 -26
- data/lib/leaflet.label/build/hint.js +0 -30
- data/lib/leaflet.label/build/hintrc.js +0 -51
- data/lib/leaflet.label/dist/images/death.png +0 -0
- data/lib/leaflet.label/dist/leaflet.label-src.js +0 -542
- data/lib/leaflet.label/dist/leaflet.label.js +0 -9
- data/lib/leaflet.label/example/label.html +0 -85
- data/lib/leaflet.label/libs/leaflet/images/layers-2x.png +0 -0
- data/lib/leaflet.label/libs/leaflet/images/layers.png +0 -0
- data/lib/leaflet.label/libs/leaflet/images/marker-icon-2x.png +0 -0
- data/lib/leaflet.label/libs/leaflet/images/marker-icon.png +0 -0
- data/lib/leaflet.label/libs/leaflet/images/marker-icon@2x.png +0 -0
- data/lib/leaflet.label/libs/leaflet/images/marker-shadow.png +0 -0
- data/lib/leaflet.label/libs/leaflet/leaflet-src.js +0 -9108
- data/lib/leaflet.label/libs/leaflet/leaflet.js +0 -9
- data/lib/leaflet.label/package.json +0 -19
- data/lib/leaflet/CHANGELOG.md +0 -905
- data/lib/leaflet/CONTRIBUTING.md +0 -155
- data/lib/leaflet/FAQ.md +0 -138
- data/lib/leaflet/Jakefile.js +0 -46
- data/lib/leaflet/LICENSE +0 -23
- data/lib/leaflet/PLUGIN-GUIDE.md +0 -127
- data/lib/leaflet/README.md +0 -34
- data/lib/leaflet/build/build.html +0 -227
- data/lib/leaflet/build/build.js +0 -163
- data/lib/leaflet/build/deps.js +0 -259
- data/lib/leaflet/build/hintrc.js +0 -39
- data/lib/leaflet/debug/css/mobile.css +0 -6
- data/lib/leaflet/debug/css/screen.css +0 -5
- data/lib/leaflet/debug/hacks/jitter.html +0 -42
- data/lib/leaflet/debug/leaflet-include.js +0 -59
- data/lib/leaflet/debug/map/canvas.html +0 -46
- data/lib/leaflet/debug/map/controls.html +0 -49
- data/lib/leaflet/debug/map/geolocation.html +0 -34
- data/lib/leaflet/debug/map/iframe.html +0 -11
- data/lib/leaflet/debug/map/image-overlay.html +0 -43
- data/lib/leaflet/debug/map/map-mobile.html +0 -34
- data/lib/leaflet/debug/map/map.html +0 -59
- data/lib/leaflet/debug/map/max-bounds.html +0 -38
- data/lib/leaflet/debug/map/opacity.html +0 -223
- data/lib/leaflet/debug/map/scroll.html +0 -41
- data/lib/leaflet/debug/map/simple-proj.html +0 -44
- data/lib/leaflet/debug/map/wms-marble.html +0 -30
- data/lib/leaflet/debug/map/wms.html +0 -40
- data/lib/leaflet/debug/map/zoomlevels.html +0 -45
- data/lib/leaflet/debug/tests/add_remove_layers.html +0 -87
- data/lib/leaflet/debug/tests/bringtoback.html +0 -37
- data/lib/leaflet/debug/tests/canvasloop.html +0 -47
- data/lib/leaflet/debug/tests/click_on_canvas.html +0 -58
- data/lib/leaflet/debug/tests/click_on_canvas_broken.html +0 -49
- data/lib/leaflet/debug/tests/dragging_and_copyworldjump.html +0 -61
- data/lib/leaflet/debug/tests/opacity.html +0 -56
- data/lib/leaflet/debug/tests/popupcontextmenuclicks.html +0 -59
- data/lib/leaflet/debug/tests/remove_while_dragging.html +0 -28
- data/lib/leaflet/debug/tests/removetilewhilepan.html +0 -41
- data/lib/leaflet/debug/tests/reuse_popups.html +0 -40
- data/lib/leaflet/debug/tests/rtl.html +0 -42
- data/lib/leaflet/debug/tests/rtl2.html +0 -27
- data/lib/leaflet/debug/tests/set_icon_reuse_dom.html +0 -43
- data/lib/leaflet/debug/tests/svg_clicks.html +0 -54
- data/lib/leaflet/debug/vector/bounds-extend.html +0 -88
- data/lib/leaflet/debug/vector/feature-group-bounds.html +0 -90
- data/lib/leaflet/debug/vector/geojson-sample.js +0 -53
- data/lib/leaflet/debug/vector/geojson.html +0 -173
- data/lib/leaflet/debug/vector/rectangle.html +0 -53
- data/lib/leaflet/debug/vector/route.js +0 -1
- data/lib/leaflet/debug/vector/touchzoomemu.html +0 -194
- data/lib/leaflet/debug/vector/us-states.js +0 -54
- data/lib/leaflet/debug/vector/vector-bounds.html +0 -69
- data/lib/leaflet/debug/vector/vector-canvas.html +0 -92
- data/lib/leaflet/debug/vector/vector-mobile.html +0 -38
- data/lib/leaflet/debug/vector/vector-simple.html +0 -48
- data/lib/leaflet/debug/vector/vector.html +0 -37
- data/lib/leaflet/dist/images/layers-2x.png +0 -0
- data/lib/leaflet/dist/images/layers.png +0 -0
- data/lib/leaflet/dist/images/marker-icon-2x.png +0 -0
- data/lib/leaflet/dist/images/marker-icon.png +0 -0
- data/lib/leaflet/dist/images/marker-shadow.png +0 -0
- data/lib/leaflet/dist/leaflet.css +0 -478
- data/lib/leaflet/package.json +0 -27
- data/lib/leaflet/spec/after.js +0 -2
- data/lib/leaflet/spec/before.js +0 -3
- data/lib/leaflet/spec/expect.js +0 -1253
- data/lib/leaflet/spec/index.html +0 -86
- data/lib/leaflet/spec/karma.conf.js +0 -65
- data/lib/leaflet/spec/sinon.js +0 -4223
- data/lib/leaflet/spec/spec.hintrc.js +0 -25
- data/lib/leaflet/spec/suites/LeafletSpec.js +0 -13
- data/lib/leaflet/spec/suites/SpecHelper.js +0 -42
- data/lib/leaflet/spec/suites/control/Control.AttributionSpec.js +0 -68
- data/lib/leaflet/spec/suites/control/Control.LayersSpec.js +0 -67
- data/lib/leaflet/spec/suites/control/Control.ScaleSpec.js +0 -6
- data/lib/leaflet/spec/suites/core/ClassSpec.js +0 -156
- data/lib/leaflet/spec/suites/core/EventsSpec.js +0 -392
- data/lib/leaflet/spec/suites/core/UtilSpec.js +0 -256
- data/lib/leaflet/spec/suites/dom/DomEventSpec.js +0 -102
- data/lib/leaflet/spec/suites/dom/DomUtilSpec.js +0 -82
- data/lib/leaflet/spec/suites/dom/PosAnimationSpec.js +0 -27
- data/lib/leaflet/spec/suites/geo/CRSSpec.js +0 -47
- data/lib/leaflet/spec/suites/geo/LatLngBoundsSpec.js +0 -144
- data/lib/leaflet/spec/suites/geo/LatLngSpec.js +0 -132
- data/lib/leaflet/spec/suites/geo/ProjectionSpec.js +0 -48
- data/lib/leaflet/spec/suites/geometry/BoundsSpec.js +0 -87
- data/lib/leaflet/spec/suites/geometry/LineUtilSpec.js +0 -75
- data/lib/leaflet/spec/suites/geometry/PointSpec.js +0 -104
- data/lib/leaflet/spec/suites/geometry/PolyUtilSpec.js +0 -27
- data/lib/leaflet/spec/suites/geometry/TransformationSpec.js +0 -31
- data/lib/leaflet/spec/suites/layer/FeatureGroupSpec.js +0 -86
- data/lib/leaflet/spec/suites/layer/GeoJSONSpec.js +0 -282
- data/lib/leaflet/spec/suites/layer/LayerGroupSpec.js +0 -58
- data/lib/leaflet/spec/suites/layer/PopupSpec.js +0 -119
- data/lib/leaflet/spec/suites/layer/TileLayerSpec.js +0 -88
- data/lib/leaflet/spec/suites/layer/marker/MarkerSpec.js +0 -94
- data/lib/leaflet/spec/suites/layer/vector/CircleMarkerSpec.js +0 -53
- data/lib/leaflet/spec/suites/layer/vector/CircleSpec.js +0 -17
- data/lib/leaflet/spec/suites/layer/vector/PolygonSpec.js +0 -91
- data/lib/leaflet/spec/suites/layer/vector/PolylineGeometrySpec.js +0 -35
- data/lib/leaflet/spec/suites/layer/vector/PolylineSpec.js +0 -55
- data/lib/leaflet/spec/suites/map/MapSpec.js +0 -536
- data/lib/leaflet/spec/suites/map/handler/Map.DragSpec.js +0 -38
- data/vendor/assets/images/layers-2x.png +0 -0
- data/vendor/assets/images/layers.png +0 -0
- data/vendor/assets/images/marker-icon-2x.png +0 -0
- data/vendor/assets/images/marker-icon.png +0 -0
- data/vendor/assets/images/marker-shadow.png +0 -0
- data/vendor/assets/images/spritesheet-2x.png +0 -0
- data/vendor/assets/images/spritesheet.png +0 -0
- data/vendor/assets/javascripts/leaflet.draw.js +0 -37
- data/vendor/assets/javascripts/leaflet.js +0 -147
- data/vendor/assets/javascripts/leaflet.label.js +0 -11
- data/vendor/assets/stylesheets/leaflet.css.erb +0 -478
- data/vendor/assets/stylesheets/leaflet.draw.ie.css +0 -49
- data/vendor/assets/stylesheets/leaflet.label.css +0 -52
@@ -1,223 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Leaflet debug page</title>
|
5
|
-
|
6
|
-
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
7
|
-
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
9
|
-
|
10
|
-
<link rel="stylesheet" href="../css/screen.css" />
|
11
|
-
|
12
|
-
<script type="text/javascript" src="../../build/deps.js"></script>
|
13
|
-
<script src="../leaflet-include.js"></script>
|
14
|
-
<style>
|
15
|
-
.mapcontainer {
|
16
|
-
float:left;
|
17
|
-
position: relative;
|
18
|
-
width: 32%;
|
19
|
-
font-size: 12px;
|
20
|
-
font-family: sans-serif;
|
21
|
-
height: 340px;
|
22
|
-
margin-bottom: 15px;
|
23
|
-
background-color: #eee;
|
24
|
-
margin-right: 1%;
|
25
|
-
}
|
26
|
-
|
27
|
-
.map {
|
28
|
-
position: absolute;
|
29
|
-
width: 100%;
|
30
|
-
height: 280px;
|
31
|
-
bottom: 0px;
|
32
|
-
}
|
33
|
-
</style>
|
34
|
-
</head>
|
35
|
-
<body>
|
36
|
-
<p>These should all render identically.</p>
|
37
|
-
<div class="mapcontainer">
|
38
|
-
CASE 1: no opacity set on any layers
|
39
|
-
<br />
|
40
|
-
<div id="map1" class="map"></div>
|
41
|
-
</div>
|
42
|
-
<div class="mapcontainer">
|
43
|
-
CASE 2: opacity set to .99 on overlays but not on basemap
|
44
|
-
<br />
|
45
|
-
<div id="map2" class="map"></div>
|
46
|
-
</div>
|
47
|
-
<div class="mapcontainer">
|
48
|
-
CASE 3: opacity set on overlays but not on basemap, zIndex option set to 0 on basemap
|
49
|
-
<br />
|
50
|
-
<div id="map3" class="map"></div>
|
51
|
-
</div>
|
52
|
-
<div class="mapcontainer">
|
53
|
-
CASE 4: opacity set to .99 on overlays but set to 1 on basemap
|
54
|
-
<br />
|
55
|
-
<div id="map4" class="map"></div>
|
56
|
-
</div>
|
57
|
-
<div class="mapcontainer">
|
58
|
-
CASE 5: opacity set to .99 on all layers
|
59
|
-
<br />
|
60
|
-
<div id="map5" class="map"></div>
|
61
|
-
</div>
|
62
|
-
<div class="mapcontainer">
|
63
|
-
CASE 6: opacity set to .99 on 1st and 3rd layers and 1 on middle layer
|
64
|
-
<br />
|
65
|
-
<div id="map6" class="map"></div>
|
66
|
-
</div>
|
67
|
-
|
68
|
-
<script type="text/javascript">
|
69
|
-
var mapopts = {
|
70
|
-
center: [35, -122],
|
71
|
-
zoom : 5
|
72
|
-
};
|
73
|
-
|
74
|
-
var map1 = L.map('map1', mapopts);
|
75
|
-
var map2 = L.map('map2', mapopts);
|
76
|
-
var map3 = L.map('map3', mapopts);
|
77
|
-
var map4 = L.map('map4', mapopts);
|
78
|
-
var map5 = L.map('map5', mapopts);
|
79
|
-
var map6 = L.map('map6', mapopts);
|
80
|
-
|
81
|
-
/**********
|
82
|
-
CASE 1: no opacity set on any layers
|
83
|
-
**********/
|
84
|
-
// OSM Basemap
|
85
|
-
var osm1 = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png?v=1', {
|
86
|
-
attribution: '',
|
87
|
-
key: 'BC9A493B41014CAABB98F0471D759707',
|
88
|
-
styleId: 97941
|
89
|
-
}).addTo(map1);
|
90
|
-
|
91
|
-
// EEZs / Nations
|
92
|
-
var eez1 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/eezs/{z}/{x}/{y}.png', {
|
93
|
-
tms: true
|
94
|
-
}).addTo(map1);
|
95
|
-
|
96
|
-
// Marine Protected Areas overlay
|
97
|
-
var mpa1 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/mpas/{z}/{x}/{y}.png', {
|
98
|
-
tms: false
|
99
|
-
}).addTo(map1);
|
100
|
-
|
101
|
-
|
102
|
-
/**********
|
103
|
-
CASE 2: opacity set on overlays but not on basemap
|
104
|
-
**********/
|
105
|
-
// OSM Basemap
|
106
|
-
var osm2 = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png?v=1', {
|
107
|
-
attribution: '',
|
108
|
-
key: 'BC9A493B41014CAABB98F0471D759707',
|
109
|
-
styleId: 97941
|
110
|
-
}).addTo(map2);
|
111
|
-
|
112
|
-
// EEZs / Nations
|
113
|
-
var eez2 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/eezs/{z}/{x}/{y}.png', {
|
114
|
-
tms: true,
|
115
|
-
opacity: 0.99
|
116
|
-
}).addTo(map2);
|
117
|
-
|
118
|
-
// Marine Protected Areas overlay
|
119
|
-
var mpa2 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/mpas/{z}/{x}/{y}.png', {
|
120
|
-
tms: false,
|
121
|
-
opacity: 0.99
|
122
|
-
}).addTo(map2);
|
123
|
-
|
124
|
-
|
125
|
-
/**********
|
126
|
-
CASE 3: opacity set on overlays but not on basemap, zIndex option set to 0 on basemap
|
127
|
-
**********/
|
128
|
-
// OSM Basemap
|
129
|
-
var osm3 = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png?v=1', {
|
130
|
-
attribution: '',
|
131
|
-
key: 'BC9A493B41014CAABB98F0471D759707',
|
132
|
-
styleId: 97941,
|
133
|
-
zIndex: 0
|
134
|
-
}).addTo(map3);
|
135
|
-
|
136
|
-
// EEZs / Nations
|
137
|
-
var eez3 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/eezs/{z}/{x}/{y}.png', {
|
138
|
-
tms: true,
|
139
|
-
opacity: 0.99
|
140
|
-
}).addTo(map3);
|
141
|
-
|
142
|
-
// Marine Protected Areas overlay
|
143
|
-
var mpa3 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/mpas/{z}/{x}/{y}.png', {
|
144
|
-
tms: false,
|
145
|
-
opacity: 0.99
|
146
|
-
}).addTo(map3);
|
147
|
-
|
148
|
-
|
149
|
-
/**********
|
150
|
-
CASE 4: opacity set on overlays but set to 1 on basemap
|
151
|
-
**********/
|
152
|
-
// OSM Basemap
|
153
|
-
var osm4 = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png?v=1', {
|
154
|
-
attribution: '',
|
155
|
-
key: 'BC9A493B41014CAABB98F0471D759707',
|
156
|
-
styleId: 97941,
|
157
|
-
opacity: 1
|
158
|
-
}).addTo(map4);
|
159
|
-
|
160
|
-
// EEZs / Nations
|
161
|
-
var eez4 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/eezs/{z}/{x}/{y}.png', {
|
162
|
-
tms: true,
|
163
|
-
opacity: 0.99
|
164
|
-
}).addTo(map4);
|
165
|
-
|
166
|
-
// Marine Protected Areas overlay
|
167
|
-
var mpa4 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/mpas/{z}/{x}/{y}.png', {
|
168
|
-
tms: false,
|
169
|
-
opacity: 0.99
|
170
|
-
}).addTo(map4);
|
171
|
-
|
172
|
-
|
173
|
-
/**********
|
174
|
-
CASE 5: opacity set to .5 on all layers
|
175
|
-
**********/
|
176
|
-
// OSM Basemap
|
177
|
-
var osm5 = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png?v=1', {
|
178
|
-
attribution: '',
|
179
|
-
key: 'BC9A493B41014CAABB98F0471D759707',
|
180
|
-
styleId: 97941,
|
181
|
-
opacity: 0.99
|
182
|
-
}).addTo(map5);
|
183
|
-
|
184
|
-
// EEZs / Nations
|
185
|
-
var eez5 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/eezs/{z}/{x}/{y}.png', {
|
186
|
-
tms: true,
|
187
|
-
opacity: 0.99
|
188
|
-
}).addTo(map5);
|
189
|
-
|
190
|
-
// Marine Protected Areas overlay
|
191
|
-
var mpa5 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/mpas/{z}/{x}/{y}.png', {
|
192
|
-
tms: false,
|
193
|
-
opacity: 0.99
|
194
|
-
}).addTo(map5);
|
195
|
-
|
196
|
-
|
197
|
-
/**********
|
198
|
-
CASE 6: opacity set to .5 on 1st and 3rd layers and 1 on middle layer
|
199
|
-
**********/
|
200
|
-
// OSM Basemap
|
201
|
-
var osm6 = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png?v=1', {
|
202
|
-
attribution: '',
|
203
|
-
key: 'BC9A493B41014CAABB98F0471D759707',
|
204
|
-
styleId: 97941,
|
205
|
-
opacity: 0.99
|
206
|
-
}).addTo(map6);
|
207
|
-
|
208
|
-
// EEZs / Nations
|
209
|
-
var eez6 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/eezs/{z}/{x}/{y}.png', {
|
210
|
-
tms: true,
|
211
|
-
opacity: 1
|
212
|
-
}).addTo(map6);
|
213
|
-
|
214
|
-
// Marine Protected Areas overlay
|
215
|
-
var mpa6 = new L.tileLayer('http://tile1.mpatlas.org/tilecache/mpas/{z}/{x}/{y}.png', {
|
216
|
-
tms: false,
|
217
|
-
opacity: 0.99
|
218
|
-
}).addTo(map6);
|
219
|
-
|
220
|
-
|
221
|
-
</script>
|
222
|
-
</body>
|
223
|
-
</html>
|
@@ -1,41 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Leaflet debug page</title>
|
5
|
-
|
6
|
-
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="../css/screen.css" />
|
9
|
-
|
10
|
-
<script type="text/javascript" src="../../build/deps.js"></script>
|
11
|
-
<script src="../leaflet-include.js"></script>
|
12
|
-
</head>
|
13
|
-
<body>
|
14
|
-
|
15
|
-
<div style="position: absolute; top: 100px; left: 100px; border: 1px solid green">
|
16
|
-
<div style="position: relative; margin-top: 500px; width: 800px; border: 1px solid red; margin-left: 200px">
|
17
|
-
<div style="height: 600px; overflow: auto">
|
18
|
-
<div id="map" style="width: 600px; height: 1000px; border: 1px solid #ccc"></div>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<script type="text/javascript">
|
24
|
-
|
25
|
-
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/d4fc77ea4a63471cab2423e66626cbb6/997/256/{z}/{x}/{y}.png',
|
26
|
-
cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
|
27
|
-
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
|
28
|
-
latlng = new L.LatLng(50.5, 30.51);
|
29
|
-
|
30
|
-
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
|
31
|
-
|
32
|
-
var s = '';
|
33
|
-
for (var i = 0; i < 100; i++) s += 'Test<br>';
|
34
|
-
|
35
|
-
var popup = L.popup({maxHeight: 100})
|
36
|
-
.setContent(s)
|
37
|
-
.setLatLng(latlng)
|
38
|
-
.openOn(map);
|
39
|
-
</script>
|
40
|
-
</body>
|
41
|
-
</html>
|
@@ -1,44 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Leaflet debug page</title>
|
5
|
-
|
6
|
-
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
7
|
-
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
9
|
-
|
10
|
-
<link rel="stylesheet" href="../css/screen.css" />
|
11
|
-
|
12
|
-
<script type="text/javascript" src="../../build/deps.js"></script>
|
13
|
-
<script src="../leaflet-include.js"></script>
|
14
|
-
</head>
|
15
|
-
<body>
|
16
|
-
|
17
|
-
<div id="map"></div>
|
18
|
-
|
19
|
-
<script type="text/javascript">
|
20
|
-
|
21
|
-
var map = L.map('map', {
|
22
|
-
crs: L.CRS.Simple
|
23
|
-
}).setView([0, 0], 0);
|
24
|
-
|
25
|
-
L.polygon([
|
26
|
-
[-200, -50],
|
27
|
-
[-40, 250],
|
28
|
-
[200, 100]
|
29
|
-
]).addTo(map);
|
30
|
-
|
31
|
-
|
32
|
-
L.marker([-200, -200]).addTo(map);
|
33
|
-
L.marker([200, -200]).addTo(map);
|
34
|
-
L.marker([200, 200]).addTo(map);
|
35
|
-
L.marker([-200, 200]).addTo(map);
|
36
|
-
|
37
|
-
L.marker([0, 0]).addTo(map);
|
38
|
-
|
39
|
-
L.imageOverlay('http://leafletjs.com/docs/images/logo.png', [[0, 0], [73, 220]]).addTo(map);
|
40
|
-
|
41
|
-
|
42
|
-
</script>
|
43
|
-
</body>
|
44
|
-
</html>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Leaflet debug page</title>
|
5
|
-
|
6
|
-
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="../css/screen.css" />
|
9
|
-
|
10
|
-
<script type="text/javascript" src="../../build/deps.js"></script>
|
11
|
-
<script src="../leaflet-include.js"></script>
|
12
|
-
</head>
|
13
|
-
<body>
|
14
|
-
|
15
|
-
<div id="map" style="width: 1024px; height: 440px; border: 1px solid #ccc"></div>
|
16
|
-
|
17
|
-
<script type="text/javascript">
|
18
|
-
var map = new L.Map('map', {crs: L.CRS.EPSG4326});
|
19
|
-
|
20
|
-
var bluemarble = new L.TileLayer.WMS("http://maps.opengeo.org/geowebcache/service/wms", {
|
21
|
-
layers: 'bluemarble',
|
22
|
-
attribution: "Data © NASA Blue Marble, image service by OpenGeo",
|
23
|
-
minZoom: 2,
|
24
|
-
maxZoom: 5
|
25
|
-
});
|
26
|
-
|
27
|
-
map.addLayer(bluemarble).fitWorld();
|
28
|
-
</script>
|
29
|
-
</body>
|
30
|
-
</html>
|
@@ -1,40 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Leaflet debug page</title>
|
5
|
-
|
6
|
-
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="../css/screen.css" />
|
9
|
-
|
10
|
-
<script type="text/javascript" src="../../build/deps.js"></script>
|
11
|
-
<script src="../leaflet-include.js"></script>
|
12
|
-
</head>
|
13
|
-
<body>
|
14
|
-
|
15
|
-
<div id="map" style="width: 800px; height: 600px; border: 1px solid #ccc"></div>
|
16
|
-
|
17
|
-
<script type="text/javascript">
|
18
|
-
var map = new L.Map('map');
|
19
|
-
|
20
|
-
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/d4fc77ea4a63471cab2423e66626cbb6/{styleId}/256/{z}/{x}/{y}.png',
|
21
|
-
cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
|
22
|
-
cloudmade = new L.TileLayer(cloudmadeUrl, {styleId: 997, attribution: cloudmadeAttribution}),
|
23
|
-
cloudmade2 = new L.TileLayer(cloudmadeUrl, {styleId: 998, attribution: cloudmadeAttribution});
|
24
|
-
|
25
|
-
var nexrad = new L.TileLayer.WMS("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", {
|
26
|
-
layers: 'nexrad-n0r-900913',
|
27
|
-
format: 'image/png',
|
28
|
-
transparent: true,
|
29
|
-
attribution: "Weather data © 2011 IEM Nexrad",
|
30
|
-
opacity: 0.4
|
31
|
-
});
|
32
|
-
|
33
|
-
var bounds = new L.LatLngBounds(new L.LatLng(32, -126), new L.LatLng(50, -64));
|
34
|
-
|
35
|
-
map.addLayer(cloudmade).addLayer(nexrad).fitBounds(bounds);
|
36
|
-
|
37
|
-
L.control.layers({"CM": cloudmade, "CM2": cloudmade2}, {"NexRad": nexrad}).addTo(map);
|
38
|
-
</script>
|
39
|
-
</body>
|
40
|
-
</html>
|
@@ -1,45 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Leaflet debug page</title>
|
5
|
-
|
6
|
-
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="../css/screen.css" />
|
9
|
-
|
10
|
-
<script type="text/javascript" src="../../build/deps.js"></script>
|
11
|
-
<script src="../leaflet-include.js"></script>
|
12
|
-
</head>
|
13
|
-
<body>
|
14
|
-
|
15
|
-
<div id="map"></div>
|
16
|
-
|
17
|
-
<script type="text/javascript">
|
18
|
-
// Test that changing between layers with differing zoomlevels also updates
|
19
|
-
// the zoomlevels in the map + also
|
20
|
-
|
21
|
-
function getCloudMadeUrl(styleId) {
|
22
|
-
return 'http://{s}.tile.cloudmade.com/d4fc77ea4a63471cab2423e66626cbb6/' + styleId + '/256/{z}/{x}/{y}.png';
|
23
|
-
}
|
24
|
-
|
25
|
-
var map = L.map('map').setView(L.latLng(50.5, 30.51), 0);
|
26
|
-
|
27
|
-
var cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
|
28
|
-
cloudmade = L.tileLayer(getCloudMadeUrl(997), {attribution: cloudmadeAttribution, minZoom: 0, maxZoom: 10}).addTo(map),
|
29
|
-
cloudmade2 = L.tileLayer(getCloudMadeUrl(998), {attribution: 'Hello world', minZoom: 5, maxZoom: 18});
|
30
|
-
|
31
|
-
L.control.layers({
|
32
|
-
'CloudMade Pale Dawn (5-18)': cloudmade2,
|
33
|
-
'CloudMade Fresh (0-10)': cloudmade
|
34
|
-
}).addTo(map);
|
35
|
-
|
36
|
-
L.control.scale().addTo(map);
|
37
|
-
|
38
|
-
for (var i = 0; i < 1000; i++) {
|
39
|
-
L.marker(getRandomLatLng(map)).addTo(map);
|
40
|
-
}
|
41
|
-
|
42
|
-
|
43
|
-
</script>
|
44
|
-
</body>
|
45
|
-
</html>
|
@@ -1,87 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Leaflet debug page</title>
|
5
|
-
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
9
|
-
|
10
|
-
<link rel="stylesheet" href="../css/screen.css" />
|
11
|
-
<script type='text/javascript' src='http://code.jquery.com/jquery-1.8.0.js'></script>
|
12
|
-
|
13
|
-
<script>
|
14
|
-
L_PREFER_CANVAS = true;
|
15
|
-
$(document).ready(function() {
|
16
|
-
var map;
|
17
|
-
var myLayerGroup = new L.LayerGroup();
|
18
|
-
|
19
|
-
initmap();
|
20
|
-
|
21
|
-
|
22
|
-
function initmap() {
|
23
|
-
|
24
|
-
// set up the map
|
25
|
-
map = new L.Map('map');
|
26
|
-
|
27
|
-
// create the tile layer with correct attribution
|
28
|
-
var osmUrl = 'http://a.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
29
|
-
var osmAttrib = 'Map data © OpenStreetMap contributors';
|
30
|
-
var osm = new L.TileLayer(osmUrl, { minZoom: 1, maxZoom: 17, attribution: osmAttrib, detectRetina: true });
|
31
|
-
map.addLayer(osm);
|
32
|
-
map.fitBounds(new L.LatLngBounds([51,7],[51,7]));
|
33
|
-
drawTestLine();
|
34
|
-
|
35
|
-
|
36
|
-
};
|
37
|
-
|
38
|
-
function drawTestLine() {
|
39
|
-
var lat = 51;
|
40
|
-
var long = 7;
|
41
|
-
for (var i = 0; i < 50; i++) {
|
42
|
-
|
43
|
-
var myCircle = new L.Circle(new L.LatLng(lat, long),3);
|
44
|
-
myCircle.on('click',
|
45
|
-
function (e) {
|
46
|
-
popup = new L.Popup();
|
47
|
-
popup.setLatLng(this.getLatLng());
|
48
|
-
|
49
|
-
var popuptxt = "Hello!";
|
50
|
-
alert("I am the click function");
|
51
|
-
popup.setContent(popuptxt);
|
52
|
-
|
53
|
-
map.openPopup(popup);
|
54
|
-
|
55
|
-
|
56
|
-
});
|
57
|
-
myLayerGroup.addLayer(myCircle);
|
58
|
-
lat = lat + 0.0001;
|
59
|
-
long = long + 0.0001;
|
60
|
-
|
61
|
-
}
|
62
|
-
|
63
|
-
map.addLayer(myLayerGroup);
|
64
|
-
|
65
|
-
};
|
66
|
-
|
67
|
-
$("#b1").click(function() {
|
68
|
-
map.addLayer(myLayerGroup);
|
69
|
-
});
|
70
|
-
|
71
|
-
$("#b2").click(function() {
|
72
|
-
map.removeLayer(myLayerGroup);
|
73
|
-
});
|
74
|
-
|
75
|
-
});
|
76
|
-
</script>
|
77
|
-
|
78
|
-
<script src="../leaflet-include.js"></script>
|
79
|
-
</head>
|
80
|
-
<body>
|
81
|
-
<div id="map"></div>
|
82
|
-
<div id="buttons">
|
83
|
-
<button type="button" id="b1"> Add Layer</button>
|
84
|
-
<button type="button" id="b2"> Remove Layer</button>
|
85
|
-
</div>
|
86
|
-
</body>
|
87
|
-
</html>
|