Commit Graph

130 Commits

Author SHA1 Message Date
Frederic Junod 9e2a393426 Remove use of goog.array.map 2015-09-29 10:54:55 +02:00
Tim Schaub f746cb7f57 Use ol.math.clamp() 2015-09-27 12:26:21 -06:00
Tim Schaub 83c59ee255 Inline goog.isDef() calls for properties 2015-09-27 10:40:20 -06:00
Tim Schaub e3951fa3c6 Inline simple goog.isDef() calls 2015-09-27 10:34:44 -06:00
Tim Schaub 3a0683f373 Inline !goog.isDef() property checks 2015-09-27 10:24:38 -06:00
Tim Schaub b36d697585 Inline goog.isDef() property checks 2015-09-27 10:21:50 -06:00
Andreas Hocevar e6f5c2a008 Cleanup and example updates 2015-06-19 18:34:19 +02:00
Andreas Hocevar 31cfa0d952 Make tile range calculation work with arbitrary origins 2015-06-19 18:34:19 +02:00
Andreas Hocevar a753d282cc Use top-left corner of extent for all generated tile grids 2015-06-19 18:34:18 +02:00
Andreas Hocevar e3a8dc89de Fix calculation of tile coord from coordinate
Tile coord calculation was wrong in the case of reverseIntersectionPolicy
for y coords, and for extents with +/- Infinity.
2015-06-19 18:34:18 +02:00
Andreas Hocevar af319c259b Do not transform tile coordinates for tileUrlFunction 2015-06-19 18:34:09 +02:00
Andreas Hocevar 4b3aac32c3 Return transformed tile coordinates from ol.TileGrid's API methods 2015-06-12 09:47:32 +02:00
Andreas Hocevar 6a4d1c9b89 Pass transformed tile coordinates to the tileUrlFunction 2015-06-12 09:45:03 +02:00
Guillaume Beraudo 361d83dc73 Mark tilegrid.createTileCoordTransform() @api
Necessary since the removal of tilegridXYZ type.
2015-06-04 09:24:35 +02:00
Andreas Hocevar 5d9708be11 Add tests 2015-06-03 12:41:35 +02:00
Andreas Hocevar 5ae2521724 Make tileCoordTransform configurable
Instead of using the static createOriginTopLeftTileCoordTransform
function, the correct transform is now a non-API config option of the tile
grid.
2015-05-31 22:22:41 +02:00
Andreas Hocevar f40aa54c18 Use the correct TileCoord transform function 2015-05-22 09:19:59 +02:00
Andreas Hocevar b05193fa45 Replace ol.tilegrid.XYZ with an ol.tilegrid.createXYZ function 2015-05-05 18:52:33 +02:00
Andreas Hocevar a116878a57 Allow extents to restrict tile ranges requested from the server
The addition of full extent tile ranges also allows us to simplify wrapX
handling for tile layers. By limiting wrapX to true and false as possible
values, we can remove a lot of guessing logic.
2015-05-05 18:52:33 +02:00
Andreas Hocevar 700903ca5c Add tests for ol.tilegrid.TileGrid
These tests are taken from ol.tilegrid.XYZ, to make sure that
ol.tilegrid.TileGrid works the same way. The additional tests show that the
#getTileCoordForXYAndResolution_() method do not handle coordinates at
tile boundaries properly, so this is fixed.
2015-05-05 18:52:32 +02:00
Andreas Hocevar 4cad17f839 Do not return a null tileSize 2015-04-16 15:32:35 +02:00
Andreas Hocevar 509a661fda Reference ol.size.toSize() 2015-04-15 08:40:20 +02:00
Andreas Hocevar 0d53edfa21 Get rid of ol.tilegrid.DEFAULT_TILE_SIZE 2015-04-14 23:16:29 +02:00
Andreas Hocevar 2b75341068 Add support for non-square tiles 2015-04-14 22:54:57 +02:00
Tim Schaub 02c4c8b360 Tile grid docs 2015-04-04 17:38:02 +02:00
Marc Jansen fb9ba22c30 Add message to assertions. 2015-03-30 22:53:03 +02:00
Andreas Hocevar ebb40c8046 Clean up docs and consistently work with resolutions 2015-03-24 19:03:33 +01:00
Andreas Hocevar 4822ca273f Give tile grids a width 2015-03-24 19:03:09 +01:00
Éric Lemoine 79748c6f0c Fix ol.tilegrid.TileGrid#getZForResolution
This fixes a bug in ol.tilegrid.TileGrid#getZForResolution where this function doesn't take minZoom and maxZoom into account when selecting a zoom level for a resolution.

