Commit Graph
95 Commits
Author SHA1 Message Date
Bruno Binet c11193f71d Use Vienna wmts in wmts-from-capabilities example
vienna wmts capabilities url is:
http://maps.wien.gv.at/wmts/1.0.0/WMTSCapabilities.xml
2013-03-21 14:03:09 +01:00
Bruno Binet 7fec1f5208 ArcGis use camelcase 'Style', not lowercase 'style'
The OGC documentation is not so clear if we should use style or Style.
2013-03-21 11:15:35 +01:00
Bruno Binet 932c284a2e ArcGis use RESTful
The OGC documentation is not clear if we should use REST or RESTful.
2013-03-21 11:15:35 +01:00
Bruno Binet 7038ac0c81 Merge pull request #356 from bbinet/issue-356
Can't parse http://maps.wien.gv.at/wmts/1.0.0/WMTSCapabilities.xml
2013-03-21 02:10:56 -07:00
Bruno Binet 641e492c95 Update social links in wmts-capabilities example 2013-03-20 15:25:45 +01:00
Bruno Binet b0c4977811 Add exportSymbol for ol.projection.addCommonProjections 2013-03-20 14:39:14 +01:00
Bruno Binet 30a2b4187c The same projection can be added more than once
So that addCommonProjections can be safely called in our examples.
2013-03-20 14:39:14 +01:00
Bruno Binet 48e142d3f0 Fix wmts-capabilities example
the parsing of the wmts getCapabilities document require proj4js.

