Commit Graph

48 Commits

Author SHA1 Message Date
Tim Schaub e9a30c5cb7 Use standard tile coords 2018-11-21 11:14:17 -07:00
Marc Jansen 685b46f1e3 Named exports from tilecoord 2018-02-15 18:04:51 +01:00
Tim Schaub 9ed3881f34 Named exports from ol/tilegrid 2018-02-09 09:30:16 -07:00
Tim Schaub ad62739a6e Use blocked scoped variables
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
2018-01-12 00:50:30 -07:00
Frederic Junod 297c9e45ab Rename _ol_tilegrid_TileGrid_ to TileGrid 2017-12-22 10:56:20 +01:00
Frederic Junod 3cc63c4767 Named export for ol/tileurlfunction
And change module name from ol/TileUrlFunction to ol/tileurlfunction
2017-12-17 18:32:43 +01:00
Tim Schaub 7f47883c48 Transformed 2017-12-12 06:53:18 -07:00
Tim Schaub b44db8eb26 Missing require in tileurlfunction.test.js 2017-08-18 16:53:46 -04:00
Tim Schaub a3e3e99baa Get rid of useless test exports 2017-08-17 15:16:58 -04:00
Frederic Junod 3e95c424ab Don't use deprecated sinon.stub(obj, 'meth', fn)
Code updated using https://github.com/hurrymaplelad/sinon-codemod
2017-03-08 15:37:46 +01:00
Frederic Junod 2591f61fd3 Allow more than one digit range in ol.TileUrlFunction.expandUrl
To be able to have number range like `{9-13}`
2016-09-15 08:44:22 +02:00
Tim Schaub 004cf15222 Add some missing test requires 2016-08-12 10:53:48 -06:00
Tim Schaub 789aeb1c64 Toward a fix for ol.tilegrid 2016-08-08 10:22:28 -06:00
Tim Schaub ed5dbd1293 Put test requires on top 2016-08-08 09:58:11 -06:00
Peter Robins f57065c412 Remove unneeded goog.provides/requires for typedefs
In general, typedefs do not need and should not have goog.require/provide
2016-05-09 13:21:25 +00:00
Tim Schaub abd0d66e66 Lint-free tileurlfunction.test.js 2016-01-11 18:56:06 -08:00
Andreas Hocevar 8248ec63ba Fix {-y} template calculation for custom (TMS) tile grids
Previously, {-y} only worked for the standard web mercator tile grid. Now
a tile grid with an extent is required (which we get from
ol.tilegrid.createXYZ() anyway), and then the y calculation for TMS style
tile grids works as expected.
2015-09-30 09:07:55 +02:00
Andreas Hocevar af319c259b Do not transform tile coordinates for tileUrlFunction 2015-06-19 18:34:09 +02:00
Andreas Hocevar 6a4d1c9b89 Pass transformed tile coordinates to the tileUrlFunction 2015-06-12 09:45:03 +02:00
Éric Lemoine ba035abb1f Change ol.TileCoord to an Array 2014-08-18 09:33:24 +02:00
Andreas Hocevar 410b274b6a Add unit test for greedy template replacement 2014-08-07 12:18:03 +02:00
Frederic Junod 9b5512c065 Allow '{-y}' placeholder 2014-04-14 14:27:18 +02:00
Tom Payne 807bf757af Remove unused ol.TileUrlFunction.createFromParamsFunction 2014-01-09 15:27:56 +01:00
Éric Lemoine e14d8add85 Add gutter support to TileUrlFunction 2013-12-12 10:59:31 +01:00
Frederic Junod a1a7e21f92 Redefine ol.Size to be Array.<number> 2013-06-01 10:22:06 +02:00
Tom Payne 46553c719c Rename ol.projection to ol.proj 2013-05-30 18:55:58 +02:00
Tom Payne efccede678 Use eql instead of equalArray 2013-04-30 18:21:58 +02:00
Éric Lemoine e128bab625 Do not pass tile grid to getTile and tileUrlFunc
getTile and the tileUrlFunc are functions of the source, so they do need to be passed the tile grid. The tile source knows its tile grid, and can get the projection's tile grid if it doesn't have a tile grid.
2013-04-02 11:12:43 +02:00
ahocevar 5719160155 Less context
This change removes all changes that were anticipated here for
WMS GetFeatureInfo handling, including the IWMS interface and
the goog.provide for 'ol.tilegrid'. I'll create a separate pull
request for WMS GetFeatureInfo eventually, taking into account
the suggestions from the discussion in #402.
2013-03-20 13:41:36 +01:00
ahocevar 57fdd78a19 Fixing requires 2013-03-20 10:55:58 +01:00
ahocevar 46ca98e484 More context for url functions
With this change, url functions are called in the scope of the
source they are configured for. This allows us to simplify the
url function generation for WMS, using a more generic
createFromParamsFunction factory, and the source's new params
member.

