Compare commits

..

408 Commits

Author SHA1 Message Date
Andreas Hocevar
394c338ff8 Update package version to 3.18.2 2016-09-01 16:44:37 +02:00
Andreas Hocevar
a112dd83e2 Changelog for v3.18.2 2016-09-01 16:44:06 +02:00
Andreas Hocevar
c6aef2a7da Merge pull request #5828 from ahocevar/close-polygons
Always close polygon rings
2016-09-01 16:41:21 +02:00
Andreas Hocevar
0b3eed5500 Update package version to 3.18.1 2016-08-29 13:18:04 +02:00
Andreas Hocevar
b98a28857d Changelog for v3.18.1 2016-08-29 13:17:32 +02:00
Andreas Hocevar
a14a348246 Merge pull request #5798 from ahocevar/fix-rotated-circles
Move to 90° along the circle, not 0°
2016-08-29 13:13:23 +02:00
Andreas Hocevar
ffefda132a Merge pull request #5790 from ahocevar/fix-pixelratio
Fix vector tile rotation on HiDPI devices
2016-08-29 13:12:27 +02:00
Andreas Hocevar
92cc26596d Update package version to 3.18.0 2016-08-26 17:56:10 +02:00
Andreas Hocevar
7de3951236 Changelog for v3.18.0 2016-08-26 17:55:57 +02:00
Andreas Hocevar
3fc2b9798e Merge pull request #5782 from ahocevar/ie-tests
Compare URLs in an IE compatible way
2016-08-26 17:25:27 +02:00
Andreas Hocevar
2e7b8dbbca Compare URLs in an IE compatible way 2016-08-26 17:03:21 +02:00
Andreas Hocevar
3e2c7071f8 Merge pull request #5778 from ahocevar/osm-mapzen
Use Mapzen instead of openstreetmap.us tiles
2016-08-26 11:46:58 +02:00
Andreas Hocevar
853fbee1e2 Use Mapzen instead of openstreetmap.us tiles
The openstreetmap.us tile service will be shut down before the end of the
month.
2016-08-26 10:46:12 +02:00
Frédéric Junod
e301ea4bc1 Merge pull request #5774 from openlayers/greenkeeper-glob-7.0.6
Update glob to version 7.0.6 🚀
2016-08-25 17:13:41 +02:00
Andreas Hocevar
457de34485 Merge pull request #5708 from ahocevar/no-closepath
Remove unnecessary closePath() instructions
2016-08-25 17:05:52 +02:00
Andreas Hocevar
65d03bfbfb Bail out when there is no fill and stroke 2016-08-25 16:40:31 +02:00
greenkeeperio-bot
9b46b86680 chore(package): update glob to version 7.0.6
https://greenkeeper.io/
2016-08-25 09:54:00 +02:00
Andreas Hocevar
b7c84b269c Merge pull request #5196 from ahocevar/batch-fill-stroke
Batch polygon and circle fills and strokes
2016-08-24 12:02:52 +02:00
Andreas Hocevar
395793b921 Additional tests and code comments 2016-08-24 11:44:15 +02:00
Andreas Hocevar
2d65ffb8ab Merge pull request #5768 from ahocevar/clip-vector
Enable extent clipping for vector layers
2016-08-23 16:33:34 +02:00
Frédéric Junod
379c092cf4 Merge pull request #4753 from fredj/export_contains
Export ol.geom.Geometry#containsCoordinate function
2016-08-23 16:22:20 +02:00
Andreas Hocevar
8992ee8e73 Entertain the compiler 2016-08-23 15:33:52 +02:00
Andreas Hocevar
f490302959 Enable extent clipping for vector tile layers 2016-08-23 15:20:00 +02:00
Andreas Hocevar
1c73dc9088 Enable extent clipping for vector layers 2016-08-23 15:12:19 +02:00
Frédéric Junod
3fcb0641e4 Merge pull request #5050 from fredj/text_rotateWithView
Add rotateWithView option to ol.style.Text
2016-08-23 14:37:14 +02:00
Frederic Junod
8d1a26dd5b Export ol.geom.Geometry#intersectsCoordinate 2016-08-23 14:36:49 +02:00
Frederic Junod
9074bd9783 Rename ol.geom.Geometry#containsCoordinate to intersectsCoordinate 2016-08-23 14:36:09 +02:00
Frédéric Junod
985dda28eb Merge pull request #5767 from fredj/modify_no_geom
Accept feature without geometry in ol.interaction.Modify
2016-08-23 14:20:11 +02:00
Frédéric Junod
8dac85ad92 Merge pull request #5334 from fredj/examples_https
Load the examples resources with HTTPS
2016-08-23 14:19:48 +02:00
Frederic Junod
bd635ed01f Load the examples resources with HTTPS 2016-08-23 13:52:16 +02:00
Frederic Junod
243f1061df Accept feature without geometry in ol.interaction.Modify 2016-08-23 13:49:43 +02:00
Petr Sloup
9eadf1505a Merge pull request #5766 from klokantech/examples-urls-https-fix
Use HTTPS to access tiles at tileserver.maptiler.com in examples
2016-08-23 13:45:36 +02:00
Frederic Junod
8e95d94f3e Add rotateWithView option to ol.style.Text 2016-08-23 13:26:02 +02:00
Petr Sloup
cf7bed7887 Fix protocol in examples
tileserver.maptiler.com now uses HTTPS
2016-08-23 12:49:00 +02:00
Frédéric Junod
17ebe82577 Merge pull request #5765 from fredj/fewer-render-calls
Force a map render when the view is not updated
2016-08-23 12:29:38 +02:00
Andreas Hocevar
79ded2aa75 Merge pull request #5724 from ahocevar/fix-tilelayer-extent
Fix clipping of the tile layer extent on HiDPI devices
2016-08-23 12:12:40 +02:00
Andreas Hocevar
7e940e618e Introduce new overlaps option for Vector and VectorTile sources
Instead of deciding whether to batch fills and strokes by looking at the
opacity of the style, we now rely on user input.
2016-08-23 12:05:03 +02:00
Andreas Hocevar
eed52552a9 Batch polygon and circle fills and strokes 2016-08-23 12:05:03 +02:00
Andreas Hocevar
208ea171c3 Add test to ensure the correct draw canvas size 2016-08-23 12:01:32 +02:00
Frederic Junod
fe75924941 Force a map render when the view is not updated 2016-08-23 10:57:20 +02:00
Andreas Hocevar
c1daf6f49f Add rendering tests for hidpi layer clipping 2016-08-23 10:55:56 +02:00
Andreas Hocevar
bee94d0d4f Fix drawScale calculation
The goal of using a drawScale was to use the smallest possible canvas (i.e.
one that fits the tile pixel ratio instead of the view pixel ratio) when
composing rotated views. Instead, the drawScale caused a ridiculously
large canvas.
2016-08-23 10:55:56 +02:00
Andreas Hocevar
92e2b72f55 Fix clip extent calculation for tile layers 2016-08-23 10:55:56 +02:00
Bart van den Eijnden
ba4aac72f3 Merge pull request #5764 from bartvde/fewer-render-calls
Remove unnecessary map.render() calls
2016-08-23 10:36:15 +02:00
Tim Schaub
684a551273 Remove extra map.render() calls from mousewheel zoom interaction 2016-08-23 10:23:23 +02:00
Tim Schaub
22add7e431 Remove extra map.render() calls from keyboard zoom interaction 2016-08-23 10:23:23 +02:00
Tim Schaub
1439f14cf3 Remove extra map.render() calls from drag rotate/zoom interaction 2016-08-23 10:23:23 +02:00
Tim Schaub
92e83aebe0 Remove extra map.render() calls from drag rotate interaction 2016-08-23 10:23:23 +02:00
Tim Schaub
5d461fa0e7 Remove extra map.render() calls from drag pan interaction 2016-08-23 10:23:23 +02:00
Andreas Hocevar
3b4e368a00 Merge pull request #5763 from ahocevar/fix-assert
Fix assert namespace
2016-08-23 10:14:37 +02:00
Andreas Hocevar
e62cc6ac47 Fix assert namespace 2016-08-23 09:58:31 +02:00
Andreas Hocevar
c81709bed3 Merge pull request #5616 from ahocevar/fix-mouseonly-type
Fix event type and documentation of ol.events.condition.mouseOnly
2016-08-23 09:46:16 +02:00
Frédéric Junod
0f9a1830b8 Merge pull request #5755 from fredj/5740
Increase the size of the map in ol.layer.Tile rendering tests
2016-08-23 08:30:12 +02:00
Frédéric Junod
7206c0f2f1 Merge pull request #5757 from fredj/cluster_setDistance
Add ol.source.Cluster#setDistance function
2016-08-23 08:29:52 +02:00
Andreas Hocevar
f9a595ed5b Merge pull request #5752 from ahocevar/fix-rotated-replaycontext
Set proper replay canvas size and offset for rotated view
2016-08-22 21:40:29 +02:00
Frederic Junod
f164ad7598 Add ol.source.Cluster#setDistance function 2016-08-22 13:36:44 +02:00
Frederic Junod
e6ba9973f9 Increase the size of the map in ol.layer.Tile rendering tests 2016-08-22 09:03:27 +02:00
Frédéric Junod
f0ca265ad1 Merge pull request #5754 from openlayers/greenkeeper-istanbul-0.4.5
Update istanbul to version 0.4.5 🚀
2016-08-22 09:03:06 +02:00
Frédéric Junod
ef07dc6eff Merge pull request #5727 from fredj/add_missing_goog_require
Add missing goog require
2016-08-22 08:35:06 +02:00
Frédéric Junod
2de2575ead Merge pull request #5273 from fredj/gutter_pixelRatio
Take the pixelRatio into account when computing the gutter
2016-08-22 08:31:00 +02:00
greenkeeperio-bot
fd2cc91482 chore(package): update istanbul to version 0.4.5
https://greenkeeper.io/
2016-08-21 19:43:05 -04:00
Andreas Hocevar
ce50714b85 Merge pull request #5753 from openlayers/greenkeeper-proj4-2.3.15
Update proj4 to version 2.3.15 🚀
2016-08-22 01:42:45 +02:00
greenkeeperio-bot
1c45321e32 chore(package): update proj4 to version 2.3.15
https://greenkeeper.io/
2016-08-21 15:41:58 -04:00
Andreas Hocevar
02daf761f0 Set proper replay canvas size and offset for rotated view 2016-08-21 14:14:37 +02:00
Bart van den Eijnden
4c098e0419 Merge pull request #5741 from bartvde/workshop-i18n
Point to the English workshop
2016-08-17 17:05:30 +02:00
Bart van den Eijnden
ede6fc6e01 Point to the English workshop 2016-08-17 14:17:59 +02:00
Frederic Junod
2fb5e544c2 Take the pixelRatio into account when computing the gutter 2016-08-17 13:33:03 +02:00
Frederic Junod
522398d064 Add missing goog.require('ol.style.Style') 2016-08-17 10:00:36 +02:00
Frederic Junod
d4ad9ad616 Add missing goog.require('ol') 2016-08-17 09:57:21 +02:00
Frederic Junod
793ec85b9d Add missing goog.require('ol.render.canvas') 2016-08-17 09:57:21 +02:00
Frederic Junod
ca7fbc25de Add missing goog.require('ol.asserts') 2016-08-17 09:57:21 +02:00
Frédéric Junod
2489dee519 Merge pull request #5721 from openlayers/greenkeeper-metalsmith-2.2.0
Update metalsmith to version 2.2.0 🚀
2016-08-17 09:08:33 +02:00
Bart van den Eijnden
784be4099e Merge pull request #5733 from adube/fix-uri-appendparams-exclude-null
Fix #5730 - Ignore null/undef. values in uri.appendParams
2016-08-16 14:50:27 +02:00
Alexandre Dubé
d61bdfb20a Add test unit for null|undefined params in ol.uri 2016-08-16 08:30:56 -04:00
Alexandre Dubé
3959e9b76f Fix #5730 - Ignore null/undef. values in uri.appendParams 2016-08-16 08:25:33 -04:00
Tobias Sauerwein
0ffc39e70f Merge pull request #5736 from tsauerwein/resultType-docs
Show `resultType` attribute in docs
2016-08-16 12:40:23 +02:00
tsauerwein
05d91e8825 Show resultType attribute in docs 2016-08-16 11:43:33 +02:00
Frédéric Junod
400818635a Merge pull request #5735 from openlayers/greenkeeper-eslint-3.3.1
Update eslint to version 3.3.1 🚀
2016-08-16 08:30:35 +02:00
Andreas Hocevar
790bfe5a52 Merge pull request #5731 from Benjaki2/master
Added a pixelRatio adjust to the canvasTileLayer 'forEachLayerAtPixel…
2016-08-16 00:17:49 +02:00
greenkeeperio-bot
be422ff9ec chore(package): update eslint to version 3.3.1
https://greenkeeper.io/
2016-08-15 17:52:51 -04:00
Frédéric Junod
bdd177dc1d Merge pull request #5732 from fredj/cleanup
Add missing curly braces in type annotations
2016-08-15 17:16:53 +02:00
Frederic Junod
a5a9ed69eb Add missing curly braces in type annotations 2016-08-15 16:33:33 +02:00
Benjamin
c3b66743fe Added a pixelRatio adjust to the canvasTileLayer 'forEachLayerAtPixel' method
This method was composing a frame that was only accurate for devices
with a pixelRatio of 1. Now the canvas widths and heights are
multiplied beforehand by the pixelRatio. #5601
2016-08-15 10:28:29 -04:00
Frédéric Junod
3dd21af721 Merge pull request #5728 from openlayers/greenkeeper-closure-util-1.15.1
Update closure-util to version 1.15.1 🚀
2016-08-15 16:17:35 +02:00
greenkeeperio-bot
87a1df8eb3 chore(package): update metalsmith to version 2.2.0
https://greenkeeper.io/
2016-08-15 15:54:39 +02:00
Frédéric Junod
8425b6d40b Merge pull request #5717 from openlayers/greenkeeper-phantomjs-prebuilt-2.1.12
Update phantomjs-prebuilt to version 2.1.12 🚀
2016-08-15 15:35:57 +02:00
greenkeeperio-bot
2032632dc6 chore(package): update phantomjs-prebuilt to version 2.1.12
https://greenkeeper.io/
2016-08-15 13:35:26 +02:00
greenkeeperio-bot
f8a2352eff chore(package): update closure-util to version 1.15.1
https://greenkeeper.io/
2016-08-15 07:33:03 -04:00
Andreas Hocevar
be1bec3aa8 Merge pull request #5725 from probins/wmts
Remove tilerange assert from tilegrid/wmts
2016-08-15 09:46:31 +02:00
Frédéric Junod
f799a4b371 Merge pull request #5723 from openlayers/greenkeeper-eslint-3.3.0
Update eslint to version 3.3.0 🚀
2016-08-15 08:45:42 +02:00
Peter Robins
8cabff9b7d Remove tilerange assert from tilegrid/wmts 2016-08-13 17:38:35 +00:00
Tim Schaub
f25fd07a5e Merge pull request #5702 from tschaub/no-missing-requires
Add rule to identify missing requires
2016-08-13 10:32:41 -06:00
Andreas Hocevar
f3c8465e6c Merge pull request #5670 from Benjaki2/master
Added image data value to 'forEachLayerAtPixel' method callback
2016-08-13 14:09:47 +02:00
greenkeeperio-bot
35bb349ece chore(package): update eslint to version 3.3.0
https://greenkeeper.io/
2016-08-12 13:07:46 -06:00
Andreas Hocevar
846a0e5f76 Merge pull request #5720 from probins/patch-1
Fix typo in tilegrid/wmts
2016-08-12 19:27:09 +02:00
Tim Schaub
c0d21aa5b4 Updated eslint-plugin-openlayers-internal 2016-08-12 10:54:36 -06:00
Tim Schaub
0db12e8590 Resolve root to source directory 2016-08-12 10:54:36 -06:00
Tim Schaub
833d061bc7 Depend on eslint-plugin-openlayers-internal from the registry 2016-08-12 10:54:36 -06:00
Frederic Junod
1973a038d3 Move eslint-plugin-openlayers-internal to devDependencies 2016-08-12 10:54:36 -06:00
Tim Schaub
e8d3fb15ed Install updated rules 2016-08-12 10:54:36 -06:00
Tim Schaub
a9e34c0f92 Refactored filter formats 2016-08-12 10:54:36 -06:00
Tim Schaub
a27d0da8a5 Add transform2D to ol.geom.SimpleGeometry 2016-08-12 10:54:06 -06:00
Tim Schaub
9d276982b5 Assorted missing requires 2016-08-12 10:53:50 -06:00
Tim Schaub
3afb42828f Add Hint and Property as ol.View properties 2016-08-12 10:53:50 -06:00
Tim Schaub
9cbbdc9242 Add Usage property to ol.webgl.Buffer 2016-08-12 10:53:50 -06:00
Tim Schaub
0b3c320540 Rename ol.webgl.WebGLContextEventType to ol.webgl.ContextEventType 2016-08-12 10:53:50 -06:00
Tim Schaub
9e4d80b459 Move State to ol.Tile 2016-08-12 10:53:49 -06:00
Tim Schaub
ef468b3b06 Ignore remaining missing requires in tests 2016-08-12 10:53:49 -06:00
Tim Schaub
5643d3ec77 Missing requires in tests 2016-08-12 10:53:49 -06:00
Tim Schaub
85d4fb6ac4 Add missing requires to rendering tests 2016-08-12 10:53:49 -06:00
Tim Schaub
bd015eabe4 One provide per test file 2016-08-12 10:53:49 -06:00
Tim Schaub
510083fbfc Remove unnecessary test 2016-08-12 10:53:49 -06:00
Tim Schaub
73c8059a0a Create rule enforcing that goog.provide() is like the path 2016-08-12 10:53:49 -06:00
Tim Schaub
4fffa190c3 Add rule to enforce one provide per file 2016-08-12 10:53:49 -06:00
Tim Schaub
395b486cd8 Public icon images cache 2016-08-12 10:53:49 -06:00
Tim Schaub
59b0f9a658 Events provides 2016-08-12 10:53:48 -06:00
Tim Schaub
e0d05f7491 One provide from scaleline.js 2016-08-12 10:53:48 -06:00
Tim Schaub
4a4872bbe5 Declare global 2016-08-12 10:53:48 -06:00
Tim Schaub
a70c6f916b Give ol.style.IconImageCache its own file 2016-08-12 10:53:48 -06:00
Tim Schaub
274b7285f3 Assorted missing requires 2016-08-12 10:53:48 -06:00
Tim Schaub
4e7e0e5324 Add missing view requires 2016-08-12 10:53:48 -06:00
Tim Schaub
004cf15222 Add some missing test requires 2016-08-12 10:53:48 -06:00
Tim Schaub
2da724cad4 Static ol.style.Style functions 2016-08-12 10:53:48 -06:00
Tim Schaub
d4a5b2f48e Separate out ol.style.IconImage 2016-08-12 10:53:48 -06:00
Tim Schaub
4887adce4f Ignore missing requires in typedefs.js and test-extensions.js 2016-08-12 10:53:48 -06:00
Tim Schaub
d02cf1e7a9 Shuffle assertions 2016-08-12 10:53:47 -06:00
Tim Schaub
c40e1bc29b No missing requires in examples 2016-08-12 10:53:47 -06:00
Tim Schaub
279e10abe8 Rule to catch missing requires 2016-08-12 10:53:47 -06:00
Tim Schaub
4778efb772 Slight rule rework 2016-08-12 10:53:47 -06:00
Tim Schaub
508750712a Merge pull request #5715 from ahocevar/smarter-check-example
Create a check-example task for smarter example checking with PhantomJS
2016-08-12 10:53:14 -06:00
Benjamin
f73ee14e3c Added image data value to 'forEachLayerAtPixel' method callback
The update has been added to the docs for all 'forEachLayerAtPixel' definitions
and currently returns null for non-supporting definitions. ol.Color typeDef
was also updated to support Uint8Arrays & Uint8ClampedArrays as it is the
reference type for the addded argument #5586
2016-08-12 12:13:11 -04:00
Peter Robins
de910916e6 Fix typo in tilegrid/wmts 2016-08-12 16:25:01 +01:00
Andreas Hocevar
7b2bdbc064 Create a check-example task for smarter example checking with PhantomJS 2016-08-12 12:05:47 +02:00
Tobias Sauerwein
7b62f13eb6 Merge pull request #5714 from tsauerwein/renderBuffer-docs
Add FAQ entry about renderBuffer
2016-08-12 09:22:48 +02:00
tsauerwein
b906fd5348 Add faq entry about renderBuffer 2016-08-12 09:02:26 +02:00
Andreas Hocevar
18ac300ed1 Merge pull request #5713 from ahocevar/check-examples-http
Check examples with http protocol instead of file
2016-08-12 08:46:41 +02:00
Andreas Hocevar
58a8e7d352 Check examples with http protocol instead of file 2016-08-11 23:07:27 +02:00
Andreas Hocevar
30ed4a29c8 Fix winding order for raster reprojection triangles
On Firefox/Linux, calling clip() without closePath() requires this.
2016-08-11 15:56:52 +02:00
Andreas Hocevar
9d80116bf0 Remove closePath() where clip() is used
clip() does an implicit closePath(), see
https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Compositing#Clipping_paths
2016-08-11 15:56:52 +02:00
Andreas Hocevar
370c0c0846 Do not close the ring when we use closePath() 2016-08-11 15:56:52 +02:00
Andreas Hocevar
a4f69f32d7 Avoid expensive closePath() when it makes no visual difference 2016-08-11 15:56:52 +02:00
Andreas Hocevar
274593feef Add rendering test for closed paths 2016-08-11 15:56:52 +02:00
Pierre GIRAUD
12cc5db0a8 Merge pull request #5689 from pgiraud/translate_interaction
Fix cursor change in translate interaction
2016-08-11 14:31:21 +02:00
Andreas Hocevar
4b68df73a8 Do not expose ol.MapBrowserPointerEvent to the docs 2016-08-09 16:13:57 +02:00
Pierre GIRAUD
bac39d3996 Fix cursor change in translate interaction 2016-08-09 16:01:51 +02:00
Andreas Hocevar
a9c54e0c02 Fix event type and documentation of ol.events.condition.mouseOnly 2016-08-09 15:55:14 +02:00
Frédéric Junod
c0efa21d7f Merge pull request #5165 from fredj/rm_goog.addSingletonGetter
Remove goog.addSingletonGetter function
2016-08-09 13:55:25 +02:00
Frederic Junod
ce3346a477 Rename ol.style.IconImageCache to ol.style.IconImageCache_ 2016-08-09 13:25:07 +02:00
Frederic Junod
fbb585c5d8 Remove goog.addSingletonGetter function 2016-08-09 11:28:02 +02:00
Frédéric Junod
41a0c6ed39 Merge pull request #5701 from openlayers/greenkeeper-phantomjs-prebuilt-2.1.11
Update phantomjs-prebuilt to version 2.1.11 🚀
2016-08-09 10:31:07 +02:00
Tim Schaub
6e0ff4c4c2 Merge pull request #5698 from tschaub/no-unused-requires
Custom rule to identify unused goog.require() calls
2016-08-08 18:23:49 -06:00
Tim Schaub
568f0c81bb Move wrapX to ol.tilegrid to break circular dependency 2016-08-08 13:48:54 -06:00
Tim Schaub
789aeb1c64 Toward a fix for ol.tilegrid 2016-08-08 10:22:28 -06:00
Tim Schaub
7ea7610892 Global strict mode for rules and Node tests 2016-08-08 09:58:12 -06:00
Tim Schaub
3a1bbc4248 Get rid of ol.render.IReplayGroup interface 2016-08-08 09:58:12 -06:00
Tim Schaub
ddbe0516d2 Ignore unused requires in MVT examples 2016-08-08 09:58:11 -06:00
Tim Schaub
7d29b35e75 Put rendering test requires on top 2016-08-08 09:58:11 -06:00
Tim Schaub
dd2e9c9ac9 Refactored rules 2016-08-08 09:58:11 -06:00
Tim Schaub
c203f6a841 Remove unused requires from tests 2016-08-08 09:58:11 -06:00
Tim Schaub
ed5dbd1293 Put test requires on top 2016-08-08 09:58:11 -06:00
Tim Schaub
29990abc7e Remove unused goog.requires() from the examples (minus MVT examples) 2016-08-08 09:58:11 -06:00
Tim Schaub
123605f21b Make no-unused-requires rule fixable 2016-08-08 09:58:11 -06:00
Tim Schaub
907a65ab83 Remove unused goog.require() calls in the source 2016-08-08 09:58:10 -06:00
Tim Schaub
3c7e9f6870 Custom rule to identify unused goog.require() calls 2016-08-08 09:58:10 -06:00
greenkeeperio-bot
9db3231bc5 chore(package): update phantomjs-prebuilt to version 2.1.11
https://greenkeeper.io/
2016-08-08 08:39:47 -06:00
Frédéric Junod
fe35c05860 Merge pull request #5699 from openlayers/greenkeeper-mocha-3.0.2
Update mocha to version 3.0.2 🚀
2016-08-08 11:55:57 +02:00
greenkeeperio-bot
9fe4ae2b96 chore(package): update mocha to version 3.0.2
https://greenkeeper.io/
2016-08-08 02:30:58 -06:00
Tim Schaub
f222711bd8 Merge pull request #5697 from tschaub/lint
Re-enable ESLint config
2016-08-07 13:48:23 -06:00
Tim Schaub
feb7713225 Remove lint 2016-08-07 13:28:19 -06:00
Tim Schaub
4373f1bd54 Run ESLint on all files (catch new linter changes) 2016-08-07 13:15:22 -06:00
Tim Schaub
9f23e96976 Avoid shadowing ESLint config in package.json 2016-08-07 13:05:36 -06:00
Tim Schaub
fa80967a1e Merge pull request #5693 from tschaub/one-provide
Reorganize files so they are named like their default export
2016-08-07 11:20:32 -06:00
Tim Schaub
02ff448d33 Test that files are named like their default export 2016-08-07 10:55:50 -06:00
Tim Schaub
b1593124ba Put the primary provide first 2016-08-07 10:49:13 -06:00
Tim Schaub
4460147291 Allow ol/typedefs.js to be missing a provide 2016-08-07 10:49:13 -06:00
Tim Schaub
b47dc998a3 More WebGL name corrections 2016-08-07 10:49:12 -06:00
Tim Schaub
f5cbfdff04 Move ol/ol.js to ol/index.js 2016-08-07 10:49:12 -06:00
Tim Schaub
295abebcec Additional upgrade notes 2016-08-07 10:49:12 -06:00
Tim Schaub
12e81e5487 Clean up WebGL provides 2016-08-07 10:49:12 -06:00
Tim Schaub
1b8310a6fe Rename ol/objectutil.js to ol/obj.js 2016-08-07 10:49:12 -06:00
Tim Schaub
bbf91b3477 Move ol/format.jsdoc to ol/format/index.jsdoc 2016-08-07 10:49:12 -06:00
Tim Schaub
e631913c8f Move ol/control.jsdoc to ol/control/index.jsdoc 2016-08-07 10:49:12 -06:00
Tim Schaub
4c8b583e30 Move ol/webgl/webgl.js to ol/webgl/index.js 2016-08-07 10:49:11 -06:00
Tim Schaub
97d403784d Move tilegrid files so they are named like their provides 2016-08-07 10:49:11 -06:00
Tim Schaub
9da581cb8f Move style files so they are named like their provide 2016-08-07 10:49:11 -06:00
Tim Schaub
c0e375412f Move sphere files so they are named like their provides 2016-08-07 10:49:11 -06:00
Tim Schaub
e07596846d Move source files so they are named like their provides 2016-08-07 10:49:11 -06:00
Tim Schaub
8d9398a965 Move ol/reproj/reproj.js to ol/reproj/index.js 2016-08-07 10:49:11 -06:00
Tim Schaub
424f3e5577 Move renderer files so they are named like their provides 2016-08-07 10:49:11 -06:00
Tim Schaub
6b883afa35 Move render files so they are named like their provides 2016-08-07 10:49:11 -06:00
Tim Schaub
aab8a7c4eb Move proj files so they are named like their provides 2016-08-07 10:49:10 -06:00
Tim Schaub
8ae6ffefc0 Move layer files so they are named like their provides 2016-08-07 10:49:10 -06:00
Tim Schaub
f07f78fbd7 Move flat geom files so they are named like their provides 2016-08-07 10:49:10 -06:00
Tim Schaub
035885c25d Move interaction files so they are named like their provides 2016-08-07 10:49:10 -06:00
Tim Schaub
e8205a8293 Rename format tests for consistency 2016-08-07 10:49:10 -06:00
Tim Schaub
386e215b47 Rename control tests for consistency 2016-08-07 10:49:10 -06:00
Tim Schaub
684af3503c Move ol/geom/flat/areaflatgeom.js to ol/geom/flat/area.js 2016-08-07 10:49:10 -06:00
Tim Schaub
2e88cc7daf Move ol/format/xsdformat.js to ol/format/xsd.js 2016-08-07 10:49:10 -06:00
Tim Schaub
4f51149ff1 Move ol/format/xmlformat.js to ol/format/xml.js 2016-08-07 10:49:10 -06:00
Tim Schaub
9827937faf Move ol/format/xmlfeatureformat.js to ol/format/xmlfeature.js 2016-08-07 10:49:09 -06:00
Tim Schaub
db6fa60937 Move ol/format/xlinkformat.js to ol/format/xlink.js 2016-08-07 10:49:09 -06:00
Tim Schaub
62403c5780 Move ol/format/wmtscapabilitiesformat.js to ol/format/wmtscapabilities.js 2016-08-07 10:49:09 -06:00
Tim Schaub
71a2f1b9af Move ol/format/wmscapabilitiesformat.js to ol/format/wmscapabilities.js 2016-08-07 10:49:09 -06:00
Tim Schaub
eba48454dc Move ol/format/wktformat.js to ol/format/wkt.js 2016-08-07 10:49:09 -06:00
Tim Schaub
a1e06297ab Move ol/format/wmsgetfeatureinfoformat.js to ol/format/wmsgetfeatureinfo.js 2016-08-07 10:49:09 -06:00
Tim Schaub
e0adcc0175 Move ol/format/wfsformat.js to ol/format/wfs.js 2016-08-07 10:49:09 -06:00
Tim Schaub
2a539ea7a4 Move ol/format/topojsonformat.js to ol/format/topojson.js 2016-08-07 10:49:09 -06:00
Tim Schaub
257e54645c Move ol/format/textfeatureformat.js to ol/format/textfeature.js 2016-08-07 10:49:09 -06:00
Tim Schaub
35e7addb5e Move ol/format/polylineformat.js to ol/format/polyline.js 2016-08-07 10:49:09 -06:00
Tim Schaub
8e1b084906 Move ol/format/owsformat.js to ol/format/ows.js 2016-08-07 10:49:08 -06:00
Tim Schaub
24e9751f40 Move ol/format/osmxmlformat.js to ol/format/osmxml.js 2016-08-07 10:49:08 -06:00
Tim Schaub
458b35d5d6 Move ol/format/mvtformat.js to ol/format/mvt.js 2016-08-07 10:49:08 -06:00
Tim Schaub
c6880e5d23 Move ol/format/kmlformat.js to ol/format/kml.js 2016-08-07 10:49:08 -06:00
Tim Schaub
5134c13f5b Move ol/format/jsonfeatureformat.js to ol/format/jsonfeature.js 2016-08-07 10:49:08 -06:00
Tim Schaub
5d22542a38 Move ol/format/igcformat.js to ol/format/igc.js 2016-08-07 10:49:08 -06:00
Tim Schaub
23d5bb5889 Move ol/format/gpxformat.js to ol/format/gpx.js 2016-08-07 10:49:08 -06:00
Tim Schaub
a7f348f4a5 Add ol/format/gml.js for ol.format.GML 2016-08-07 10:49:08 -06:00
Tim Schaub
9d7479fb65 Move ol/format/gml/gmlbaseformat.js to ol/format/gmlbase.js 2016-08-07 10:49:08 -06:00
Tim Schaub
66f7d3c370 Move ol/format/gml/gml3format.js to ol/format/gml3.js 2016-08-07 10:49:08 -06:00
Tim Schaub
9a3131084b Move ol/format/gml/gml2format.js to ol/format/gml2.js 2016-08-07 10:49:07 -06:00
Tim Schaub
0b3db7c564 Move ol/format/geojsonformat.js to ol/format/geojson.js 2016-08-07 10:49:07 -06:00
Tim Schaub
ba36e05bd6 Move ol/format/format.js to ol/format/formattype.js 2016-08-07 10:49:07 -06:00
Tim Schaub
c452caa513 Move ol/format/esrijsonformat.js to ol/format/esrijson.js 2016-08-07 10:49:07 -06:00
Tim Schaub
cc5b02a40f Move ol/format/featureformat.js to ol/format/feature.js 2016-08-07 10:49:07 -06:00
Tim Schaub
8e381c1b2a Move ol/dom/dom.js to ol/dom.js 2016-08-07 10:49:07 -06:00
Tim Schaub
adbfb7a355 Move ol/control/zoomtoextentcontrol.js to ol/control/zoomtoextent.js 2016-08-07 10:49:07 -06:00
Tim Schaub
395f3bcbcf Move ol/control/zoomslide.js to ol/control/zoomslider.js 2016-08-07 10:49:07 -06:00
Tim Schaub
a53f4b3401 Move ol/control/zoomslidercontrol.js to ol/control/zoomslider.js 2016-08-07 10:49:07 -06:00
Tim Schaub
ce0cb1392d Move ol/control/zoomcontrol.js to ol/control/zoom.js 2016-08-07 10:49:07 -06:00
Tim Schaub
c398f1cacb Swap expectations 2016-08-07 10:49:07 -06:00
Tim Schaub
0c9abf5257 Move ol/control/scalelinecontrol.js to ol/control/scaleline.js 2016-08-07 10:49:06 -06:00
Tim Schaub
30c4e5c635 Move ol/control/overviewmapcontrol.js to ol/control/overviewmap.js 2016-08-07 10:49:06 -06:00
Tim Schaub
0e8845230d Move ol/control/rotatecontrol.js to ol/control/rotate.js 2016-08-07 10:49:06 -06:00
Tim Schaub
f1ebcae72a Move ol/control/mousepositioncontrol.js to ol/control/mouseposition.js 2016-08-07 10:49:06 -06:00
Tim Schaub
571a583e10 Move ol/control/fullscreencontrol.js to ol/control/fullscreen.js 2016-08-07 10:49:06 -06:00
Tim Schaub
909253a48f Move ol/control/controldefaults.js to ol/control/index.js 2016-08-07 10:49:06 -06:00
Tim Schaub
f7a02ba6af Move ol/control/attributioncontrol.js to ol/control/attribution.js 2016-08-07 10:49:06 -06:00
Tim Schaub
cb1b3a09b3 Move ol/color/color.js to ol/color.js 2016-08-07 10:49:06 -06:00
Tim Schaub
ffe3565166 Single provide from ol/collection.js 2016-08-07 10:49:06 -06:00
Tim Schaub
4261523720 Test that all files have a single provide named like the path 2016-08-07 10:49:06 -06:00
Tim Schaub
54531ba325 Merge pull request #5694 from probins/base
layer.Base in Map not required
2016-08-07 08:53:52 -06:00
Tim Schaub
a4762fd127 Merge pull request #5695 from probins/renderer
Remove unneeded requires in renderers
2016-08-07 08:52:46 -06:00
Peter Robins
52afa50eec Remove unneeded requires in renderers 2016-08-07 09:01:07 +00:00
Peter Robins
81a5d669c6 layer.Base in Map not required 2016-08-07 08:19:18 +00:00
Marc Jansen
2a64dd091f Merge pull request #5692 from bngsudheer/patch-1
Small text fix
2016-08-06 19:11:31 +02:00
Sudheer Satyanarayana
4d6feb39df Small text fix
"View allows" not "view allow"
2016-08-06 21:44:46 +05:30
Tim Schaub
fc75492b95 Merge pull request #5682 from openlayers/greenkeeper-mocha-3.0.1
Update mocha to version 3.0.1 🚀
2016-08-06 10:02:01 -06:00
Andreas Hocevar
b25ce40781 Merge pull request #5619 from ahocevar/remove-goog-asserts
Remove goog.asserts.*
2016-08-04 23:02:38 +02:00
Tim Schaub
afea011ebd Merge pull request #5685 from tschaub/scale
Add a method to scale geometries
2016-08-04 14:10:34 -06:00
Tim Schaub
69bf9254a5 Correctly set default anchor for collections 2016-08-04 11:27:36 -06:00
Tim Schaub
795cee876e Add a method to scale geometries 2016-08-04 10:23:00 -06:00
Andreas Hocevar
bf275b0740 Remove asserts from ol.format.WFS 2016-08-04 11:42:40 +02:00
Andreas Hocevar
e18d41b5e0 Remove gratuitous debug assertions 2016-08-04 11:29:54 +02:00
Andreas Hocevar
e0015b3d4e Use goog.DEBUG instead of ol.DEBUG for now 2016-08-04 11:29:54 +02:00
Andreas Hocevar
55ab5704d4 Use a nicer URL for the error descriptions 2016-08-04 11:29:54 +02:00
Andreas Hocevar
6f5ed17fc5 Remove goog.asserts.*
This pull requests replaces type check hint assertions with type casts,
library sanity check assertions with conditional console.assert statements
in debug mode, and runtime sanity checks with assertions that throw an
ol.AssertionError with an error code for lookup outside the library.
2016-08-04 11:29:54 +02:00
Andreas Hocevar
f50f1f401c Merge pull request #5674 from ahocevar/fractional-getzoom
Support fractional zoom levels in ol.View#getZoom and #setZoom
2016-08-04 10:22:43 +02:00
Frédéric Junod
ab7e3f268e Merge pull request #5681 from fredj/extra_goog.require
Remove extra goog.require
2016-08-04 09:54:09 +02:00
greenkeeperio-bot
fc62fc77e9 chore(package): update mocha to version 3.0.1
https://greenkeeper.io/
2016-08-04 01:41:09 -06:00
Frederic Junod
87295a0c73 Remove extra goog.require 2016-08-04 09:09:09 +02:00
Frédéric Junod
3c6ffe2c10 Merge pull request #5680 from openlayers/greenkeeper-phantomjs-prebuilt-2.1.10
Update phantomjs-prebuilt to version 2.1.10 🚀
2016-08-04 08:42:24 +02:00
Tobias Sauerwein
95ce473dcb Merge pull request #5668 from cpsTinK/master
Added Intersects and Within filters into ol.format.wfs
2016-08-04 08:25:51 +02:00
greenkeeperio-bot
f01a1e760f chore(package): update phantomjs-prebuilt to version 2.1.10
https://greenkeeper.io/
2016-08-03 11:13:21 -06:00
Frédéric Junod
07cb28e660 Merge pull request #5675 from fredj/rm_goog.provide
Remove unused goog.provide
2016-08-03 15:02:57 +02:00
cpsTinK
18101ad0e2 Refactor AND Fixed description Intersects and Within filters into ol.format.wfs 2016-08-03 15:42:46 +04:00
Frederic Junod
3d46a0bfaa Remove unused goog.provide 2016-08-03 12:49:01 +02:00
Andreas Hocevar
98fbfe4b67 Support fractional zoom levels in ol.View#getZoom and #setZoom 2016-08-03 11:48:13 +02:00
Andreas Hocevar
bb5d79e9f2 Merge pull request #5673 from ahocevar/missing-semicolon
Add missing semicolon
2016-08-03 09:26:07 +02:00
Andreas Hocevar
aba8c2c8d1 Add missing semicolon 2016-08-03 09:25:27 +02:00
Andreas Hocevar
01baf48870 Merge pull request #5587 from ahocevar/kml-faster-init
Lazily create KML style defaults
2016-08-03 09:19:39 +02:00
Andreas Hocevar
8719b79b5e Merge pull request #5599 from ahocevar/subpixel-center
Allow subpixel center on view
2016-08-03 09:19:09 +02:00
Tim Schaub
e78bc45b65 Merge pull request #5630 from tlvince/iife
chore(build): guard against unterminated scripts
2016-08-03 00:35:10 -06:00
Andreas Hocevar
5c9f2841e7 Merge pull request #5669 from dtreiter/master
Fix Github links to specific lines on jsdoc pages
2016-08-02 20:25:22 +02:00
Daniel Reiter
ce4e6d49f5 Fix github line links on jsdoc pages
Github line links only work with a capital `L`.
2016-08-02 11:05:10 -05:00
cpsTinK
9150fa2a60 Added Intersects and Within filters into ol.format.wfs 2016-08-02 16:20:09 +04:00
Andreas Hocevar
e39199f97a Merge pull request #5667 from ahocevar/proj-get-null
Do not return undefined from ol.proj.get
2016-08-02 13:47:54 +02:00
Andreas Hocevar
4227f8034b Do not return undefined from ol.proj.get 2016-08-02 13:39:07 +02:00
Andreas Hocevar
ab9e386892 Merge pull request #5665 from openlayers/greenkeeper-eslint-3.2.2
Update eslint to version 3.2.2 🚀
2016-08-02 10:32:40 +02:00
Andreas Hocevar
692c2f0e62 Merge pull request #5632 from ahocevar/loadingstrategy-docs
Improve docs for the ol.LoadingStrategy type
2016-08-02 09:31:47 +02:00
greenkeeperio-bot
f956119265 chore(package): update eslint to version 3.2.2
https://greenkeeper.io/
2016-08-02 09:28:40 +02:00
Andreas Hocevar
958f0eacdc Merge pull request #5641 from ahocevar/listenermap-property
De-randomize the listener map property
2016-08-02 08:53:51 +02:00
Andreas Hocevar
5455aca87b Merge pull request #5664 from openlayers/greenkeeper-eslint-3.2.1
Update eslint to version 3.2.1 🚀
2016-08-01 21:59:19 +02:00
greenkeeperio-bot
05f996f7c6 chore(package): update eslint to version 3.2.1
https://greenkeeper.io/
2016-08-01 12:48:44 -06:00
Andreas Hocevar
91cb0f612b Merge pull request #5658 from openlayers/greenkeeper-marked-0.3.6
Update marked to version 0.3.6 🚀
2016-07-31 21:17:25 +02:00
greenkeeperio-bot
9eb6785abc chore(package): update marked to version 0.3.6
https://greenkeeper.io/
2016-07-30 00:48:48 -06:00
Andreas Hocevar
bc68cce4f2 Merge pull request #5657 from openlayers/greenkeeper-phantomjs-prebuilt-2.1.9
Update phantomjs-prebuilt to version 2.1.9 🚀
2016-07-30 08:48:30 +02:00
greenkeeperio-bot
674e0c3e4d chore(package): update phantomjs-prebuilt to version 2.1.9
https://greenkeeper.io/
2016-07-29 16:25:03 -06:00
Andreas Hocevar
82b181f137 Merge pull request #5652 from ahocevar/xhr-file
Make XHR work for file:// urls
2016-07-28 14:52:23 +02:00
Andreas Hocevar
7da5a5ae92 Make XHR work for file:// urls
The response status will be 0 instead of a HTTP status code for file urls,
so we need to consider a status of 0 as success too.
2016-07-28 13:46:43 +02:00
Andreas Hocevar
b6acbf7c93 Merge pull request #5653 from ahocevar/fix-filter-docs
Fix namespace in filter docs
2016-07-28 13:44:36 +02:00
Andreas Hocevar
f059eb6686 Fix namespace in filter docs 2016-07-28 12:06:58 +02:00
Andreas Hocevar
3d57ea45cb Merge pull request #5651 from openlayers/greenkeeper-coveralls-2.11.12
Update coveralls to version 2.11.12 🚀
2016-07-28 09:05:40 +02:00
greenkeeperio-bot
105d2601a6 chore(package): update coveralls to version 2.11.12
https://greenkeeper.io/
2016-07-27 18:03:54 -06:00
Andreas Hocevar
1df679a916 Merge pull request #5649 from ahocevar/datetime-fix
Fix DateTime parsing with non-Zulu times
2016-07-27 00:02:23 +02:00
Andreas Hocevar
efdf9961b3 Fix KML date parsing
We even have an incorrect test here. And like in ol.format.XSD, we can use
Date.parse().
2016-07-26 16:59:04 +02:00
Andreas Hocevar
1bb572310d Use Date.parse() instead of parsing XSD dates manually 2016-07-26 16:58:48 +02:00
Andreas Hocevar
e2d96082f9 Fix XSD parsing of non-Zulu times 2016-07-26 16:58:33 +02:00
Andreas Hocevar
cd8fafbead Merge pull request #5648 from openlayers/greenkeeper-sinon-1.17.5
Update sinon to version 1.17.5 🚀
2016-07-26 15:19:19 +02:00
greenkeeperio-bot
eed59c5611 chore(package): update sinon to version 1.17.5
https://greenkeeper.io/
2016-07-26 06:02:31 -06:00
Andreas Hocevar
6d815c3e15 Merge pull request #5646 from openlayers/greenkeeper-phantomjs-prebuilt-2.1.8
Update phantomjs-prebuilt to version 2.1.8 🚀
2016-07-26 10:07:56 +02:00
greenkeeperio-bot
63f04b1777 chore(package): update phantomjs-prebuilt to version 2.1.8
https://greenkeeper.io/
2016-07-25 22:29:44 -06:00
Andreas Hocevar
c5a1f9c230 Merge pull request #5644 from openlayers/greenkeeper-browserify-13.1.0
Update browserify to version 13.1.0 🚀
2016-07-25 23:56:13 +02:00
greenkeeperio-bot
28971ec527 chore(package): update browserify to version 13.1.0
https://greenkeeper.io/
2016-07-25 14:58:19 -06:00
Andreas Hocevar
bfcfb61eff De-randomize the listener map property 2016-07-25 16:17:18 +02:00
Andreas Hocevar
02911ae275 Merge pull request #5640 from chrismayer/here-example
Add example for usage of HERE Map Tile API
2016-07-25 16:14:02 +02:00
Andreas Hocevar
8f501e0de8 Merge pull request #5579 from openlayers/greenkeeper-jquery-3.1.0
Update jquery to version 3.1.0 🚀
2016-07-25 15:37:55 +02:00
Christian Mayer
e1b2358f44 Add example for usage of HERE Map Tile API
This adds an example showing how to use the HERE Map Tile API with
OpenLayers.
2016-07-25 14:30:03 +02:00
greenkeeperio-bot
c1dd410208 chore(package): update jquery to version 3.1.0
https://greenkeeper.io/
2016-07-25 00:51:18 -06:00
Andreas Hocevar
89b96193de Merge pull request #5636 from openlayers/greenkeeper-clean-css-3.4.19
Update clean-css to version 3.4.19 🚀
2016-07-25 08:51:01 +02:00
greenkeeperio-bot
2196b88962 chore(package): update clean-css to version 3.4.19
https://greenkeeper.io/
2016-07-24 22:38:19 -06:00
Andreas Hocevar
c8d7d65226 Merge pull request #5634 from openlayers/greenkeeper-async-2.0.1
Update async to version 2.0.1 🚀
2016-07-22 23:03:52 +02:00
greenkeeperio-bot
7e800483de chore(package): update async to version 2.0.1
https://greenkeeper.io/
2016-07-22 14:50:22 -06:00
Andreas Hocevar
95d247d332 Improve docs for the ol.LoadingStrategy type 2016-07-22 14:54:41 +02:00
Tom Vincent
8548a6f898 chore(build): guard against unterminated scripts
If ol3 is included as part of a concatenated build and the script before it does
not end in a semi-colon, the IIFE is interpreted incorrectly (often resulting in
`TypeError: (intermediate value)`).
2016-07-22 13:47:25 +02:00
Andreas Hocevar
a575749793 Merge pull request #5622 from rrutkows/reset-coordkeyprefix
Update TileWMS.coordKeyPrefix_ on setUrls
2016-07-21 11:38:55 +02:00
Rafał Rutkowski
3157ccb2f2 Update TileWMS.coordKeyPrefix_ on setUrls
Outdated coordKeyPrefix_ causes the TileWMS layer to flicker
on the first updateParams call.
2016-07-21 10:13:13 +02:00
Andreas Hocevar
d0302ba92a Merge pull request #5611 from ischas/fix-styleguide-link
Fix broken link to Google JavaScript Style Guide
2016-07-20 19:57:17 +02:00
Andreas Hocevar
6d67ba539c Merge pull request #5620 from probins/uid
Replace goog.getUid with ol.getUid
2016-07-20 15:40:59 +02:00
Peter Robins
f8f2cd11d5 Replace goog.getUid with ol.getUid 2016-07-20 11:01:00 +00:00
Andreas Hocevar
29230d48b3 Merge pull request #5614 from probins/abstract
Replace goog.abstractMethod
2016-07-19 19:52:53 +02:00
Peter Robins
0713e680e1 Replace goog.abstractMethod 2016-07-19 09:08:23 +00:00
Andreas Hocevar
8e31b65a87 Merge pull request #5613 from drnextgis/issue#5366
Parse MVT id property
2016-07-19 10:41:27 +02:00
Andreas Hocevar
17c4dbe391 Merge pull request #5612 from openlayers/greenkeeper-vector-tile-1.3.0
Update vector-tile to version 1.3.0 🚀
2016-07-19 10:40:32 +02:00
drnextgis
2685dd1bd9 Parse MVT id property 2016-07-19 11:34:44 +07:00
greenkeeperio-bot
d4c1b2e838 chore(package): update vector-tile to version 1.3.0
https://greenkeeper.io/
2016-07-18 18:38:26 -06:00
Sascha Klemenjak
e637bfb35e Fix broken link to Google JavaScript Style Guide 2016-07-18 22:31:30 +02:00
Andreas Hocevar
8a0f18de56 Merge pull request #5609 from openlayers/greenkeeper-eslint-3.1.1
Update eslint to version 3.1.1 🚀
2016-07-18 22:06:50 +02:00
greenkeeperio-bot
ba78506b2e chore(package): update eslint to version 3.1.1
https://greenkeeper.io/
2016-07-18 12:27:17 -06:00
Andreas Hocevar
3665e21341 Merge pull request #5605 from probins/isobject
Remove goog.isObject not in assertions
2016-07-16 21:39:30 +02:00
Peter Robins
53a7aad431 Remove goog.isObject not in assertions 2016-07-16 11:07:42 +00:00
Andreas Hocevar
6ab0de303d Merge pull request #5603 from openlayers/greenkeeper-eslint-3.1.0
Update eslint to version 3.1.0 🚀
2016-07-16 11:59:14 +02:00
greenkeeperio-bot
831593ddbd chore(package): update eslint to version 3.1.0
https://greenkeeper.io/
2016-07-15 14:18:35 -06:00
Andreas Hocevar
cc7bd013c3 Merge pull request #5597 from schmidtk/master
Avoid unnecessary getImageData calls in hit detection
2016-07-15 12:04:28 +02:00
Andreas Hocevar
34d5cc228e Merge pull request #5429 from probins/testenums
Remove enums from tests
2016-07-15 09:12:58 +02:00
Kevin Schmidt
1d585f8924 Avoid unnecessary getImageData calls in hit detection
If a feature is outside the hit extent, don't execute the end
geometry instruction that calls getImageData.
2016-07-14 18:21:49 -06:00
Andreas Hocevar
51e84e10f2 Allow subpixel center on view 2016-07-14 23:51:00 +02:00
Andreas Hocevar
878ca6471d Merge pull request #5516 from probins/goog.uri
Remove goog.Uri from KML format
2016-07-14 22:50:45 +02:00
Andreas Hocevar
2d8a19a94e Merge pull request #5598 from probins/patch-1
Clarify that default source.Vector loader only handles features
2016-07-14 17:33:53 +02:00
Andreas Hocevar
2b21cb0104 Merge pull request #5595 from ahocevar/wanted-tile-keys
Use tile keys instead of coord keys
2016-07-14 13:26:09 +02:00
Peter Robins
5732cde025 Add tests for kml url from file 2016-07-14 11:13:39 +00:00
Peter Robins
ba97ee4674 Remove KML.readStyleUrl_ as duplicate of KML.readURI_
StyleUrl elements in Placemarks use readURI_() whereas those in StyleMaps use readStyleUrl_(), so standardize on readURI_()
2016-07-14 11:13:39 +00:00
Peter Robins
810ed63b9f Replace goog.Uri in kml format with URL() 2016-07-14 11:13:39 +00:00
Peter Robins
393cf31046 Clarify that default source.Vector loader only handles features 2016-07-14 11:05:30 +01:00
Andreas Hocevar
d259ab893e Use tile keys instead of coord keys
This change ensures that tiles with old params or dimensions are discarded
2016-07-14 01:03:30 +02:00
Andreas Hocevar
57af1a9b24 Merge pull request #5594 from ahocevar/imagevector-renderbuffer
Add renderBuffer option for ol.source.ImageVector
2016-07-13 14:43:42 +02:00
Andreas Hocevar
a64e3c1d3e Add renderBuffer option for ol.source.ImageVector 2016-07-13 14:23:41 +02:00
Frédéric Junod
79d8660ded Merge pull request #5592 from openlayers/greenkeeper-coveralls-2.11.11
Update coveralls to version 2.11.11 🚀
2016-07-13 09:01:26 +02:00
greenkeeperio-bot
5e1f8d8f07 chore(package): update coveralls to version 2.11.11
https://greenkeeper.io/
2016-07-12 23:41:43 -07:00
Andreas Hocevar
bdd50f4aaa Merge pull request #5593 from openlayers/greenkeeper-async-2.0.0
Update async to version 2.0.0 🚀
2016-07-13 08:41:25 +02:00
greenkeeperio-bot
bb49639370 chore(package): update async to version 2.0.0
https://greenkeeper.io/
2016-07-12 17:35:15 -07:00
Andreas Hocevar
3630a043fe Lazily create KML style defaults 2016-07-12 13:56:02 +02:00
Andreas Hocevar
e8582b297b Merge pull request #4194 from bjornharrtell/remove-goog-color
Remove usage of goog.color and closure named colors
2016-07-12 11:25:29 +02:00
Björn Harrtell
3be90d4d8d Remove usage of goog.color 2016-07-12 10:56:00 +02:00
Andreas Hocevar
2289d557d8 Merge pull request #5583 from ahocevar/document-change-event
Fix dead link for change event in API docs
2016-07-11 09:44:24 +02:00
Frédéric Junod
fa4f29e0ac Merge pull request #5560 from fredj/rm_goog.isArrayLike
Get rid of goog.isArrayLike
2016-07-11 08:53:24 +02:00
Andreas Hocevar
218978aea3 Merge pull request #5573 from ahocevar/safe-eval-global
Determine ol.global in a way that works in more environments
2016-07-10 12:46:48 +02:00
Andreas Hocevar
7552763be3 Determine ol.global in a way that works in more environments 2016-07-10 12:34:37 +02:00
Andreas Hocevar
4d61ae9a50 Merge pull request #5558 from probins/uritests
Remove goog.Uri from tests
2016-07-10 12:20:38 +02:00
Andreas Hocevar
c75581d026 Fix dead link for change event in API docs 2016-07-10 12:11:31 +02:00
Andreas Hocevar
2f7533ccb2 Merge pull request #5578 from ahocevar/examples-polyfill
Add polyfills to copy/paste code
2016-07-08 10:40:18 +02:00
Frédéric Junod
13e512f437 Merge pull request #5577 from fredj/osm_url_doc
Fix olx.source.OSMOptions#url default value documentation
2016-07-08 09:00:56 +02:00
Andreas Hocevar
1464da64a6 Add polyfills to copy/paste code 2016-07-07 19:06:10 +02:00
Andreas Hocevar
f959dd7d77 Merge pull request #5576 from ahocevar/link-to-latest
Use the word "documentation"
2016-07-07 18:47:42 +02:00
Frederic Junod
fe67b047f4 Fix olx.source.OSMOptions#url default value documentation 2016-07-07 15:39:31 +02:00
Andreas Hocevar
1aa7a6d4e1 Use the word "documentation"
To get better search engine rankings for users looking for documentation, it
might be a good idea to not use "docs".
2016-07-07 15:27:00 +02:00
Andreas Hocevar
d68b498a2c Merge pull request #5575 from ahocevar/lib-info
Add a bit more info about the library to the README
2016-07-07 14:58:51 +02:00
Andreas Hocevar
24e0967052 Add a bit more info about the library to the README 2016-07-07 14:47:36 +02:00
Andreas Hocevar
9671e8a5bd Merge pull request #5574 from ahocevar/polyfill
Add paragraph about supported browsers and polyfills
2016-07-07 14:46:43 +02:00
Andreas Hocevar
a60aee329c Add paragraphs about supported browsers and polyfills 2016-07-07 13:41:36 +02:00
Tobias Sauerwein
343d2c032d Merge pull request #5570 from bjornharrtell/jsts_1.2.0
Upgrade JSTS in example to 1.2.0
2016-07-05 22:24:47 +02:00
Björn Harrtell
7d4c7b7982 Upgrade JSTS in example to 1.2.0 2016-07-05 21:21:36 +02:00
Frédéric Junod
130052c935 Merge pull request #5566 from fredj/5253
Fix ol.style.Image#getAnchor documentation
2016-07-05 16:23:20 +02:00
Frederic Junod
8957e618a5 Fix ol.style.Image#getAnchor documentation 2016-07-05 14:51:33 +02:00
Andreas Hocevar
c49fbf9070 Merge pull request #5546 from ahocevar/event-no-target
Remove useless target argument from ol.Event and subclass constructors
2016-07-05 09:54:19 +02:00
Andreas Hocevar
d840bba905 Merge pull request #5565 from probins/enum
Reinsert goog.provide for enums in olx.js
2016-07-05 09:52:22 +02:00
Andreas Hocevar
ccf15b8be3 Remove useless target argument from ol.Event and subclass constructors 2016-07-05 09:40:00 +02:00
Peter Robins
d7180fd1e8 Reinsert goog.provide for enums in olx.js 2016-07-05 07:32:30 +00:00
Frédéric Junod
2845f50ff7 Merge pull request #5561 from fredj/test_centerConstraint
Add unit tests for ol.View.createCenterConstraint
2016-07-05 09:13:34 +02:00
Frédéric Junod
39e06151c5 Merge pull request #5563 from fredj/removeVertex_return
Return if a vertex was removed in ol.interaction.Modify#removeVertex_
2016-07-05 09:13:19 +02:00
Frederic Junod
460ea4e809 Return if a vertex was removed in ol.interaction.Modify#removeVertex_ 2016-07-04 17:09:01 +02:00
Frederic Junod
6910c471bf Add unit tests for ol.View.createCenterConstraint 2016-07-04 16:46:57 +02:00
Frederic Junod
89e377cb48 Get rid of goog.isArrayLike
With this change, it's no longer possible to extend an array with
an "array like" object (an object with a 'length' property).
We were not using this feature in the library.
2016-07-04 16:17:36 +02:00
Peter Robins
250bb2f2be Remove goog.Uri from tests 2016-07-04 13:12:55 +00:00
Andreas Hocevar
b5da32340e Merge pull request #5533 from ahocevar/update-wms-params-reproj
Make sure reprojected tiles are recreated on updateParams
2016-07-04 11:21:42 +02:00
Andreas Hocevar
102eb1b94f Handle interim tiles correctly when reprojecting 2016-07-04 10:31:20 +02:00
Bart van den Eijnden
ee3e302f69 Merge pull request #5557 from openlayers/release-v3.17.1
Release v3.17.1
2016-07-04 10:14:16 +02:00
Andreas Hocevar
4d10a6b9a1 Merge pull request #5548 from GaborFarkas/fullscreen_event_enum
Fix CHANGETYPE in ol.control.FullScreen
2016-07-03 11:25:39 +02:00
GaborFarkas
2e68be13f6 Create a dedicated function to changeType. 2016-07-03 11:14:53 +02:00
Andreas Hocevar
d05f1ce743 Merge pull request #5534 from ahocevar/scaleline-docs
Fix ScaleLine control documentation
2016-07-02 21:36:53 +02:00
Tim Schaub
a30d4843cf Merge pull request #5541 from probins/isnumber
Replace goog.isNumber
2016-07-02 09:20:53 -06:00
Tim Schaub
5e98b27afd Merge pull request #5552 from probins/webgl
Replace goog.webgl.
2016-07-02 09:19:16 -06:00
Peter Robins
294a129083 Replace goog.webgl 2016-07-02 10:40:55 +00:00
Andreas Hocevar
c95c9846fb Fix ScaleLine control documentation
The scale line shown is derived from y-axis distances, not x-axis.
2016-07-02 09:44:47 +02:00
Andreas Hocevar
512c442ccc Merge pull request #5550 from ahocevar/rename-multvec2
Remove use of ol.vec.Mat4 calls remaining after #5482
2016-07-01 23:12:03 +02:00
Andreas Hocevar
2d4bccacb5 Remove use of ol.vec.Mat4 calls remaining after #5482 2016-07-01 23:00:29 +02:00
Andreas Hocevar
9624357bc3 Merge pull request #5507 from ahocevar/remove-goog-vec
Remove use of goog.vec.*
2016-07-01 22:46:42 +02:00
Bart van den Eijnden
9cc724550a Merge pull request #5549 from openlayers/release-v3.17.0
Release v3.17.0
2016-07-01 19:34:17 +02:00
GaborFarkas
27e3124dca Set changeType when the map exists 2016-07-01 18:28:36 +02:00
GaborFarkas
34cc5c6bde Fix error from early enum of CHANGETYPE 2016-07-01 18:06:11 +02:00
Peter Robins
3eea9d4558 Replace goog.isNumber 2016-07-01 09:35:54 +00:00
Tim Schaub
618cb389e5 Use ol.transform.compose() for common transform compositions 2016-06-24 19:33:53 +02:00
Tim Schaub
a655234cc3 Convenience function for common composite transform 2016-06-24 19:32:29 +02:00
Tim Schaub
4cde6a0a6d Move assertions into it blocks 2016-06-24 19:32:13 +02:00
Andreas Hocevar
a1e0969d9f Add tests 2016-06-23 17:17:59 +02:00
Andreas Hocevar
3e928718f4 ol.vec.Mat4 improvements
* Rename ol.vec.Mat4.fromMatrix to ol.vec.Mat4.fromTransform
* Make result from ol.vec.Mat4.fromTransform immutable by adding result
  matrix as argument.
