Commit Graph

70 Commits

Author SHA1 Message Date
Tim Schaub 054af09032 Make code prettier
This updates ESLint and our shared eslint-config-openlayers to use Prettier.  Most formatting changes were automatically applied with this:

    npm run lint -- --fix

A few manual changes were required:

 * In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import.
 * In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason.  While editing this, I reworked `ExampleBuilder` to be a class.
 * In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument.
2020-04-06 12:54:09 -06:00
mike-000 1416e30127 Add maxResolution option to createXYZ()
include maxResolution in options test
2020-02-17 18:20:50 +00:00
Tim Schaub e9a30c5cb7 Use standard tile coords 2018-11-21 11:14:17 -07:00
Frederic Junod 6006a9d9b5 Allow unprefixed WMTS tileMatrix identifiers
`ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet` fails when tileMatrix identifiers
are not prefixed by their tileMatrixSet identifier.

Original code by @filipheymans
2018-04-19 11:48:42 +02:00
Nicholas L 7097b530f3 Rename extent 2018-02-19 20:33:03 +13:00
Tim Schaub 9ed3881f34 Named exports from ol/tilegrid 2018-02-09 09:30:16 -07:00
Tim Schaub 6701d19a45 Named exports from ol/proj/epsg3857 2018-02-07 12:44:02 -07:00
Frederic Junod 106fe3c138 Rename _ol_format_WMTSCapabilities_ to WMTSCapabilities 2018-01-15 10:26:36 +01: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
Tim Schaub aa89746c47 Rename _ol_proj_Projection_ to Projection 2018-01-11 13:33:41 -07:00
Frederic Junod 297c9e45ab Rename _ol_tilegrid_TileGrid_ to TileGrid 2017-12-22 10:56:20 +01:00
Frederic Junod 7617e4e377 Rename _ol_source_WMTSRequestEncoding_ to WMTSRequestEncoding
And add named export for `createFromCapabilitiesMatrixSet` function.
2017-12-22 10:50:23 +01:00
Frederic Junod a7b743da07 Rename _ol_TileRange_ to TileRange 2017-12-18 10:33:41 +01:00
Tim Schaub 6f72ffe498 Named exports from ol/proj 2017-12-14 13:08:40 +01:00
Andreas Hocevar 5a4887e300 Remove default export from ol/extent 2017-12-13 22:05:10 +01:00
Tim Schaub f2752eb01e Common tilegrid exports 2017-12-12 16:53:57 -07:00
Tim Schaub 87295a74dd Use named exports from ol/index.js 2017-12-12 12:34:23 -07:00
Tim Schaub 8a9bbd6264 Separate example scripts for dev and prod 2017-12-12 06:56:19 -07:00
Tim Schaub 7f47883c48 Transformed 2017-12-12 06:53:18 -07:00
Tim Schaub eb31b75caa Fast path for child range when zoom factor is 2 2017-09-02 20:37:33 -06:00
Tim Schaub 5e6a4e8cb7 Avoid unnecessary calls to tileGrid.getZForResolution() 2017-09-02 14:34:08 -06:00
Tim Schaub a3e3e99baa Get rid of useless test exports 2017-08-17 15:16:58 -04:00
Marc Jansen d0ef05977b Autofix indentation issues (eslint --fix) 2017-06-19 11:58:00 +02:00
Tim Schaub 6d22119425 One provide per proj module 2016-12-04 12:44:04 -08:00
Thomas Tilak 1f04a0aad9 adds TileMatrixSetLimits to WMTS format reader
enhance wmtstilegrid to use it when building matrixId and resolution arrays
2016-11-23 18:50:24 +01:00
greenkeeperio-bot 71ebed07bf chore(package): update eslint to version 3.9.1
https://greenkeeper.io/
2016-11-01 11:51:06 +01:00
Peter Robins 8cabff9b7d Remove tilerange assert from tilegrid/wmts 2016-08-13 17:38:35 +00: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
Tim Schaub 97d403784d Move tilegrid files so they are named like their provides 2016-08-07 10:49:11 -06:00
Frederic Junod 87295a0c73 Remove extra goog.require 2016-08-04 09:09:09 +02:00
Andreas Hocevar 34d5cc228e Merge pull request #5429 from probins/testenums
Remove enums from tests
2016-07-15 09:12:58 +02:00
Andreas Hocevar bc506389fc Use forEachTileCoord name instead of forEachTileCoordInExtentAndZ 2016-06-23 14:27:21 +02:00
Andreas Hocevar 14cecb7163 Add function to iterate over tile coordinates in extent and z 2016-06-22 18:05:18 +02:00
Peter Robins 06fd92353b Remove enums from tests 2016-06-03 11:10:46 +00: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
Andreas Hocevar f7147960a9 Add render options for vector tile layers 2016-04-19 13:04:38 +02:00
Andreas Hocevar d0eb6322c3 Cleanup after goog.array, goog.object and goog.isDef removal 2016-02-05 14:52:52 +01:00
Tim Schaub 8ab5a338b5 Unused origins 2016-01-11 18:56:06 -08: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 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
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
Marc Jansen eca09cba1d Add basic test for ol.tilegrid.Zoomify 2015-04-13 21:13:27 +02: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
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