Note that there is also a new url member for WMS sources. This
is the WMS base url (the first one in case there is an array of
urls for faster tile access). This can be used for accessing
other WMS services (especially GetFeatureInfo).
2013-03-20 10:45: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
Tobias Bieniek 89ab68cde7 Replaced jasmine testing framework by mocha, expect.js and sinon
as discussed in #319
2013-03-13 04:32:43 +01:00
Tom Payne afcbec469a Rename ol.projection.getFromCode to ol.projection.get 2013-03-07 13:29:39 +01:00
ahocevar 4bb521db65 WMS GetMap request parameters shall be params
To avoid surprises, we configure everything that is a WMS GetMap
request parameter in the params object, and not as direct
configuration option. This affects the VERSION and TRANSPARENT
params.
2013-03-05 10:54:33 +01:00
ahocevar 66b790294d Merge branch 'master' of github.com:openlayers/ol3 into wms-improvements
Conflicts:
	src/ol/source/tiledwmssource.js
	test/spec/ol/tileurlfunction.test.js
2013-03-05 00:55:52 +01:00
ahocevar 586f393492 Support tile sources without configured projection
This change adds a lot of flexibility to working with tile
layers: Sources where the server projection or tile grid do not
matter can now be constructed without specifying a projection or
tile grid.

The tileUrlFunction/imageUrlFunction now also creates updated
URLs when the params of the layer change, so things like
mergeNewParams in ol2 will be possible.

A nice side effect of this whole change is that there is no more
duplicated code between tiled and single image WMS layers.

While I was at it, I also fixed a WMS 1.1.1 axis order issue
and incorrect STYLES params (STYLES=& instead of STYLES&).
2013-03-05 00:46:58 +01:00
Tom Payne f6fe7bd36c Make spec indentation pass strict mode 2013-03-04 20:47:20 +01:00
Bruno Binet bf325c38b4 Fix tests related to createBboxParam. 2013-03-03 20:43:46 +01:00
Tom Payne fcc620af7d Separate ol.projection module from ol.Projection class 2013-03-03 13:09:13 +01:00
Tom Payne 66e5b1d736 Cope with axis orientation for tiled WMS sources 2013-03-03 12:22:24 +01:00
Éric Lemoine b6ed5f2164 Use namespaces for tests
With this commit test files provide namespaces (using goog.provide). This fixes the issue reported by @bartvde where goog objects cannot be used in Jasmine "describe" functions. It also frees us from having to add script tags for the test files in test/ol.html.
2013-01-31 10:18:21 +01:00
Éric Lemoine dd014a3b79 Avoid unneeded parameter concatenations (thanks @twpayne, refs #85) 2012-11-04 19:31:20 +01:00
Éric Lemoine 529c3e8b6a Add ol.TileUrlFunction.createBboxParam 2012-11-03 22:55:54 +01:00
Éric Lemoine b2c71ed269 Add tests showing more usages of createFromTemplate 2012-11-03 00:43:46 +01:00
Tom Payne 228e5a8dbf Move requires to end of the file to ensure tests run even if goog.require fails 2012-09-26 19:40:16 +02:00
Éric Lemoine 94f2f85195 Jasmine tests for ol.TileUrlFunction 2012-09-24 23:39:50 +02:00