2016-06-23 15:52:25 +02:00
Andreas Hocevar
6b4ee42c90 Refactor to a more convenient internal API 2016-06-23 13:10:41 +02:00
Andreas Hocevar
cf7ff841a7 Remove use of goog.vec.* 2016-06-23 13:10:41 +02:00
Peter Robins
06fd92353b Remove enums from tests 2016-06-03 11:10:46 +00:00
585 changed files with 10765 additions and 7748 deletions

View File

@@ -80,7 +80,7 @@ include:
### Follow OpenLayers 3's coding style
OpenLayers 3 follows [Google's JavaScript Style
Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml).
Guide](https://google.github.io/styleguide/javascriptguide.xml).
This is checked using [ESLint](http://eslint.org/), you
can run the linter locally on your machine before committing using the `lint`
target:

View File

@@ -2,7 +2,7 @@ OS := $(shell uname)
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
SRC_GLSL := $(shell find src -type f -name '*.glsl')
SRC_SHADER_JS := $(patsubst %.glsl,%shader.js,$(SRC_GLSL))
SRC_SHADER_JS := $(patsubst %shader.glsl,%shader.js,$(SRC_GLSL))
SRC_JS := $(filter-out $(SRC_SHADER_JS),$(shell find src -name '*.js'))
SRC_JSDOC = $(shell find src -type f -name '*.jsdoc')
@@ -180,7 +180,7 @@ build/timestamps/check-%-timestamp: $(BUILD_HOSTED)/examples/%.html \
$(BUILD_HOSTED)/build/ol.js \
$(BUILD_HOSTED)/css/ol.css
@mkdir -p $(@D)
./node_modules/.bin/phantomjs --local-to-remote-url-access=true --ssl-protocol=any --ignore-ssl-errors=true bin/check-example.js $<
node tasks/check-example.js $<
@touch $@
build/compiled-examples/all.js: $(EXAMPLES_JS)
@@ -252,7 +252,7 @@ build/timestamps/eslint-timestamp: $(SRC_JS) $(SPEC_JS) $(SPEC_RENDERING_JS) \
build/timestamps/node-modules-timestamp
@mkdir -p $(@D)
@echo "Running eslint..."
@./node_modules/.bin/eslint $?
@./node_modules/.bin/eslint --quiet tasks test test_rendering src examples
@touch $@
build/timestamps/node-modules-timestamp: package.json
@@ -298,5 +298,5 @@ build/test_rendering_requires.js: $(SPEC_RENDERING_JS)
@mkdir -p $(@D)
@node tasks/generate-requires.js $^ > $@
%shader.js: %.glsl src/ol/webgl/shader.mustache bin/pyglslunit.py build/timestamps/node-modules-timestamp
%shader.js: %shader.glsl src/ol/webgl/shader.mustache bin/pyglslunit.py build/timestamps/node-modules-timestamp
@python bin/pyglslunit.py --input $< | ./node_modules/.bin/mustache - src/ol/webgl/shader.mustache > $@

View File

@@ -4,7 +4,7 @@
[![Coverage Status](https://coveralls.io/repos/openlayers/ol3/badge.svg?branch=master)](https://coveralls.io/r/openlayers/ol3?branch=master)
[![OSGeo Project](https://img.shields.io/badge/OSGeo-Project-brightgreen.svg)](http://osgeo.org/)
[OpenLayers 3](http://openlayers.org/) is a high-performance, feature-packed library for creating interactive maps on the web.
[OpenLayers 3](http://openlayers.org/) is a high-performance, feature-packed library for creating interactive maps on the web. It can display map tiles, vector data and markers loaded from any source on any web page. OpenLayers has been developed to further the use of geographic information of all kinds. It is completely free, Open Source JavaScript, released under the 2-clause BSD License (also known as the FreeBSD).
## Getting Started
@@ -12,9 +12,13 @@
- Install with npm: `npm install openlayers`
- Clone the repo: `git clone git@github.com:openlayers/ol3.git`
## Supported Browsers
OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.whatwg.org/multipage/) and [ECMAScript 5](http://www.ecma-international.org/ecma-262/5.1/). This includes Chrome, Firefox, Safari and Edge. For older browsers and platforms like Internet Explorer (down to version 9) and Android 4.x, [polyfills](http://polyfill.io) for `requestAnimationFrame` and `Element.prototype.classList` are required, and using the KML format requires a polyfill for `URL`.
## Documentation
Check out the [hosted examples](http://openlayers.org/en/master/examples/), the [workshop](http://openlayers.org/workshop/) or [API docs](http://openlayers.org/en/master/apidoc/).
Check out the [hosted examples](http://openlayers.org/en/latest/examples/), the [workshop](http://openlayers.org/workshop/) or the [API documentation](http://openlayers.org/en/latest/apidoc/).
## Bugs

View File

@@ -1,5 +1,41 @@
## Upgrade notes
### v3.18.0
#### Changes in the way assertions are handled
Previously, minified builds of the library did not have any assertions. This caused applications to fail silently or with cryptic stack traces. Starting with this release, developers get notified of many runtime errors through the new `ol.AssertionError`. This error has a `code` property. The meaning of the code can be found on http://openlayers.org/en/latest/doc/errors/. There are additional console assertion checks in debug mode when the `goog.DEBUG` compiler flag is `true`. As this is `true` by default, it is recommended that those creating custom builds set this to `false` so these assertions are stripped.'
#### Removal of `ol.ENABLE_NAMED_COLORS`
This option was previously needed to use named colors with the WebGL renderer but is no longer needed.
#### KML format now uses URL()
The URL constructor is supported by all modern browsers, but not by older ones, such as IE. To use the KML format in such older browsers, a URL polyfill will have to be loaded before use.
#### Changes only relevant to those who compile their applications together with the Closure Compiler
A number of internal types have been renamed. This will not affect those who use the API provided by the library, but if you are compiling your application together with OpenLayers and using type names, you'll need to do the following:
* rename `ol.CollectionEventType` to `ol.Collection.EventType`
* rename `ol.CollectionEvent` to `ol.Collection.Event`
* rename `ol.ViewHint` to `ol.View.Hint`
* rename `ol.ViewProperty` to `ol.View.Property`
* rename `ol.render.webgl.imagereplay.shader.Default.Locations` to `ol.render.webgl.imagereplay.defaultshader.Locations`
* rename `ol.render.webgl.imagereplay.shader.DefaultFragment` to `ol.render.webgl.imagereplay.defaultshader.Fragment`
* rename `ol.render.webgl.imagereplay.shader.DefaultVertex` to `ol.render.webgl.imagereplay.defaultshader.Vertex`
* rename `ol.renderer.webgl.map.shader.Default.Locations` to `ol.renderer.webgl.defaultmapshader.Locations`
* rename `ol.renderer.webgl.map.shader.Default.Locations` to `ol.renderer.webgl.defaultmapshader.Locations`
* rename `ol.renderer.webgl.map.shader.DefaultFragment` to `ol.renderer.webgl.defaultmapshader.Fragment`
* rename `ol.renderer.webgl.map.shader.DefaultVertex` to `ol.renderer.webgl.defaultmapshader.Vertex`
* rename `ol.renderer.webgl.tilelayer.shader.Fragment` to `ol.renderer.webgl.tilelayershader.Fragment`
* rename `ol.renderer.webgl.tilelayer.shader.Locations` to `ol.renderer.webgl.tilelayershader.Locations`
* rename `ol.renderer.webgl.tilelayer.shader.Vertex` to `ol.renderer.webgl.tilelayershader.Vertex`
* rename `ol.webgl.WebGLContextEventType` to `ol.webgl.ContextEventType`
* rename `ol.webgl.shader.Fragment` to `ol.webgl.Fragment`
* rename `ol.webgl.shader.Vertex` to `ol.webgl.Vertex`
### v3.17.0
#### `ol.source.MapQuest` removal

170
changelog/v3.18.0.md Normal file
View File

@@ -0,0 +1,170 @@
# v3.18.0
## Summary
The v3.18.0 release includes features and fixes from almost 120 pull requests since the v3.17.1 release. Most of the changes are bug fixes and continuing removal of the dependency on Closure Library. New features include:
* Addition of `Intersects` and `Within` filters to `ol.format.ogc.filter` [#5668](https://github.com/openlayers/ol3/pull/5668)
* New `overlaps` option for `ol.source.Vector` and `ol.source.VectorTile` to improve rendering performance for polygon topologies [#5196](https://github.com/openlayers/ol3/pull/5196)
* New `rotateWithView` option for `ol.style.Text` to control appearance of text on rotated views [#5050](https://github.com/openlayers/ol3/pull/5050)
* Add a `#scale()` method to `ol.geom.Geometry` and subclasses [#5685](https://github.com/openlayers/ol3/pull/5685)
* Parse `id` of features in `ol.format.MVT` [#5613](https://github.com/openlayers/ol3/pull/5613)
## Upgrade notes
#### Changes in the way assertions are handled
Previously, minified builds of the library did not have any assertions. This caused applications to fail silently or with cryptic stack traces. Starting with this release, developers get notified of many runtime errors through the new `ol.AssertionError`. This error has a `code` property. The meaning of the code can be found on http://openlayers.org/en/latest/doc/errors/. There are additional console assertion checks in debug mode when the `goog.DEBUG` compiler flag is `true`. As this is `true` by default, it is recommended that those creating custom builds set this to `false` so these assertions are stripped.'
#### Removal of `ol.ENABLE_NAMED_COLORS`
This option was previously needed to use named colors with the WebGL renderer but is no longer needed.
#### KML format now uses URL()
The URL constructor is supported by all modern browsers, but not by older ones, such as IE. To use the KML format in such older browsers, a URL polyfill will have to be loaded before use.
#### Changes only relevant to those who compile their applications together with the Closure Compiler
A number of internal types have been renamed. This will not affect those who use the API provided by the library, but if you are compiling your application together with OpenLayers and using type names, you'll need to do the following:
* rename `ol.CollectionEventType` to `ol.Collection.EventType`
* rename `ol.CollectionEvent` to `ol.Collection.Event`
* rename `ol.ViewHint` to `ol.View.Hint`
* rename `ol.ViewProperty` to `ol.View.Property`
* rename `ol.render.webgl.imagereplay.shader.Default.Locations` to `ol.render.webgl.imagereplay.defaultshader.Locations`
* rename `ol.render.webgl.imagereplay.shader.DefaultFragment` to `ol.render.webgl.imagereplay.defaultshader.Fragment`
* rename `ol.render.webgl.imagereplay.shader.DefaultVertex` to `ol.render.webgl.imagereplay.defaultshader.Vertex`
* rename `ol.renderer.webgl.map.shader.Default.Locations` to `ol.renderer.webgl.defaultmapshader.Locations`
* rename `ol.renderer.webgl.map.shader.Default.Locations` to `ol.renderer.webgl.defaultmapshader.Locations`
* rename `ol.renderer.webgl.map.shader.DefaultFragment` to `ol.renderer.webgl.defaultmapshader.Fragment`
* rename `ol.renderer.webgl.map.shader.DefaultVertex` to `ol.renderer.webgl.defaultmapshader.Vertex`
* rename `ol.renderer.webgl.tilelayer.shader.Fragment` to `ol.renderer.webgl.tilelayershader.Fragment`
* rename `ol.renderer.webgl.tilelayer.shader.Locations` to `ol.renderer.webgl.tilelayershader.Locations`
* rename `ol.renderer.webgl.tilelayer.shader.Vertex` to `ol.renderer.webgl.tilelayershader.Vertex`
* rename `ol.webgl.WebGLContextEventType` to `ol.webgl.ContextEventType`
* rename `ol.webgl.shader.Fragment` to `ol.webgl.Fragment`
* rename `ol.webgl.shader.Vertex` to `ol.webgl.Vertex`
## Full list of changes
* [#5782](https://github.com/openlayers/ol3/pull/5782) - Compare URLs in an IE compatible way ([@ahocevar](https://github.com/ahocevar))
* [#5778](https://github.com/openlayers/ol3/pull/5778) - Use Mapzen instead of openstreetmap.us tiles ([@ahocevar](https://github.com/ahocevar))
* [#5774](https://github.com/openlayers/ol3/pull/5774) - Update glob to version 7.0.6 🚀 ([@openlayers](https://github.com/openlayers))
* [#5708](https://github.com/openlayers/ol3/pull/5708) - Remove unnecessary closePath() instructions ([@ahocevar](https://github.com/ahocevar))
* [#5196](https://github.com/openlayers/ol3/pull/5196) - Batch polygon and circle fills and strokes ([@ahocevar](https://github.com/ahocevar))
* [#5768](https://github.com/openlayers/ol3/pull/5768) - Enable extent clipping for vector layers ([@ahocevar](https://github.com/ahocevar))
* [#4753](https://github.com/openlayers/ol3/pull/4753) - Export ol.geom.Geometry#containsCoordinate function ([@fredj](https://github.com/fredj))
* [#5050](https://github.com/openlayers/ol3/pull/5050) - Add rotateWithView option to ol.style.Text ([@fredj](https://github.com/fredj))
* [#5767](https://github.com/openlayers/ol3/pull/5767) - Accept feature without geometry in ol.interaction.Modify ([@fredj](https://github.com/fredj))
* [#5334](https://github.com/openlayers/ol3/pull/5334) - Load the examples resources with HTTPS ([@fredj](https://github.com/fredj))
* [#5766](https://github.com/openlayers/ol3/pull/5766) - Use HTTPS to access tiles at tileserver.maptiler.com in examples ([@klokantech](https://github.com/klokantech))
* [#5765](https://github.com/openlayers/ol3/pull/5765) - Force a map render when the view is not updated ([@fredj](https://github.com/fredj))
* [#5724](https://github.com/openlayers/ol3/pull/5724) - Fix clipping of the tile layer extent on HiDPI devices ([@ahocevar](https://github.com/ahocevar))
* [#5764](https://github.com/openlayers/ol3/pull/5764) - Remove unnecessary map.render() calls ([@bartvde](https://github.com/bartvde))
* [#5763](https://github.com/openlayers/ol3/pull/5763) - Fix assert namespace ([@ahocevar](https://github.com/ahocevar))
* [#5616](https://github.com/openlayers/ol3/pull/5616) - Fix event type and documentation of ol.events.condition.mouseOnly ([@ahocevar](https://github.com/ahocevar))
* [#5755](https://github.com/openlayers/ol3/pull/5755) - Increase the size of the map in ol.layer.Tile rendering tests ([@fredj](https://github.com/fredj))
* [#5757](https://github.com/openlayers/ol3/pull/5757) - Add ol.source.Cluster#setDistance function ([@fredj](https://github.com/fredj))
* [#5752](https://github.com/openlayers/ol3/pull/5752) - Set proper replay canvas size and offset for rotated view ([@ahocevar](https://github.com/ahocevar))
* [#5754](https://github.com/openlayers/ol3/pull/5754) - Update istanbul to version 0.4.5 🚀 ([@openlayers](https://github.com/openlayers))
* [#5727](https://github.com/openlayers/ol3/pull/5727) - Add missing goog require ([@fredj](https://github.com/fredj))
* [#5273](https://github.com/openlayers/ol3/pull/5273) - Take the pixelRatio into account when computing the gutter ([@fredj](https://github.com/fredj))
* [#5753](https://github.com/openlayers/ol3/pull/5753) - Update proj4 to version 2.3.15 🚀 ([@openlayers](https://github.com/openlayers))
* [#5741](https://github.com/openlayers/ol3/pull/5741) - Point to the English workshop ([@bartvde](https://github.com/bartvde))
* [#5721](https://github.com/openlayers/ol3/pull/5721) - Update metalsmith to version 2.2.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5733](https://github.com/openlayers/ol3/pull/5733) - Fix #5730 - Ignore null/undef. values in uri.appendParams ([@adube](https://github.com/adube))
* [#5736](https://github.com/openlayers/ol3/pull/5736) - Show `resultType` attribute in docs ([@tsauerwein](https://github.com/tsauerwein))
* [#5735](https://github.com/openlayers/ol3/pull/5735) - Update eslint to version 3.3.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5731](https://github.com/openlayers/ol3/pull/5731) - Added a pixelRatio adjust to the canvasTileLayer 'forEachLayerAtPixel… ([@Benjaki2](https://github.com/Benjaki2))
* [#5732](https://github.com/openlayers/ol3/pull/5732) - Add missing curly braces in type annotations ([@fredj](https://github.com/fredj))
* [#5728](https://github.com/openlayers/ol3/pull/5728) - Update closure-util to version 1.15.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5717](https://github.com/openlayers/ol3/pull/5717) - Update phantomjs-prebuilt to version 2.1.12 🚀 ([@openlayers](https://github.com/openlayers))
* [#5725](https://github.com/openlayers/ol3/pull/5725) - Remove tilerange assert from tilegrid/wmts ([@probins](https://github.com/probins))
* [#5723](https://github.com/openlayers/ol3/pull/5723) - Update eslint to version 3.3.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5702](https://github.com/openlayers/ol3/pull/5702) - Add rule to identify missing requires ([@tschaub](https://github.com/tschaub))
* [#5670](https://github.com/openlayers/ol3/pull/5670) - Added image data value to 'forEachLayerAtPixel' method callback ([@Benjaki2](https://github.com/Benjaki2))
* [#5720](https://github.com/openlayers/ol3/pull/5720) - Fix typo in tilegrid/wmts ([@probins](https://github.com/probins))
* [#5715](https://github.com/openlayers/ol3/pull/5715) - Create a check-example task for smarter example checking with PhantomJS ([@ahocevar](https://github.com/ahocevar))
* [#5714](https://github.com/openlayers/ol3/pull/5714) - Add FAQ entry about renderBuffer ([@tsauerwein](https://github.com/tsauerwein))
* [#5713](https://github.com/openlayers/ol3/pull/5713) - Check examples with http protocol instead of file ([@ahocevar](https://github.com/ahocevar))
* [#5689](https://github.com/openlayers/ol3/pull/5689) - Fix cursor change in translate interaction ([@pgiraud](https://github.com/pgiraud))
* [#5165](https://github.com/openlayers/ol3/pull/5165) - Remove goog.addSingletonGetter function ([@fredj](https://github.com/fredj))
* [#5701](https://github.com/openlayers/ol3/pull/5701) - Update phantomjs-prebuilt to version 2.1.11 🚀 ([@openlayers](https://github.com/openlayers))
* [#5698](https://github.com/openlayers/ol3/pull/5698) - Custom rule to identify unused goog.require() calls ([@tschaub](https://github.com/tschaub))
* [#5699](https://github.com/openlayers/ol3/pull/5699) - Update mocha to version 3.0.2 🚀 ([@openlayers](https://github.com/openlayers))
* [#5697](https://github.com/openlayers/ol3/pull/5697) - Re-enable ESLint config ([@tschaub](https://github.com/tschaub))
* [#5693](https://github.com/openlayers/ol3/pull/5693) - Reorganize files so they are named like their default export ([@tschaub](https://github.com/tschaub))
* [#5694](https://github.com/openlayers/ol3/pull/5694) - layer.Base in Map not required ([@probins](https://github.com/probins))
* [#5695](https://github.com/openlayers/ol3/pull/5695) - Remove unneeded requires in renderers ([@probins](https://github.com/probins))
* [#5692](https://github.com/openlayers/ol3/pull/5692) - Small text fix ([@bngsudheer](https://github.com/bngsudheer))
* [#5682](https://github.com/openlayers/ol3/pull/5682) - Update mocha to version 3.0.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5619](https://github.com/openlayers/ol3/pull/5619) - Remove goog.asserts.* ([@ahocevar](https://github.com/ahocevar))
* [#5685](https://github.com/openlayers/ol3/pull/5685) - Add a method to scale geometries ([@tschaub](https://github.com/tschaub))
* [#5674](https://github.com/openlayers/ol3/pull/5674) - Support fractional zoom levels in ol.View#getZoom and #setZoom ([@ahocevar](https://github.com/ahocevar))
* [#5681](https://github.com/openlayers/ol3/pull/5681) - Remove extra goog.require ([@fredj](https://github.com/fredj))
* [#5680](https://github.com/openlayers/ol3/pull/5680) - Update phantomjs-prebuilt to version 2.1.10 🚀 ([@openlayers](https://github.com/openlayers))
* [#5668](https://github.com/openlayers/ol3/pull/5668) - Added Intersects and Within filters into ol.format.wfs ([@cpsTinK](https://github.com/cpsTinK))
* [#5675](https://github.com/openlayers/ol3/pull/5675) - Remove unused goog.provide ([@fredj](https://github.com/fredj))
* [#5673](https://github.com/openlayers/ol3/pull/5673) - Add missing semicolon ([@ahocevar](https://github.com/ahocevar))
* [#5587](https://github.com/openlayers/ol3/pull/5587) - Lazily create KML style defaults ([@ahocevar](https://github.com/ahocevar))
* [#5599](https://github.com/openlayers/ol3/pull/5599) - Allow subpixel center on view ([@ahocevar](https://github.com/ahocevar))
* [#5630](https://github.com/openlayers/ol3/pull/5630) - chore(build): guard against unterminated scripts ([@tlvince](https://github.com/tlvince))
* [#5669](https://github.com/openlayers/ol3/pull/5669) - Fix Github links to specific lines on jsdoc pages ([@dtreiter](https://github.com/dtreiter))
* [#5667](https://github.com/openlayers/ol3/pull/5667) - Do not return undefined from ol.proj.get ([@ahocevar](https://github.com/ahocevar))
* [#5665](https://github.com/openlayers/ol3/pull/5665) - Update eslint to version 3.2.2 🚀 ([@openlayers](https://github.com/openlayers))
* [#5632](https://github.com/openlayers/ol3/pull/5632) - Improve docs for the ol.LoadingStrategy type ([@ahocevar](https://github.com/ahocevar))
* [#5641](https://github.com/openlayers/ol3/pull/5641) - De-randomize the listener map property ([@ahocevar](https://github.com/ahocevar))
* [#5664](https://github.com/openlayers/ol3/pull/5664) - Update eslint to version 3.2.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5658](https://github.com/openlayers/ol3/pull/5658) - Update marked to version 0.3.6 🚀 ([@openlayers](https://github.com/openlayers))
* [#5657](https://github.com/openlayers/ol3/pull/5657) - Update phantomjs-prebuilt to version 2.1.9 🚀 ([@openlayers](https://github.com/openlayers))
* [#5652](https://github.com/openlayers/ol3/pull/5652) - Make XHR work for file:// urls ([@ahocevar](https://github.com/ahocevar))
* [#5653](https://github.com/openlayers/ol3/pull/5653) - Fix namespace in filter docs ([@ahocevar](https://github.com/ahocevar))
* [#5651](https://github.com/openlayers/ol3/pull/5651) - Update coveralls to version 2.11.12 🚀 ([@openlayers](https://github.com/openlayers))
* [#5649](https://github.com/openlayers/ol3/pull/5649) - Fix DateTime parsing with non-Zulu times ([@ahocevar](https://github.com/ahocevar))
* [#5648](https://github.com/openlayers/ol3/pull/5648) - Update sinon to version 1.17.5 🚀 ([@openlayers](https://github.com/openlayers))
* [#5646](https://github.com/openlayers/ol3/pull/5646) - Update phantomjs-prebuilt to version 2.1.8 🚀 ([@openlayers](https://github.com/openlayers))
* [#5644](https://github.com/openlayers/ol3/pull/5644) - Update browserify to version 13.1.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5640](https://github.com/openlayers/ol3/pull/5640) - Add example for usage of HERE Map Tile API ([@chrismayer](https://github.com/chrismayer))
* [#5579](https://github.com/openlayers/ol3/pull/5579) - Update jquery to version 3.1.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5636](https://github.com/openlayers/ol3/pull/5636) - Update clean-css to version 3.4.19 🚀 ([@openlayers](https://github.com/openlayers))
* [#5634](https://github.com/openlayers/ol3/pull/5634) - Update async to version 2.0.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5622](https://github.com/openlayers/ol3/pull/5622) - Update TileWMS.coordKeyPrefix_ on setUrls ([@rrutkows](https://github.com/rrutkows))
* [#5611](https://github.com/openlayers/ol3/pull/5611) - Fix broken link to Google JavaScript Style Guide ([@ischas](https://github.com/ischas))
* [#5620](https://github.com/openlayers/ol3/pull/5620) - Replace goog.getUid with ol.getUid ([@probins](https://github.com/probins))
* [#5614](https://github.com/openlayers/ol3/pull/5614) - Replace goog.abstractMethod ([@probins](https://github.com/probins))
* [#5613](https://github.com/openlayers/ol3/pull/5613) - Parse MVT id property ([@drnextgis](https://github.com/drnextgis))
* [#5612](https://github.com/openlayers/ol3/pull/5612) - Update vector-tile to version 1.3.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5609](https://github.com/openlayers/ol3/pull/5609) - Update eslint to version 3.1.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5605](https://github.com/openlayers/ol3/pull/5605) - Remove goog.isObject not in assertions ([@probins](https://github.com/probins))
* [#5603](https://github.com/openlayers/ol3/pull/5603) - Update eslint to version 3.1.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5597](https://github.com/openlayers/ol3/pull/5597) - Avoid unnecessary getImageData calls in hit detection ([@schmidtk](https://github.com/schmidtk))
* [#5429](https://github.com/openlayers/ol3/pull/5429) - Remove enums from tests ([@probins](https://github.com/probins))
* [#5516](https://github.com/openlayers/ol3/pull/5516) - Remove goog.Uri from KML format ([@probins](https://github.com/probins))
* [#5598](https://github.com/openlayers/ol3/pull/5598) - Clarify that default source.Vector loader only handles features ([@probins](https://github.com/probins))
* [#5595](https://github.com/openlayers/ol3/pull/5595) - Use tile keys instead of coord keys ([@ahocevar](https://github.com/ahocevar))
* [#5594](https://github.com/openlayers/ol3/pull/5594) - Add renderBuffer option for ol.source.ImageVector ([@ahocevar](https://github.com/ahocevar))
* [#5592](https://github.com/openlayers/ol3/pull/5592) - Update coveralls to version 2.11.11 🚀 ([@openlayers](https://github.com/openlayers))
* [#5593](https://github.com/openlayers/ol3/pull/5593) - Update async to version 2.0.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#4194](https://github.com/openlayers/ol3/pull/4194) - Remove usage of goog.color and closure named colors ([@bjornharrtell](https://github.com/bjornharrtell))
* [#5583](https://github.com/openlayers/ol3/pull/5583) - Fix dead link for change event in API docs ([@ahocevar](https://github.com/ahocevar))
* [#5560](https://github.com/openlayers/ol3/pull/5560) - Get rid of goog.isArrayLike ([@fredj](https://github.com/fredj))
* [#5573](https://github.com/openlayers/ol3/pull/5573) - Determine ol.global in a way that works in more environments ([@ahocevar](https://github.com/ahocevar))
* [#5558](https://github.com/openlayers/ol3/pull/5558) - Remove goog.Uri from tests ([@probins](https://github.com/probins))
* [#5578](https://github.com/openlayers/ol3/pull/5578) - Add polyfills to copy/paste code ([@ahocevar](https://github.com/ahocevar))
* [#5577](https://github.com/openlayers/ol3/pull/5577) - Fix olx.source.OSMOptions#url default value documentation ([@fredj](https://github.com/fredj))
* [#5576](https://github.com/openlayers/ol3/pull/5576) - Use the word "documentation" ([@ahocevar](https://github.com/ahocevar))
* [#5575](https://github.com/openlayers/ol3/pull/5575) - Add a bit more info about the library to the README ([@ahocevar](https://github.com/ahocevar))
* [#5574](https://github.com/openlayers/ol3/pull/5574) - Add paragraph about supported browsers and polyfills ([@ahocevar](https://github.com/ahocevar))
* [#5570](https://github.com/openlayers/ol3/pull/5570) - Upgrade JSTS in example to 1.2.0 ([@bjornharrtell](https://github.com/bjornharrtell))
* [#5566](https://github.com/openlayers/ol3/pull/5566) - Fix ol.style.Image#getAnchor documentation ([@fredj](https://github.com/fredj))
* [#5546](https://github.com/openlayers/ol3/pull/5546) - Remove useless target argument from ol.Event and subclass constructors ([@ahocevar](https://github.com/ahocevar))
* [#5565](https://github.com/openlayers/ol3/pull/5565) - Reinsert goog.provide for enums in olx.js ([@probins](https://github.com/probins))
* [#5561](https://github.com/openlayers/ol3/pull/5561) - Add unit tests for ol.View.createCenterConstraint ([@fredj](https://github.com/fredj))
* [#5563](https://github.com/openlayers/ol3/pull/5563) - Return if a vertex was removed in ol.interaction.Modify#removeVertex_ ([@fredj](https://github.com/fredj))
* [#5533](https://github.com/openlayers/ol3/pull/5533) - Make sure reprojected tiles are recreated on updateParams ([@ahocevar](https://github.com/ahocevar))
* [#5534](https://github.com/openlayers/ol3/pull/5534) - Fix ScaleLine control documentation ([@ahocevar](https://github.com/ahocevar))
* [#5541](https://github.com/openlayers/ol3/pull/5541) - Replace goog.isNumber ([@probins](https://github.com/probins))
* [#5552](https://github.com/openlayers/ol3/pull/5552) - Replace goog.webgl. ([@probins](https://github.com/probins))
* [#5550](https://github.com/openlayers/ol3/pull/5550) - Remove use of ol.vec.Mat4 calls remaining after #5482 ([@ahocevar](https://github.com/ahocevar))
* [#5507](https://github.com/openlayers/ol3/pull/5507) - Remove use of goog.vec.* ([@ahocevar](https://github.com/ahocevar))

10
changelog/v3.18.1.md Normal file
View File

@@ -0,0 +1,10 @@
# v3.18.1
## Summary
The v3.18.1 release is a patch release that addresses two regressions in the v3.18.0 release. See the [v3.18.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.18.0) for details on upgrading from v3.17.x.
## Fixes
* [#5798](https://github.com/openlayers/ol3/pull/5798) - Move to 90° along the circle, not 0° ([@ahocevar](https://github.com/ahocevar))
* [#5790](https://github.com/openlayers/ol3/pull/5790) - Fix vector tile rotation on HiDPI devices ([@ahocevar](https://github.com/ahocevar))

9
changelog/v3.18.2.md Normal file
View File

@@ -0,0 +1,9 @@
# v3.18.2
## Summary
The v3.18.2 release is a patch release that addresses a regression in the v3.18.1 release. See the [v3.18.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.18.0) for details on upgrading from v3.17.x.
## Fixes
* [#5828](https://github.com/openlayers/ol3/pull/5828) - Always close polygon rings ([@ahocevar](https://github.com/ahocevar))

View File

@@ -11,7 +11,7 @@
<link rel="stylesheet" href="./resources/layout.css" type="text/css">
{{{ extraHead.local }}}
{{{ css.tag }}}
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList"></script>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="./resources/zeroclipboard/ZeroClipboard.min.js"></script>
<title>{{ title }}</title>
</head>
@@ -61,7 +61,7 @@
<a id="copy-button"><i class="fa fa-clipboard"></i> Copy</a>
<a id="jsfiddle-button"><i class="fa fa-jsfiddle"></i> Edit</a>
</div>
<form method="POST" id="jsfiddle-form" target="_blank" action="http://jsfiddle.net/api/post/library/pure/">
<form method="POST" id="jsfiddle-form" target="_blank" action="https://jsfiddle.net/api/post/library/pure/">
<textarea class="hidden" name="js">{{ js.source }}</textarea>
<textarea class="hidden" name="css">{{ css.source }}</textarea>
<textarea class="hidden" name="html">{{ contents }}</textarea>
@@ -73,6 +73,8 @@
&lt;head&gt;
&lt;title&gt;{{ title }}&lt;/title&gt;
&lt;link rel="stylesheet" href="http://openlayers.org/en/v{{ olVersion }}/css/ol.css" type="text/css"&gt;
&lt;!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --&gt;
&lt;script src="http://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"&gt;&lt;/script&gt;
&lt;script src="http://openlayers.org/en/v{{ olVersion }}/build/ol.js"&gt;&lt;/script&gt;{{#if extraHead.remote}}
{{ indent extraHead.remote spaces=4 }}{{/if}}{{#if css.source}}
&lt;style&gt;

View File

@@ -88,7 +88,7 @@ $(function () {
var link = 'https://github.com/openlayers/ol3/blob/v' + currentVersion + '/' +
textParts[0];
el.innerHTML = '<a href="' + link + '">' + textParts[0] + '</a>, ' +
'<a href="' + link + textParts[1].replace('line ', '#l') + '">' +
'<a href="' + link + textParts[1].replace('line ', '#L') + '">' +
textParts[1] + '</a>';
});

View File

@@ -1,4 +1,4 @@
@import url(http://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700);
@import url(https://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700);
.navbar-inverse {
border: 0;
}

226
doc/errors/index.md Normal file
View File

@@ -0,0 +1,226 @@
---
title: Errors
layout: doc.hbs
---
# Errors
### 1
The view center is not defined.
### 2
The view resolution is not defined.
### 3
The view rotation is not defined.
### 4
`image` and `src` cannot be provided at the same time.
### 5
`imgSize` must be set when `image` is provided.
### 6
A defined and non-empty `src` or `image` must be provided.
### 7
`format` must be set when `url` is set.
### 8
Unknown `serverType` configured.
### 9
`url` must be configured or set using `#setUrl()`.
### 10
The default `geometryFunction` can only handle `ol.geom.Point` geometries.
### 11
`options.featureTypes` should be an Array.
### 12
`options.geometryName` must also be provided when `options.bbox` is set.
### 13
Invalid corner. Valid corners are `top-left`, `top-right`, `bottom-right` and `bottom-left`.
### 14
Invalid color. Valid colors are all [CSS colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color).
### 15
Tried to get a value for a key that does not exist in the cache.
### 16
Tried to set a value for a key that is used already.
### 17
`resolutions` must be sorted in descending order.
### 18
Either `origin` or `origins` must be configured, never both.
### 19
Number of `tileSizes` and `resolutions` must be equal.
### 20
Number of `origins` and `resolutions` must be equal.
### 22
Either `tileSize` or `tileSizes` must be configured, never both.
### 23
The passed `ol.TileCoord`s must all have the same `z` value.
### 24
Invalid extent or geometry provided as `geometry`.
### 25
Cannot fit empty extent provided as `geometry`.
### 26
Features for `deletes` must have an id set by the feature reader or `ol.Feature#setId()`.
### 27
Features for `updates` must have an id set by the feature reader or `ol.Feature#setId()`.
### 28
`renderMode` must be `'image'`, `'hybrid'` or `'vector'`.
### 29
`x` must be greater than `0`.
### 30
The passed `feature` was already added to the source.
### 31
Tried to enqueue an `element` that was already added to the queue.
### 32
Transformation matrix cannot be inverted.
### 33
Invalid `units`. `'degrees'`, `'imperial'`, `'nautical'`, `'metric'` or `'us'` required.
### 34
Invalid geometry layout. Must be `XY`, `XYZ`, `XYM` or `XYZM`.
### 35
Unknown GeoJSON object type. Expected `"Feature"` or `"FeatureCollection"`.
### 36
Unknown SRS type. Expected `"name"` or `"EPSG"`.
### 37
Unknown geometry type found. Expected `'Point'`, `'LineString'`, `'Polygon'` or `'GeometryCollection'`.
### 38
`styleMapValue` has an unknown type.
### 39
Unknown geometry type found. Expected `'GeometryCollection'`, `'MultiPoint'`, `'MultiLineString'` or `'MultiPolygon'`.
### 40
Expected `feature` to have a geometry.
### 41
Expected an `ol.style.Style` or an array of `ol.style.Style`.
### 42
Expected an `ol.Feature`, but got an `ol.RenderFeature`.
### 43
Expected `layers` to be an array or an `ol.Collection`.
### 44
`logo.href` should be a string.
### 45
`logo.src` should be a string.
### 46
Incorrect format for `renderer` option.
### 47
Expected `controls` to be an array or an `ol.Collection`.
### 48
Expected `interactions` to be an array or an `ol.Collection`.
### 49
Expected `overlays` to be an array or an `ol.Collection`.
### 50
Cannot determine Rest Service from url.
### 51
Either `url` or `tileJSON` options must be provided.
### 52
Unknown `serverType` configured.
### 53
Unknown `tierSizeCalculation` configured.
### 54
Hex color should have 3 or 6 digits.
### 55
The `{-y}` placeholder requires a tile grid with extent.
### 56
`mapBrowserEvent` must originate from a pointer event.

View File

@@ -20,6 +20,7 @@ Table of contents:
* [Why is the order of a coordinate [lon,lat], and not [lat,lon]?](#why-is-the-order-of-a-coordinate-lon-lat-and-not-lat-lon-)
* [Why aren't there any features in my source?](#why-aren-t-there-any-features-in-my-source-)
* [How do I force a re-render of the map?](#how-do-i-force-a-re-render-of-the-map-)
* [Why are my features not found?](#why-are-my-features-not-found-)
* [How do I create a custom build of OpenLayers?](#how-do-i-create-a-custom-build-of-openlayers-)
* [Do I need to write my own code using Closure library?](#do-i-need-to-write-my-own-code-using-closure-library-)
* [Do I need to compress my code with Closure compiler?](#do-i-need-to-compress-my-code-with-closure-compiler-)
@@ -316,6 +317,24 @@ map.render();
map.renderSync();
```
## Why are my features not found?
You are using `ol.Map#forEachFeatureAtPixel` or `ol.Map#hasFeatureAtPixel`, but
it sometimes does not work for large icons or labels? The *hit detection* only
checks features that are within a certain distance of the given position. For large
icons, the actual geometry of a feature might be too far away and is not considered.
In this case, set the `renderBuffer` property of `ol.layer.Vector` (the default
value is 100px):
```javascript
var vectorLayer = new ol.layer.Vector({
...
renderBuffer: 200
});
```
The recommended value is the size of the largest symbol, line width or label.
## How do I create a custom build of OpenLayers?

View File

@@ -9,7 +9,7 @@ If you're eager to get your first OpenLayers 3 map on a page, dive into the [qui
For a more in-depth overview of OpenLayers 3 core concepts, check out the [tutorials](tutorials/).
Make sure to also check out the [OpenLayers 3 workshop](/workshop/).
Make sure to also check out the [OpenLayers 3 workshop](/workshop/en/).
Find additional reference material in the [API docs](../apidoc).

View File

@@ -60,6 +60,12 @@ To include a map a web page you will need 3 things:
The first part is to include the JavaScript library. For the purpose of this tutorial, here we simply point to the openlayers.org website to get the whole library. In a production environment, we would build a custom version of the library including only the module needed for our application.
**Optional:** If the application is intended to run on old platforms like Internet Explorer or Android 4.x, another script needs to be included before OpenLayers:
```xml
<script src="http://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList"></script>
```
### `<div>` to contain the map
@@ -121,7 +127,7 @@ The `layers: [ ... ]` array is used to define the list of layers available in th
Layers in OpenLayers 3 are defined with a type (Image, Tile or Vector) which contains a source. The source is the protocol used to get the map tiles. You can consult the list of [available layer sources here](/en/{{ latest }}/apidoc/ol.source.html)
The next part of the `Map` object is the `View`. The view allow to specify the center, resolution, and rotation of the map. The simplest way to define a view is to define a center point and a zoom level. Note that zoom level 0 is zoomed out.
The next part of the `Map` object is the `View`. The view allows to specify the center, resolution, and rotation of the map. The simplest way to define a view is to define a center point and a zoom level. Note that zoom level 0 is zoomed out.
```js
view: new ol.View({

View File

@@ -24,7 +24,9 @@ Although Closure library functions are widely used within OL3, none of them are
Unlike in, say, Node, where a module's exports are fixed in the source, with Closure Compiler, exports can be defined at compile time. This makes it easy to create builds that are customized to the needs of a particular site or application: a __custom build__ only exports those properties and methods needed by the site or application. As the full build is large, and will probably become larger as new features are added to the API, it's recommended that sites create a custom build for production software.
## Renderers and Browser Support
The library currently includes three renderers: Canvas, DOM, and WebGL. All three support both raster data from tile/image servers, and vector data; WebGL however only supports Point vectors and does not support labels. Clearly only those browsers that [support Canvas](http://caniuse.com/canvas) can use the Canvas renderer. Equally, the WebGL renderer can only be used on those devices and [browsers](http://caniuse.com/webgl) that support WebGL. Internet Explorer versions before 9 are not supported at all.
The library currently includes three renderers: Canvas, DOM, and WebGL. All three support both raster data from tile/image servers, and vector data; WebGL however only supports Point vectors and does not support labels. Clearly only those browsers that [support Canvas](http://caniuse.com/canvas) can use the Canvas renderer. Equally, the WebGL renderer can only be used on those devices and [browsers](http://caniuse.com/webgl) that support WebGL.
OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.whatwg.org/multipage/) and [ECMAScript 5](http://www.ecma-international.org/ecma-262/5.1/). This includes Chrome, Firefox, Safari and Edge. For older browsers and platforms like Internet Explorer (down to version 9) and Android 4.x, [polyfills](http://polyfill.io) for `requestAnimationFrame` and `Element.prototype.classList` are required, and using the KML format requires a polyfill for `URL`.
The library is intended for use on both desktop/laptop and mobile devices.

View File

@@ -2,8 +2,6 @@ goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.control');
goog.require('ol.format.GeoJSON');
goog.require('ol.geom.Point');
goog.require('ol.geom.SimpleGeometry');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.source.OSM');

View File

@@ -7,3 +7,7 @@ docs: >
tags: "cluster, vector"
---
<div id="map" class="map"></div>
<form>
<label>cluster distance</label>
<input id="distance" type="range" min="0" max="100" step="1" value="40"/>
</form>

View File

@@ -14,6 +14,8 @@ goog.require('ol.style.Style');
goog.require('ol.style.Text');
var distance = document.getElementById('distance');
var count = 20000;
var features = new Array(count);
var e = 4500000;
@@ -27,7 +29,7 @@ var source = new ol.source.Vector({
});
var clusterSource = new ol.source.Cluster({
distance: 40,
distance: parseInt(distance.value, 10),
source: source
});
@@ -74,3 +76,7 @@ var map = new ol.Map({
zoom: 2
})
});
distance.addEventListener('input', function() {
clusterSource.setDistance(parseInt(distance.value, 10));
});

View File

@@ -8,7 +8,7 @@ logoElement.href = 'http://www.osgeo.org/';
logoElement.target = '_blank';
var logoImage = document.createElement('img');
logoImage.src = 'http://www.osgeo.org/sites/all/themes/osgeo/logo.png';
logoImage.src = 'https://www.osgeo.org/sites/all/themes/osgeo/logo.png';
logoElement.appendChild(logoImage);

View File

@@ -1,3 +1,4 @@
goog.require('ol');
goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.View');
@@ -149,7 +150,7 @@ var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json'
url: 'https://api.tiles.mapbox.com/v3/mapbox.geography-class.json?secure'
})
}),
new ol.layer.Vector({

View File

@@ -6,7 +6,7 @@ docs: >
<p>The example loads TopoJSON geometries and uses d3 (<code>d3.geo.path</code>) to render these geometries to a canvas element that is then used as the image of an ol3 image layer.</p>
tags: "d3"
resources:
- http://d3js.org/d3.v3.min.js
- http://d3js.org/topojson.v1.min.js
- https://d3js.org/d3.v3.min.js
- https://d3js.org/topojson.v1.min.js
---
<div id="map" class="map"></div>

View File

@@ -1,4 +1,3 @@
goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.geom.MultiPoint');

View File

@@ -1,5 +1,4 @@
// NOCOMPILE
goog.require('ol.Attribution');
goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.View');

21
examples/here-maps.html Normal file
View File

@@ -0,0 +1,21 @@
---
layout: example.html
title: HERE Map Tile API
shortdesc: Example of a map with map tiles from HERE.
docs: >
<p><a href="https://developer.here.com/rest-apis/documentation/enterprise-map-tile">HERE Map Tile API</a> used with <code>ol.source.XYZ</code>.</p>
<p>Be sure to respect the <a href="https://legal.here.com/en/terms/serviceterms/us/">HERE Service Terms</a> when using their tile API.</p>
tags: "here, here-maps, here-tile-api"
cloak:
a2qhegvZZFIuJDkkqjhQ: Your HERE Maps appId from https://developer.here.com/
lPJ3iaFLJDhD8fIAyU582A: Your HERE Maps appCode from https://developer.here.com/
---
<div id="map" class="map"></div>
<select id="layer-select">
<option value="normal.day" selected>Normal Day</option>
<option value="normal.day.transit">Normal Day Transit</option>
<option value="pedestrian.day">Pedestrian Day</option>
<option value="terrain.day">Terrain Day</option>
<option value="satellite.day">Satellite Day</option>
<option value="hybrid.day">Hybrid Day</option>
</select>

100
examples/here-maps.js Normal file
View File

@@ -0,0 +1,100 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.source.XYZ');
var appId = 'a2qhegvZZFIuJDkkqjhQ';
var appCode = 'lPJ3iaFLJDhD8fIAyU582A';
var hereLayers = [
{
base: 'base',
type: 'maptile',
scheme: 'normal.day',
app_id: appId,
app_code: appCode
},
{
base: 'base',
type: 'maptile',
scheme: 'normal.day.transit',
app_id: appId,
app_code: appCode
},
{
base: 'base',
type: 'maptile',
scheme: 'pedestrian.day',
app_id: appId,
app_code: appCode
},
{
base: 'aerial',
type: 'maptile',
scheme: 'terrain.day',
app_id: appId,
app_code: appCode
},
{
base: 'aerial',
type: 'maptile',
scheme: 'satellite.day',
app_id: appId,
app_code: appCode
},
{
base: 'aerial',
type: 'maptile',
scheme: 'hybrid.day',
app_id: appId,
app_code: appCode
}
];
var urlTpl = 'https://{1-4}.{base}.maps.cit.api.here.com' +
'/{type}/2.1/maptile/newest/{scheme}/{z}/{x}/{y}/256/png' +
'?app_id={app_id}&app_code={app_code}';
var layers = [];
var i, ii;
for (i = 0, ii = hereLayers.length; i < ii; ++i) {
var layerDesc = hereLayers[i];
layers.push(new ol.layer.Tile({
visible: false,
preload: Infinity,
source: new ol.source.XYZ({
url: createUrl(urlTpl, layerDesc),
attributions: 'Map Tiles &copy; 2016 ' +
'<a href="http://developer.here.com">HERE</a>'
})
}));
}
var map = new ol.Map({
layers: layers,
renderer: common.getRendererFromQueryString(),
// Improve user experience by loading tiles while dragging/zooming. Will make
// zooming choppy on mobile or slow devices.
loadTilesWhileInteracting: true,
target: 'map',
view: new ol.View({
center: [921371.9389, 6358337.7609],
zoom: 10
})
});
function createUrl(tpl, layerDesc) {
return tpl
.replace('{base}', layerDesc.base)
.replace('{type}', layerDesc.type)
.replace('{scheme}', layerDesc.scheme)
.replace('{app_id}', layerDesc.app_id)
.replace('{app_code}', layerDesc.app_code);
}
var select = document.getElementById('layer-select');
function onChange() {
var scheme = select.value;
for (var i = 0, ii = layers.length; i < ii; ++i) {
layers[i].setVisible(hereLayers[i].scheme === scheme);
}
}
select.addEventListener('change', onChange);
onChange();

View File

@@ -55,7 +55,7 @@ var vectorLayer = new ol.layer.Vector({
var rasterLayer = new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.geography-class.json?secure',
crossOrigin: ''
})
});

View File

@@ -39,7 +39,7 @@ var vectorLayer = new ol.layer.Vector({
var rasterLayer = new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.geography-class.json?secure',
crossOrigin: ''
})
});

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.View');

View File

@@ -7,6 +7,6 @@ docs: >
with OpenLayers 3.
tags: "vector, jsts, buffer"
resources:
- https://cdn.rawgit.com/bjornharrtell/jsts/gh-pages/1.0.2/jsts.min.js
- https://cdn.rawgit.com/bjornharrtell/jsts/gh-pages/1.2.0/jsts.min.js
---
<div id="map" class="map"></div>

View File

@@ -1,6 +1,5 @@
// NOCOMPILE
// this example uses JSTS for which we don't have an externs file.
goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.GeoJSON');

View File

@@ -17,8 +17,7 @@ var extents = {
var base = new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/' +
'mapbox.world-light.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.world-light.json?secure',
crossOrigin: 'anonymous'
})
});
@@ -26,8 +25,7 @@ var base = new ol.layer.Tile({
var overlay = new ol.layer.Tile({
extent: extents.India,
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/' +
'mapbox.world-black.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.world-black.json?secure',
crossOrigin: 'anonymous'
})
});

View File

@@ -14,15 +14,13 @@ var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/' +
'mapbox.20110804-hoa-foodinsecurity-3month.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.20110804-hoa-foodinsecurity-3month.json?secure',
crossOrigin: 'anonymous'
})
}),
new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/' +
'mapbox.world-borders-light.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.world-borders-light.json?secure',
crossOrigin: 'anonymous'
})
})

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.control');

View File

@@ -1,4 +1,4 @@
goog.require('ol.Attribution');
/* eslint-disable openlayers-internal/no-unused-requires */
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.MVT');
@@ -31,7 +31,7 @@ for (var z = zoomOffset / reuseZoomLevels; z <= 22 / reuseZoomLevels; ++z) {
resolutions.push(156543.03392804097 / Math.pow(2, z * reuseZoomLevels));
}
function tileUrlFunction(tileCoord) {
return ('http://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' +
return ('https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' +
'{z}/{x}/{y}.vector.pbf?access_token=' + key)
.replace('{z}', String(tileCoord[0] * reuseZoomLevels + zoomOffset))
.replace('{x}', String(tileCoord[1]))

View File

@@ -1,4 +1,5 @@
goog.require('ol.Attribution');
/* eslint-disable openlayers-internal/no-unused-requires */
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.MVT');
@@ -9,6 +10,7 @@ goog.require('ol.style.Icon');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
goog.require('ol.style.Text');
goog.require('ol.tilegrid');
var key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiRk1kMWZaSSJ9.E5BkluenyWQMsBLsuByrmg';
@@ -23,7 +25,7 @@ var map = new ol.Map({
format: new ol.format.MVT(),
tileGrid: ol.tilegrid.createXYZ({maxZoom: 22}),
tilePixelRatio: 16,
url: 'http://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' +
url: 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' +
'{z}/{x}/{y}.vector.pbf?access_token=' + key
}),
style: createMapboxStreetsV6Style()

View File

@@ -18,8 +18,7 @@ var map = new ol.Map({
}),
new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/' +
'mapbox.natural-earth-hypso-bathy.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy.json?secure',
crossOrigin: 'anonymous'
}),
minResolution: 2000,

View File

@@ -3,7 +3,9 @@ layout: example.html
title: OSM Vector Tiles
shortdesc: Using OpenStreetMap vector tiles.
docs: >
A simple vector tiles map with OpenStreetMap vector tiles. **Note**: The tiles used in this example are not optimized for rendering - they clip tiles exactly at the tile boundary instead of adding a buffer, and use geographic coordinates instead of tile relative pixel coordinates in view projection.
tags: "vector, tiles, osm"
A simple vector tiles map with Mapzen vector tiles. **Note**: TopoJSON vector tiles are not optimized for rendering - they might clip geometries exactly at the tile boundary instead of adding a buffer, and use geographic coordinates instead of tile relative pixel coordinates in view projection.
tags: "vector, tiles, osm, mapzen"
cloak:
vector-tiles-5eJz6JX: Your Mapzen API key from https://mapzen.com/developers
---
<div id="map" class="map"></div>

View File

@@ -7,8 +7,14 @@ goog.require('ol.source.VectorTile');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
goog.require('ol.tilegrid');
var key = 'vector-tiles-5eJz6JX';
var attribution = [new ol.Attribution({
html: '&copy; OpenStreetMap contributors, Whos On First, Natural Earth, and openstreetmapdata.com'
})];
var format = new ol.format.TopoJSON();
var tileGrid = ol.tilegrid.createXYZ({maxZoom: 19});
var roadStyleCache = {};
@@ -17,7 +23,6 @@ var roadColor = {
'minor_road': '#ccb',
'highway': '#f39'
};
var landuseStyleCache = {};
var buildingStyle = new ol.style.Style({
fill: new ol.style.Fill({
color: '#666',
@@ -33,10 +38,10 @@ var map = new ol.Map({
layers: [
new ol.layer.VectorTile({
source: new ol.source.VectorTile({
attributions: attribution,
format: format,
tileGrid: tileGrid,
url: 'http://{a-c}.tile.openstreetmap.us/' +
'vectiles-water-areas/{z}/{x}/{y}.topojson'
url: 'https://vector.mapzen.com/osm/water/{z}/{x}/{y}.topojson?api_key=' + key
}),
style: new ol.style.Style({
fill: new ol.style.Fill({
@@ -46,10 +51,10 @@ var map = new ol.Map({
}),
new ol.layer.VectorTile({
source: new ol.source.VectorTile({
attributions: attribution,
format: format,
tileGrid: tileGrid,
url: 'http://{a-c}.tile.openstreetmap.us/' +
'vectiles-highroad/{z}/{x}/{y}.topojson'
url: 'https://vector.mapzen.com/osm/roads/{z}/{x}/{y}.topojson?api_key=' + key
}),
style: function(feature) {
var kind = feature.get('kind');
@@ -80,55 +85,14 @@ var map = new ol.Map({
}),
new ol.layer.VectorTile({
source: new ol.source.VectorTile({
attributions: attribution,
format: format,
tileGrid: tileGrid,
url: 'http://{a-c}.tile.openstreetmap.us/' +
'vectiles-buildings/{z}/{x}/{y}.topojson'
url: 'https://vector.mapzen.com/osm/buildings/{z}/{x}/{y}.topojson?api_key=' + key
}),
style: function(f, resolution) {
return (resolution < 10) ? buildingStyle : null;
}
}),
new ol.layer.VectorTile({
source: new ol.source.VectorTile({
format: format,
tileGrid: tileGrid,
url: 'http://{a-c}.tile.openstreetmap.us/' +
'vectiles-land-usages/{z}/{x}/{y}.topojson'
}),
visible: false,
style: function(feature) {
var kind = feature.get('kind');
var styleKey = kind;
var style = landuseStyleCache[styleKey];
if (!style) {
var color, width;
color = {
'parking': '#ddd',
'industrial': '#aaa',
'urban area': '#aaa',
'park': '#76C759',
'school': '#DA10E7',
'garden': '#76C759',
'pitch': '#D58F8D',
'scrub': '#3E7D28',
'residential': '#4C9ED9'
}[kind];
width = kind == 'highway' ? 1.5 : 1;
style = new ol.style.Style({
stroke: new ol.style.Stroke({
color: color,
width: width
}),
fill: new ol.style.Fill({
color: color,
opacity: 0.5
})
});
landuseStyleCache[styleKey] = style;
}
return style;
}
})
],
target: 'map',

View File

@@ -45,8 +45,7 @@ var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/' +
'mapbox.natural-earth-hypso-bathy.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy.json?secure',
crossOrigin: 'anonymous'
})
})

View File

@@ -20,7 +20,7 @@ docs: >
</p>
tags: "raster, pixel"
resources:
- http://d3js.org/d3.v3.min.js
- https://d3js.org/d3.v3.min.js
cloak:
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://www.bingmapsportal.com/ here
---

View File

@@ -8,7 +8,7 @@ docs: >
in <a href="http://epsg.io/">EPSG.io</a> database.
tags: "reprojection, projection, proj4js, epsg.io"
resources:
- http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
- https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
---
<div id="map" class="map"></div>
<form class="form-inline">

View File

@@ -6,6 +6,6 @@ docs: >
This example shows client-side reprojection of single image source.
tags: "reprojection, projection, proj4js, image, imagestatic"
resources:
- http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
- https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
---
<div id="map" class="map"></div>

View File

@@ -6,7 +6,7 @@ docs: >
This example shows client-side raster reprojection between various projections.
tags: "reprojection, projection, proj4js, osm, wms, wmts, hidpi"
resources:
- http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
- https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
---
<div id="map" class="map"></div>
<form class="form-inline">

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.extent');
@@ -58,7 +57,7 @@ var layers = {};
layers['bng'] = new ol.layer.Tile({
source: new ol.source.XYZ({
projection: 'EPSG:27700',
url: 'http://tileserver.maptiler.com/miniscale/{z}/{x}/{y}.png',
url: 'https://tileserver.maptiler.com/miniscale/{z}/{x}/{y}.png',
crossOrigin: '',
maxZoom: 6
})
@@ -88,7 +87,7 @@ layers['wms21781'] = new ol.layer.Tile({
'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale',
'FORMAT': 'image/jpeg'
},
url: 'http://wms.geo.admin.ch/',
url: 'https://wms.geo.admin.ch/',
projection: 'EPSG:21781'
})
});
@@ -112,7 +111,7 @@ fetch(url).then(function(response) {
layers['grandcanyon'] = new ol.layer.Tile({
source: new ol.source.XYZ({
url: 'http://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png',
url: 'https://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png',
crossOrigin: '',
tilePixelRatio: 2,
maxZoom: 15,

View File

@@ -1,4 +1,4 @@
@import url(http://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700);
@import url(https://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700);
body {
font-family: 'Quattrocento Sans', sans-serif;

View File

@@ -6,6 +6,6 @@ docs: >
This example shows client-side reprojection of OpenStreetMap to NAD83 Indiana East, including a ScaleLine control with US units.
tags: "reprojection, projection, openstreetmap, nad83, tile, scaleline"
resources:
- http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
- https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
---
<div id="map" class="map"></div>

View File

@@ -13,7 +13,7 @@ var map = new ol.Map({
}),
new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/mapbox.va-quake-aug.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.va-quake-aug.json?secure',
crossOrigin: 'anonymous'
})
})

View File

@@ -1,6 +1,5 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.interaction');
goog.require('ol.interaction.Draw');
goog.require('ol.interaction.Modify');
goog.require('ol.interaction.Select');

View File

@@ -6,6 +6,6 @@ docs: >
Example of a Sphere Mollweide map with a Graticule component.
tags: "graticule, Mollweide, projection, proj4js"
resources:
- http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
- https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
---
<div id="map" class="map"></div>

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.extent');
@@ -22,7 +21,7 @@ var map = new ol.Map({
new ol.layer.Image({
source: new ol.source.ImageStatic({
attributions: '© <a href="http://xkcd.com/license.html">xkcd</a>',
url: 'http://imgs.xkcd.com/comics/online_communities.png',
url: 'https://imgs.xkcd.com/comics/online_communities.png',
projection: projection,
imageExtent: extent
})

View File

@@ -78,7 +78,7 @@ Progress.prototype.hide = function() {
var progress = new Progress(document.getElementById('progress'));
var source = new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/mapbox.world-bright.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.world-bright.json?secure',
crossOrigin: 'anonymous'
});

View File

@@ -8,7 +8,7 @@ var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json',
url: 'https://api.tiles.mapbox.com/v3/mapbox.geography-class.json?secure',
crossOrigin: 'anonymous'
})
})

View File

@@ -9,13 +9,13 @@ var key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiRk1kMWZaSSJ9.E5BkluenyWQMsBLsuByrmg';
var mapLayer = new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v4/mapbox.geography-class.json?access_token=' + key
url: 'https://api.tiles.mapbox.com/v4/mapbox.geography-class.json?secure&access_token=' + key
})
});
var gridSource = new ol.source.TileUTFGrid({
url: 'http://api.tiles.mapbox.com/v4/mapbox.geography-class.json?access_token=' + key
url: 'https://api.tiles.mapbox.com/v4/mapbox.geography-class.json?secure&access_token=' + key
});
var gridLayer = new ol.layer.Tile({source: gridSource});

View File

@@ -12,7 +12,7 @@ goog.require('ol.style.Style');
var raster = new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/mapbox.world-dark.json'
url: 'https://api.tiles.mapbox.com/v3/mapbox.world-dark.json?secure'
})
});
@@ -29,7 +29,8 @@ var style = new ol.style.Style({
var vector = new ol.layer.Vector({
source: new ol.source.Vector({
url: 'data/topojson/world-110m.json',
format: new ol.format.TopoJSON()
format: new ol.format.TopoJSON(),
overlaps: false
}),
style: function(feature) {
// don't want to render the full world polygon, which repeats all countries

View File

@@ -1,4 +1,3 @@
goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.GeoJSON');

View File

@@ -1,6 +1,5 @@
// NOCOMPILE
// this example uses turf.js for which we don't have an externs file.
goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.GeoJSON');

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.EsriJSON');
@@ -12,6 +11,7 @@ goog.require('ol.loadingstrategy');
goog.require('ol.proj');
goog.require('ol.source.Vector');
goog.require('ol.source.XYZ');
goog.require('ol.tilegrid');
var serviceUrl = 'http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/' +
@@ -57,7 +57,7 @@ var raster = new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: 'Tiles © <a href="http://services.arcgisonline.com/ArcGIS/' +
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
url: 'http://server.arcgisonline.com/ArcGIS/rest/services/' +
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +
'World_Topo_Map/MapServer/tile/{z}/{y}/{x}'
})
});

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.EsriJSON');
@@ -11,6 +10,7 @@ goog.require('ol.source.XYZ');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
goog.require('ol.tilegrid');
var serviceUrl = 'http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/' +
@@ -99,7 +99,7 @@ var raster = new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: 'Tiles © <a href="http://services.arcgisonline.com/ArcGIS/' +
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
url: 'http://server.arcgisonline.com/ArcGIS/rest/services/' +
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +
'World_Topo_Map/MapServer/tile/{z}/{y}/{x}'
})
});

View File

@@ -12,6 +12,7 @@ goog.require('ol.style.Circle');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
goog.require('ol.tilegrid');
var styles = {
'amenity': {

View File

@@ -40,16 +40,15 @@ var map = new ol.Map({
});
// generate a GetFeature request
var f = ol.format.ogc.filter;
var featureRequest = new ol.format.WFS().writeGetFeature({
srsName: 'EPSG:3857',
featureNS: 'http://openstreemap.org',
featurePrefix: 'osm',
featureTypes: ['water_areas'],
outputFormat: 'application/json',
filter: f.and(
f.like('name', 'Mississippi*'),
f.equalTo('waterway', 'riverbank')
filter: ol.format.ogc.filter.and(
ol.format.ogc.filter.like('name', 'Mississippi*'),
ol.format.ogc.filter.equalTo('waterway', 'riverbank')
)
});

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.control');
@@ -46,7 +45,7 @@ var layers = [
new ol.layer.Tile({
extent: extent,
source: new ol.source.TileWMS({
url: 'http://wms.geo.admin.ch/',
url: 'https://wms.geo.admin.ch/',
crossOrigin: 'anonymous',
attributions: '© <a href="http://www.geo.admin.ch/internet/geoportal/' +
'en/home.html">Pixelmap 1:1000000 / geo.admin.ch</a>',
@@ -60,7 +59,7 @@ var layers = [
new ol.layer.Tile({
extent: extent,
source: new ol.source.TileWMS({
url: 'http://wms.geo.admin.ch/',
url: 'https://wms.geo.admin.ch/',
crossOrigin: 'anonymous',
attributions: '© <a href="http://www.geo.admin.ch/internet/geoportal/' +
'en/home.html">National parks / geo.admin.ch</a>',

View File

@@ -6,7 +6,7 @@ docs: >
With [Proj4js](http://proj4js.org/) integration, OpenLayers can transform coordinates between arbitrary projections.
tags: "wms, single image, proj4js, projection"
resources:
- http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
- http://epsg.io/21781-1753.js
- https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js
- https://epsg.io/21781-1753.js
---
<div id="map" class="map"></div>

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.control');
@@ -34,7 +33,7 @@ var layers = [
new ol.layer.Image({
extent: extent,
source: new ol.source.ImageWMS({
url: 'http://wms.geo.admin.ch/',
url: 'https://wms.geo.admin.ch/',
crossOrigin: 'anonymous',
attributions: '© <a href="http://www.geo.admin.ch/internet/geoportal/' +
'en/home.html">Pixelmap 1:1000000 / geo.admin.ch</a>',
@@ -48,7 +47,7 @@ var layers = [
new ol.layer.Image({
extent: extent,
source: new ol.source.ImageWMS({
url: 'http://wms.geo.admin.ch/',
url: 'https://wms.geo.admin.ch/',
crossOrigin: 'anonymous',
attributions: '© <a href="http://www.geo.admin.ch/internet/geoportal/' +
'en/home.html">National parks / geo.admin.ch</a>',

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Image');
@@ -18,7 +17,7 @@ var layers = [
'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale',
'FORMAT': 'image/jpeg'
},
url: 'http://wms.geo.admin.ch/'
url: 'https://wms.geo.admin.ch/'
})
}),
new ol.layer.Image({
@@ -28,7 +27,7 @@ var layers = [
crossOrigin: 'anonymous',
params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'},
serverType: 'mapserver',
url: 'http://wms.geo.admin.ch/'
url: 'https://wms.geo.admin.ch/'
})
})
];

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.extent');

View File

@@ -6,7 +6,7 @@ goog.require('ol.layer.Tile');
goog.require('ol.source.WMTS');
var capabilitiesUrl = 'http://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml';
var capabilitiesUrl = 'https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml';
// HiDPI support:
// * Use 'bmaphidpi' layer (pixel ratio 2) for device pixel ratio > 1

View File

@@ -43,7 +43,7 @@ var tileGrid = new ol.tilegrid.WMTS({
var key = '2mqbg0z6cx7ube8gsou10nrt';
var ign_source = new ol.source.WMTS({
url: 'http://wxs.ign.fr/' + key + '/wmts',
url: 'https://wxs.ign.fr/' + key + '/wmts',
layer: 'GEOGRAPHICALGRIDSYSTEMS.MAPS',
matrixSet: 'PM',
format: 'image/jpeg',

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.control');
@@ -32,7 +31,7 @@ var map = new ol.Map({
source: new ol.source.WMTS({
attributions: 'Tiles © <a href="http://services.arcgisonline.com/arcgis/rest/' +
'services/Demographics/USA_Population_Density/MapServer/">ArcGIS</a>',
url: 'http://services.arcgisonline.com/arcgis/rest/' +
url: 'https://services.arcgisonline.com/arcgis/rest/' +
'services/Demographics/USA_Population_Density/MapServer/WMTS/',
layer: '0',
matrixSet: 'EPSG:3857',

View File

@@ -17,7 +17,7 @@ var map = new ol.Map({
new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: [attribution],
url: 'http://server.arcgisonline.com/ArcGIS/rest/services/' +
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +
'World_Topo_Map/MapServer/tile/{z}/{y}/{x}'
})
})

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
@@ -21,7 +20,7 @@ var map = new ol.Map({
source: new ol.source.XYZ({
attributions: 'Tiles © USGS, rendered with ' +
'<a href="http://www.maptiler.com/">MapTiler</a>',
url: 'http://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png',
url: 'https://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png',
tilePixelRatio: 2, // THIS IS IMPORTANT
minZoom: mapMinZoom,
maxZoom: mapMaxZoom

View File

@@ -1,7 +1,6 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.proj');
goog.require('ol.proj.Projection');
goog.require('ol.source.Zoomify');

View File

@@ -15,3 +15,5 @@
* @see http://www.w3.org/TR/pointerevents/#the-touch-action-css-property
*/
CSSProperties.prototype.touchAction;
var global;

View File

@@ -9,6 +9,18 @@
var oli;
/**
* @interface
*/
oli.AssertionError = function() {};
/**
* @type {number}
*/
oli.AssertionError.prototype.code;
/**
* @interface
*/
@@ -40,13 +52,13 @@ oli.events.Event.prototype.stopPropagation = function() {};
/**
* @interface
*/
oli.CollectionEvent = function() {};
oli.Collection.Event = function() {};
/**
* @type {*}
*/
oli.CollectionEvent.prototype.element;
oli.Collection.Event.prototype.element;
/**

View File

@@ -1260,7 +1260,7 @@ olx.control.OverviewMapOptions.prototype.view;
* minWidth: (number|undefined),
* render: (function(ol.MapEvent)|undefined),
* target: (Element|undefined),
* units: (ol.control.ScaleLineUnits|string|undefined)}}
* units: (ol.control.ScaleLine.Units|string|undefined)}}
*/
olx.control.ScaleLineOptions;
@@ -1300,7 +1300,7 @@ olx.control.ScaleLineOptions.prototype.target;
/**
* Units. Default is `metric`.
* @type {ol.control.ScaleLineUnits|string|undefined}
* @type {ol.control.ScaleLine.Units|string|undefined}
* @api stable
*/
olx.control.ScaleLineOptions.prototype.units;
@@ -2014,7 +2014,8 @@ olx.format.WFSOptions.prototype.schemaLocation;
* startIndex: (number|undefined),
* count: (number|undefined),
* bbox: (ol.Extent|undefined),
* filter: (ol.format.ogc.filter.Filter|undefined)}}
* filter: (ol.format.ogc.filter.Filter|undefined),
* resultType: (string|undefined)}}
*/
olx.format.WFSWriteGetFeatureOptions;
@@ -2127,6 +2128,15 @@ olx.format.WFSWriteGetFeatureOptions.prototype.bbox;
olx.format.WFSWriteGetFeatureOptions.prototype.filter;
/**
* Indicates what response should be returned, E.g. `hits` only includes the
* `numberOfFeatures` attribute in the response and no features.
* @type {string|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.resultType;
/**
* @typedef {{featureNS: string,
* featurePrefix: string,
@@ -4190,7 +4200,7 @@ olx.source.TileUTFGridOptions.prototype.url;
* reprojectionErrorThreshold: (number|undefined),
* state: (ol.source.State|undefined),
* tileClass: (function(new: ol.ImageTile, ol.TileCoord,
* ol.TileState, string, ?string,
* ol.Tile.State, string, ?string,
* ol.TileLoadFunctionType)|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
@@ -4275,7 +4285,7 @@ olx.source.TileImageOptions.prototype.state;
/**
* Class used to instantiate image tiles. Default is {@link ol.ImageTile}.
* @type {function(new: ol.ImageTile, ol.TileCoord,
* ol.TileState, string, ?string,
* ol.Tile.State, string, ?string,
* ol.TileLoadFunctionType)|undefined}
* @api
*/
@@ -4356,10 +4366,11 @@ olx.source.TileImageOptions.prototype.wrapX;
* cacheSize: (number|undefined),
* format: (ol.format.Feature|undefined),
* logo: (string|olx.LogoOptions|undefined),
* overlaps: (boolean|undefined),
* projection: ol.ProjectionLike,
* state: (ol.source.State|undefined),
* tileClass: (function(new: ol.VectorTile, ol.TileCoord,
* ol.TileState, string, ol.format.Feature,
* ol.Tile.State, string, ol.format.Feature,
* ol.TileLoadFunctionType)|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
@@ -4405,6 +4416,17 @@ olx.source.VectorTileOptions.prototype.format;
olx.source.VectorTileOptions.prototype.logo;
/**
* This source may have overlapping geometries. Default is `true`. Setting this
* to `false` (e.g. for sources with polygons that represent administrative
* boundaries or TopoJSON sources) allows the renderer to optimise fill and
* stroke operations.
* @type {boolean|undefined}
* @api
*/
olx.source.VectorTileOptions.prototype.overlaps;
/**
* Projection.
* @type {ol.ProjectionLike}
@@ -4424,7 +4446,7 @@ olx.source.VectorTileOptions.prototype.state;
/**
* Class used to instantiate image tiles. Default is {@link ol.VectorTile}.
* @type {function(new: ol.VectorTile, ol.TileCoord,
* ol.TileState, string, ol.format.Feature,
* ol.Tile.State, string, ol.format.Feature,
* ol.TileLoadFunctionType)|undefined}
* @api
*/
@@ -4774,7 +4796,7 @@ olx.source.OSMOptions.prototype.tileLoadFunction;
/**
* URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
* Default is `//{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png`.
* Default is `https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png`.
* @type {string|undefined}
* @api stable
*/
@@ -4970,6 +4992,7 @@ olx.source.ImageCanvasOptions.prototype.state;
* logo: (string|olx.LogoOptions|undefined),
* projection: ol.ProjectionLike,
* ratio: (number|undefined),
* renderBuffer: (number|undefined),
* resolutions: (Array.<number>|undefined),
* source: ol.source.Vector,
* style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined)}}
@@ -5011,6 +5034,17 @@ olx.source.ImageVectorOptions.prototype.projection;
olx.source.ImageVectorOptions.prototype.ratio;
/**
* The buffer around the viewport extent used by the renderer when getting
* features from the vector source for the rendering or hit-detection.
* Recommended value: the size of the largest symbol, line width or label.
* Default is 100 pixels.
* @type {number|undefined}
* @api
*/
olx.source.ImageVectorOptions.prototype.renderBuffer;
/**
* Resolutions. If specified, new canvases will be created for these resolutions
* only.
@@ -5775,6 +5809,7 @@ olx.source.TileWMSOptions.prototype.wrapX;
* format: (ol.format.Feature|undefined),
* loader: (ol.FeatureLoader|undefined),
* logo: (string|olx.LogoOptions|undefined),
* overlaps: (boolean|undefined),
* strategy: (ol.LoadingStrategy|undefined),
* url: (string|ol.FeatureUrlFunction|undefined),
* useSpatialIndex: (boolean|undefined),
@@ -5827,6 +5862,17 @@ olx.source.VectorOptions.prototype.loader;
olx.source.VectorOptions.prototype.logo;
/**
* This source may have overlapping geometries. Default is `true`. Setting this
* to `false` (e.g. for sources with polygons that represent administrative
* boundaries or TopoJSON sources) allows the renderer to optimise fill and
* stroke operations.
* @type {boolean|undefined}
* @api
*/
olx.source.VectorOptions.prototype.overlaps;
/**
* The loading strategy to use. By default an {@link ol.loadingstrategy.all}
* strategy is used, a one-off strategy which loads all features at once.
@@ -5837,8 +5883,8 @@ olx.source.VectorOptions.prototype.strategy;
/**
* Setting this option instructs the source to use an XHR loader (see
* {@link ol.featureloader.xhr}). Use a `string` and an
* Setting this option instructs the source to load features using an XHR loader
* (see {@link ol.featureloader.xhr}). Use a `string` and an
* {@link ol.loadingstrategy.all} for a one-off download of all features from
* the given URL. Use a {@link ol.FeatureUrlFunction} to generate the url with
* other loading strategies.
@@ -5849,6 +5895,8 @@ olx.source.VectorOptions.prototype.strategy;
* properly, this transformation will be incorrect. For some formats, the
* default projection (usually EPSG:4326) can be overridden by setting the
* defaultDataProjection constructor option on the format.
* Note that if a source contains non-feature data, such as a GeoJSON geometry
* or a KML NetworkLink, these will be ignored. Use a custom loader to load these.
* @type {string|ol.FeatureUrlFunction|undefined}
* @api
*/
@@ -5908,7 +5956,7 @@ olx.source.VectorOptions.prototype.wrapX;
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* urls: (Array.<string>|undefined),
* tileClass: (function(new: ol.ImageTile, ol.TileCoord,
* ol.TileState, string, ?string,
* ol.Tile.State, string, ?string,
* ol.TileLoadFunctionType)|undefined),
* wrapX: (boolean|undefined)}}
*/
@@ -6003,7 +6051,7 @@ olx.source.WMTSOptions.prototype.style;
/**
* Class used to instantiate image tiles. Default is {@link ol.ImageTile}.
* @type {function(new: ol.ImageTile, ol.TileCoord,
* ol.TileState, string, ?string,
* ol.Tile.State, string, ?string,
* ol.TileLoadFunctionType)|undefined}
* @api
*/
@@ -6816,6 +6864,14 @@ olx.style.RegularShapeOptions.prototype.snapToPixel;
olx.style.RegularShapeOptions.prototype.stroke;
/**
* Whether to rotate the text with the view. Default is `false`.
* @type {boolean|undefined}
* @api
*/
olx.style.TextOptions.prototype.rotateWithView;
/**
* Rotation in radians (positive rotation clockwise). Default is `0`.
* @type {number|undefined}
@@ -6913,6 +6969,7 @@ olx.style.StrokeOptions.prototype.width;
* offsetX: (number|undefined),
* offsetY: (number|undefined),
* scale: (number|undefined),
* rotateWithView: (boolean|undefined),
* rotation: (number|undefined),
* text: (string|undefined),
* textAlign: (string|undefined),
@@ -7376,7 +7433,7 @@ olx.view.FitOptions.prototype.maxZoom;
/**
* @typedef {{animate: boolean,
* attributions: Object.<string, ol.Attribution>,
* coordinateToPixelMatrix: ol.vec.Mat4.Number,
* coordinateToPixelTransform: ol.Transform,
* extent: (null|ol.Extent),
* focus: ol.Coordinate,
* index: number,
@@ -7384,7 +7441,7 @@ olx.view.FitOptions.prototype.maxZoom;
* layerStatesArray: Array.<ol.LayerState>,
* logos: Object.<string, (string|Element)>,
* pixelRatio: number,
* pixelToCoordinateMatrix: ol.vec.Mat4.Number,
* pixelToCoordinateTransform: ol.Transform,
* postRenderFunctions: Array.<ol.PostRenderFunction>,
* size: ol.Size,
* skippedFeatureUids: Object.<string, boolean>,

View File

@@ -1,6 +1,6 @@
{
"name": "openlayers",
"version": "3.17.1",
"version": "3.18.2",
"description": "Build tools and sources for developing OpenLayers based mapping applications",
"keywords": [
"map",
@@ -30,42 +30,44 @@
"css/ol.css"
],
"dependencies": {
"async": "1.5.2",
"browserify": "13.0.1",
"closure-util": "1.15.0",
"async": "2.0.1",
"browserify": "13.1.0",
"closure-util": "1.15.1",
"derequire": "2.0.3",
"fs-extra": "0.30.0",
"glob": "7.0.5",
"glob": "7.0.6",
"handlebars": "4.0.5",
"jsdoc": "3.4.0",
"marked": "0.3.5",
"metalsmith": "2.1.0",
"marked": "0.3.6",
"metalsmith": "2.2.0",
"metalsmith-layouts": "1.6.5",
"nomnom": "1.8.1",
"pbf": "2.0.1",
"pixelworks": "1.1.0",
"rbush": "2.0.1",
"temp": "0.8.3",
"vector-tile": "1.2.1",
"vector-tile": "1.3.0",
"walk": "2.3.9"
},
"devDependencies": {
"clean-css": "3.4.18",
"coveralls": "2.11.9",
"clean-css": "3.4.19",
"coveralls": "2.11.12",
"debounce": "^1.0.0",
"eslint": "2.13.1",
"eslint": "3.3.1",
"eslint-config-openlayers": "5.0.0",
"eslint-plugin-openlayers-internal": "2.1.0",
"expect.js": "0.3.1",
"gaze": "^1.0.0",
"istanbul": "0.4.4",
"jquery": "2.2.4",
"mocha": "2.5.3",
"istanbul": "0.4.5",
"jquery": "3.1.0",
"mocha": "3.0.2",
"mocha-phantomjs-core": "^1.3.0",
"mustache": "2.2.1",
"phantomjs-prebuilt": "2.1.7",
"proj4": "2.3.14",
"phantomjs-prebuilt": "2.1.12",
"proj4": "2.3.15",
"resemblejs": "2.2.1",
"sinon": "1.17.4",
"serve-files": "1.0.0",
"sinon": "1.17.5",
"slimerjs": "0.906.2"
},
"eslintConfig": {
@@ -81,8 +83,26 @@
"goog": false,
"proj4": false
},
"plugins": [
"openlayers-internal"
],
"rules": {
"no-constant-condition": 0
"no-console": [
2,
{
"allow": [
"assert"
]
}
],
"no-constant-condition": 0,
"openlayers-internal/no-duplicate-requires": 2,
"openlayers-internal/no-missing-requires": 1,
"openlayers-internal/no-unused-requires": 2,
"openlayers-internal/one-provide": 1,
"openlayers-internal/requires-first": 2,
"openlayers-internal/valid-provide": 2,
"openlayers-internal/valid-requires": 2
}
},
"ext": [

8
rules/.eslintrc Normal file
View File

@@ -0,0 +1,8 @@
{
"env": {
"es6": true
},
"rules": {
"strict": [2, "global"]
}
}

13
rules/index.js Normal file
View File

@@ -0,0 +1,13 @@
'use strict';
module.exports = {
rules: {
'no-duplicate-requires': require('./no-duplicate-requires').rule,
'no-missing-requires': require('./no-missing-requires').rule,
'no-unused-requires': require('./no-unused-requires').rule,
'one-provide': require('./one-provide').rule,
'requires-first': require('./requires-first').rule,
'valid-provide': require('./valid-provide').rule,
'valid-requires': require('./valid-requires').rule
}
};

View File

@@ -0,0 +1,48 @@
'use strict';
const util = require('./util');
exports.rule = {
meta: {
docs: {
description: 'disallow duplicate goog.require() calls'
},
fixable: 'code'
},
create: function(context) {
const alreadyRequired = {};
return {
ExpressionStatement: function(statement) {
if (util.isRequireStatement(statement)) {
const expression = statement.expression;
if (!expression.arguments[0]) {
return;
}
const name = expression.arguments[0].value;
if (alreadyRequired[name]) {
const source = context.getSourceCode();
return context.report({
node: statement,
message: `Duplicate goog.require('${name}')`,
fix: function(fixer) {
const afterToken = source.getTokenAfter(statement);
const range = [
statement.range[0],
afterToken ? afterToken.range[0] : statement.range[1]
];
return fixer.removeRange(range);
}
});
}
alreadyRequired[name] = true;
}
}
};
}
};

View File

@@ -0,0 +1,90 @@
'use strict';
const util = require('./util');
/**
* Unfortunately fragile RegExp to follow. Here is the logic:
*
* 1. check if a name looks like a const (ol.foo.BOO_HOO must have a "_")
* if so, require the "namespace" (ol.foo)
* 2. check if a name looks like a class (ol.foo.Bar or ol.foo.XYZ)
* if so, require the class (ol.foo.Bar)
* 3. otherwise, lop off the last part of a name and require the rest
* (e.g. ol.foo.bar would require ol.foo)
*/
const CONST_RE = /^(ol(\.[a-z]\w*)*)\.[A-Z]+_([_A-Z])+$/;
const CLASS_RE = /^(ol(\.[a-z]\w*)*\.[A-Z]\w*)(\.\w+)*$/;
exports.rule = {
meta: {
docs: {
description: 'ensure there are goog.require() calls for all used symbols'
},
fixable: 'code'
},
create: function(context) {
const defined = {};
return {
ExpressionStatement: function(statement) {
if (util.isRequireStatement(statement) || util.isProvideStatement(statement)) {
const expression = statement.expression;
const arg = expression.arguments[0];
if (!arg || !arg.value) {
return;
}
defined[arg.value] = true;
}
},
MemberExpression: function(expression) {
const parent = expression.parent;
if (parent.type !== 'MemberExpression') {
const name = util.getName(expression);
if (name && name.startsWith('ol.')) {
// check if the name looks like a const
let match = name.match(CONST_RE);
if (match) {
if (!defined[match[1]]) {
context.report(expression, `Missing goog.require('${match[1]}')`);
}
return;
}
// check if the name looks like a class
match = name.match(CLASS_RE);
if (match) {
const className = match[1];
const parts = className.split('.');
const lastPart = parts[parts.length - 1];
if (lastPart.toUpperCase() === lastPart) {
// unfortunately ambiguous:
// ol.has.WEBGL -> require('ol.has')
// ol.source.XYZ -> require('ol.source.XYZ')
const objectName = parts.slice(0, -1).join('.');
if (!defined[className] && !defined[objectName]) {
context.report(expression, `Missing goog.require('${className}') or goog.require('${objectName}')`);
}
return;
}
if (!defined[className]) {
context.report(expression, `Missing goog.require('${className}')`);
}
return;
}
// otherwise, assume the object should be required
const parts = name.split('.');
parts.pop();
const objectName = parts.join('.');
if (!defined[objectName]) {
context.report(expression, `Missing goog.require('${objectName}')`);
}
}
}
}
};
}
};

View File

@@ -0,0 +1,90 @@
'use strict';
const util = require('./util');
exports.rule = {
meta: {
docs: {
description: 'disallow unused goog.require() calls'
},
fixable: 'code'
},
create: function(context) {
// a lookup of goog.require() nodes by argument
const requireStatements = {};
// used names from member expressions that match the goog.require() arg
const usedNames = {};
return {
ExpressionStatement: function(statement) {
if (util.isRequireStatement(statement)) {
const expression = statement.expression;
const arg = expression.arguments[0];
if (!arg || !arg.value) {
return;
}
const name = arg.value;
requireStatements[name] = statement;
}
},
MemberExpression: function(node) {
const name = util.getName(node);
if (name in requireStatements) {
const requiredAncestor = context.getAncestors().some(
ancestorNode => !!requireStatements[util.getName(ancestorNode)]);
if (!requiredAncestor) {
usedNames[name] = true;
}
}
},
Identifier: function(node) {
const name = node.name;
if (name in requireStatements) {
const ancestors = context.getAncestors();
if (ancestors.length && ancestors[0].type === 'MemberExpression') {
const requiredAncestor = ancestors.some(
ancestorNode => !!requireStatements[util.getName(ancestorNode)]);
if (!requiredAncestor) {
usedNames[name] = true;
}
} else {
usedNames[name] = true;
}
}
},
'Program:exit': function(node) {
const source = context.getSourceCode();
for (let name in requireStatements) {
if (!usedNames[name]) {
const unusedRequire = requireStatements[name];
context.report({
node: unusedRequire,
message: `Unused ${source.getText(unusedRequire)}`,
fix: function(fixer) {
const afterToken = source.getTokenAfter(unusedRequire);
const range = [
unusedRequire.range[0],
afterToken ? afterToken.range[0] : unusedRequire.range[1]
];
return fixer.removeRange(range);
}
});
}
}
}
};
}
};

28
rules/one-provide.js Normal file
View File

@@ -0,0 +1,28 @@
'use strict';
const util = require('./util');
exports.rule = {
meta: {
docs: {
description: 'disallow multiple goog.provide() calls'
}
},
create: function(context) {
let hasProvide = false;
return {
ExpressionStatement: function(statement) {
if (util.isProvideStatement(statement)) {
if (hasProvide) {
const name = statement.expression.arguments[0].value;
context.report(statement, `Extra goog.provide('${name}')`);
} else {
hasProvide = true;
}
}
}
};
}
};

11
rules/package.json Normal file
View File

@@ -0,0 +1,11 @@
{
"name": "eslint-plugin-openlayers-internal",
"version": "2.1.0",
"description": "Custom ESLint rules for the OpenLayers project",
"main": "index.js",
"repository": {
"type": "git",
"url": "git://github.com/openlayers/ol3.git"
},
"license": "BSD-2-Clause"
}

30
rules/requires-first.js Normal file
View File

@@ -0,0 +1,30 @@
'use strict';
const util = require('./util');
exports.rule = {
meta: {
docs: {
description: 'require that all goog.require() precede other statements (except goog.provide())'
}
},
create: function(context) {
return {
Program: function(program) {
let otherSeen = false;
program.body.forEach(statement => {
if (util.isRequireStatement(statement)) {
if (otherSeen) {
return context.report(statement, 'Expected goog.require() to precede other statements');
}
} else if (!util.isProvideStatement(statement)) {
otherSeen = true;
}
});
}
};
}
};

49
rules/util.js Normal file
View File

@@ -0,0 +1,49 @@
'use strict';
function isGoogCallExpression(node, name) {
const callee = node.callee;
return callee && callee.type === 'MemberExpression' &&
callee.object.type === 'Identifier' && callee.object.name === 'goog' &&
callee.property.type === 'Identifier' && !callee.property.computed &&
callee.property.name === name;
}
function isGoogStatement(node, name) {
return node.expression && node.expression.type === 'CallExpression' &&
isGoogCallExpression(node.expression, name);
}
exports.isProvideExpression = function(node) {
return isGoogCallExpression(node, 'provide');
};
exports.isProvideStatement = function(node) {
return isGoogStatement(node, 'provide');
};
exports.isRequireExpression = function(node) {
return isGoogCallExpression(node, 'require');
};
exports.isRequireStatement = function(node) {
return isGoogStatement(node, 'require');
};
var getName = exports.getName = function(node) {
if (node.type !== 'MemberExpression') {
return;
}
if (node.property.type !== 'Identifier' || node.property.computed) {
return;
}
let objectName;
if (node.object.type === 'Identifier' && !node.object.computed) {
objectName = node.object.name;
} else if (node.object.type === 'MemberExpression' && !node.object.computed) {
objectName = getName(node.object);
}
if (!objectName) {
return;
}
return `${objectName}.${node.property.name}`;
};

72
rules/valid-provide.js Normal file
View File

@@ -0,0 +1,72 @@
'use strict';
const path = require('path');
const util = require('./util');
function longestCommonPrefix(path1, path2) {
const parts1 = path.resolve(path1).split(path.sep);
const parts2 = path.resolve(path2).split(path.sep);
const common = [];
for (let i = 0, ii = parts1.length; i < ii; ++i) {
if (parts1[i] === parts2[i]) {
common.push(parts1[i]);
} else {
break;
}
}
return common.join(path.sep);
}
exports.rule = {
meta: {
docs: {
description: 'require the first goog.provide() has an arg named like the file path'
}
},
create: function(context) {
let gotFirst = false;
return {
CallExpression: function(expression) {
if (gotFirst) {
return;
}
if (util.isProvideExpression(expression)) {
gotFirst = true;
const parent = expression.parent;
if (parent.type !== 'ExpressionStatement') {
return context.report(expression, 'Expected goog.provide() to in an expression statement');
}
if (parent.parent.type !== 'Program') {
return context.report(expression, 'Expected goog.provide() to be at the top level');
}
if (expression.arguments.length !== 1) {
return context.report(expression, 'Expected one argument for goog.require()');
}
const arg = expression.arguments[0];
if (arg.type !== 'Literal' || !arg.value || typeof arg.value !== 'string') {
return context.report(expression, 'Expected goog.require() to be called with a string');
}
const filePath = context.getFilename();
const sourceRoot = path.join(longestCommonPrefix(__dirname, filePath), 'src');
const requirePath = path.relative(sourceRoot, filePath);
let ext;
if (path.basename(requirePath) === 'index.js') {
ext = path.sep + 'index.js';
} else {
ext = '.js';
}
const name = arg.value;
const expectedPath = name.split('.').join(path.sep) + ext;
if (expectedPath.toLowerCase() !== requirePath.toLowerCase()) {
return context.report(expression, `Expected goog.provide('${name}') to be like ${requirePath}`);
}
}
}
};
}
};

37
rules/valid-requires.js Normal file
View File

@@ -0,0 +1,37 @@
'use strict';
const util = require('./util');
exports.rule = {
meta: {
docs: {
description: 'require that all goog.require() have a valid arg and appear at the top level'
}
},
create: function(context) {
return {
CallExpression: function(expression) {
if (util.isRequireExpression(expression)) {
const parent = expression.parent;
if (parent.type !== 'ExpressionStatement') {
return context.report(expression, 'Expected goog.require() to in an expression statement');
}
if (parent.parent.type !== 'Program') {
return context.report(expression, 'Expected goog.require() to be at the top level');
}
if (expression.arguments.length !== 1) {
return context.report(expression, 'Expected one argument for goog.require()');
}
const arg = expression.arguments[0];
if (arg.type !== 'Literal' || !arg.value || typeof arg.value !== 'string') {
return context.report(expression, 'Expected goog.require() to be called with a string');
}
}
}
};
}
};

View File

@@ -1,7 +1,7 @@
goog.provide('ol.animation');
goog.require('ol');
goog.require('ol.ViewHint');
goog.require('ol.View');
goog.require('ol.coordinate');
goog.require('ol.easing');
@@ -28,14 +28,14 @@ ol.animation.bounce = function(options) {
function(map, frameState) {
if (frameState.time < start) {
frameState.animate = true;
frameState.viewHints[ol.ViewHint.ANIMATING] += 1;
frameState.viewHints[ol.View.Hint.ANIMATING] += 1;
return true;
} else if (frameState.time < start + duration) {
var delta = easing((frameState.time - start) / duration);
var deltaResolution = resolution - frameState.viewState.resolution;
frameState.animate = true;
frameState.viewState.resolution += delta * deltaResolution;
frameState.viewHints[ol.ViewHint.ANIMATING] += 1;
frameState.viewHints[ol.View.Hint.ANIMATING] += 1;
return true;
} else {
return false;
@@ -67,7 +67,7 @@ ol.animation.pan = function(options) {
function(map, frameState) {
if (frameState.time < start) {
frameState.animate = true;
frameState.viewHints[ol.ViewHint.ANIMATING] += 1;
frameState.viewHints[ol.View.Hint.ANIMATING] += 1;
return true;
} else if (frameState.time < start + duration) {
var delta = 1 - easing((frameState.time - start) / duration);
@@ -76,7 +76,7 @@ ol.animation.pan = function(options) {
frameState.animate = true;
frameState.viewState.center[0] += delta * deltaX;
frameState.viewState.center[1] += delta * deltaY;
frameState.viewHints[ol.ViewHint.ANIMATING] += 1;
frameState.viewHints[ol.View.Hint.ANIMATING] += 1;
return true;
} else {
return false;
@@ -109,7 +109,7 @@ ol.animation.rotate = function(options) {
function(map, frameState) {
if (frameState.time < start) {
frameState.animate = true;
frameState.viewHints[ol.ViewHint.ANIMATING] += 1;
frameState.viewHints[ol.View.Hint.ANIMATING] += 1;
return true;
} else if (frameState.time < start + duration) {
var delta = 1 - easing((frameState.time - start) / duration);
@@ -123,7 +123,7 @@ ol.animation.rotate = function(options) {
ol.coordinate.rotate(center, deltaRotation);
ol.coordinate.add(center, anchor);
}
frameState.viewHints[ol.ViewHint.ANIMATING] += 1;
frameState.viewHints[ol.View.Hint.ANIMATING] += 1;
return true;
} else {
return false;
@@ -153,7 +153,7 @@ ol.animation.zoom = function(options) {
function(map, frameState) {
if (frameState.time < start) {
frameState.animate = true;
frameState.viewHints[ol.ViewHint.ANIMATING] += 1;
frameState.viewHints[ol.View.Hint.ANIMATING] += 1;
return true;
} else if (frameState.time < start + duration) {
var delta = 1 - easing((frameState.time - start) / duration);
@@ -161,7 +161,7 @@ ol.animation.zoom = function(options) {
sourceResolution - frameState.viewState.resolution;
frameState.animate = true;
frameState.viewState.resolution += delta * deltaResolution;
frameState.viewHints[ol.ViewHint.ANIMATING] += 1;
frameState.viewHints[ol.View.Hint.ANIMATING] += 1;
return true;
} else {
return false;

View File

@@ -1,7 +1,5 @@
goog.provide('ol.array');
goog.require('goog.asserts');
/**
* Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.
@@ -135,9 +133,6 @@ ol.array.linearFindNearest = function(arr, target, direction) {
}
}
}
// We should never get here, but the compiler complains
// if it finds a path for which no number is returned.
goog.asserts.fail();
return n - 1;
}
};
@@ -149,9 +144,9 @@ ol.array.linearFindNearest = function(arr, target, direction) {
* @param {number} end End index.
*/
ol.array.reverseSubArray = function(arr, begin, end) {
goog.asserts.assert(begin >= 0,
goog.DEBUG && console.assert(begin >= 0,
'Array begin index should be equal to or greater than 0');
goog.asserts.assert(end < arr.length,
goog.DEBUG && console.assert(end < arr.length,
'Array end index should be less than the array length');
while (begin < end) {
var tmp = arr[begin];
@@ -187,7 +182,7 @@ ol.array.flatten = function(arr) {
*/
ol.array.extend = function(arr, data) {
var i;
var extension = goog.isArrayLike(data) ? data : [data];
var extension = Array.isArray(data) ? data : [data];
var length = extension.length;
for (i = 0; i < length; i++) {
arr[arr.length] = extension[i];

36
src/ol/assertionerror.js Normal file
View File

@@ -0,0 +1,36 @@
goog.provide('ol.AssertionError');
goog.require('ol');
/**
* Error object thrown when an assertion failed. This is an ECMA-262 Error,
* extended with a `code` property.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error}
* @constructor
* @extends {Error}
* @implements {oli.AssertionError}
* @param {number} code Error code.
*/
ol.AssertionError = function(code) {
/**
* @type {string}
*/
this.message = 'Assertion failed. See ' +
(ol.VERSION ? 'http://openlayers.org/en/' + ol.VERSION.split('-')[0] : '') +
'/doc/errors/#' + code + ' for details.';
/**
* Error code. The meaning of the code can be found on
* {@link http://openlayers.org/en/latest/errors.html} (replace `latest` with
* the version found in the OpenLayers script's header comment if a version
* other than the latest is used).
* @type {number}
* @api
*/
this.code = code;
this.name = 'AssertionError';
};
ol.inherits(ol.AssertionError, Error);

15
src/ol/asserts.js Normal file
View File

@@ -0,0 +1,15 @@
goog.provide('ol.asserts');
goog.require('ol');
goog.require('ol.AssertionError');
/**
* @param {*} assertion Assertion we expected to be truthy.
* @param {number} errorCode Error code.
*/
ol.asserts.assert = function(assertion, errorCode) {
if (!assertion) {
throw new ol.AssertionError(errorCode);
}
};

View File

@@ -2,6 +2,7 @@ goog.provide('ol.Attribution');
goog.require('ol.TileRange');
goog.require('ol.math');
goog.require('ol.tilegrid');
/**

View File

@@ -4,59 +4,12 @@
*/
goog.provide('ol.Collection');
goog.provide('ol.CollectionEvent');
goog.provide('ol.CollectionEventType');
goog.require('ol');
goog.require('ol.events.Event');
goog.require('ol.Object');
/**
* @enum {string}
*/
ol.CollectionEventType = {
/**
* Triggered when an item is added to the collection.
* @event ol.CollectionEvent#add
* @api stable
*/
ADD: 'add',
/**
* Triggered when an item is removed from the collection.
* @event ol.CollectionEvent#remove
* @api stable
*/
REMOVE: 'remove'
};
/**
* @classdesc
* Events emitted by {@link ol.Collection} instances are instances of this
* type.
*
* @constructor
* @extends {ol.events.Event}
* @implements {oli.CollectionEvent}
* @param {ol.CollectionEventType} type Type.
* @param {*=} opt_element Element.
* @param {Object=} opt_target Target.
*/
ol.CollectionEvent = function(type, opt_element, opt_target) {
ol.events.Event.call(this, type, opt_target);
/**
* The element that is added to or removed from the collection.
* @type {*}
* @api stable
*/
this.element = opt_element;
};
ol.inherits(ol.CollectionEvent, ol.events.Event);
/**
* @enum {string}
*/
@@ -75,7 +28,7 @@ ol.CollectionProperty = {
*
* @constructor
* @extends {ol.Object}
* @fires ol.CollectionEvent
* @fires ol.Collection.Event
* @param {!Array.<T>=} opt_array Array.
* @template T
* @api stable
@@ -182,7 +135,7 @@ ol.Collection.prototype.insertAt = function(index, elem) {
this.array_.splice(index, 0, elem);
this.updateLength_();
this.dispatchEvent(
new ol.CollectionEvent(ol.CollectionEventType.ADD, elem, this));
new ol.Collection.Event(ol.Collection.EventType.ADD, elem));
};
@@ -240,7 +193,7 @@ ol.Collection.prototype.removeAt = function(index) {
this.array_.splice(index, 1);
this.updateLength_();
this.dispatchEvent(
new ol.CollectionEvent(ol.CollectionEventType.REMOVE, prev, this));
new ol.Collection.Event(ol.Collection.EventType.REMOVE, prev));
return prev;
};
@@ -257,9 +210,9 @@ ol.Collection.prototype.setAt = function(index, elem) {
var prev = this.array_[index];
this.array_[index] = elem;
this.dispatchEvent(
new ol.CollectionEvent(ol.CollectionEventType.REMOVE, prev, this));
new ol.Collection.Event(ol.Collection.EventType.REMOVE, prev));
this.dispatchEvent(
new ol.CollectionEvent(ol.CollectionEventType.ADD, elem, this));
new ol.Collection.Event(ol.Collection.EventType.ADD, elem));
} else {
var j;
for (j = n; j < index; ++j) {
@@ -276,3 +229,48 @@ ol.Collection.prototype.setAt = function(index, elem) {
ol.Collection.prototype.updateLength_ = function() {
this.set(ol.CollectionProperty.LENGTH, this.array_.length);
};
/**
* @enum {string}
*/
ol.Collection.EventType = {
/**
* Triggered when an item is added to the collection.
* @event ol.Collection.Event#add
* @api stable
*/
ADD: 'add',
/**
* Triggered when an item is removed from the collection.
* @event ol.Collection.Event#remove
* @api stable
*/
REMOVE: 'remove'
};
/**
* @classdesc
* Events emitted by {@link ol.Collection} instances are instances of this
* type.
*
* @constructor
* @extends {ol.events.Event}
* @implements {oli.Collection.Event}
* @param {ol.Collection.EventType} type Type.
* @param {*=} opt_element Element.
*/
ol.Collection.Event = function(type, opt_element) {
ol.events.Event.call(this, type);
/**
* The element that is added to or removed from the collection.
* @type {*}
* @api stable
*/
this.element = opt_element;
};
ol.inherits(ol.Collection.Event, ol.events.Event);

View File

@@ -1,14 +1,7 @@
// We can't use goog.color or goog.color.alpha because they interally use a hex
// string representation that encodes each channel in a single byte. This
// causes occasional loss of precision and rounding errors, especially in the
// alpha channel.
goog.provide('ol.color');
goog.require('goog.asserts');
goog.require('goog.color');
goog.require('goog.color.names');
goog.require('ol');
goog.require('ol.asserts');
goog.require('ol.math');
@@ -22,7 +15,7 @@ ol.color.hexColorRe_ = /^#(?:[0-9a-f]{3}){1,2}$/i;
/**
* @see goog.color.rgbColorRe_
* Regular expression for matching and capturing RGB style strings.
* @const
* @type {RegExp}
* @private
@@ -32,7 +25,7 @@ ol.color.rgbColorRe_ =
/**
* @see goog.color.alpha.rgbaColorRe_
* Regular expression for matching and capturing RGBA style strings.
* @const
* @type {RegExp}
* @private
@@ -41,6 +34,16 @@ ol.color.rgbaColorRe_ =
/^(?:rgba)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|1|0\.\d{0,10})\)$/i;
/**
* Regular expression for matching potential named color style strings.
* @const
* @type {RegExp}
* @private
*/
ol.color.namedColorRe_ =
/^([a-z]*)$/i;
/**
* Return the color as an array. This function maintains a cache of calculated
* arrays which means the result should not be modified.
@@ -52,8 +55,7 @@ ol.color.asArray = function(color) {
if (Array.isArray(color)) {
return color;
} else {
goog.asserts.assert(typeof color === 'string', 'Color should be a string');
return ol.color.fromString(color);
return ol.color.fromString(/** @type {string} */ (color));
}
};
@@ -68,11 +70,24 @@ ol.color.asString = function(color) {
if (typeof color === 'string') {
return color;
} else {
goog.asserts.assert(Array.isArray(color), 'Color should be an array');
return ol.color.toString(color);
}
};
/**
* Return named color as an rgba string.
* @param {string} color Named color.
* @return {string} Rgb string.
*/
ol.color.fromNamed = function(color) {
var el = document.createElement('div');
el.style.color = color;
document.body.appendChild(el);
var rgb = window.getComputedStyle(el).color;
document.body.removeChild(el);
return rgb;
};
/**
* @param {string} s String.
@@ -137,18 +152,15 @@ ol.color.fromString = (
* @return {ol.Color} Color.
*/
ol.color.fromStringInternal_ = function(s) {
var r, g, b, a, color, match;
var isHex = false;
if (ol.ENABLE_NAMED_COLORS && goog.color.names.hasOwnProperty(s)) {
s = goog.color.names[s];
isHex = true;
if (ol.color.namedColorRe_.exec(s)) {
s = ol.color.fromNamed(s);
}
var r, g, b, a, color, match;
if (isHex || (match = ol.color.hexColorRe_.exec(s))) { // hex
if (ol.color.hexColorRe_.exec(s)) { // hex
var n = s.length - 1; // number of hex digits
goog.asserts.assert(n == 3 || n == 6,
'Color string length should be 3 or 6');
ol.asserts.assert(n == 3 || n == 6, 54); // Hex color should have 3 or 6 digits
var d = n == 3 ? 1 : 2; // number of digits per channel
r = parseInt(s.substr(1 + 0 * d, d), 16);
g = parseInt(s.substr(1 + 1 * d, d), 16);
@@ -160,26 +172,21 @@ ol.color.fromStringInternal_ = function(s) {
}
a = 1;
color = [r, g, b, a];
goog.asserts.assert(ol.color.isValid(color),
'Color should be a valid color');
return color;
} else if ((match = ol.color.rgbaColorRe_.exec(s))) { // rgba()
r = Number(match[1]);
g = Number(match[2]);
b = Number(match[3]);
a = Number(match[4]);
color = [r, g, b, a];
return ol.color.normalize(color, color);
color = ol.color.normalize([r, g, b, a]);
} else if ((match = ol.color.rgbColorRe_.exec(s))) { // rgb()
r = Number(match[1]);
g = Number(match[2]);
b = Number(match[3]);
color = [r, g, b, 1];
return ol.color.normalize(color, color);
color = ol.color.normalize([r, g, b, 1]);
} else {
goog.asserts.fail(s + ' is not a valid color');
ol.asserts.assert(false, 14); // Invalid color
}
return /** @type {ol.Color} */ (color);
};

View File

@@ -2,16 +2,13 @@
goog.provide('ol.control.Attribution');
goog.require('goog.asserts');
goog.require('ol');
goog.require('ol.dom');
goog.require('ol.Attribution');
goog.require('ol.control.Control');
goog.require('ol.css');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol.object');
goog.require('ol.source.Tile');
goog.require('ol.obj');
/**
@@ -157,33 +154,29 @@ ol.control.Attribution.prototype.getSourceAttributions = function(frameState) {
var intersectsTileRange;
var layerStatesArray = frameState.layerStatesArray;
/** @type {Object.<string, ol.Attribution>} */
var attributions = ol.object.assign({}, frameState.attributions);
var attributions = ol.obj.assign({}, frameState.attributions);
/** @type {Object.<string, ol.Attribution>} */
var hiddenAttributions = {};
var projection = frameState.viewState.projection;
goog.asserts.assert(projection, 'projection of viewState required');
var projection = /** @type {!ol.proj.Projection} */ (frameState.viewState.projection);
for (i = 0, ii = layerStatesArray.length; i < ii; i++) {
source = layerStatesArray[i].layer.getSource();
if (!source) {
continue;
}
sourceKey = goog.getUid(source).toString();
sourceKey = ol.getUid(source).toString();
sourceAttributions = source.getAttributions();
if (!sourceAttributions) {
continue;
}
for (j = 0, jj = sourceAttributions.length; j < jj; j++) {
sourceAttribution = sourceAttributions[j];
sourceAttributionKey = goog.getUid(sourceAttribution).toString();
sourceAttributionKey = ol.getUid(sourceAttribution).toString();
if (sourceAttributionKey in attributions) {
continue;
}
tileRanges = frameState.usedTiles[sourceKey];
if (tileRanges) {
goog.asserts.assertInstanceof(source, ol.source.Tile,
'source should be an ol.source.Tile');
var tileGrid = source.getTileGridForProjection(projection);
goog.asserts.assert(tileGrid, 'tileGrid required for projection');
var tileGrid = /** @type {ol.source.Tile} */ (source).getTileGridForProjection(projection);
intersectsTileRange = sourceAttribution.intersectsAnyTileRange(
tileRanges, tileGrid, projection);
} else {
@@ -272,14 +265,14 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
}
var renderVisible =
!ol.object.isEmpty(this.attributionElementRenderedVisible_) ||
!ol.object.isEmpty(frameState.logos);
!ol.obj.isEmpty(this.attributionElementRenderedVisible_) ||
!ol.obj.isEmpty(frameState.logos);
if (this.renderedVisible_ != renderVisible) {
this.element.style.display = renderVisible ? '' : 'none';
this.renderedVisible_ = renderVisible;
}
if (renderVisible &&
ol.object.isEmpty(this.attributionElementRenderedVisible_)) {
ol.obj.isEmpty(this.attributionElementRenderedVisible_)) {
this.element.classList.add('ol-logo-only');
} else {
this.element.classList.remove('ol-logo-only');
@@ -329,7 +322,7 @@ ol.control.Attribution.prototype.insertLogos_ = function(frameState) {
}
}
this.logoLi_.style.display = !ol.object.isEmpty(logos) ? '' : 'none';
this.logoLi_.style.display = !ol.obj.isEmpty(logos) ? '' : 'none';
};

View File

@@ -1,6 +1,5 @@
goog.provide('ol.control.FullScreen');
goog.require('goog.asserts');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol');
@@ -125,7 +124,6 @@ ol.control.FullScreen.prototype.handleFullScreen_ = function() {
} else {
element = map.getTargetElement();
}
goog.asserts.assert(element, 'element should be defined');
if (this.keys_) {
ol.control.FullScreen.requestFullScreenWithKeys(element);

View File

@@ -2,12 +2,12 @@
goog.provide('ol.control.MousePosition');
goog.require('ol');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol.Object');
goog.require('ol.control.Control');
goog.require('ol.proj');
goog.require('ol.proj.Projection');
/**

View File

@@ -1,8 +1,5 @@
goog.provide('ol.control.OverviewMap');
goog.require('goog.asserts');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol');
goog.require('ol.Collection');
goog.require('ol.Map');
@@ -12,11 +9,12 @@ goog.require('ol.ObjectEventType');
goog.require('ol.Overlay');
goog.require('ol.OverlayPositioning');
goog.require('ol.View');
goog.require('ol.ViewProperty');
goog.require('ol.control.Control');
goog.require('ol.coordinate');
goog.require('ol.css');
goog.require('ol.dom');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol.extent');
@@ -213,7 +211,7 @@ ol.control.OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
*/
ol.control.OverviewMap.prototype.bindView_ = function(view) {
ol.events.listen(view,
ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
ol.Object.getChangeEventType(ol.View.Property.ROTATION),
this.handleRotationChanged_, this);
};
@@ -225,7 +223,7 @@ ol.control.OverviewMap.prototype.bindView_ = function(view) {
*/
ol.control.OverviewMap.prototype.unbindView_ = function(view) {
ol.events.unlisten(view,
ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
ol.Object.getChangeEventType(ol.View.Property.ROTATION),
this.handleRotationChanged_, this);
};
@@ -272,18 +270,14 @@ ol.control.OverviewMap.prototype.validateExtent_ = function() {
return;
}
var mapSize = map.getSize();
goog.asserts.assertArray(mapSize, 'mapSize should be an array');
var mapSize = /** @type {ol.Size} */ (map.getSize());
var view = map.getView();
goog.asserts.assert(view, 'view should be defined');
var extent = view.calculateExtent(mapSize);
var ovmapSize = ovmap.getSize();
goog.asserts.assertArray(ovmapSize, 'ovmapSize should be an array');
var ovmapSize = /** @type {ol.Size} */ (ovmap.getSize());
var ovview = ovmap.getView();
goog.asserts.assert(ovview, 'ovview should be defined');
var ovextent = ovview.calculateExtent(ovmapSize);
var topLeftPixel =
@@ -321,18 +315,14 @@ ol.control.OverviewMap.prototype.resetExtent_ = function() {
var map = this.getMap();
var ovmap = this.ovmap_;
var mapSize = map.getSize();
goog.asserts.assertArray(mapSize, 'mapSize should be an array');
var mapSize = /** @type {ol.Size} */ (map.getSize());
var view = map.getView();
goog.asserts.assert(view, 'view should be defined');
var extent = view.calculateExtent(mapSize);
var ovmapSize = ovmap.getSize();
goog.asserts.assertArray(ovmapSize, 'ovmapSize should be an array');
var ovmapSize = /** @type {ol.Size} */ (ovmap.getSize());
var ovview = ovmap.getView();
goog.asserts.assert(ovview, 'ovview should be defined');
// get how many times the current map overview could hold different
// box sizes using the min and max ratio, pick the step in the middle used
@@ -355,10 +345,8 @@ ol.control.OverviewMap.prototype.recenter_ = function() {
var ovmap = this.ovmap_;
var view = map.getView();
goog.asserts.assert(view, 'view should be defined');
var ovview = ovmap.getView();
goog.asserts.assert(ovview, 'ovview should be defined');
ovview.setCenter(view.getCenter());
};
@@ -376,20 +364,13 @@ ol.control.OverviewMap.prototype.updateBox_ = function() {
return;
}
var mapSize = map.getSize();
goog.asserts.assertArray(mapSize, 'mapSize should be an array');
var mapSize = /** @type {ol.Size} */ (map.getSize());
var view = map.getView();
goog.asserts.assert(view, 'view should be defined');
var ovview = ovmap.getView();
goog.asserts.assert(ovview, 'ovview should be defined');
var ovmapSize = ovmap.getSize();
goog.asserts.assertArray(ovmapSize, 'ovmapSize should be an array');
var rotation = view.getRotation();
goog.asserts.assert(rotation !== undefined, 'rotation should be defined');
var overlay = this.boxOverlay_;
var box = this.boxOverlay_.getElement();
@@ -422,7 +403,6 @@ ol.control.OverviewMap.prototype.calculateCoordinateRotate_ = function(
var map = this.getMap();
var view = map.getView();
goog.asserts.assert(view, 'view should be defined');
var currentCenter = view.getCenter();

Some files were not shown because too many files have changed in this diff Show More