Fixes #2780.
2015-03-23 18:04:13 +01:00
Andreas Hocevar 3e18b85206 Add ol.source.Tile support for wrapping around the x-axis 2015-03-22 14:27:19 +01:00
Sara Metz 6894bc8444 Add ability to get wmts source from capabilities
Added functionality to create a wmts tilegrid and wmts source from the
capabilities object created from ol.format.WMTSCapabilities.read().
Added tests for these functions and an example.

Also altered the REST url template replacement to be case insensitive
and added tests for this. This is because the spec uses both style
and Style and both of these are used by existing WMTS services.
2015-02-25 09:21:45 +13:00
Éric Lemoine 4734530ce2 Merge pull request #2973 from s093294/patch-1
Making GetTileCoordFor methods public avaible
2014-12-01 09:05:29 +01:00
Poul Kjeldager Sørensen 1d7bae6b26 Update tilegrid.js 2014-11-30 21:53:42 +01:00
Poul Kjeldager Sørensen b72fddf7f4 Making GetTileCoordFor methods public avaible
I am using tilegrid to request elevation data tiles side by side of a raster layer. It would be nice if these two method was public avaible such I could use the tilegrid to convert mouse coordinates to tile coordinates to request backend tiles. 

The elevation tiles are not shown as a layer directly but rather used to compute and show information in relationship to mouse curser or map view.

This would save me the time of adding another tilegrid implementation in my application specific context.
2014-11-26 01:24:00 +01:00
Éric Lemoine ec01aa45b9 Make createTileCoordTransform return identity func
This makes ol.tilegrid.TileGrid#createTileCoordTransform return the identity function. This makes it possible to use ol.source.TileVector with an ol.tilegrid.TileGrid (as opposed to an ol.tilegrid.XYZ).
2014-11-24 15:19:24 +01:00
Tim Schaub 2ad27044a6 Correctly generate child tile ranges for XYZ
Instead of incrementing and then doubling, calculate the child tile range by doubling and then incrementing.

With this change, tile coord [0, 0, 0] has the four following children:

    [1, 0, 0]    [1, 1, 0]

    [1, 0, 1]    [1, 1, 1]

Without this change, tile coord [0, 0, 0] had the nine following children:

    [1, 0, 0]    [1, 1, 0]    [1, 2, 0]

    [1, 0, 1]    [1, 1, 1]    [1, 2, 1]

    [1, 0, 2]    [1, 1, 2]    [1, 2, 2]
2014-09-28 12:23:12 -06:00
Éric Lemoine 56d4d68459 Mark all WMTS functions/options as experimental 2014-08-27 14:44:21 +02:00
Éric Lemoine b0e87fac76 Add @api stable annotations to ol.tilegrid.WMTS 2014-08-25 11:00:13 +02:00
Éric Lemoine 137d74e5a0 Add @api stable annotations to ol.tilegrid.TileGrid 2014-08-25 11:00:13 +02:00
Tim Schaub 1ede97ae18 Respect the tileSize option for XYZ grids 2014-08-19 10:30:37 -06:00
Tim Schaub ee487ca308 Sources may be configured with a projection, tile grids with an extent
An XYZ tile grid is constructed with an extent defining the bounds of the tile grid.
2014-08-19 10:30:27 -06:00
Tim Schaub e97f79b4ab Respect XYZ source projection 2014-08-18 23:03:33 -06:00
Tim Schaub 63ad916ca7 Function for creating tile grids from extents 2014-08-18 17:10:26 -06:00
Petr Sloup 0ac90e62b9 Added some api annotations required for accessing layer properties 2014-08-18 13:48:14 +02:00
Éric Lemoine ba035abb1f Change ol.TileCoord to an Array 2014-08-18 09:33:24 +02:00
Frederic Junod 14fc16b91d Add ol.TileRange#containsXY function 2014-08-14 10:50:19 +02:00
Tim Schaub 4cf5ab4620 Use @api annotation instead of @todo api 2014-07-05 15:41:14 -04:00
oterral 0fefd680d4 Make ol.tilegrid.TileGrid#getResolutions method exportable 2014-06-25 08:31:45 +02:00
Peter Robins 41d9f0360a Add @classdesc to classes 2014-06-09 12:10:19 -04:00
Tim Schaub e4e3b2229a Defines in ol namespace defined in ol.js 2014-04-30 08:54:30 -06:00