Also initialize common ol3 projections with ol.projection.addCommonProjections
so that it won't try to get EPSG:3857 from proj4js.
2013-03-20 14:39:14 +01:00
Bruno Binet e6450dc313 Add new equivalent projections
for both EPSG:4326 and EPSG:3857.
2013-03-20 14:39:14 +01:00
Bruno Binet c1db1cd491 Use correct namespaceURI for WGS84BoundingBox reader
(closes #356)
2013-03-20 14:39:14 +01:00
Bruno Binet 07fb27db2c Merge pull request #370 from bbinet/fix-missing-requires
Fix check for missing goog.require directives
2013-03-18 08:16:43 -07:00
Bruno Binet 28155a4147 Fix check for missing goog.require directives
Take this example:
```
goog.require('ol.projection.addCommonProjections');

ol.projection.addCommonProjections();
```

Without this patch, the build_check_requires_timestamp target would report
that ``ol.projection`` is missing.
This is because ``ol.projection.addCommonProjections();`` would match both
``ol.projection.addCommonProjections and ``ol.projection`` provide
directives.
2013-03-14 15:22:00 +01:00
Bruno Binet 68714e73c3 Merge pull request #369 from bbinet/fix-unusedrequires
Remove unused goog.require directives
2013-03-14 07:21:28 -07:00
Bruno Binet 6cf20ef82f Remove unused goog.require directives
See #367.
2013-03-14 14:57:21 +01:00
Bruno Binet 81089b2199 Remove unused goog.require directives 2013-03-14 12:39:51 +01:00
Bruno Binet 15ce80f42e Merge pull request #364 from bbinet/fix-check-requires
Fix check for unused goog.require directives
2013-03-14 04:29:41 -07:00
Bruno Binet 9b1c389c80 Remove unused goog.require directives 2013-03-14 11:39:43 +01:00
Bruno Binet 1eabd7f4e6 Fix check for unused goog.require directives 2013-03-14 11:30:05 +01:00
Bruno Binet 7d675b73b4 Merge pull request #361 from bbinet/factorize-expandurl-code
Factorize code that expand a template url into multiples urls
2013-03-13 09:47:17 -07:00
Bruno Binet 317676a68f Homogenize wmts tileUrlFunction relative to other sources 2013-03-13 16:52:54 +01:00
Bruno Binet 5eaf4baaa4 Try to expand single url for TiledWMS source 2013-03-13 16:52:54 +01:00
Bruno Binet 875ead58ab Remove expandUrl duplicated code from createFromTemplate
and make use of expandUrl function instead.
2013-03-13 16:52:54 +01:00
Bruno Binet 54dfca3419 Move factorizable code in ol.TileUrlFunction.expandUrl 2013-03-13 16:48:22 +01:00
Bruno Binet 19acefc6d9 Merge pull request #359 from bbinet/useTile-consistent
Be more consistent with useTile parent method
2013-03-13 01:50:54 -07:00
Bruno Binet 86c05b4d21 Be more consistent with useTile abstract method 2013-03-12 17:58:29 +01:00
Bruno Binet 837aa7512b Merge pull request #342 from bbinet/wmts
Add WMTS support.
2013-03-11 08:05:25 -07:00
Bruno Binet 61603dacce WMTS from swisstopo now supports CORS headers 2013-03-11 15:47:42 +01:00
Bruno Binet d14b1c57a9 Remove ImageLayer from wmts-from-capabilities example 2013-03-11 15:15:53 +01:00
Bruno Binet 8638f6d502 s/meters_per_unit/metersPerUnit/ 2013-03-11 15:05:53 +01:00
Bruno Binet 9e370bf6af Implement ol.source.WMTS.optionsFromCapabilities
and remove related ol.source.WMTS.createFromCapabilities function.
2013-03-11 12:42:14 +01:00
Bruno Binet 6f83e50332 Load EPSG:21781 definition from cdnjs. 2013-03-11 11:48:06 +01:00
Bruno Binet c67e67ee12 Single tileUrlFunction in createFromTileUrlFunctions
In that case, simply return the single tileUrlFunction.
2013-03-11 11:29:40 +01:00
Bruno Binet b4cbe0609a Add missing exports
so that wmts-from-capabilities example works.
2013-03-11 10:42:38 +01:00
Bruno Binet 14d5916e67 Add wmts-from-capabilities example
it demonstrates how to create a wmts source by retrieving its configuration
from a wmts getCapabilities.
2013-03-11 10:42:38 +01:00
Bruno Binet 13d0b36a08 Add a ol.source.WMTS.createFromCapabilities function
so that we can create a wmts source directly from a getCapabilities response
(parsed by the wmts parser)
2013-03-11 10:42:37 +01:00
Bruno Binet dc440a6604 Ensure supportedCRS property won't be renamed
this property was renamed when using wmts parser when built with
ADVANCED_OPTIMIZATIONS
2013-03-11 10:42:37 +01:00
Bruno Binet 0f9f5a25ae Export methods methods for ol.Extent
so that wmts example work (it makes use of extent.getTopLeft() method)
2013-03-11 10:42:37 +01:00
Bruno Binet 56ffb6146d Add example for WMTS source 2013-03-11 10:42:37 +01:00
Bruno Binet 877ce3adcf Add a WMTS source 2013-03-11 10:42:37 +01:00
Bruno Binet 6d78a8340a Add a WMTS tilegrid 2013-03-11 10:42:37 +01:00
Bruno Binet 35b6d805df Merge pull request #307 from bbinet/null-extent
Check for not null extent
2013-03-07 02:06:18 -08:00
Bruno Binet 41408c0909 Extent cannot be undefined here but it can be null
so we now use !goog.isNull(extent) instead of goog.isDef(extent)
2013-03-07 10:54:06 +01:00
Bruno Binet 129f2bbcb0 Merge pull request #305 from bbinet/check-isglobal
Do not wrap dateline if projection.isGlobal() is false
2013-03-07 01:42:18 -08:00
Bruno Binet 48c84aaf69 Do not wrap dateline if projection.isGlobal() is false 2013-03-07 02:07:00 +01:00
Bruno Binet 7f9e327a65 Merge pull request #304 from bbinet/projection-improvements
Some projection improvements
2013-03-06 16:53:14 -08:00
Bruno Binet 1e050fe25f Add global=true for both EPSG:4326 and EPSG:3857 2013-03-07 01:36:42 +01:00
Bruno Binet 4415f8ac74 Add test for ol.projection.configureProj4jsProjection 2013-03-07 01:36:41 +01:00
Bruno Binet b6d57894b4 Add configureProj4jsProjection function
so that we can add extent and global parameter to proj4js projections.
And remove setExtent method which is not relevant.
2013-03-07 01:36:41 +01:00
Bruno Binet 0e53a3f3c9 ol.Proj4jsProjection_ now takes a single argument 2013-03-07 01:36:40 +01:00
Bruno Binet 9d88273161 ol.Projection now takes a single argument
which is called ol.ProjectionOptions.
2013-03-07 01:36:39 +01:00
Bruno Binet 8dd3093f4c Add information on wether the projection is global
so that we know if we can wrap the dateline.
2013-03-07 01:36:39 +01:00
Bruno Binet a10cae6117 Merge pull request #301 from bbinet/projection-setextent
Add a setExtent method to ol.Projection
2013-03-06 09:46:07 -08:00
Bruno Binet 93ae4256eb Add a setExtent method to ol.Projection 2013-03-06 17:53:51 +01:00
Bruno Binet d1762a06f8 Merge pull request #290 from bbinet/projection_stuff
Add a getMetersPerUnit instance method to ol.Projection class
2013-03-06 08:50:47 -08:00
Bruno Binet 1ff3c79ff6 Use correct value to convert from foot to meters
(was using value for converting to inches).
Thanks @twpayne
2013-03-06 12:26:30 +01:00
Bruno Binet f4aa08ee90 Use ol.sphere.NORMAL.radius instead of 6378000
to be consistent.
2013-03-06 12:18:37 +01:00
Bruno Binet 097d59c41a Add test for ol.Projection getMetersPerUnit method 2013-03-06 10:33:03 +01:00
Bruno Binet 1803e7b28d Add getMetersPerUnit instance method to ol.Projection 2013-03-06 10:32:45 +01:00
Bruno Binet 1f30f693b6 Merge pull request #288 from bbinet/projection_stuff
Find proj4js projection even if code is different than srs.
2013-03-06 01:06:38 -08:00
Bruno Binet bb1cf45c0a Add Proj4js.Proj.srsCode property to Proj4js externs 2013-03-06 02:38:03 +01:00
Bruno Binet 382022bdb5 Add defaultNamespaceURI and errorProperty properties for WMTS.
Thanks @bartvde.
2013-03-06 02:20:10 +01:00
Bruno Binet f1b72a10bc Tests for cached proj4js projections. 2013-03-06 01:59:35 +01:00
Bruno Binet 7d1db48836 Find proj4js projection even if code is different than srs. 2013-03-06 01:57:06 +01:00
Bruno Binet ade4213dd8 Merge pull request #277 from bbinet/fix-wmts-parser
Add defaultNamespaceURI and errorProperty properties for WMTS.
2013-03-05 02:29:23 -08:00
Bruno Binet 8b3cfda963 Add defaultNamespaceURI and errorProperty properties for WMTS.
Thanks @bartvde.
2013-03-05 11:26:46 +01:00
Bruno Binet 874481cae5 Merge pull request #262 from bbinet/wmtsparser-resourceurl
Rework the structure of the WMTS resourceUrls property
2013-03-04 08:34:10 -08:00
Bruno Binet 80509a6a62 Fix tests relative to the WMTS resourceUrl(s) object 2013-03-04 17:16:49 +01:00
Bruno Binet 4baf397f77 Rework the structure of the resourceUrls object
and remove duplicated resourceUrl object.
2013-03-04 17:14:16 +01:00
Bruno Binet cedba8cd60 Merge pull request #258 from bbinet/tilegrid-tilesizes
Add support for multiple tileSizes in the tilegrid
2013-03-03 22:31:33 -08:00
Bruno Binet 07e0fc3a20 Fix tileSize in the canvastilelayerrenderer. 2013-03-04 07:30:33 +01:00
Bruno Binet 93131d6105 Add some tests for the multiple tileSizes in tilegrid. 2013-03-03 20:43:47 +01:00
Bruno Binet bf325c38b4 Fix tests related to createBboxParam. 2013-03-03 20:43:46 +01:00
Bruno Binet 2816e3256c Add support for multiple tileSizes in the tilegrid.
This is needed by WMTS.
2013-03-03 20:43:46 +01:00
Bruno Binet 7c440d087f Ensure we cannot set both origin and origins in the tilegrid 2013-03-03 20:43:46 +01:00
Bruno Binet f7a895a823 Remove unused tileGrid.getTileSize() call. 2013-03-03 20:43:45 +01:00
Bruno Binet 6407b7c1c1 Merge pull request #254 from bbinet/indent-wmscap-example
Better indentation for wms capabilities example
2013-03-03 09:58:16 -08:00
Bruno Binet d754c34a04 Better indentation for wms capabilities example 2013-03-03 18:57:53 +01:00
Bruno Binet 7454314578 Merge pull request #253 from bbinet/gitignore
Ignore ol-simple.js and ol-whitespace.js generated files
2013-03-03 08:59:26 -08:00
Bruno Binet 88335da8de Ignore ol-simple.js and ol-whitespace.js generated files 2013-03-03 17:55:53 +01:00
Bruno Binet 302ba3a8e1 Merge pull request #248 from bbinet/prefer-canvas
Prefer the canvas renderer over dom.
2013-03-03 06:19:12 -08:00
Bruno Binet 0a462f1254 Prefer the canvas renderer over dom. 2013-03-03 15:11:27 +01:00
Bruno Binet 9053e1dfc8 Merge pull request #237 from bbinet/tilegrid_extent_cleanup
Remove extent property from ol.tilegrid.TileGridOptions
2013-03-03 02:20:52 -08:00
Bruno Binet 4bdf59bc6b Remove extent property from ol.tilegrid.TileGridOptions
This follows tilegrid extent_ property removal from #216.
2013-03-02 10:36:11 +01:00
Bruno Binet 6e08f5ef1b Merge pull request #216 from bbinet/remove_tilegrid_extent
Remove tilegrid extent_ property
2013-02-19 08:59:06 -08:00
Bruno Binet 0835fd6b0a Remove tile grid extent_ property
This is never used in ol3.
2013-02-19 17:22:24 +01:00
Bruno Binet a64e4ae579 Merge pull request #164 from bbinet/kinetic
Add support for kinetic effect while dragging
2013-01-30 06:26:01 -08:00
Bruno Binet d2f30986db Set kinetic getDuration instance method to @private 2013-01-30 14:46:49 +01:00
Bruno Binet dff8c2b2b2 Renaming to be more consistent with ol3 style
s/v_0/initialVelocity/
s/v_min/minVelocity/
2013-01-30 14:46:49 +01:00
Bruno Binet d91e1d30d4 Get rid of binarySelect to find the first point. 2013-01-30 14:46:49 +01:00
Bruno Binet 79849888db Kinetic now returns directly the pre-render function
instead of returning the kinetic easing function only.

(thanks @fredj)
2013-01-29 15:34:11 +01:00
Bruno Binet 2bb8a5cfd9 Stop current kinetic animation on DOWN events 2013-01-29 14:32:38 +01:00
Bruno Binet 39cbba3eb7 Add a frameState property to ol.MapBrowserEvent
so that we will be able to retrieve the current center of the view2d from the
framestate in the dragpan interaction.
2013-01-29 13:00:02 +01:00
Bruno Binet d54864695d Add a removePreRenderFunction method to ol.Map
This will remove the pre-render function from preRenderFunctions_ array if
found.
2013-01-29 12:56:15 +01:00
Bruno Binet 7d0b4c757e Activate kinetic effect by default 2013-01-29 12:39:52 +01:00
Bruno Binet 8a9738d755 Add support for kinetic effect while dragging.
Only dragpan interaction is supported for now.

The kinetic effect use the maths below (thx @twpayne):

Rate of decay (number, must be negative) = α
Minimum velocity (pixels/millisecond) = v_min
Initial velocity (pixels/millisecond) = v₀

Velocity at time t (pixels/millisecond) =
    α⋅t
v₀⋅ℯ

Distance travelled at time t (pixels) =
   ⎛ α⋅t    ⎞
v₀⋅⎝ℯ    - 1⎠
─────────────
      α

Duration of animation (milliseconds) =
   ⎛v_min⎞
log⎜─────⎟
   ⎝  v₀ ⎠
──────────
    α

Total distance travelled (pixels) =
-v₀ + v_min
───────────
     α

Easing function =
   ⎛ α⋅duration⋅t    ⎞
v₀⋅⎝ℯ             - 1⎠
──────────────────────
     -v₀ + v_min
2013-01-29 12:39:52 +01:00