columbus3 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/README.md +122 -0
- data/bin/console +0 -0
- data/bin/setup +0 -0
- data/bower.json +25 -0
- data/bower_components/jquery/.bower.json +7 -20
- data/bower_components/jquery/AUTHORS.txt +301 -0
- data/bower_components/jquery/{MIT-LICENSE.txt → LICENSE.txt} +17 -2
- data/bower_components/jquery/README.md +67 -0
- data/bower_components/jquery/bower.json +2 -16
- data/bower_components/jquery/dist/core.js +476 -0
- data/bower_components/jquery/dist/jquery.js +3861 -2818
- data/bower_components/jquery/dist/jquery.min.js +4 -5
- data/bower_components/jquery/dist/jquery.min.map +1 -1
- data/bower_components/jquery/dist/jquery.slim.js +8160 -0
- data/bower_components/jquery/dist/jquery.slim.min.js +4 -0
- data/bower_components/jquery/dist/jquery.slim.min.map +1 -0
- data/bower_components/jquery/external/sizzle/LICENSE.txt +36 -0
- data/bower_components/jquery/{src → external}/sizzle/dist/sizzle.js +445 -240
- data/bower_components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/bower_components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/bower_components/jquery/src/.eslintrc.json +5 -0
- data/bower_components/jquery/src/ajax.js +174 -105
- data/bower_components/jquery/src/ajax/jsonp.js +27 -14
- data/bower_components/jquery/src/ajax/load.js +24 -23
- data/bower_components/jquery/src/ajax/parseXML.js +8 -6
- data/bower_components/jquery/src/ajax/script.js +25 -12
- data/bower_components/jquery/src/ajax/var/location.js +5 -0
- data/bower_components/jquery/src/ajax/var/nonce.js +4 -2
- data/bower_components/jquery/src/ajax/var/rquery.js +5 -3
- data/bower_components/jquery/src/ajax/xhr.js +76 -43
- data/bower_components/jquery/src/attributes.js +4 -2
- data/bower_components/jquery/src/attributes/attr.js +60 -60
- data/bower_components/jquery/src/attributes/classes.js +87 -71
- data/bower_components/jquery/src/attributes/prop.js +81 -32
- data/bower_components/jquery/src/attributes/support.js +11 -13
- data/bower_components/jquery/src/attributes/val.js +66 -37
- data/bower_components/jquery/src/callbacks.js +119 -90
- data/bower_components/jquery/src/core.js +108 -134
- data/bower_components/jquery/src/core/DOMEval.js +16 -0
- data/bower_components/jquery/src/core/access.js +21 -11
- data/bower_components/jquery/src/core/init.js +33 -28
- data/bower_components/jquery/src/core/nodeName.js +13 -0
- data/bower_components/jquery/src/core/parseHTML.js +39 -13
- data/bower_components/jquery/src/core/ready-no-deferred.js +96 -0
- data/bower_components/jquery/src/core/ready.js +40 -51
- data/bower_components/jquery/src/core/readyException.js +13 -0
- data/bower_components/jquery/src/core/stripAndCollapse.js +14 -0
- data/bower_components/jquery/src/core/support.js +20 -0
- data/bower_components/jquery/src/core/var/rsingleTag.js +5 -3
- data/bower_components/jquery/src/css.js +146 -158
- data/bower_components/jquery/src/css/addGetHookIf.js +7 -3
- data/bower_components/jquery/src/css/adjustCSS.js +71 -0
- data/bower_components/jquery/src/css/curCSS.js +22 -14
- data/bower_components/jquery/src/css/hiddenVisibleSelectors.js +8 -8
- data/bower_components/jquery/src/css/showHide.js +105 -0
- data/bower_components/jquery/src/css/support.js +69 -76
- data/bower_components/jquery/src/css/var/cssExpand.js +4 -2
- data/bower_components/jquery/src/css/var/getStyles.js +11 -6
- data/bower_components/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/bower_components/jquery/src/css/var/rmargin.js +5 -3
- data/bower_components/jquery/src/css/var/rnumnonpx.js +4 -2
- data/bower_components/jquery/src/css/{swap.js → var/swap.js} +5 -7
- data/bower_components/jquery/src/data.js +67 -66
- data/bower_components/jquery/src/data/Data.js +87 -107
- data/bower_components/jquery/src/data/{accepts.js → var/acceptData.js} +6 -7
- data/bower_components/jquery/src/data/var/{data_priv.js → dataPriv.js} +4 -2
- data/bower_components/jquery/src/data/var/{data_user.js → dataUser.js} +4 -2
- data/bower_components/jquery/src/deferred.js +314 -72
- data/bower_components/jquery/src/deferred/exceptionHook.js +21 -0
- data/bower_components/jquery/src/deprecated.js +36 -9
- data/bower_components/jquery/src/dimensions.js +16 -10
- data/bower_components/jquery/src/effects.js +257 -206
- data/bower_components/jquery/src/effects/Tween.js +18 -9
- data/bower_components/jquery/src/effects/animatedSelector.js +7 -5
- data/bower_components/jquery/src/event.js +297 -419
- data/bower_components/jquery/src/event/ajax.js +13 -4
- data/bower_components/jquery/src/event/alias.js +13 -23
- data/bower_components/jquery/src/event/focusin.js +55 -0
- data/bower_components/jquery/src/event/support.js +5 -3
- data/bower_components/jquery/src/event/trigger.js +185 -0
- data/bower_components/jquery/src/exports/amd.js +5 -3
- data/bower_components/jquery/src/exports/global.js +8 -6
- data/bower_components/jquery/src/jquery.js +6 -2
- data/bower_components/jquery/src/manipulation.js +218 -310
- data/bower_components/jquery/src/manipulation/_evalUrl.js +9 -4
- data/bower_components/jquery/src/manipulation/buildFragment.js +104 -0
- data/bower_components/jquery/src/manipulation/getAll.js +32 -0
- data/bower_components/jquery/src/manipulation/setGlobalEval.js +22 -0
- data/bower_components/jquery/src/manipulation/support.js +11 -8
- data/bower_components/jquery/src/manipulation/var/rcheckableType.js +5 -3
- data/bower_components/jquery/src/manipulation/var/rscriptType.js +5 -0
- data/bower_components/jquery/src/manipulation/var/rtagName.js +5 -0
- data/bower_components/jquery/src/manipulation/wrapMap.js +29 -0
- data/bower_components/jquery/src/offset.js +75 -53
- data/bower_components/jquery/src/queue.js +26 -23
- data/bower_components/jquery/src/queue/delay.js +8 -6
- data/bower_components/jquery/src/selector-native.js +133 -68
- data/bower_components/jquery/src/selector-sizzle.js +10 -5
- data/bower_components/jquery/src/selector.js +3 -1
- data/bower_components/jquery/src/serialize.js +52 -33
- data/bower_components/jquery/src/traversing.js +61 -69
- data/bower_components/jquery/src/traversing/findFilter.js +37 -31
- data/bower_components/jquery/src/traversing/var/dir.js +22 -0
- data/bower_components/jquery/src/traversing/var/rneedsContext.js +4 -2
- data/bower_components/jquery/src/traversing/var/siblings.js +17 -0
- data/bower_components/jquery/src/var/ObjectFunctionString.js +7 -0
- data/bower_components/jquery/src/var/arr.js +4 -2
- data/bower_components/jquery/src/var/class2type.js +4 -2
- data/bower_components/jquery/src/var/concat.js +4 -2
- data/bower_components/jquery/src/var/document.js +5 -0
- data/bower_components/jquery/src/var/documentElement.js +7 -0
- data/bower_components/jquery/src/var/fnToString.js +7 -0
- data/bower_components/jquery/src/var/getProto.js +5 -0
- data/bower_components/jquery/src/var/hasOwn.js +4 -2
- data/bower_components/jquery/src/var/indexOf.js +4 -2
- data/bower_components/jquery/src/var/pnum.js +5 -3
- data/bower_components/jquery/src/var/push.js +4 -2
- data/bower_components/jquery/src/var/rcssNum.js +9 -0
- data/bower_components/jquery/src/var/rnothtmlwhite.js +8 -0
- data/bower_components/jquery/src/var/slice.js +4 -2
- data/bower_components/jquery/src/var/support.js +4 -2
- data/bower_components/jquery/src/var/toString.js +4 -2
- data/bower_components/jquery/src/wrap.js +24 -26
- data/bower_components/leaflet-providers/.bower.json +6 -7
- data/bower_components/leaflet-providers/CHANGELOG.md +62 -0
- data/bower_components/leaflet-providers/README.md +12 -3
- data/bower_components/leaflet-providers/bower.json +1 -1
- data/bower_components/leaflet-providers/leaflet-providers.js +133 -92
- data/bower_components/leaflet-providers/package.json +14 -7
- data/bower_components/leaflet/.bower.json +10 -14
- data/bower_components/leaflet/CHANGELOG.md +648 -3
- data/bower_components/leaflet/CONTRIBUTING.md +88 -33
- data/bower_components/leaflet/ISSUE_TEMPLATE.md +25 -0
- data/bower_components/leaflet/Jakefile.js +73 -14
- data/bower_components/leaflet/LICENSE +1 -1
- data/bower_components/leaflet/PLUGIN-GUIDE.md +97 -3
- data/bower_components/leaflet/README.md +6 -8
- data/bower_components/leaflet/bower.json +3 -9
- data/bower_components/leaflet/dist/images/layers-2x.png +0 -0
- data/bower_components/leaflet/dist/images/layers.png +0 -0
- data/bower_components/leaflet/dist/images/marker-icon-2x.png +0 -0
- data/bower_components/leaflet/dist/images/marker-icon.png +0 -0
- data/bower_components/leaflet/dist/images/marker-shadow.png +0 -0
- data/bower_components/leaflet/dist/leaflet-src.js +12301 -7898
- data/bower_components/leaflet/dist/leaflet-src.js.map +1 -0
- data/bower_components/leaflet/dist/leaflet.css +196 -43
- data/bower_components/leaflet/dist/leaflet.js +6 -9
- data/bower_components/leaflet/dist/leaflet.js.map +1 -0
- data/bower_components/leaflet/docs/CNAME +1 -0
- data/bower_components/leaflet/docs/Gemfile +4 -0
- data/bower_components/leaflet/docs/_config.yml +19 -0
- data/bower_components/leaflet/docs/_includes/frame.html +9 -0
- data/bower_components/leaflet/docs/_includes/tutorial_link.html +8 -0
- data/bower_components/leaflet/docs/_layouts/post.html +30 -0
- data/bower_components/leaflet/docs/_layouts/redirected.html +14 -0
- data/bower_components/leaflet/docs/_layouts/tutorial.html +9 -0
- data/bower_components/leaflet/docs/_layouts/tutorial_frame.html +32 -0
- data/bower_components/leaflet/docs/_layouts/tutorial_v2.html +9 -0
- data/bower_components/leaflet/docs/_layouts/v2.html +159 -0
- data/bower_components/leaflet/docs/_posts/2012-07-30-leaflet-0-4-released.md +240 -0
- data/bower_components/leaflet/docs/_posts/2012-08-07-leaflet-0-4-3-and-a-new-tutorial.md +47 -0
- data/bower_components/leaflet/docs/_posts/2012-08-20-guest-post-markerclusterer-0-1-released.md +112 -0
- data/bower_components/leaflet/docs/_posts/2012-10-25-leaflet-0-4-5-bugfix-release-and-plans-for-0.5.md +36 -0
- data/bower_components/leaflet/docs/_posts/2013-01-17-leaflet-0-5-released.md +24 -0
- data/bower_components/leaflet/docs/_posts/2013-02-20-guest-post-draw.md +146 -0
- data/bower_components/leaflet/docs/_posts/2013-06-26-leaflet-0-6-released-dc-code-sprint-mapbox.md +31 -0
- data/bower_components/leaflet/docs/_posts/2013-06-28-leaflet-plugin-authoring-guide.md +111 -0
- data/bower_components/leaflet/docs/_posts/2013-11-18-leaflet-0-7-released-plans-for-future.md +56 -0
- data/bower_components/leaflet/docs/_posts/2015-07-01-leaflet-is-alive-and-kicking.md +21 -0
- data/bower_components/leaflet/docs/_posts/2015-07-15-leaflet-1.0-beta1-released.md +60 -0
- data/bower_components/leaflet/docs/_posts/2015-09-01-leaflet-0.7.4-released.md +29 -0
- data/bower_components/leaflet/docs/_posts/2015-10-14-leaflet-1.0-beta2-released.md +35 -0
- data/bower_components/leaflet/docs/_posts/2016-03-20-debugging-touch-interactions.md +101 -0
- data/bower_components/leaflet/docs/_posts/2016-04-18-leaflet-1.0-rc1.md +78 -0
- data/bower_components/leaflet/docs/_posts/2016-07-16-leaflet-1.0-rc2.md +60 -0
- data/bower_components/leaflet/docs/_posts/2016-08-05-leaflet-1.0-rc3.md +53 -0
- data/bower_components/leaflet/docs/_posts/2016-09-27-leaflet-1.0-final.md +50 -0
- data/bower_components/leaflet/docs/_posts/2016-11-21-leaflet-1.0.2.md +25 -0
- data/bower_components/leaflet/docs/_posts/2017-01-23-leaflet-1.0.3.md +27 -0
- data/bower_components/leaflet/docs/atom.xml +29 -0
- data/bower_components/leaflet/docs/blog.md +24 -0
- data/bower_components/leaflet/docs/docs/css/main.css +1092 -0
- data/bower_components/leaflet/docs/docs/css/normalize.css +426 -0
- data/bower_components/leaflet/docs/docs/highlight/LICENSE +24 -0
- data/bower_components/leaflet/docs/docs/highlight/highlight.pack.js +1 -0
- data/bower_components/leaflet/docs/docs/highlight/styles/github-gist.css +211 -0
- data/bower_components/leaflet/docs/docs/images/2016-03-20-prosthetic-hand-zooming.gif +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-04-18-inheritances.gif +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-04-18-leaflet-toilet-paper.jpeg +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-04-18-madrid-leaflet-864px.jpg +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-07-18-remote-session.png +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-07-18-tooltip.png +0 -0
- data/bower_components/leaflet/docs/docs/images/2016-08-03-iraq-hacking.jpg +0 -0
- data/bower_components/leaflet/docs/docs/images/favicon.ico +0 -0
- data/bower_components/leaflet/docs/docs/images/forum-round.png +0 -0
- data/bower_components/leaflet/docs/docs/images/github-round.png +0 -0
- data/bower_components/leaflet/docs/docs/images/logo.png +0 -0
- data/bower_components/leaflet/docs/docs/images/logos.png +0 -0
- data/bower_components/leaflet/docs/docs/images/sprite.png +0 -0
- data/bower_components/leaflet/docs/docs/images/sprite.svg +75 -0
- data/bower_components/leaflet/docs/docs/images/twitter-round.png +0 -0
- data/bower_components/leaflet/docs/docs/images/twitter.png +0 -0
- data/bower_components/leaflet/docs/docs/js/docs.js +52 -0
- data/bower_components/leaflet/docs/download.md +95 -0
- data/bower_components/leaflet/docs/examples.md +125 -0
- data/bower_components/leaflet/docs/examples/choropleth-example.md +5 -0
- data/bower_components/leaflet/docs/examples/choropleth.md +5 -0
- data/bower_components/leaflet/docs/examples/choropleth/example-basic.md +20 -0
- data/bower_components/leaflet/docs/examples/choropleth/example-color.md +46 -0
- data/bower_components/leaflet/docs/examples/choropleth/example.md +159 -0
- data/bower_components/leaflet/docs/examples/choropleth/index.md +232 -0
- data/bower_components/leaflet/docs/examples/choropleth/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/choropleth/us-states.js +54 -0
- data/bower_components/leaflet/docs/examples/crs-simple/crs-simple-example1.md +16 -0
- data/bower_components/leaflet/docs/examples/crs-simple/crs-simple-example2.md +20 -0
- data/bower_components/leaflet/docs/examples/crs-simple/crs-simple-example3.md +38 -0
- data/bower_components/leaflet/docs/examples/crs-simple/crs-simple.md +117 -0
- data/bower_components/leaflet/docs/examples/crs-simple/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/crs-simple/uqm_map_400px.png +0 -0
- data/bower_components/leaflet/docs/examples/crs-simple/uqm_map_detail.png +0 -0
- data/bower_components/leaflet/docs/examples/crs-simple/uqm_map_full.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons-example.md +5 -0
- data/bower_components/leaflet/docs/examples/custom-icons.md +5 -0
- data/bower_components/leaflet/docs/examples/custom-icons/example-one-icon.md +27 -0
- data/bower_components/leaflet/docs/examples/custom-icons/example.md +31 -0
- data/bower_components/leaflet/docs/examples/custom-icons/index.md +79 -0
- data/bower_components/leaflet/docs/examples/custom-icons/leaf-green.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons/leaf-orange.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons/leaf-red.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons/leaf-shadow.png +0 -0
- data/bower_components/leaflet/docs/examples/custom-icons/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/canvascircles.md +37 -0
- data/bower_components/leaflet/docs/examples/extending/class-diagram.md +24 -0
- data/bower_components/leaflet/docs/examples/extending/class-diagram.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/class-diagram.txt +100 -0
- data/bower_components/leaflet/docs/examples/extending/extending-1-classes.md +196 -0
- data/bower_components/leaflet/docs/examples/extending/extending-2-layers.md +210 -0
- data/bower_components/leaflet/docs/examples/extending/extending-3-controls.md +100 -0
- data/bower_components/leaflet/docs/examples/extending/gridcoords.md +32 -0
- data/bower_components/leaflet/docs/examples/extending/kittenlayer.md +29 -0
- data/bower_components/leaflet/docs/examples/extending/pixelorigin.md +90 -0
- data/bower_components/leaflet/docs/examples/extending/thumbnail-1.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/thumbnail-2.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/thumbnail-3.png +0 -0
- data/bower_components/leaflet/docs/examples/extending/tilt.md +59 -0
- data/bower_components/leaflet/docs/examples/extending/watermark.md +36 -0
- data/bower_components/leaflet/docs/examples/geojson-example.md +5 -0
- data/bower_components/leaflet/docs/examples/geojson.md +5 -0
- data/bower_components/leaflet/docs/examples/geojson/baseball-marker.png +0 -0
- data/bower_components/leaflet/docs/examples/geojson/example.md +78 -0
- data/bower_components/leaflet/docs/examples/geojson/geojson-example.html +89 -0
- data/bower_components/leaflet/docs/examples/geojson/geojson.html +281 -0
- data/bower_components/leaflet/docs/examples/geojson/index.md +205 -0
- data/bower_components/leaflet/docs/examples/geojson/sample-geojson.js +248 -0
- data/bower_components/leaflet/docs/examples/geojson/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/layers-control-example.md +5 -0
- data/bower_components/leaflet/docs/examples/layers-control.md +5 -0
- data/bower_components/leaflet/docs/examples/layers-control/example.md +38 -0
- data/bower_components/leaflet/docs/examples/layers-control/index.md +72 -0
- data/bower_components/leaflet/docs/examples/layers-control/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/map-panes-example.md +5 -0
- data/bower_components/leaflet/docs/examples/map-panes.md +5 -0
- data/bower_components/leaflet/docs/examples/map-panes/eu-countries.js +79 -0
- data/bower_components/leaflet/docs/examples/map-panes/example.md +38 -0
- data/bower_components/leaflet/docs/examples/map-panes/index.md +105 -0
- data/bower_components/leaflet/docs/examples/map-panes/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/mobile-example.md +5 -0
- data/bower_components/leaflet/docs/examples/mobile.md +5 -0
- data/bower_components/leaflet/docs/examples/mobile/example.md +42 -0
- data/bower_components/leaflet/docs/examples/mobile/index.md +72 -0
- data/bower_components/leaflet/docs/examples/mobile/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/quick-start-example.md +5 -0
- data/bower_components/leaflet/docs/examples/quick-start.md +5 -0
- data/bower_components/leaflet/docs/examples/quick-start/example-basic.md +19 -0
- data/bower_components/leaflet/docs/examples/quick-start/example-overlays.md +35 -0
- data/bower_components/leaflet/docs/examples/quick-start/example-popups.md +37 -0
- data/bower_components/leaflet/docs/examples/quick-start/example.md +46 -0
- data/bower_components/leaflet/docs/examples/quick-start/index.md +143 -0
- data/bower_components/leaflet/docs/examples/quick-start/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/video-overlay/example-bounds.md +23 -0
- data/bower_components/leaflet/docs/examples/video-overlay/example-nocontrols.md +31 -0
- data/bower_components/leaflet/docs/examples/video-overlay/example.md +58 -0
- data/bower_components/leaflet/docs/examples/video-overlay/index.md +122 -0
- data/bower_components/leaflet/docs/examples/video-overlay/thumbnail.gif +0 -0
- data/bower_components/leaflet/docs/examples/wms/qgis-wms-layers.png +0 -0
- data/bower_components/leaflet/docs/examples/wms/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example-crs.md +18 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example1.md +16 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example2.md +16 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example3.md +34 -0
- data/bower_components/leaflet/docs/examples/wms/wms-example4.md +29 -0
- data/bower_components/leaflet/docs/examples/wms/wms.md +157 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-delta.md +40 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-fractional.md +56 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-scale.md +29 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-setzoom.md +44 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/example-zero.md +19 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/index.md +275 -0
- data/bower_components/leaflet/docs/examples/zoom-levels/thumbnail.png +0 -0
- data/bower_components/leaflet/docs/index.html +218 -0
- data/bower_components/leaflet/docs/plugins.md +3854 -0
- data/bower_components/leaflet/docs/reference-0.7.7.html +6424 -0
- data/bower_components/leaflet/docs/reference-1.0.0.html +22889 -0
- data/bower_components/leaflet/docs/reference-1.0.2.html +23382 -0
- data/bower_components/leaflet/docs/reference-1.0.3.html +23495 -0
- data/bower_components/leaflet/docs/reference-tpl.html +89 -0
- data/bower_components/leaflet/docs/reference-versions.html +16 -0
- data/bower_components/leaflet/docs/reference.html +3 -0
- data/bower_components/leaflet/package.json +77 -16
- data/columbus3.gemspec +1 -1
- data/doc/ChangeLog.org +10 -0
- data/doc/manual.txt +122 -0
- data/doc/todo.org +63 -0
- data/exe/columbus3 +2 -246
- data/lib/columbus3.rb +12 -7
- data/lib/columbus3/cli/command_semantics.rb +352 -0
- data/lib/columbus3/cli/command_syntax.rb +103 -0
- data/lib/columbus3/metadata/query_parser.racc +21 -7
- data/lib/columbus3/metadata/query_parser.tab.rb +34 -34
- data/lib/columbus3/metadata/sidecar.rb +1 -1
- data/lib/columbus3/renderer/flot_renderer.rb +3 -8
- data/lib/columbus3/renderer/leaflet_renderer.rb +18 -29
- data/lib/columbus3/renderer/sanitizer.rb +8 -0
- data/lib/columbus3/v900track/gpx2v900.rb +31 -0
- data/lib/columbus3/v900track/v900track.rb +34 -8
- data/lib/columbus3/v900track/v900waypoint.rb +9 -0
- data/lib/columbus3/version.rb +1 -1
- data/lib/html/flot.html.erb +6 -6
- data/lib/html/show.html.erb +53 -76
- data/lib/html/track.js.erb +58 -12
- metadata +222 -23
- data/README.textile +0 -67
- data/bower_components/jquery/src/ajax/parseJSON.js +0 -13
- data/bower_components/jquery/src/css/defaultDisplay.js +0 -70
- data/bower_components/jquery/src/css/var/isHidden.js +0 -13
- data/bower_components/jquery/src/intro.js +0 -44
- data/bower_components/jquery/src/outro.js +0 -1
- data/bower_components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
- data/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
- data/bower_components/jquery/src/var/rnotwhite.js +0 -3
- data/bower_components/jquery/src/var/strundefined.js +0 -3
- data/bower_components/leaflet/component.json +0 -20
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
layout: tutorial_frame
|
3
|
+
title: Zoom Levels Tutorial
|
4
|
+
---
|
5
|
+
<script>
|
6
|
+
|
7
|
+
var map = L.map('map', {
|
8
|
+
minZoom: 0,
|
9
|
+
maxZoom: 18,
|
10
|
+
zoomSnap: 0,
|
11
|
+
zoomDelta: 0.25
|
12
|
+
});
|
13
|
+
|
14
|
+
var cartodbAttribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>';
|
15
|
+
|
16
|
+
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
17
|
+
attribution: cartodbAttribution
|
18
|
+
}).addTo(map);
|
19
|
+
|
20
|
+
var ZoomViewer = L.Control.extend({
|
21
|
+
onAdd: function(){
|
22
|
+
|
23
|
+
var container= L.DomUtil.create('div');
|
24
|
+
var gauge = L.DomUtil.create('div');
|
25
|
+
container.style.width = '200px';
|
26
|
+
container.style.background = 'rgba(255,255,255,0.5)';
|
27
|
+
container.style.textAlign = 'left';
|
28
|
+
map.on('zoomstart zoom zoomend', function(ev){
|
29
|
+
gauge.innerHTML = 'Zoom level: ' + map.getZoom();
|
30
|
+
})
|
31
|
+
container.appendChild(gauge);
|
32
|
+
|
33
|
+
return container;
|
34
|
+
}
|
35
|
+
});
|
36
|
+
|
37
|
+
(new ZoomViewer).addTo(map);
|
38
|
+
|
39
|
+
map.setView([0, 0], 0);
|
40
|
+
</script>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
layout: tutorial_frame
|
3
|
+
title: Zoom Levels Tutorial
|
4
|
+
---
|
5
|
+
<script>
|
6
|
+
|
7
|
+
var map = L.map('map', {
|
8
|
+
minZoom: 0,
|
9
|
+
maxZoom: 1,
|
10
|
+
zoomSnap: 0.25,
|
11
|
+
dragging: false
|
12
|
+
});
|
13
|
+
|
14
|
+
var cartodbAttribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>';
|
15
|
+
|
16
|
+
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
17
|
+
attribution: cartodbAttribution
|
18
|
+
}).addTo(map);
|
19
|
+
|
20
|
+
|
21
|
+
function zoomCycle(){
|
22
|
+
map.setZoom(0);
|
23
|
+
timeouts = [];
|
24
|
+
timeouts.push(setTimeout(function(){ map.setZoom(0.25); }, 1000));
|
25
|
+
timeouts.push(setTimeout(function(){ map.setZoom(0.50); }, 2000));
|
26
|
+
timeouts.push(setTimeout(function(){ map.setZoom(0.75); }, 3000));
|
27
|
+
timeouts.push(setTimeout(function(){ map.setZoom(1); }, 4000));
|
28
|
+
timeouts.push(setTimeout(function(){ map.setZoom(0.75); }, 5000));
|
29
|
+
timeouts.push(setTimeout(function(){ map.setZoom(0.50); }, 6000));
|
30
|
+
timeouts.push(setTimeout(function(){ map.setZoom(0.25); }, 7000));
|
31
|
+
}
|
32
|
+
zoomCycle();
|
33
|
+
|
34
|
+
var zoomingInterval = setInterval(zoomCycle, 8000);
|
35
|
+
|
36
|
+
var ZoomViewer = L.Control.extend({
|
37
|
+
onAdd: function(){
|
38
|
+
|
39
|
+
var container= L.DomUtil.create('div');
|
40
|
+
var gauge = L.DomUtil.create('div');
|
41
|
+
container.style.width = '200px';
|
42
|
+
container.style.background = 'rgba(255,255,255,0.5)';
|
43
|
+
container.style.textAlign = 'left';
|
44
|
+
map.on('zoomstart zoom zoomend', function(ev){
|
45
|
+
gauge.innerHTML = 'Zoom level: ' + map.getZoom();
|
46
|
+
})
|
47
|
+
container.appendChild(gauge);
|
48
|
+
|
49
|
+
return container;
|
50
|
+
}
|
51
|
+
});
|
52
|
+
|
53
|
+
(new ZoomViewer).addTo(map);
|
54
|
+
|
55
|
+
map.setView([0, 0], 0);
|
56
|
+
</script>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
---
|
2
|
+
layout: tutorial_frame
|
3
|
+
title: Zoom Levels Tutorial
|
4
|
+
---
|
5
|
+
<script>
|
6
|
+
|
7
|
+
var map = L.map('map', {
|
8
|
+
minZoom: 1,
|
9
|
+
maxZoom: 1,
|
10
|
+
dragging: false
|
11
|
+
});
|
12
|
+
|
13
|
+
var cartodbAttribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>';
|
14
|
+
|
15
|
+
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
16
|
+
attribution: cartodbAttribution
|
17
|
+
}).addTo(map);
|
18
|
+
|
19
|
+
L.control.scale({maxWidth: 150}).addTo(map);
|
20
|
+
|
21
|
+
setInterval(function(){
|
22
|
+
map.setView([0, 0], 0, {duration: 1, animate: true});
|
23
|
+
setTimeout(function(){
|
24
|
+
map.setView([60, 0], 0, {duration: 1, animate: true});
|
25
|
+
}, 2000);
|
26
|
+
}, 4000);
|
27
|
+
|
28
|
+
map.setView([0, 0], 0);
|
29
|
+
</script>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
layout: tutorial_frame
|
3
|
+
title: Zoom Levels Tutorial
|
4
|
+
---
|
5
|
+
<script>
|
6
|
+
|
7
|
+
var map = L.map('map', {
|
8
|
+
minZoom: 0,
|
9
|
+
maxZoom: 1
|
10
|
+
});
|
11
|
+
|
12
|
+
var cartodbAttribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>';
|
13
|
+
|
14
|
+
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
15
|
+
attribution: cartodbAttribution
|
16
|
+
}).addTo(map);
|
17
|
+
|
18
|
+
setInterval(function(){
|
19
|
+
|
20
|
+
map.setZoom(0);
|
21
|
+
|
22
|
+
setTimeout(function(){
|
23
|
+
map.setZoom(1);
|
24
|
+
}, 2000);
|
25
|
+
|
26
|
+
}, 4000);
|
27
|
+
|
28
|
+
var ZoomViewer = L.Control.extend({
|
29
|
+
onAdd: function(){
|
30
|
+
var gauge = L.DomUtil.create('div');
|
31
|
+
gauge.style.width = '200px';
|
32
|
+
gauge.style.background = 'rgba(255,255,255,0.5)';
|
33
|
+
gauge.style.textAlign = 'left';
|
34
|
+
map.on('zoomstart zoom zoomend', function(ev){
|
35
|
+
gauge.innerHTML = 'Zoom level: ' + map.getZoom();
|
36
|
+
})
|
37
|
+
return gauge;
|
38
|
+
}
|
39
|
+
});
|
40
|
+
|
41
|
+
(new ZoomViewer).addTo(map);
|
42
|
+
|
43
|
+
map.setView([0, 0], 0);
|
44
|
+
</script>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
layout: tutorial_frame
|
3
|
+
title: Zoom Levels Tutorial
|
4
|
+
---
|
5
|
+
<script>
|
6
|
+
|
7
|
+
var map = L.map('map', {
|
8
|
+
minZoom: 0,
|
9
|
+
maxZoom: 0
|
10
|
+
});
|
11
|
+
|
12
|
+
var cartodbAttribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>';
|
13
|
+
|
14
|
+
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
15
|
+
attribution: cartodbAttribution
|
16
|
+
}).addTo(map);
|
17
|
+
|
18
|
+
map.setView([0, 0], 0);
|
19
|
+
</script>
|
@@ -0,0 +1,275 @@
|
|
1
|
+
---
|
2
|
+
layout: tutorial_v2
|
3
|
+
title: Zoom levels
|
4
|
+
---
|
5
|
+
|
6
|
+
<style>
|
7
|
+
.tiles img {
|
8
|
+
border: 1px solid #ccc;
|
9
|
+
border-radius: 5px;
|
10
|
+
margin: 5px;
|
11
|
+
}
|
12
|
+
.tiles.small img {
|
13
|
+
border: 1px solid #ccc;
|
14
|
+
border-radius: 5px;
|
15
|
+
margin: 1px;
|
16
|
+
width: 64px;
|
17
|
+
height: 64px;
|
18
|
+
}
|
19
|
+
.tiles {
|
20
|
+
line-height: 0;
|
21
|
+
}
|
22
|
+
.tiles.legend {
|
23
|
+
line-height: 1;
|
24
|
+
}
|
25
|
+
</style>
|
26
|
+
|
27
|
+
## Zoom levels
|
28
|
+
|
29
|
+
Leaflet works with [latitude](https://en.wikipedia.org/wiki/Latitude), [longitude](https://en.wikipedia.org/wiki/Longitude) and "zoom level".
|
30
|
+
|
31
|
+
Lower zoom levels means that the map shows entire continents, while higher zoom
|
32
|
+
levels means that the map can show details of a city.
|
33
|
+
|
34
|
+
To understand how zoom levels work, first we need a basic introduction to <i>geodesy</i>.
|
35
|
+
|
36
|
+
## The shape of the earth
|
37
|
+
|
38
|
+
Let's have a look at a simple map locked at zoom zero:
|
39
|
+
|
40
|
+
```
|
41
|
+
var map = L.map('map', {
|
42
|
+
minZoom: 0,
|
43
|
+
maxZoom: 0
|
44
|
+
});
|
45
|
+
|
46
|
+
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
47
|
+
attribution: cartodbAttribution
|
48
|
+
}).addTo(map);
|
49
|
+
|
50
|
+
map.setView([0, 0], 0);
|
51
|
+
```
|
52
|
+
|
53
|
+
{% include frame.html url="example-zero.html" %}
|
54
|
+
|
55
|
+
Notice that the "whole earth" is just one image, 256 pixels wide and 256 pixels high:
|
56
|
+
|
57
|
+
<div class='tiles' style='text-align: center'>
|
58
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/0/0/0.png" class="bordered-img" alt=""/>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
Just to be clear: the earth is not a square. Rather, the earth is shaped like [a weird potato](https://commons.wikimedia.org/wiki/File:GRACE_globe_animation.gif) that can be approximated to [something similar to a sphere](https://en.wikipedia.org/wiki/Geoid).
|
62
|
+
|
63
|
+
<div class='tiles legend' style='text-align: center'>
|
64
|
+
<a title="By NASA/JPL/University of Texas Center for Space Research. (http://photojournal.jpl.nasa.gov/catalog/PIA12146) [Public domain], via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File%3AGRACE_globe_animation.gif"><img width="256" alt="GRACE globe animation" src="https://upload.wikimedia.org/wikipedia/commons/7/78/GRACE_globe_animation.gif"/>
|
65
|
+
<br/>
|
66
|
+
Potato earth image by NASA/JPL/University of Texas Center for Space Research</a>
|
67
|
+
with help of the <a href='https://en.wikipedia.org/wiki/Gravity_Recovery_and_Climate_Experiment'>GRACE satellites</a>.
|
68
|
+
</div>
|
69
|
+
|
70
|
+
So we *assume* that the earth is mosly round. To make it flat, we put an imaginary cylinder around, unroll it, and cut it so it looks square:
|
71
|
+
|
72
|
+
<div class='tiles legend' style='text-align: center'>
|
73
|
+
<a title="By derived from US Government USGS [Public domain], via Wikimedia Commons" href="https://en.wikipedia.org/wiki/Map_projection#Cylindrical"><img width="512" alt="Usgs map mercator" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Usgs_map_mercator.svg/512px-Usgs_map_mercator.svg.png"/>
|
74
|
+
<br/>
|
75
|
+
This is called a "cylindrical map projection".
|
76
|
+
</a>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
This is not the only way of displaying the surface on the earth on a plane. There
|
80
|
+
are [hundreds of ways](https://en.wikipedia.org/wiki/Map_projection), each of them
|
81
|
+
with its own advantages and disadvantages. The following 6-minute video is a nice
|
82
|
+
introduction to the topic:
|
83
|
+
|
84
|
+
<center><iframe width="696" height="392" src="https://www.youtube.com/embed/kIID5FDi2JQ" frameborder="0" allowfullscreen></iframe></center>
|
85
|
+
|
86
|
+
Things like geodesy, map projections and coordinate systems are hard, *very hard*
|
87
|
+
(and out of scope for this tutorial). Assuming that the earth is a square is not
|
88
|
+
always the right thing to do, but most of the time works fine enough, makes things
|
89
|
+
simpler, and allows Leaflet (and other map libraries) to be fast.
|
90
|
+
|
91
|
+
## Powers of two
|
92
|
+
|
93
|
+
For now, let's just ***assume*** that the world is a square:
|
94
|
+
|
95
|
+
<div class='tiles' style='text-align: center'>
|
96
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/0/0/0.png" class="bordered-img" alt=""/>
|
97
|
+
</div>
|
98
|
+
|
99
|
+
When we represent the world at zoom level **zero**, it's 256 pixels wide and high. When we go into zoom level **one**, it doubles its width and height, and can be represented by four 256-pixel-by-256-pixel images:
|
100
|
+
|
101
|
+
<div class='tiles' style='text-align: center'>
|
102
|
+
<div>
|
103
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/1/0/0.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/1/1/0.png" class="bordered-img" alt=""/>
|
104
|
+
</div>
|
105
|
+
<div>
|
106
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/1/0/1.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/1/1/1.png" class="bordered-img" alt=""/>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
At each zoom level, each tile is divided in four, and its size doubles (in other words, the width and height of the world is <code>256·2<sup>zoomlevel</sup></code> pixels):
|
111
|
+
|
112
|
+
<table><tr><td>
|
113
|
+
<div class='tiles small' style='text-align: center'>
|
114
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/0/0/0.png" class="bordered-img" alt=""/>
|
115
|
+
</div>
|
116
|
+
</td><td>
|
117
|
+
<div class='tiles small' style='text-align: center'>
|
118
|
+
<div>
|
119
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/1/0/0.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/1/1/0.png" class="bordered-img" alt=""/>
|
120
|
+
</div>
|
121
|
+
<div>
|
122
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/1/0/1.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/1/1/1.png" class="bordered-img" alt=""/>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
</td><td>
|
126
|
+
<div class='tiles small' style='text-align: center'>
|
127
|
+
<div>
|
128
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/2/0/0.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/1/0.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/2/0.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/3/0.png" class="bordered-img" alt=""/>
|
129
|
+
</div>
|
130
|
+
<div>
|
131
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/2/0/1.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/1/1.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/2/1.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/3/1.png" class="bordered-img" alt=""/>
|
132
|
+
</div>
|
133
|
+
<div>
|
134
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/2/0/2.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/1/2.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/2/2.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/3/2.png" class="bordered-img" alt=""/>
|
135
|
+
</div>
|
136
|
+
<div>
|
137
|
+
<img src="http://a.basemaps.cartocdn.com/light_all/2/0/3.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/1/3.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/2/3.png" class="bordered-img" alt=""/><img src="http://a.basemaps.cartocdn.com/light_all/2/3/3.png" class="bordered-img" alt=""/>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
</td></tr>
|
141
|
+
<tr><td>Zoom 0</td><td>Zoom 1</td><td>Zoom 2</td></tr></table>
|
142
|
+
|
143
|
+
This goes on and on. Most tile services offer tiles up to zoom level 18, depending on
|
144
|
+
their coverage. This is enough to see a few city blocks per tile.
|
145
|
+
|
146
|
+
## A note about scale
|
147
|
+
|
148
|
+
One of the disadvantages of using a cylindrical projection is that the scale is not
|
149
|
+
constant, and measuring distances or sizes is not reliable, specially at low zoom levels.
|
150
|
+
|
151
|
+
In [technical terms](https://en.wikipedia.org/wiki/Map_projection#Projections_by_preservation_of_a_metric_property),
|
152
|
+
the cylindrical projection that Leaflet uses is <i>conformal</i> (preserves shapes),
|
153
|
+
but not <i>equidistant</i> (does not preserve distances), and not <i>equal-area</i>
|
154
|
+
(does not preserve areas, as things near the equator appear smaller than they are).
|
155
|
+
|
156
|
+
By adding a `L.Control.Scale` to a map, and panning to the equator and to 60° north,
|
157
|
+
we can see how the scale factor <b>doubles</b>. The following example uses
|
158
|
+
[javascript timeouts](https://developer.mozilla.org/docs/Web/API/WindowTimers/setTimeout)
|
159
|
+
to do this automatically:
|
160
|
+
|
161
|
+
```
|
162
|
+
L.control.scale().addTo(map);
|
163
|
+
|
164
|
+
setInterval(function(){
|
165
|
+
map.setView([0, 0]);
|
166
|
+
setTimeout(function(){
|
167
|
+
map.setView([60, 0]);
|
168
|
+
}, 2000);
|
169
|
+
}, 4000);
|
170
|
+
```
|
171
|
+
|
172
|
+
{% include frame.html url="example-scale.html" %}
|
173
|
+
|
174
|
+
`L.Control.Scale` shows the scale which applies to the center point of the map.
|
175
|
+
At high zoom levels, the scale changes very little, and is not noticeable.
|
176
|
+
|
177
|
+
|
178
|
+
## Controlling the zoom
|
179
|
+
|
180
|
+
A leaflet map has a several ways to control the zoom level shown, but the most obvious
|
181
|
+
one is [`setZoom()`](../../reference-1.0.3.html#map-setzoom). For example, `map.setZoom(0);`
|
182
|
+
will set the zoom level of `map` to `0`.
|
183
|
+
|
184
|
+
This example again uses timeouts to alternate between zoom levels `0` and `1` automatically:
|
185
|
+
|
186
|
+
```
|
187
|
+
setInterval(function(){
|
188
|
+
map.setZoom(0);
|
189
|
+
setTimeout(function(){
|
190
|
+
map.setZoom(1);
|
191
|
+
}, 2000);
|
192
|
+
}, 4000);
|
193
|
+
```
|
194
|
+
|
195
|
+
{% include frame.html url="example-setzoom.html" %}
|
196
|
+
|
197
|
+
Notice how the images shown at zoom levels 0 and one correspond with the images
|
198
|
+
shown in the previous section!
|
199
|
+
|
200
|
+
Other ways of setting the zoom are:
|
201
|
+
|
202
|
+
* [`setView(center, zoom)`](../../reference-1.0.3.html#map-setview), which also sets the map center
|
203
|
+
* [`flyTo(center, zoom)`](../../reference-1.0.3.html#map-flyto), like `setView` but with a smooth animation
|
204
|
+
* [`zoomIn()` / `zoomIn(delta)`](../../reference-1.0.3.html#map-zoomin), zooms in `delta` zoom levels, `1` by default
|
205
|
+
* [`zoomOut()` / `zoomOut(delta)`](../../reference-1.0.3.html#map-zoomout), zooms out `delta` zoom levels, `1` by default
|
206
|
+
* [`setZoomAround(fixedPoint, zoom)`](../../reference-1.0.3.html#map-setzoomaround), sets the zoom level while keeping a point fixed (what scrollwheel zooming does)
|
207
|
+
* [`fitBounds(bounds)`](../../reference-1.0.3.html#map-fitbounds), automatically calculates the zoom to fit a rectangular area on the map
|
208
|
+
|
209
|
+
|
210
|
+
## Fractional zoom
|
211
|
+
|
212
|
+
A feature introduced in Leaflet 1.0.0 was the concept of <em>fractional zoom</em>.
|
213
|
+
Before this, the zoom level of the map could be only an integer number (`0`, `1`, `2`, and so on);
|
214
|
+
but now you can use fractional numbers like `1.5` or `1.25`.
|
215
|
+
|
216
|
+
Fractional zoom is disabled by default. To enable it, use the
|
217
|
+
[map's `zoomSnap` option](http://leafletjs.com/reference-1.0.3.html#map-zoomsnap).
|
218
|
+
The `zoomSnap` option has a default value of `1` (which means that the zoom level
|
219
|
+
of the map can be `0`, `1`, `2`, and so on).
|
220
|
+
|
221
|
+
If you set the value of `zoomSnap` to `0.5`, the valid zoom levels of the map
|
222
|
+
will be `0`, `0.5`, `1`, `1.5`, `2`, and so on.
|
223
|
+
|
224
|
+
If you set a value of `0.1`, the valid zoom levels of the map will be `0`, `0.1`,
|
225
|
+
`0.2`, `0.3`, `0.4`, and so on.
|
226
|
+
|
227
|
+
The following example uses a `zoomSnap` value of `0.25`:
|
228
|
+
|
229
|
+
```
|
230
|
+
var map = L.map('map', {
|
231
|
+
zoomSnap: 0.25
|
232
|
+
});
|
233
|
+
```
|
234
|
+
|
235
|
+
{% include frame.html url="example-fractional.html" %}
|
236
|
+
|
237
|
+
As you can see, Leaflet will only load the tiles for zoom levels `0` or `1`, and will scale them
|
238
|
+
as needed.
|
239
|
+
|
240
|
+
Leaflet will <em>snap</em> the zoom level to the closest valid one. For example,
|
241
|
+
if you have `zoomSnap: 0.25` and you try to do `map.setZoom(0.8)`, the zoom will
|
242
|
+
snap back to `0.75`. The same happens with `map.fitBounds(bounds)`, or when ending
|
243
|
+
a pinch-zoom gesture on a touchscreen.
|
244
|
+
|
245
|
+
`zoomSnap` can be set to zero. This means that Leaflet will <strong>not</strong>
|
246
|
+
snap the zoom level.
|
247
|
+
|
248
|
+
There is another important map option related to `zoomSnap`: [the `zoomDelta` option](http://leafletjs.com/reference-1.0.3.html#map-zoomdelta).
|
249
|
+
This controls how many zoom levels to zoom in/out when using the zoom buttons
|
250
|
+
(from the default [`L.Control.Zoom`](http://leafletjs.com/reference-1.0.3.html#control-zoom))
|
251
|
+
or the `+`/`-` keys in your keyboard.
|
252
|
+
|
253
|
+
For the mousewheel zoom, the [`wheelPxPerZoomLevel`](http://leafletjs.com/reference-1.0.3.html#map-wheelpxperzoomlevel)
|
254
|
+
option controls how fast the mousewheel zooms in our out.
|
255
|
+
|
256
|
+
Here is an example with `zoomSnap` set to zero:
|
257
|
+
|
258
|
+
```
|
259
|
+
var map = L.map('map', {
|
260
|
+
zoomDelta: 0.25,
|
261
|
+
zoomSnap: 0
|
262
|
+
});
|
263
|
+
```
|
264
|
+
|
265
|
+
Try the following, and see how the zoom level changes:
|
266
|
+
|
267
|
+
* Pinch-zoom if you have a touchscreen
|
268
|
+
* Zoom in/out with your mousewheel
|
269
|
+
* Do a box zoom (drag with your mouse while pressing the `shift` key in your keyboard)
|
270
|
+
* Use the zoom in/out buttons
|
271
|
+
|
272
|
+
{% include frame.html url="example-delta.html" %}
|
273
|
+
|
274
|
+
|
275
|
+
That concludes this tutorial. Now play with your zoom levels in your maps!
|