Commit Graph
45 Commits
Author SHA1 Message Date
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 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