Compare commits

...

388 Commits

Author SHA1 Message Date
Marc Jansen
5498f5f7db Merge pull request #6008 from marcjansen/release-v3.19.0
Release v3.19.0
2016-10-21 10:31:20 +02:00
Marc Jansen
84a3d6bee0 Update package version to 3.19.0 2016-10-21 10:19:03 +02:00
Marc Jansen
47c5e8fef7 Changelog for v3.19.0 2016-10-21 10:19:03 +02:00
Marc Jansen
d6f157a792 Merge pull request #6007 from marcjansen/export-example-note
Add note to example that canvas.toBlob() is required
2016-10-21 09:36:54 +02:00
Marc Jansen
d88f5a8c2c Add note that canvas.toBlob() is required 2016-10-21 09:26:07 +02:00
Marc Jansen
574c570242 Merge pull request #5979 from fredj/export_map
Use FileSaver.js in export-map example
2016-10-21 09:23:33 +02:00
Andreas Hocevar
7584c6d540 Merge pull request #6004 from ahocevar/osmxml
Bring back the vector-osm example, using a different service
2016-10-20 14:15:39 +02:00
Andreas Hocevar
dc7f367eaa Bring back the vector-osm example, using a different service 2016-10-20 13:58:17 +02:00
Andreas Hocevar
12fb632999 Merge pull request #6002 from ahocevar/gutter-pixel-ratio
Use tile pixel ratio for gutter calculation
2016-10-20 13:56:43 +02:00
Frédéric Junod
1fbfd4aced Merge pull request #5991 from openlayers/Array.isView_tests
Only test ol.format.MVT if ArrayBuffer.isView is supported
2016-10-20 13:40:45 +02:00
Frederic Junod
0345055cfb Use tile pixel ratio for gutter calculation (webgl and tests) 2016-10-20 13:15:06 +02:00
Frederic Junod
88cebbf6c1 Remove projection param in ol.VectorTile constructor 2016-10-20 12:36:12 +02:00
Frederic Junod
e8bc38b6a9 Use a mock format instead of ol.format.MVT in tests 2016-10-20 12:36:12 +02:00
Frederic Junod
61fcc4a326 Only test ol.format.MVT if ArrayBuffer.isView is supported 2016-10-20 12:18:23 +02:00
Andreas Hocevar
76e0a37d69 Use tile pixel ratio for gutter calculation 2016-10-20 10:52:55 +02:00
Andreas Hocevar
de5b16c0d3 Merge pull request #6000 from ahocevar/fix-tilelayer-mock
Fix mockup of tile layer to keep drawImage arguments in range
2016-10-20 08:54:29 +02:00
Andreas Hocevar
8fb6b6b6e6 Fix mockup of tile layer to keep drawImage arguments in range 2016-10-19 19:48:48 +02:00
Marc Jansen
4e1ccaafcd Merge pull request #5997 from marcjansen/ms-edge-URL-polyfill
Always load a gated URL polyfill when testing
2016-10-19 17:10:09 +02:00
Marc Jansen
3ce93a51ed Always load a gated URL polyfill when testing
Otherwise the tests fail to run in MS Edge, whose user agent doesn't
trigger the inclusion of the polyfill without `always`.
2016-10-19 15:12:24 +02:00
Frédéric Junod
e542c622a7 Merge pull request #5963 from fredj/modify_deactivate
Remove the vertex on ol.interaction.Modify deactivation
2016-10-19 12:14:06 +02:00
Frederic Junod
e853f1ed2a Remove the vertex on ol.interaction.Modify deactivation 2016-10-19 11:06:29 +02:00
Marc Jansen
1311f65ece Merge pull request #5994 from marcjansen/fix-component-no-available-5993
Setup a loaded image with src for TileLayer test
2016-10-19 10:50:32 +02:00
Frederic Junod
92bd1d67a8 Use FileSaver.js in export-map example
Instead of relying on the download attribute.
2016-10-19 10:33:20 +02:00
Marc Jansen
2c200dcf5f Setup a loaded image with src for TileLayer test 2016-10-19 09:56:16 +02:00
Frédéric Junod
b89eb77f20 Merge pull request #5989 from openlayers/rm_vector-osm_example
Remove vector-osm example
2016-10-18 16:05:26 +02:00
Frederic Junod
e890b4b1d6 Remove vector-osm example
fixes #5988
2016-10-18 15:18:24 +02:00
Andreas Hocevar
bca5fde854 Merge pull request #5985 from ahocevar/new-mapzen-url-scheme
Update Mapzen urls to new scheme
2016-10-18 00:50:44 +02:00
Andreas Hocevar
dc23683c0c Merge pull request #5984 from ahocevar/more-https
Less examples with mixed content
2016-10-18 00:50:01 +02:00
Tim Schaub
24d03bc014 Merge pull request #5986 from openlayers/greenkeeper-eslint-3.8.1
Update eslint to version 3.8.1 🚀
2016-10-17 16:13:58 -06:00
greenkeeperio-bot
8456270316 chore(package): update eslint to version 3.8.1
https://greenkeeper.io/
2016-10-17 15:11:21 -06:00
Andreas Hocevar
6caf8adc4c Update Mapzen urls to new scheme 2016-10-17 23:08:39 +02:00
Andreas Hocevar
74bf0dfd72 Merge pull request #5982 from ahocevar/geoserver-https
Use a https enabled GeoServer
2016-10-17 22:59:31 +02:00
Andreas Hocevar
68488eced9 Use https logo for IGN 2016-10-17 22:53:33 +02:00
Andreas Hocevar
910c9d7c4e Use https resource for OpenCycleMap 2016-10-17 22:53:19 +02:00
Andreas Hocevar
f6b2858348 Remove unused JQuery (which uses http) 2016-10-17 22:52:53 +02:00
Andreas Hocevar
971faf230d Use https resources for ski map KML 2016-10-17 22:52:26 +02:00
Tim Schaub
625273c017 Merge pull request #5977 from tschaub/draw-box
Convenience function for drawing boxes
2016-10-17 12:56:49 -06:00
Andreas Hocevar
1181607f39 Use a https enabled GeoServer 2016-10-17 19:53:52 +02:00
Tim Schaub
884e05b90b Merge pull request #5978 from openlayers/greenkeeper-async-2.1.2
Update async to version 2.1.2 🚀
2016-10-16 21:03:07 -06:00
greenkeeperio-bot
4904b5035e chore(package): update async to version 2.1.2
https://greenkeeper.io/
2016-10-16 17:01:52 -06:00
Tim Schaub
5644fe3e2f Add example demonstrating freehand drawing 2016-10-16 16:45:42 -06:00
Tim Schaub
ac805e804b Divide the draw features example into two examples 2016-10-16 16:38:00 -06:00
Tim Schaub
ec1ad89338 Correct docs for createRegularPolygon() function 2016-10-16 15:54:15 -06:00
Tim Schaub
1e6c4472b2 Use the createBox() geometry function 2016-10-16 15:54:15 -06:00
Tim Schaub
9b12cac5c6 Convenience function for drawing box-shaped polygons 2016-10-16 15:54:15 -06:00
Tim Schaub
92583542eb Merge pull request #5975 from tschaub/freehand-finish
Finish drawing on pointerup when in freehand mode
2016-10-16 01:30:17 -06:00
Tim Schaub
7068081c67 Merge pull request #5976 from tschaub/https
Use https where available
2016-10-16 01:14:39 -06:00
Tim Schaub
8e6f74fecd Use https for mesonet.agron.iastate.edu 2016-10-16 01:02:31 -06:00
Tim Schaub
7c983058ad Use https for sampleserver3.arcgisonline.com 2016-10-16 01:00:38 -06:00
Tim Schaub
2e5ecd1efb Use https for services.arcgis.com 2016-10-16 00:58:51 -06:00
Tim Schaub
626968f72e Use https for tiles.openseamap.org 2016-10-16 00:55:40 -06:00
Tim Schaub
0925538525 Use https for overpass-api.de 2016-10-16 00:53:03 -06:00
Tim Schaub
c016a497c3 Use https for map1.vis.earthdata.nasa.gov 2016-10-16 00:44:10 -06:00
Tim Schaub
0382c34c78 Use https for upload.wikimedia.org 2016-10-16 00:41:08 -06:00
Tim Schaub
324e67fac1 Use https for epsg.io 2016-10-16 00:39:07 -06:00
Tim Schaub
8c8246a33f Use https for www.osgeo.org 2016-10-16 00:38:25 -06:00
Tim Schaub
ff754a0a9f Use https for www.openstreetmap.org 2016-10-16 00:34:06 -06:00
Tim Schaub
da402b22af Use https for www.opencyclemap.org 2016-10-16 00:26:50 -06:00
Tim Schaub
100c42e671 Use https for services.arcgisonline.com 2016-10-16 00:25:47 -06:00
Tim Schaub
9875df39bf Use https for openlayers.org 2016-10-16 00:16:15 -06:00
Tim Schaub
978548b085 Use https for cdn.polyfill.io 2016-10-16 00:14:52 -06:00
Tim Schaub
8f57ebd2c6 Finish drawing on pointerup when in freehand mode 2016-10-15 13:47:34 -06:00
Tim Schaub
484b684d20 Merge pull request #5973 from tschaub/freehand-option
Add a freehand option to the draw interaction
2016-10-15 12:40:35 -06:00
Andreas Hocevar
cba270efa1 Merge pull request #5964 from ahocevar/icon-text-transform
Set one-off transform instead of transforming back and forth
2016-10-15 19:46:47 +02:00
Tim Schaub
4b0e857b93 Add freehand to the typedef 2016-10-15 06:36:59 -06:00
Tim Schaub
1c8ed12b68 Assert that the freehand option properly sets the condition 2016-10-15 05:45:23 -06:00
Tim Schaub
fad6d368a6 Allow freehand drawing without a modifier key 2016-10-15 05:37:15 -06:00
Tim Schaub
8d68d68c9d Merge pull request #5970 from tschaub/freehand-shape
Allow circles, squares, and boxes to be drawn in freehand mode
2016-10-15 05:36:35 -06:00
Tim Schaub
a80d073da9 Merge pull request #5972 from openlayers/greenkeeper-eslint-3.8.0
Update eslint to version 3.8.0 🚀
2016-10-14 17:36:45 -06:00
greenkeeperio-bot
333ccb6ae4 chore(package): update eslint to version 3.8.0
https://greenkeeper.io/
2016-10-14 16:12:06 -06:00
Tim Schaub
c58d98248a Allow circles, squares, and boxes to be drawn in freehand mode 2016-10-14 11:11:43 -06:00
Andreas Hocevar
fdae2e8e00 Set one-off transform instead of transforming back and forth 2016-10-14 17:54:21 +02:00
Andreas Hocevar
068c9ceba4 Merge pull request #5969 from ahocevar/not-only
Test all, not just one
2016-10-14 17:52:37 +02:00
Andreas Hocevar
b563e9079f Update expected result after #5950 2016-10-14 17:40:24 +02:00
Andreas Hocevar
78082e2833 Test all, not just one 2016-10-14 16:12:31 +02:00
Frédéric Junod
eacc3a52bb Merge pull request #5967 from fredj/cleanup
Add missing jsdoc to ol.render.canvas.Replay#fill_ function
2016-10-14 15:35:05 +02:00
Frederic Junod
988b3f8b9b Add missing jsdoc to ol.render.canvas.Replay#fill_ function 2016-10-14 15:05:30 +02:00
Andreas Hocevar
761c63585d Merge pull request #5962 from ahocevar/proj4js-examples
Use same proj4js version in examples and tests
2016-10-13 15:18:45 +02:00
Andreas Hocevar
6be7dcf9d2 Merge pull request #5961 from ahocevar/remove-unused-error-codes
Remove unused error codes
2016-10-13 15:17:25 +02:00
Frédéric Junod
07a413efff Merge pull request #5960 from fredj/rename
More renaming to have one provide per file
2016-10-13 14:49:24 +02:00
Andreas Hocevar
22084aa960 Use same proj4js version in examples and tests 2016-10-13 14:27:43 +02:00
Andreas Hocevar
f5eaba4255 Remove unused error codes 2016-10-13 14:06:36 +02:00
Andreas Hocevar
674e2ab37e Merge pull request #5959 from ahocevar/getlayer-no-assert
Remove unnecessary and misleading assertion
2016-10-13 13:44:07 +02:00
Frederic Junod
ed677cec4e Rename ol.render.EventType to ol.render.Event.Type 2016-10-13 12:02:51 +02:00
Andreas Hocevar
58d459bca0 Remove unnecessary and misleading assertion 2016-10-13 11:54:32 +02:00
Frederic Junod
5a3794752a Rename ol.interaction.InteractionProperty to ol.interaction.Interaction.Property 2016-10-13 11:50:42 +02:00
Frederic Junod
189a7f1759 Rename ol.layer.VectorTileProperty to ol.layer.VectorTile.Property 2016-10-13 11:43:40 +02:00
Frederic Junod
80a6512d55 Rename ol.layer.VectorProperty to ol.layer.Vector.Property 2016-10-13 11:42:17 +02:00
Frederic Junod
99dcaf3830 Add missing goog.require('ol') 2016-10-13 11:40:06 +02:00
Andreas Hocevar
74450f40be Merge pull request #5950 from ahocevar/fill-movewithview
Move gradient and pattern fills with the view
2016-10-13 09:41:40 +02:00
Andreas Hocevar
f655f6740e Move gradient and pattern fills with the view 2016-10-13 09:30:09 +02:00
Andreas Hocevar
cd4f2cc2d8 Merge pull request #5957 from openlayers/greenkeeper-async-2.1.1
Update async to version 2.1.1 🚀
2016-10-12 21:29:16 +02:00
greenkeeperio-bot
ba9e332baa chore(package): update async to version 2.1.1
https://greenkeeper.io/
2016-10-12 13:15:08 -06:00
Andreas Hocevar
a0ab27c182 Merge pull request #5956 from openlayers/greenkeeper-async-2.1.0
Update async to version 2.1.0 🚀
2016-10-12 20:52:40 +02:00
greenkeeperio-bot
8c4abaf47a chore(package): update async to version 2.1.0
https://greenkeeper.io/
2016-10-12 12:39:35 -06:00
Bart van den Eijnden
941fbbedc0 Merge pull request #5955 from bartvde/bing-getters
Add getters to BingMaps source for api key and imagerySet
2016-10-12 16:13:03 +02:00
Bart van den Eijnden
df4f2ff28d Add getters to BingMaps source for api key and imagerySet 2016-10-12 16:04:10 +02:00
Tim Schaub
cbf5d0bae0 Merge pull request #5944 from tschaub/geojson-as-features
Allow readFeature and readFeatures to be called with GeoJSON geometries
2016-10-11 14:07:36 -06:00
Tim Schaub
0d686fe88b Corrected test description 2016-10-11 13:55:37 -06:00
Marc Jansen
043a8ab1db Merge pull request #5949 from marcjansen/attributionlike-prose-doc
Add prose documentation for ol.AttributionLike
2016-10-11 13:59:20 +02:00
Marc Jansen
0c4705fb9d Merge pull request #5948 from marcjansen/getstyle-docs
Fix API docs of ol.Feature#getStyle
2016-10-11 13:59:06 +02:00
Marc Jansen
9094894a41 Add prose documentation for ol.AttributionLike 2016-10-11 12:25:10 +02:00
Marc Jansen
857c9e83ac Fix API docs of ol.Feature#getStyle 2016-10-11 12:01:06 +02:00
Andreas Hocevar
251ff89c70 Merge pull request #5946 from openlayers/greenkeeper-mocha-3.1.2
Update mocha to version 3.1.2 🚀
2016-10-11 09:45:14 +02:00
greenkeeperio-bot
de4728b1b7 chore(package): update mocha to version 3.1.2
https://greenkeeper.io/
2016-10-11 00:37:47 -06:00
Tim Schaub
309b2145cf Allow readFeature and readFeatures to be called with geometries 2016-10-10 13:31:19 -06:00
Andreas Hocevar
c1c7c8bc11 Merge pull request #5941 from openlayers/greenkeeper-mocha-3.1.1
Update mocha to version 3.1.1 🚀
2016-10-10 12:50:14 +02:00
Andreas Hocevar
5f18246355 Merge pull request #5890 from ahocevar/no-white-lines
No gaps between tiles of different resolutions
2016-10-10 10:48:07 +02:00
Andreas Hocevar
f23921367b Use a common origin and resolution factors for tile alignment 2016-10-10 10:25:29 +02:00
greenkeeperio-bot
e26a4b36bb chore(package): update mocha to version 3.1.1
https://greenkeeper.io/
2016-10-10 01:27:43 -06:00
Tim Schaub
004afa6b9a Merge pull request #5935 from tschaub/friendly-transform
Keep transformed coordinates within valid y range
2016-10-07 06:40:04 -06:00
Andreas Hocevar
fe874938c3 Merge pull request #5937 from ahocevar/one-require-vectortile
One provide per file for vector tiles
2016-10-07 07:46:15 +02:00
Tim Schaub
7cf1e74ae3 Integration test for rendering a world spanning polygon 2016-10-06 20:48:58 -06:00
Andreas Hocevar
04649a74cd One provide per file for vector tiles 2016-10-06 22:52:02 +02:00
Tim Schaub
8ac6c85f0f Reuse half size 2016-10-05 08:23:41 -06:00
Tim Schaub
321c65b023 Keep transformed coordinates within valid y range 2016-10-05 07:26:41 -06:00
Frédéric Junod
5cdbd76b1e Merge pull request #5933 from openlayers/greenkeeper-phantomjs-prebuilt-2.1.13
Update phantomjs-prebuilt to version 2.1.13 🚀
2016-10-05 08:25:37 +02:00
greenkeeperio-bot
9f8315762a chore(package): update phantomjs-prebuilt to version 2.1.13
https://greenkeeper.io/
2016-10-04 09:13:44 -06:00
Andreas Hocevar
869153e7ac Merge pull request #5932 from openlayers/greenkeeper-eslint-3.7.1
Update eslint to version 3.7.1 🚀
2016-10-04 02:06:20 +02:00
Andreas Hocevar
1bdf480670 Merge pull request #5931 from openlayers/greenkeeper-jsdoc-3.4.2
Update jsdoc to version 3.4.2 🚀
2016-10-04 01:20:53 +02:00
greenkeeperio-bot
eab85a2107 chore(package): update eslint to version 3.7.1
https://greenkeeper.io/
2016-10-03 16:55:05 -06:00
greenkeeperio-bot
3f2424c0d8 chore(package): update jsdoc to version 3.4.2
https://greenkeeper.io/
2016-10-03 12:22:56 -06:00
Andreas Hocevar
74466a3561 Merge pull request #5923 from openlayers/greenkeeper-pbf-3.0.2
Update pbf to version 3.0.2 🚀
2016-10-02 22:42:03 +02:00
Andreas Hocevar
09eee4aa43 Merge pull request #5926 from adube/fix-map-collection-element-type
Ensure correct type of event.element
2016-10-02 16:00:38 +02:00
greenkeeperio-bot
19c5518c96 chore(package): update pbf to version 3.0.2
https://greenkeeper.io/
2016-09-30 15:11:35 -06:00
Marc Jansen
da32e5e367 Merge pull request #5928 from openlayers/greenkeeper-eslint-3.7.0
Update eslint to version 3.7.0 🚀
2016-09-30 23:11:14 +02:00
greenkeeperio-bot
8669dec33b chore(package): update eslint to version 3.7.0
https://greenkeeper.io/
2016-09-30 13:11:02 -06:00
Alexandre Dubé
72e0ad13b3 Ensure correct type of event.element 2016-09-30 09:57:16 -04:00
Andreas Hocevar
40c639b194 Merge pull request #5919 from openlayers/greenkeeper-resemblejs-2.2.2
Update resemblejs to version 2.2.2 🚀
2016-09-27 21:52:54 +02:00
Andreas Hocevar
fb8c4820d0 Merge pull request #5909 from openlayers/greenkeeper-jquery-3.1.1
Update jquery to version 3.1.1 🚀
2016-09-27 21:52:41 +02:00
greenkeeperio-bot
eb4b2d4bcc chore(package): update resemblejs to version 2.2.2
https://greenkeeper.io/
2016-09-27 09:55:16 -06:00
Tim Schaub
5973644c4b Merge pull request #5917 from tschaub/format-options
Accept feature projection in GeoJSON constructor
2016-09-27 06:11:50 -06:00
greenkeeperio-bot
0e6919462d chore(package): update jquery to version 3.1.1
https://greenkeeper.io/
2016-09-27 05:03:00 -06:00
Marc Jansen
6f4f2f100e Merge pull request #5918 from openlayers/greenkeeper-mocha-3.1.0
Update mocha to version 3.1.0 🚀
2016-09-27 13:02:33 +02:00
greenkeeperio-bot
cad455f635 chore(package): update mocha to version 3.1.0
https://greenkeeper.io/
2016-09-27 02:59:02 -06:00
Tim Schaub
529da77b49 Merge pull request #5916 from openlayers/greenkeeper-eslint-3.6.1
Update eslint to version 3.6.1 🚀
2016-09-26 22:57:08 -06:00
Tim Schaub
4b6e907f69 Accept feature projection in GeoJSON constructor 2016-09-26 22:56:07 -06:00
greenkeeperio-bot
2ce2e5bf27 chore(package): update eslint to version 3.6.1
https://greenkeeper.io/
2016-09-26 17:09:58 -06:00
Tim Schaub
f8bcd725ad Merge pull request #5914 from tschaub/multi-poly-clip
Allow clipping by MultiPolygon
2016-09-26 06:39:12 -06:00
Andreas Hocevar
0ae73632cc Merge pull request #5894 from ahocevar/reuse-arrays
Reuse arrays for rendered tiles and extent
2016-09-26 14:35:58 +02:00
Andreas Hocevar
1fffd0d749 Merge pull request #5895 from ahocevar/straight-extent
Always use the frameState's extent
2016-09-26 14:30:55 +02:00
Tim Schaub
f444800fc6 Only call beginPath once per MultiPolygon 2016-09-26 06:13:01 -06:00
Andreas Hocevar
3026fda02b Use pixel rounded center for the WebGL renderer transform 2016-09-26 13:28:09 +02:00
Frédéric Junod
d8fbc09326 Merge pull request #5911 from openlayers/greenkeeper-eslint-3.6.0
Update eslint to version 3.6.0 🚀
2016-09-26 09:37:09 +02:00
Frédéric Junod
27cdbf9c00 Merge pull request #5903 from fredj/ol.format.filter
Rename ol.format.ogc.filter namespace to ol.format.filter
2016-09-26 08:38:30 +02:00
Frédéric Junod
5083e7a395 Merge pull request #5913 from openlayers/greenkeeper-clean-css-3.4.20
Update clean-css to version 3.4.20 🚀
2016-09-26 08:36:32 +02:00
greenkeeperio-bot
b92dc1b55d chore(package): update clean-css to version 3.4.20
https://greenkeeper.io/
2016-09-25 22:53:18 -06:00
greenkeeperio-bot
0b1e16bf58 chore(package): update eslint to version 3.6.0
https://greenkeeper.io/
2016-09-23 16:33:27 -06:00
Marc Jansen
66854c0669 Merge pull request #5776 from jonataswalker/add-radius-to-circle
Add ol.style.Circle#setRadius
2016-09-23 21:16:00 +02:00
Frédéric Junod
833247d24e Merge pull request #5905 from openlayers/greenkeeper-pbf-3.0.1
Update pbf to version 3.0.1 🚀
2016-09-21 08:36:17 +02:00
Frederic Junod
78af52d62d Rename ol.format.ogc.filter namespace to ol.format.filter 2016-09-21 08:35:49 +02:00
Frédéric Junod
addc23b20e Merge pull request #5904 from fredj/upgrade-notes_code
Fix changelog/upgrade-notes.md formating
2016-09-21 08:34:36 +02:00
greenkeeperio-bot
1d43ee38e6 chore(package): update pbf to version 3.0.1
https://greenkeeper.io/
2016-09-20 22:18:23 -07:00
Frédéric Junod
d27b057969 Merge pull request #5906 from openlayers/greenkeeper-glob-7.1.0
Update glob to version 7.1.0 🚀
2016-09-21 07:18:03 +02:00
greenkeeperio-bot
b20a9ac1e9 chore(package): update glob to version 7.1.0
https://greenkeeper.io/
2016-09-20 11:38:26 -07:00
Frederic Junod
84c50ca6b2 Fix changelog/upgrade-notes.md formating 2016-09-20 16:54:19 +02:00
Frédéric Junod
22014f2454 Merge pull request #5898 from openlayers/greenkeeper-sinon-1.17.6
Update sinon to version 1.17.6 🚀
2016-09-20 08:33:43 +02:00
Frédéric Junod
ae61fcfb34 Merge pull request #5888 from fredj/rm_unused
Remove unused functions
2016-09-20 08:33:12 +02:00
Frédéric Junod
474e5a0a98 Merge pull request #5900 from openlayers/greenkeeper-coveralls-2.11.14
Update coveralls to version 2.11.14 🚀
2016-09-20 08:32:25 +02:00
greenkeeperio-bot
8bf2ebb38d chore(package): update coveralls to version 2.11.14
https://greenkeeper.io/
2016-09-19 11:35:57 -06:00
greenkeeperio-bot
096506ed37 chore(package): update sinon to version 1.17.6
https://greenkeeper.io/
2016-09-19 06:51:37 -06:00
Andreas Hocevar
90cfde39b3 Merge pull request #5897 from ahocevar/wms-time-data
Show NEXRAD data in WMS Time example
2016-09-16 20:12:42 +02:00
Andreas Hocevar
36aeccdac2 Merge pull request #5896 from probins/renderer
Remove plain string from Map renderer option
2016-09-16 20:10:23 +02:00
Andreas Hocevar
a88f150c4b Show NEXRAD data in WMS Time example 2016-09-16 20:02:09 +02:00
Peter Robins
d4024846cf Remove plain string from Map renderer option
To get this to compile with the examples, typecasts have to be added to Map renderer options.
2016-09-16 15:43:20 +00:00
Andreas Hocevar
e9056c9d30 Merge pull request #5893 from ahocevar/fix-assertion
Fix fillStyle or strokeStyle defined assertion
2016-09-16 15:06:20 +02:00
Andreas Hocevar
76605e232a Merge pull request #5892 from probins/getrenderer
Remove getRendererFromQueryString from examples
2016-09-16 15:05:57 +02:00
Andreas Hocevar
9950e97c54 Always use the frameState's extent
Since the tile renderer aligns tiles to pixels anyway, we do not need to
modify the extent to make its center align with a pixel.
2016-09-16 15:02:21 +02:00
Andreas Hocevar
b0a654534c Reuse arrays for rendered tiles and extent 2016-09-16 14:58:39 +02:00
Andreas Hocevar
e87c198eef Fix fillStyle or strokeStyle defined assertion 2016-09-16 14:21:10 +02:00
Peter Robins
7d5635092a Remove getRendererFromQueryString from examples 2016-09-16 09:34:30 +00:00
Andreas Hocevar
49e2e55063 Merge pull request #5889 from openlayers/greenkeeper-coveralls-2.11.13
Update coveralls to version 2.11.13 🚀
2016-09-15 23:10:20 +02:00
greenkeeperio-bot
c80918c8d8 chore(package): update coveralls to version 2.11.13
https://greenkeeper.io/
2016-09-15 11:40:22 -06:00
Frederic Junod
000207016f Remove unused ol.tilecoord.createFromString function 2016-09-15 16:33:58 +02:00
Frederic Junod
932269c8b6 Remove unused ol.color.isValid function 2016-09-15 16:33:42 +02:00
Frédéric Junod
415105c4db Merge pull request #5886 from fredj/rm_unused
Remove unused functions
2016-09-15 15:49:01 +02:00
Frederic Junod
d812804b2e Remove unused ol.array.binaryFindNearest function 2016-09-15 10:39:46 +02:00
Frederic Junod
d108658cff Remove unused ol.size.equals function 2016-09-15 10:39:46 +02:00
Frederic Junod
97ececb470 Remove unused ol.coordinate.fromProjectedArray function 2016-09-15 10:39:46 +02:00
Frederic Junod
a4504b0e00 Remove unused ol.TileRange.boundingTileRange function 2016-09-15 10:21:50 +02:00
Bart van den Eijnden
175727c782 Merge pull request #5885 from bartvde/issue-5524
Remove unused pruneTileRange function
2016-09-15 10:18:28 +02:00
Bart van den Eijnden
589c6b7ded Get rid of unused pruneTileRange function 2016-09-15 10:07:25 +02:00
Frédéric Junod
e416a884b7 Merge pull request #5853 from fredj/number_range_expandUrl
Allow more than one digit range in ol.TileUrlFunction.expandUrl
2016-09-15 09:20:52 +02:00
Frederic Junod
2591f61fd3 Allow more than one digit range in ol.TileUrlFunction.expandUrl
To be able to have number range like `{9-13}`
2016-09-15 08:44:22 +02:00
Marc Jansen
bdced57162 Merge pull request #5445 from fblackburn/select_interaction_fix_style_function
Select interaction default styling function can now handle geometry less features
2016-09-14 16:21:31 +02:00
Francois Blackburn
f12a407a7d Fix a crash in select interaction default styling function when receiving a feature without geometry 2016-09-14 08:37:07 -04:00
Frédéric Junod
752b4c6247 Merge pull request #5884 from fredj/indent
Fix jsdoc tag indentation
2016-09-14 14:18:55 +02:00
Frederic Junod
d2291360ba Fix jsdoc tag indentation 2016-09-14 13:57:50 +02:00
Frédéric Junod
7ec100f3f8 Merge pull request #5863 from fredj/stroke_pattern
Allow CanvasPattern or CanvasGradient as stroke style
2016-09-14 08:38:41 +02:00
Marc Jansen
4864306d0c Merge pull request #5838 from marcjansen/more-requires
Require ol where ol.DEBUG is being used
2016-09-14 07:58:18 +02:00
jonataswalker
1372f98822 Add ol.style.Circle#setRadius 2016-09-13 17:24:31 -03:00
Andreas Hocevar
057f60e4f1 Merge pull request #5878 from ahocevar/polygon-appendflatcoordinates
Smarter handling of closed rings and closePath() instructions
2016-09-13 20:14:25 +02:00
Marc Jansen
f5d82ff7bd Merge pull request #5880 from marcjansen/fewer-linter-warnings
More work towards one provide per file
2016-09-13 20:11:10 +02:00
Marc Jansen
dfbeba02c8 Merge pull request #5857 from KlausBenndorf/multiOptionSelectInteraction
Fixed issue with multi option of ol.interaction.Select
2016-09-13 20:10:25 +02:00
Frederic Junod
e48fda6bef Allow CanvasPattern or CanvasGradient as stroke style 2016-09-13 17:16:29 +02:00
Andreas Hocevar
c8c1578928 Add rendering tests for simplified polygons 2016-09-13 16:32:55 +02:00
simonseyock
7392db0f57 Fixed issue with multi option of ol.interaction.Select 2016-09-13 13:29:44 +02:00
Marc Jansen
7b8b300b31 Rename source.RasterEvent* to source.Raster.Event* 2016-09-13 09:25:47 +02:00
Marc Jansen
bb43a45f91 Move provider and layerconfig to be class members 2016-09-13 08:47:19 +02:00
Andreas Hocevar
e7bc7121d6 Add option to skip first coordinate for use with closePath() 2016-09-13 02:14:12 +02:00
Andreas Hocevar
430aee95fd Only check for fill and stroke once 2016-09-13 02:14:12 +02:00
Andreas Hocevar
129757578d Do not repeat first vertex when closed is true 2016-09-13 02:13:30 +02:00
Marc Jansen
51776ed79e Merge pull request #5876 from KlausBenndorf/useCloneInKMLFormat
Use clone method in kml format
2016-09-12 16:02:33 +02:00
Simon Seyock
640307d8f1 Use clone method in kml format 2016-09-12 14:17:14 +02:00
Marc Jansen
6192234e4e Merge pull request #5832 from KlausBenndorf/cloneStyle
Add clone methods to styles
2016-09-12 13:15:10 +02:00
Simon Seyock
ef0300b828 More consistent use of be and eql in tests 2016-09-12 12:17:47 +02:00
Simon Seyock
c5ba4af2a6 Restored ol.style.RegularShape#getPoints behaviour 2016-09-12 12:13:21 +02:00
Frédéric Junod
2ac33073cf Merge pull request #5869 from openlayers/greenkeeper-jsdoc-3.4.1
Update jsdoc to version 3.4.1 🚀
2016-09-12 09:10:04 +02:00
Simon Seyock
37a11c89b9 Added note about coping the atlasManager 2016-09-11 21:45:01 +02:00
Simon Seyock
b86a12e121 Added remaining tests 2016-09-11 21:45:00 +02:00
Simon Seyock
9f32e8d566 Added cloning of image element, color cloning 2016-09-11 21:44:59 +02:00
Simon Seyock
147f091998 Added ol.style.Icon#clone test 2016-09-11 21:44:58 +02:00
Simon Seyock
a183c66704 Added tests for ol.style.Circle, ol.style.Stroke & ol.style.Fill 2016-09-11 21:44:58 +02:00
simonseyock
c561f1587b Add clone methods to styles 2016-09-11 21:44:52 +02:00
Tim Schaub
ae16b9ed63 Merge pull request #5872 from tschaub/color-type
Keep ol.Color as Array<number>
2016-09-10 18:11:13 -06:00
Tim Schaub
f61a43b3c6 Keep ol.Color as Array<number> 2016-09-10 11:12:10 -06:00
greenkeeperio-bot
e7ff7786a6 chore(package): update jsdoc to version 3.4.1
https://greenkeeper.io/
2016-09-10 04:29:48 -06:00
Andreas Hocevar
c7e743805b Merge pull request #5870 from openlayers/greenkeeper-eslint-3.5.0
Update eslint to version 3.5.0 🚀
2016-09-10 11:29:30 +01:00
greenkeeperio-bot
46908bad18 chore(package): update eslint to version 3.5.0
https://greenkeeper.io/
2016-09-09 14:29:32 -06:00
Marc Jansen
6c56d34330 Merge pull request #5867 from marcjansen/pattern-gradient-example
Add dedicated example using CanvasPattern and CanvasGradient for styling vectors
2016-09-08 13:53:03 +02:00
Frédéric Junod
5f9855bf5a Merge pull request #5864 from fredj/more_renaming
More renaming
2016-09-08 13:03:11 +02:00
Marc Jansen
09d3028ece Add example using CanvasPattern and CanvasGradient 2016-09-08 12:20:17 +02:00
Marc Jansen
e5ac575eb3 Simplify basic vector layer example
This effectively reverts the changes introduced by 860aa9ff46.
2016-09-08 08:44:35 +02:00
Frederic Junod
f860c94840 Rename ol.ModifyEventType to ol.interaction.Modify.EventType 2016-09-07 16:57:03 +02:00
Frederic Junod
c6a9bc66d6 Rename ol.interaction.ModifyEvent to ol.interaction.Modify.Event 2016-09-07 16:55:47 +02:00
Frederic Junod
c30a97ef59 Rename ol.interaction.SelectEventType to ol.interaction.Select.EventType 2016-09-07 16:49:18 +02:00
Frederic Junod
fa40b59c53 Rename ol.interaction.SelectEvent to ol.interaction.Select.Event 2016-09-07 16:46:26 +02:00
Frederic Junod
82d172545c Rename ol.interaction.DrawEventType to ol.interaction.Draw.EventType 2016-09-07 16:43:18 +02:00
Frederic Junod
3d1b1d5ac5 Rename ol.interaction.DrawEvent to ol.interaction.Draw.Event 2016-09-07 16:40:42 +02:00
Frederic Junod
3e4ed489a4 Rename ol.interaction.DrawMode to ol.interaction.Draw.Mode 2016-09-07 16:38:16 +02:00
Frédéric Junod
9a9b22ec5e Merge pull request #5861 from fredj/more_renaming
More renaming to have one provide per file
2016-09-07 13:02:40 +02:00
Frederic Junod
d35537e975 Rename ol.layer.TileProperty to ol.layer.Tile.Property 2016-09-07 10:47:39 +02:00
Frederic Junod
302f37ae7a Rename ol.interaction.ExtentEventType to ol.interaction.Extent.EventType 2016-09-07 10:36:02 +02:00
Frederic Junod
151e9866ea Rename ol.interaction.ExtentEvent to ol.interaction.Extent.Event 2016-09-07 10:34:10 +02:00
Frederic Junod
cfc1337cde Rename ol.source.ImageEventType to ol.source.Image.EventType 2016-09-07 10:22:25 +02:00
Frederic Junod
d08e9e65b4 Rename ol.source.ImageEvent to ol.source.Image.Event 2016-09-07 10:21:21 +02:00
Frederic Junod
36b50ab491 Rename ol.interaction.TranslateEventType to ol.interaction.Translate.EventType 2016-09-07 10:14:11 +02:00
Frederic Junod
7ced5e68be Rename ol.interaction.TranslateEvent to ol.interaction.Translate.Event 2016-09-07 10:12:30 +02:00
Frederic Junod
107dd6a85f Rename ol.MapEventType to ol.MapEvent.Type 2016-09-07 10:05:38 +02:00
Frédéric Junod
a40717b7c9 Merge pull request #5860 from fredj/more_renaming
Rename ol.MapProperty and ol.interaction.DragAndDropEvent*
2016-09-07 09:53:35 +02:00
Frederic Junod
14c9212992 Rename ol.interaction.DragAndDropEventType to ol.interaction.DragAndDrop.EventType 2016-09-07 09:38:16 +02:00
Frederic Junod
dfa0c00810 Rename ol.interaction.DragAndDropEvent to ol.interaction.DragAndDrop.Event 2016-09-07 09:38:16 +02:00
Frederic Junod
6c7b395024 Rename ol.MapProperty to ol.Map.Property 2016-09-07 09:38:16 +02:00
Frédéric Junod
ac26a2cfcd Merge pull request #5855 from fredj/rename_dragbox_event
Rename ol.DragBoxEvent* to ol.interaction.DragBox.Event*
2016-09-07 09:37:59 +02:00
Frédéric Junod
d55e4cd028 Merge pull request #5859 from fredj/rname_ol.RendererType
Rename ol.RendererType to ol.renderer.Type
2016-09-07 09:24:29 +02:00
Frederic Junod
db2b8666b6 Rename ol.RendererType to ol.renderer.Type 2016-09-07 08:57:23 +02:00
Frederic Junod
f6daa99082 Rename ol.DragBoxEventType to ol.interaction.DragBox.EventType 2016-09-06 09:14:36 +02:00
Frederic Junod
7135cec0fd Rename ol.DragBoxEvent to ol.interaction.DragBox.Event 2016-09-06 09:10:17 +02:00
Frédéric Junod
86c1513062 Merge pull request #5846 from probins/patch-2
Remove unused goog.require('ol')
2016-09-06 08:54:19 +02:00
Frédéric Junod
00c62f4db7 Merge pull request #5854 from fredj/fillPattern_example
Use a canvas pattern in the vector-layer example
2016-09-05 14:27:34 +02:00
Frederic Junod
860aa9ff46 Use a canvas pattern in the vector-layer example 2016-09-05 12:32:09 +02:00
Frédéric Junod
d06b5dc818 Merge pull request #5852 from fredj/ol.interaction.Extent_cleanup
ol.interaction.extent cleanup
2016-09-05 09:51:47 +02:00
Frédéric Junod
df6eee5d79 Merge pull request #5851 from fredj/rm_imageByContext_
Remove unused imageByContext_ in ol.ImageTile
2016-09-05 09:21:21 +02:00
Frederic Junod
ed4401e15e Remove unused removeExtentFeature_ function in ol.interaction.Extent 2016-09-05 09:14:49 +02:00
Frederic Junod
cd7bc2e4bf Remove unused removeExtentFeature_ function in ol.interaction.Extent 2016-09-05 09:14:49 +02:00
Frederic Junod
d863cff28d Remove unused lastPixel_ in ol.interaction.Extent 2016-09-05 09:14:49 +02:00
Frederic Junod
6c7f50a38e Add '=' to optional parameter annotation 2016-09-05 09:14:49 +02:00
Frederic Junod
1deedd5b7a Remove unused imageByContext_ in ol.ImageTile
Leftover from #5815
2016-09-05 09:07:21 +02:00
Frédéric Junod
6bb3301b7d Merge pull request #5849 from fredj/global_externs
Remove 'global' from externs/closure-compiler.js
2016-09-05 09:06:07 +02:00
Frederic Junod
a3a2e82696 Remove 'global' from externs/closure-compiler.js 2016-09-05 08:37:14 +02:00
Peter Robins
c4ea5e60c2 Remove unused goog.require 2016-09-03 14:57:32 +01:00
Tim Schaub
956aed7eb4 Merge pull request #5837 from tschaub/global
Remove ol.global
2016-09-02 21:18:26 -06:00
Andreas Hocevar
f4b40ab28e Merge pull request #5842 from ahocevar/remove-extra-provide
Remove extra provide causing a circular dependency
2016-09-02 22:05:49 +02:00
Andreas Hocevar
ae41b83a78 Remove extra provide causing a circular dependency 2016-09-02 21:46:46 +02:00
Andreas Hocevar
9b61e8f44c Merge pull request #5795 from thomasmoelhave/wmts-tile-transitions
Render older loaded tiles while waiting for new tiles
2016-09-02 16:53:55 +02:00
Thomas Moelhave
8af5dd7157 Move interim chain tests to ol.Tile 2016-09-02 15:50:22 +02:00
Marc Jansen
64e44009e0 Merge pull request #5840 from marcjansen/one-provide-per-file
Rename source.wms.ServerType ➛ source.WMSServerType
2016-09-02 15:37:56 +02:00
Andreas Hocevar
ed17cbc6f0 Move interim tile related methods to ol.Tile 2016-09-02 15:28:28 +02:00
Thomas Moelhave
69fc9edb4d Render older loaded tiles while waiting for new tiles 2016-09-02 15:28:28 +02:00
Marc Jansen
9bf524a288 Rename source.wms.ServerType ➛ source.WMSServerType 2016-09-02 15:21:40 +02:00
Marc Jansen
98aba50735 Merge pull request #5839 from marcjansen/rename-vector-event
Rename source.VectorEvent(*) to source.Vector.Event(*)
2016-09-02 14:49:52 +02:00
Marc Jansen
02c1e78412 Rename source.VectorEvent(*) to source.Vector.Event(*) 2016-09-02 14:29:15 +02:00
Marc Jansen
5afd5c838e Require ol in ol.tileurlfunction 2016-09-02 11:20:49 +02:00
Marc Jansen
36281373b7 Require ol in ol.tilecoord 2016-09-02 11:20:37 +02:00
Marc Jansen
58e4bad459 Require ol in ol.style.iconimagecache 2016-09-02 11:20:15 +02:00
Marc Jansen
794abed395 Require ol in ol.structs.priorityqueue 2016-09-02 11:19:38 +02:00
Marc Jansen
0586a3d98a Require ol in ol.structs.lrucache 2016-09-02 11:19:15 +02:00
Marc Jansen
ae929c1b6d Require ol in ol.math 2016-09-02 11:18:53 +02:00
Marc Jansen
7c58794b6f Require ol in ol.graticule 2016-09-02 11:18:42 +02:00
Marc Jansen
f3979d47db Require ol in ol.geom.flat.intersectsextent 2016-09-02 11:18:22 +02:00
Marc Jansen
5448871029 Require ol in ol.geom.flat.interpolate 2016-09-02 11:18:08 +02:00
Marc Jansen
ae67419f76 Require ol in ol.geom.flat.interiorpoint 2016-09-02 11:17:51 +02:00
Marc Jansen
3740f05d5b Require ol in ol.geom.flat.geodesic 2016-09-02 11:17:33 +02:00
Marc Jansen
2c4060a38d Require ol in ol.geom.flat.deflate 2016-09-02 11:17:19 +02:00
Marc Jansen
e8fed9c21f Require ol in ol.geom.flat.contains 2016-09-02 11:17:03 +02:00
Marc Jansen
870ddceafd Require ol in ol.geom.flat.closest 2016-09-02 11:16:51 +02:00
Marc Jansen
46272fbaa4 Require ol in ol.extent 2016-09-02 11:09:03 +02:00
Marc Jansen
d5691676de Require ol in ol.array 2016-09-02 11:08:33 +02:00
Andreas Hocevar
e962b6f801 Merge pull request #5835 from thomasmoelhave/getuid-sequence
document and test ol.getUid sequence behavior
2016-09-02 10:34:22 +02:00
Thomas Moelhave
eddfc04ccc Document and test ol.getUid sequence behavior 2016-09-02 09:09:24 +02:00
Tim Schaub
651c6959ab Remove ol.global 2016-09-01 23:13:00 -06:00
Tim Schaub
785639338b Merge pull request #5834 from thomasmoelhave/remove-goog-debug
Rename goog.DEBUG to ol.DEBUG
2016-09-01 19:11:04 -06:00
Thomas Moelhave
0fd834b4e1 Rename goog.DEBUG to ol.DEBUG 2016-09-01 20:00:45 +02:00
Tim Schaub
617dca34f5 Merge pull request #5815 from tschaub/domless
Remove the DOM renderer
2016-09-01 09:07:03 -06:00
Andreas Hocevar
a445d80c03 Merge tag 'v3.18.2'
3.18.2
2016-09-01 16:53:21 +02:00
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
7911ab1d18 Merge pull request #5828 from ahocevar/close-polygons
Always close polygon rings
2016-09-01 16:38:01 +02:00
Andreas Hocevar
6e0b406c7b Always close polygon rings
This ensures that we do not optimize away the last vertex of a polygon
2016-09-01 16:19:41 +02:00
Tim Schaub
935348fdca Remove unnecessary ol.vec.Mat4 dependency 2016-09-01 07:32:05 -06:00
Tim Schaub
0ea5ded807 Remove unused ol.dom.setTransform() 2016-09-01 07:32:05 -06:00
Tim Schaub
0a60eced25 Remove unused ol.dom.canUseCssTransform() 2016-09-01 07:32:04 -06:00
Tim Schaub
54357bbc2b Remove unused ol.dom.canUseCssTransform3D() 2016-09-01 07:31:34 -06:00
Tim Schaub
c11c4e4d17 Remove unused ol.dom.transformElement2D() 2016-09-01 07:30:29 -06:00
Tim Schaub
c469241bee Update the side-by-side example 2016-09-01 07:30:29 -06:00
Tim Schaub
ca5a858b21 Add an upgrade note regarding the DOM renderer 2016-09-01 07:30:29 -06:00
Tim Schaub
bd89d1f227 Remove unused context arg for tile.getImage() 2016-09-01 07:30:29 -06:00
Tim Schaub
5ce55d39ba Remove the DOM renderer 2016-09-01 07:26:55 -06:00
Tim Schaub
11e4675337 Merge pull request #5794 from openlayers/fix-more-missing-requires
Fix more missing requires
2016-09-01 07:25:33 -06:00
Tim Schaub
ff8a84a220 Deal with ol.global issues 2016-09-01 06:58:12 -06:00
Tim Schaub
9e1a3f59e3 Restructure Canvas replay classes 2016-09-01 06:58:12 -06:00
Tim Schaub
d1d3e6a37a Move ol.render.canvas.Instruction to its own file 2016-09-01 06:58:12 -06:00
Tim Schaub
74047e747d Rename ol.source.TileEvent to ol.source.Tile.Event 2016-09-01 06:58:12 -06:00
Tim Schaub
c316e5f39a Depend on published rules 2016-09-01 06:58:12 -06:00
Frederic Junod
00a50b3f66 Uppercase ol.color constants 2016-09-01 06:58:12 -06:00
Frederic Junod
e757c014d1 Give ol.source.State its own file 2016-09-01 06:58:12 -06:00
Frederic Junod
1d2e4fed4a Rename ol.source.TileUTFGridTile_ to ol.source.TileUTFGrid.Tile_ 2016-09-01 06:58:11 -06:00
Frederic Junod
f9bbaed717 Rename ol.DebugTile_ to ol.source.TileDebug.Tile_ 2016-09-01 06:58:11 -06:00
Frederic Junod
cc87a092fd Give ol.pointer.EventType its own file 2016-09-01 06:58:11 -06:00
Frederic Junod
fcdeda7f14 Rename ol.layer.HeatmapLayerProperty to ol.layer.Heatmap.Property 2016-09-01 06:58:11 -06:00
Frederic Junod
af29aa7d21 Remove goog.provide('ol.tilejson') 2016-09-01 06:58:11 -06:00
Frederic Junod
db741a1530 Remove goog.provide('ol.interaction.SnapProperty') 2016-09-01 06:58:11 -06:00
Frederic Junod
0b2d183009 Rename ol.source.WMTSRequestEncoding to ol.source.WMTS.RequestEncoding 2016-09-01 06:58:11 -06:00
Frederic Junod
8b3536fc85 Rename ol.layer.VectorTileRenderType to ol.layer.VectorTile.RenderType 2016-09-01 06:58:11 -06:00
Frederic Junod
f09460b717 Rename ol.control.MousePositionProperty to ol.control.MousePosition.Property 2016-09-01 06:58:11 -06:00
Frederic Junod
7df8b2bb2b Rename ol.OverlayPositioning to ol.Overlay.Positioning 2016-09-01 06:58:10 -06:00
Frederic Junod
556e443705 Rename ol.OverlayProperty to ol.Overlay.Property 2016-09-01 06:58:10 -06:00
Frederic Junod
1fa91717bd Rename ol.GeolocationProperty to ol.Geolocation.Property 2016-09-01 06:58:10 -06:00
Frederic Junod
3972ec42f6 Rename ol.DeviceOrientationProperty to ol.DeviceOrientation.Property 2016-09-01 06:58:10 -06:00
Frederic Junod
21d436e529 Rename ol.CollectionProperty to ol.Collection.Property 2016-09-01 06:58:10 -06:00
Frederic Junod
5457917e75 Rename ol.layer.GroupProperty to ol.layer.Group.Property 2016-09-01 06:58:10 -06:00
Frederic Junod
cda8a5a8b7 Add missing goog.require('ol') 2016-09-01 06:58:10 -06:00
Frederic Junod
1de3f99123 Add missing goog.require('ol.MapProperty') 2016-09-01 06:58:10 -06:00
Frederic Junod
14e3914b7d Add missing goog.require('ol.functions') 2016-09-01 06:58:09 -06:00
Frederic Junod
11c8b99602 Rename ol.format.IGCZ to ol.format.IGC.Z 2016-09-01 06:58:09 -06:00
Frederic Junod
d0801036d2 Add missing goog.require('ol.has') 2016-09-01 06:58:09 -06:00
Frederic Junod
e402d1db30 Add missing ol.Attribution in examples/osm-vector-tiles.js 2016-09-01 06:58:09 -06:00
Andreas Hocevar
fe16cf9702 Fix ol.source.Zoomify namespace hierarchy 2016-09-01 06:58:09 -06:00
Andreas Hocevar
2972917bb9 Properly detect ol.ext.* requires 2016-09-01 06:58:09 -06:00
Andreas Hocevar
843a6a4bf4 Give ol.style.Atlas its own file 2016-09-01 06:58:09 -06:00
Andreas Hocevar
a8d8942fba Rename ol.style.IconAnchorUnits and ol.style.IconOrigin 2016-09-01 06:58:09 -06:00
Andreas Hocevar
1beddcd99a Remove unnecessary charcode enum 2016-09-01 06:58:09 -06:00
Frédéric Junod
b44685494f Merge pull request #5820 from fredj/format_readme
Change ol.format.Format to ol.format.Feature in format/readme.md
2016-09-01 14:36:21 +02:00
Frédéric Junod
6e52f61011 Merge pull request #5819 from fredj/ArrayBuffer.isView
Add ArrayBuffer.isView method in externs/closure-compiler.js
2016-09-01 14:34:28 +02:00
Frederic Junod
e4091051a2 Change ol.format.Format to ol.format.Feature in format/readme.md
And remove a dead link
2016-09-01 12:17:04 +02:00
Frederic Junod
bb5c1664d0 Add ArrayBuffer.isView method in externs/closure-compiler.js 2016-09-01 08:34:25 +02:00
Tim Schaub
00905e8131 Merge pull request #5793 from ahocevar/closure-bye-bye
Closure bye bye
2016-08-31 17:08:58 -06:00
Andreas Hocevar
d1e4b33760 Rename goog.DEBUG to ol.DEBUG 2016-08-31 21:10:01 +02:00
Andreas Hocevar
92ab5a079c Remove use of goog.async.nextTick 2016-08-31 21:10:00 +02:00
Andreas Hocevar
367f0923c5 Remove use of goog.crypt 2016-08-31 21:10:00 +02:00
Andreas Hocevar
5bb887d3ce Remove use of goog.userAgent 2016-08-31 21:10:00 +02:00
Frédéric Junod
784c19a9b3 Merge pull request #5809 from fredj/reuse_layerState
Reuse ol.LayerState object
2016-08-31 16:53:38 +02:00
Frédéric Junod
3b6f1f99bc Merge pull request #5811 from fredj/use_ol.global
Use ol.global.getComputedStyle instead of window.getComputedStyle
2016-08-31 13:22:14 +02:00
Frederic Junod
d93bb74068 Use ol.global.getComputedStyle instead of window.getComputedStyle 2016-08-31 12:29:38 +02:00
Frédéric Junod
c7eeec018d Merge pull request #5810 from gberaudo/typo
ESLint rule typo
2016-08-31 11:49:25 +02:00
Guillaume Beraudo
f3ca9e4bf5 ESLint rule typo 2016-08-31 11:15:28 +02:00
Frederic Junod
5583a09889 Reuse ol.LayerState object
Reduce the number of temporary objects by reusing the layer state object.
2016-08-30 13:59:38 +02:00
Frédéric Junod
92f05f40c8 Merge pull request #5807 from openlayers/greenkeeper-pbf-3.0.0
Update pbf to version 3.0.0 🚀
2016-08-30 12:10:14 +02:00
greenkeeperio-bot
70792a1610 chore(package): update pbf to version 3.0.0
https://greenkeeper.io/
2016-08-30 03:58:42 -06:00
Frédéric Junod
f57896d848 Merge pull request #5806 from fredj/rotateWithView_olx
Fix olx.style.TextOptions.rotateWithView option in externs
2016-08-30 10:49:48 +02:00
Frederic Junod
cf9683dc03 Fix olx.style.TextOptions.rotateWithView option in externs 2016-08-30 10:30:26 +02:00
Frédéric Junod
b9a7fb2421 Merge pull request #5770 from fredj/unordered_doc
Update ol.source.Vector comments
2016-08-29 14:48:23 +02:00
Frederic Junod
854b20a8fd Update ol.source.Vector comments
Add a note for `getFeatures` and `getFeaturesInExtent` about the unordered array of features.
2016-08-29 13:49:48 +02:00
Andreas Hocevar
389ae13cea Merge pull request #5803 from openlayers/v3.18.1
V3.18.1
2016-08-29 13:28:22 +02:00
Frédéric Junod
f16e40742c Merge pull request #5801 from fredj/rm_ol.style.ImageState
Remove ol.style.ImageState and use ol.ImageState instead
2016-08-29 11:16:48 +02:00
Andreas Hocevar
710c95c5cd Merge pull request #5790 from ahocevar/fix-pixelratio
Fix vector tile rotation on HiDPI devices
2016-08-29 11:04:55 +02:00
Frederic Junod
bed95e3b5b Change ol.ImageState to ol.Image.State 2016-08-29 10:53:09 +02:00
Frederic Junod
1fecb6fd16 Remove ol.style.ImageState and use ol.ImageState instead 2016-08-29 10:39:37 +02:00
Andreas Hocevar
c393d43005 Merge pull request #5798 from ahocevar/fix-rotated-circles
Move to 90° along the circle, not 0°
2016-08-29 10:31:21 +02:00
Tobias Sauerwein
edfbbc4b40 Merge pull request #5800 from tsauerwein/filter-upper-lower
Wrap values in <Literal> for InBetween filter
2016-08-29 10:00:35 +02:00
Bart van den Eijnden
fcc854bcea Merge pull request #5769 from bartvde/issue-5759
Only call addToDrawing if sketchFeature
2016-08-29 09:59:37 +02:00
tsauerwein
d35e978c35 Move namespaces into constants 2016-08-29 09:39:49 +02:00
tsauerwein
7128e86e3c Wrap values in <Literal> 2016-08-29 09:34:52 +02:00
Andreas Hocevar
2037e725b3 Move to 90° along the circle, not 0° 2016-08-29 09:30:23 +02:00
Andreas Hocevar
5d00edfc1d Merge pull request #5745 from tamarmot/4316_goog_object_clone_cleanup
removed dependencies on goog.object.clone and fixed placemark rendering
2016-08-28 12:16:45 +02:00
Andreas Hocevar
cb7c15c767 Fix vector tile rotation on HiDPI devices 2016-08-27 23:03:07 +02:00
Bart van den Eijnden
fe6fe702b2 Merge pull request #5290 from tbarsballe/bboxinteraction
Add extent interaction
2016-08-27 09:08:28 +02:00
Andreas Hocevar
4b97612900 Merge pull request #5786 from openlayers/greenkeeper-eslint-3.4.0
Update eslint to version 3.4.0 🚀
2016-08-26 22:30:10 +02:00
greenkeeperio-bot
3f7d884d4f chore(package): update eslint to version 3.4.0
https://greenkeeper.io/
2016-08-26 20:26:04 +02:00
Andreas Hocevar
0d0f2d454b Merge pull request #5785 from openlayers/release-v3.18.0
Release v3.18.0
2016-08-26 17:57:22 +02:00
Torben Barsballe
4b2884f10f Extent interaction example 2016-08-26 15:40:02 +02:00
Torben Barsbsballe
7ed96f69f7 Add extent interaction 2016-08-25 17:41:39 +02:00
Bart van den Eijnden
3118df320b Only call addToDrawing if sketchFeature 2016-08-23 18:05:06 +02:00
Tamar Cohen
e0d75555c5 updates to not depend on closure library; improvements on styles for KML placemarks 2016-08-18 16:00:29 -07:00
Tamar Cohen
a44cc1a3a6 fixed Travis errors 2016-08-17 16:57:30 -07:00
Tamar Cohen
50e314adbd removed dependencies on goog.clone and fixed placemark rendering 2016-08-17 16:53:08 -07:00
Tamar Cohen
9e7a2ae17a removed dependencies on goog.clone and fixed placemark rendering 2016-08-17 16:42:18 -07:00
414 changed files with 7945 additions and 7058 deletions

View File

@@ -77,7 +77,7 @@ Then, just point your browser <http://localhost:3000/build/examples> in your bro
Run examples against the `ol.js` standalone build: Run examples against the `ol.js` standalone build:
The examples can also be run against the `ol.js` standalone build, just like The examples can also be run against the `ol.js` standalone build, just like
the examples [hosted](http://openlayers.org/en/master/examples/) on GitHub. the examples [hosted](https://openlayers.org/en/master/examples/) on GitHub.
Start by executing the `host-examples` build target: Start by executing the `host-examples` build target:
$ make host-examples $ make host-examples

View File

@@ -4,11 +4,11 @@
[![Coverage Status](https://coveralls.io/repos/openlayers/ol3/badge.svg?branch=master)](https://coveralls.io/r/openlayers/ol3?branch=master) [![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/) [![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. 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). [OpenLayers 3](https://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 ## Getting Started
- Download the [latest release](http://openlayers.org/download/) - Download the [latest release](https://openlayers.org/download/)
- Install with npm: `npm install openlayers` - Install with npm: `npm install openlayers`
- Clone the repo: `git clone git@github.com:openlayers/ol3.git` - Clone the repo: `git clone git@github.com:openlayers/ol3.git`
@@ -18,7 +18,7 @@ OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.wh
## Documentation ## Documentation
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/). Check out the [hosted examples](https://openlayers.org/en/latest/examples/), the [workshop](https://openlayers.org/workshop/) or the [API documentation](https://openlayers.org/en/latest/apidoc/).
## Bugs ## Bugs

View File

@@ -1,10 +1,78 @@
## Upgrade notes ## Upgrade notes
### v3.19.0
#### `ol.style.Fill` with `CanvasGradient` or `CanvasPattern`
Previously, gradients and patterns were aligned with the canvas, so they did not
move and rotate with the map. This was changed to a more expected behavior by anchoring the fill to the map origin (usually at map coordinate `[0, 0]`).
#### `goog.DEBUG` define was renamed to `ol.DEBUG`
As last step in the removal of the dependency on Google Closure Library, the `goog.DEBUG` compiler define was renamed to `ol.DEBUG`. Please change accordingly in your custom build configuration json files.
#### `ol.format.ogc.filter` namespace was renamed to `ol.format.filter`
`ol.format.ogc.filter` was simplified to `ol.format.filter`; to upgrade your code, simply remove the `ogc` string from the name.
For example: `ol.format.ogc.filter.and` to `ol.format.filter.and`.
#### 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.CollectionProperty` to `ol.Collection.Property`
* rename `ol.DeviceOrientationProperty` to `ol.DeviceOrientation.Property`
* rename `ol.DragBoxEvent` to `ol.interaction.DragBox.Event`
* rename `ol.DragBoxEventType` to `ol.interaction.DragBox.EventType`
* rename `ol.GeolocationProperty` to `ol.Geolocation.Property`
* rename `ol.OverlayPositioning` to `ol.Overlay.Positioning`
* rename `ol.OverlayProperty` to `ol.Overlay.Property`
* rename `ol.control.MousePositionProperty` to `ol.control.MousePosition.Property`
* rename `ol.format.IGCZ` to `ol.format.IGC.Z`
* rename `ol.interaction.InteractionProperty` to `ol.interaction.Interaction.Property`
* rename `ol.interaction.DrawMode` to `ol.interaction.Draw.Mode`
* rename `ol.interaction.DrawEvent` to `ol.interaction.Draw.Event`
* rename `ol.interaction.DrawEventType` to `ol.interaction.Draw.EventType`
* rename `ol.interaction.ExtentEvent` to `ol.interaction.Extent.Event`
* rename `ol.interaction.ExtentEventType` to `ol.interaction.Extent.EventType`
* rename `ol.interaction.DragAndDropEvent` to `ol.interaction.DragAndDrop.Event`
* rename `ol.interaction.DragAndDropEventType` to `ol.interaction.DragAndDrop.EventType`
* rename `ol.interaction.ModifyEvent` to `ol.interaction.Modify.Event`
* rename `ol.interaction.SelectEvent` to `ol.interaction.Select.Event`
* rename `ol.interaction.SelectEventType` to `ol.interaction.Select.EventType`
* rename `ol.interaction.TranslateEvent` to `ol.interaction.Translate.Event`
* rename `ol.interaction.TranslateEventType` to `ol.interaction.Translate.EventType`
* rename `ol.layer.GroupProperty` to `ol.layer.Group.Property`
* rename `ol.layer.HeatmapLayerProperty` to `ol.layer.Heatmap.Property`
* rename `ol.layer.TileProperty` to `ol.layer.Tile.Property`
* rename `ol.layer.VectorTileRenderType` to `ol.layer.VectorTile.RenderType`
* rename `ol.MapEventType` to `ol.MapEvent.Type`
* rename `ol.MapProperty` to `ol.Map.Property`
* rename `ol.ModifyEventType` to `ol.interaction.Modify.EventType`
* rename `ol.RendererType` to `ol.renderer.Type`
* rename `ol.render.EventType` to `ol.render.Event.Type`
* rename `ol.source.ImageEvent` to `ol.source.Image.Event`
* rename `ol.source.ImageEventType` to `ol.source.Image.EventType`
* rename `ol.source.RasterEvent` to `ol.source.Raster.Event`
* rename `ol.source.RasterEventType` to `ol.source.Raster.EventType`
* rename `ol.source.TileEvent` to `ol.source.Tile.Event`
* rename `ol.source.TileEventType` to `ol.source.Tile.EventType`
* rename `ol.source.VectorEvent` to `ol.source.Vector.Event`
* rename `ol.source.VectorEventType` to `ol.source.Vector.EventType`
* rename `ol.source.wms.ServerType` to `ol.source.WMSServerType`
* rename `ol.source.WMTSRequestEncoding` to `ol.source.WMTS.RequestEncoding`
* rename `ol.style.IconAnchorUnits` to `ol.style.Icon.AnchorUnits`
* rename `ol.style.IconOrigin` to `ol.style.Icon.Origin`
### v3.18.0 ### v3.18.0
#### Removal of the DOM renderer
The DOM renderer has been removed. Instead, the Canvas renderer should be used. If you were previously constructing a map with `'dom'` as the `renderer` option, you will see an error message in the console in debug mode and the Canvas renderer will be used instead. To remove the warning, remove the `renderer` option from your map constructor.
#### Changes in the way assertions are handled #### 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.' 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 https://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` #### Removal of `ol.ENABLE_NAMED_COLORS`
@@ -113,7 +181,7 @@ var v3source = new ol.source.TileUTFGrid({
#### Internet Explorer 9 support #### Internet Explorer 9 support
As of this release, OpenLayers requires a `classList` polyfill for IE 9 support. See http://cdn.polyfill.io/v2/docs/features#Element_prototype_classList. As of this release, OpenLayers requires a `classList` polyfill for IE 9 support. See https://cdn.polyfill.io/v2/docs/features#Element_prototype_classList.
#### Immediate rendering API #### Immediate rendering API
@@ -162,7 +230,7 @@ The default cache size is `2048`.
#### Internet Explorer 9 support #### Internet Explorer 9 support
As of this release, OpenLayers requires a `requestAnimationFrame`/`cancelAnimationFrame` polyfill for IE 9 support. See http://cdn.polyfill.io/v2/docs/features/#requestAnimationFrame. As of this release, OpenLayers requires a `requestAnimationFrame`/`cancelAnimationFrame` polyfill for IE 9 support. See https://cdn.polyfill.io/v2/docs/features/#requestAnimationFrame.
#### Layer pre-/postcompose event changes #### Layer pre-/postcompose event changes
@@ -480,7 +548,7 @@ now specify an `extent` instead of `widths`. These settings are used to restrict
}); });
``` ```
See http://openlayers.org/en/master/examples/vector-layer.html for a real example. See https://openlayers.org/en/master/examples/vector-layer.html for a real example.
Note that you no longer need to set a `projection` on the source! Note that you no longer need to set a `projection` on the source!
@@ -502,7 +570,7 @@ now specify an `extent` instead of `widths`. These settings are used to restrict
The above code uses jQuery to send an Ajax request, but you can obviously use any Ajax library. The above code uses jQuery to send an Ajax request, but you can obviously use any Ajax library.
See http://openlayers.org/en/master/examples/igc.html for a real example. See https://openlayers.org/en/master/examples/igc.html for a real example.
* Note about KML * Note about KML
@@ -560,9 +628,9 @@ now specify an `extent` instead of `widths`. These settings are used to restrict
}); });
``` ```
See http://openlayers.org/en/master/examples/vector-osm.html for a real example. See https://openlayers.org/en/master/examples/vector-osm.html for a real example.
* The experimental `ol.loadingstrategy.createTile` function has been renamed to `ol.loadingstrategy.tile`. The signature of the function hasn't changed. See http://openlayers.org/en/master/examples/vector-osm.html for an example. * The experimental `ol.loadingstrategy.createTile` function has been renamed to `ol.loadingstrategy.tile`. The signature of the function hasn't changed. See https://openlayers.org/en/master/examples/vector-osm.html for an example.
#### Change to `ol.style.Icon` #### Change to `ol.style.Icon`

View File

@@ -17,7 +17,7 @@ The v3.14.0 release includes features and fixes from 93 pull requests since the
#### Internet Explorer 9 support #### Internet Explorer 9 support
As of this release, OpenLayers requires a `requestAnimationFrame`/`cancelAnimationFrame` polyfill for IE 9 support. See http://cdn.polyfill.io/v2/docs/features/#requestAnimationFrame. As of this release, OpenLayers requires a `requestAnimationFrame`/`cancelAnimationFrame` polyfill for IE 9 support. See https://cdn.polyfill.io/v2/docs/features/#requestAnimationFrame.
#### Layer pre-/postcompose event changes #### Layer pre-/postcompose event changes

View File

@@ -18,7 +18,7 @@ The v3.15.0 release includes features and fixes from 136 pull requests since the
#### Internet Explorer 9 support #### Internet Explorer 9 support
As of this release, OpenLayers requires a `classList` polyfill for IE 9 support. See http://cdn.polyfill.io/v2/docs/features#Element_prototype_classList. As of this release, OpenLayers requires a `classList` polyfill for IE 9 support. See https://cdn.polyfill.io/v2/docs/features#Element_prototype_classList.
#### Immediate rendering API #### Immediate rendering API

View File

@@ -14,7 +14,7 @@ The v3.18.0 release includes features and fixes from almost 120 pull requests si
#### Changes in the way assertions are handled #### 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.' 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 https://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` #### Removal of `ol.ENABLE_NAMED_COLORS`

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))

203
changelog/v3.19.0.md Normal file
View File

@@ -0,0 +1,203 @@
# v3.19.0
## Summary
The v3.19.0 release includes features and fixes from a little more than 120 pull requests with more than 380 commits. Most of the changes are bug fixes, documentation enhancements or target the continuing removal of the dependency on Closure Library. Some notable new or enhanced features are:
* Vector fills with `CanvasGradient` or `CanvasPattern` now move and rotate with the map which is far more intuitive ([#5950](https://github.com/openlayers/ol3/pull/5950))
* Drawing in `freehand`-mode also became more intuitive ([#5970](https://github.com/openlayers/ol3/pull/5970), [#5973](https://github.com/openlayers/ol3/pull/5973), [#5975](https://github.com/openlayers/ol3/pull/5975))
* When tiles of different resolutions are combined for a layer (which is the case before all tiles of the best resolution have been loaded), lower resolution tiles now align with higher resolution tiles resulting in a map without gaps ([#5890](https://github.com/openlayers/ol3/pull/5890))
* Styles can now easily be cloned ([#5832](https://github.com/openlayers/ol3/pull/5832))
Additionally the [openlayers.org](https://openlayers.org) homepage is now available via the `https`-protocol.
## Upgrade notes
#### `ol.style.Fill` with `CanvasGradient` or `CanvasPattern`
Previously, gradients and patterns were aligned with the canvas, so they did not
move and rotate with the map. This was changed to a more expected behavior by anchoring the fill to the map origin (usually at map coordinate `[0, 0]`).
#### `goog.DEBUG` define was renamed to `ol.DEBUG`
As last step in the removal of the dependency on Google Closure Library, the `goog.DEBUG` compiler define was renamed to `ol.DEBUG`. Please change accordingly in your custom build configuration json files.
#### `ol.format.ogc.filter` namespace was renamed to `ol.format.filter`
`ol.format.ogc.filter` was simplified to `ol.format.filter`; to upgrade your code, simply remove the `ogc` string from the name.
For example: `ol.format.ogc.filter.and` to `ol.format.filter.and`.
#### 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.CollectionProperty` to `ol.Collection.Property`
* rename `ol.DeviceOrientationProperty` to `ol.DeviceOrientation.Property`
* rename `ol.DragBoxEvent` to `ol.interaction.DragBox.Event`
* rename `ol.DragBoxEventType` to `ol.interaction.DragBox.EventType`
* rename `ol.GeolocationProperty` to `ol.Geolocation.Property`
* rename `ol.OverlayPositioning` to `ol.Overlay.Positioning`
* rename `ol.OverlayProperty` to `ol.Overlay.Property`
* rename `ol.control.MousePositionProperty` to `ol.control.MousePosition.Property`
* rename `ol.format.IGCZ` to `ol.format.IGC.Z`
* rename `ol.interaction.InteractionProperty` to `ol.interaction.Interaction.Property`
* rename `ol.interaction.DrawMode` to `ol.interaction.Draw.Mode`
* rename `ol.interaction.DrawEvent` to `ol.interaction.Draw.Event`
* rename `ol.interaction.DrawEventType` to `ol.interaction.Draw.EventType`
* rename `ol.interaction.ExtentEvent` to `ol.interaction.Extent.Event`
* rename `ol.interaction.ExtentEventType` to `ol.interaction.Extent.EventType`
* rename `ol.interaction.DragAndDropEvent` to `ol.interaction.DragAndDrop.Event`
* rename `ol.interaction.DragAndDropEventType` to `ol.interaction.DragAndDrop.EventType`
* rename `ol.interaction.ModifyEvent` to `ol.interaction.Modify.Event`
* rename `ol.interaction.SelectEvent` to `ol.interaction.Select.Event`
* rename `ol.interaction.SelectEventType` to `ol.interaction.Select.EventType`
* rename `ol.interaction.TranslateEvent` to `ol.interaction.Translate.Event`
* rename `ol.interaction.TranslateEventType` to `ol.interaction.Translate.EventType`
* rename `ol.layer.GroupProperty` to `ol.layer.Group.Property`
* rename `ol.layer.HeatmapLayerProperty` to `ol.layer.Heatmap.Property`
* rename `ol.layer.TileProperty` to `ol.layer.Tile.Property`
* rename `ol.layer.VectorTileRenderType` to `ol.layer.VectorTile.RenderType`
* rename `ol.MapEventType` to `ol.MapEvent.Type`
* rename `ol.MapProperty` to `ol.Map.Property`
* rename `ol.ModifyEventType` to `ol.interaction.Modify.EventType`
* rename `ol.RendererType` to `ol.renderer.Type`
* rename `ol.render.EventType` to `ol.render.Event.Type`
* rename `ol.source.ImageEvent` to `ol.source.Image.Event`
* rename `ol.source.ImageEventType` to `ol.source.Image.EventType`
* rename `ol.source.RasterEvent` to `ol.source.Raster.Event`
* rename `ol.source.RasterEventType` to `ol.source.Raster.EventType`
* rename `ol.source.TileEvent` to `ol.source.Tile.Event`
* rename `ol.source.TileEventType` to `ol.source.Tile.EventType`
* rename `ol.source.VectorEvent` to `ol.source.Vector.Event`
* rename `ol.source.VectorEventType` to `ol.source.Vector.EventType`
* rename `ol.source.wms.ServerType` to `ol.source.WMSServerType`
* rename `ol.source.WMTSRequestEncoding` to `ol.source.WMTS.RequestEncoding`
* rename `ol.style.IconAnchorUnits` to `ol.style.Icon.AnchorUnits`
* rename `ol.style.IconOrigin` to `ol.style.Icon.Origin`
## Full list of changes
* [#6007](https://github.com/openlayers/ol3/pull/6007) - Add note to example that canvas.toBlob() is required ([@marcjansen](https://github.com/marcjansen))
* [#5979](https://github.com/openlayers/ol3/pull/5979) - Use FileSaver.js in export-map example ([@fredj](https://github.com/fredj))
* [#6004](https://github.com/openlayers/ol3/pull/6004) - Bring back the vector-osm example, using a different service ([@ahocevar](https://github.com/ahocevar))
* [#6002](https://github.com/openlayers/ol3/pull/6002) - Use tile pixel ratio for gutter calculation ([@ahocevar](https://github.com/ahocevar))
* [#5991](https://github.com/openlayers/ol3/pull/5991) - Only test ol.format.MVT if ArrayBuffer.isView is supported ([@openlayers](https://github.com/openlayers))
* [#6000](https://github.com/openlayers/ol3/pull/6000) - Fix mockup of tile layer to keep drawImage arguments in range ([@ahocevar](https://github.com/ahocevar))
* [#5997](https://github.com/openlayers/ol3/pull/5997) - Always load a gated URL polyfill when testing ([@marcjansen](https://github.com/marcjansen))
* [#5963](https://github.com/openlayers/ol3/pull/5963) - Remove the vertex on ol.interaction.Modify deactivation ([@fredj](https://github.com/fredj))
* [#5994](https://github.com/openlayers/ol3/pull/5994) - Setup a loaded image with src for TileLayer test ([@marcjansen](https://github.com/marcjansen))
* [#5989](https://github.com/openlayers/ol3/pull/5989) - Remove vector-osm example ([@openlayers](https://github.com/openlayers))
* [#5985](https://github.com/openlayers/ol3/pull/5985) - Update Mapzen urls to new scheme ([@ahocevar](https://github.com/ahocevar))
* [#5984](https://github.com/openlayers/ol3/pull/5984) - Less examples with mixed content ([@ahocevar](https://github.com/ahocevar))
* [#5986](https://github.com/openlayers/ol3/pull/5986) - Update eslint to version 3.8.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5982](https://github.com/openlayers/ol3/pull/5982) - Use a https enabled GeoServer ([@ahocevar](https://github.com/ahocevar))
* [#5977](https://github.com/openlayers/ol3/pull/5977) - Convenience function for drawing boxes ([@tschaub](https://github.com/tschaub))
* [#5978](https://github.com/openlayers/ol3/pull/5978) - Update async to version 2.1.2 🚀 ([@openlayers](https://github.com/openlayers))
* [#5975](https://github.com/openlayers/ol3/pull/5975) - Finish drawing on pointerup when in freehand mode ([@tschaub](https://github.com/tschaub))
* [#5976](https://github.com/openlayers/ol3/pull/5976) - Use https where available ([@tschaub](https://github.com/tschaub))
* [#5973](https://github.com/openlayers/ol3/pull/5973) - Add a freehand option to the draw interaction ([@tschaub](https://github.com/tschaub))
* [#5964](https://github.com/openlayers/ol3/pull/5964) - Set one-off transform instead of transforming back and forth ([@ahocevar](https://github.com/ahocevar))
* [#5970](https://github.com/openlayers/ol3/pull/5970) - Allow circles, squares, and boxes to be drawn in freehand mode ([@tschaub](https://github.com/tschaub))
* [#5972](https://github.com/openlayers/ol3/pull/5972) - Update eslint to version 3.8.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5969](https://github.com/openlayers/ol3/pull/5969) - Test all, not just one ([@ahocevar](https://github.com/ahocevar))
* [#5967](https://github.com/openlayers/ol3/pull/5967) - Add missing jsdoc to ol.render.canvas.Replay#fill_ function ([@fredj](https://github.com/fredj))
* [#5962](https://github.com/openlayers/ol3/pull/5962) - Use same proj4js version in examples and tests ([@ahocevar](https://github.com/ahocevar))
* [#5961](https://github.com/openlayers/ol3/pull/5961) - Remove unused error codes ([@ahocevar](https://github.com/ahocevar))
* [#5960](https://github.com/openlayers/ol3/pull/5960) - More renaming to have one provide per file ([@fredj](https://github.com/fredj))
* [#5959](https://github.com/openlayers/ol3/pull/5959) - Remove unnecessary and misleading assertion ([@ahocevar](https://github.com/ahocevar))
* [#5950](https://github.com/openlayers/ol3/pull/5950) - Move gradient and pattern fills with the view ([@ahocevar](https://github.com/ahocevar))
* [#5957](https://github.com/openlayers/ol3/pull/5957) - Update async to version 2.1.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5956](https://github.com/openlayers/ol3/pull/5956) - Update async to version 2.1.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5955](https://github.com/openlayers/ol3/pull/5955) - Add getters to BingMaps source for api key and imagerySet ([@bartvde](https://github.com/bartvde))
* [#5944](https://github.com/openlayers/ol3/pull/5944) - Allow readFeature and readFeatures to be called with GeoJSON geometries ([@tschaub](https://github.com/tschaub))
* [#5949](https://github.com/openlayers/ol3/pull/5949) - Add prose documentation for ol.AttributionLike ([@marcjansen](https://github.com/marcjansen))
* [#5948](https://github.com/openlayers/ol3/pull/5948) - Fix API docs of ol.Feature#getStyle ([@marcjansen](https://github.com/marcjansen))
* [#5946](https://github.com/openlayers/ol3/pull/5946) - Update mocha to version 3.1.2 🚀 ([@openlayers](https://github.com/openlayers))
* [#5941](https://github.com/openlayers/ol3/pull/5941) - Update mocha to version 3.1.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5890](https://github.com/openlayers/ol3/pull/5890) - No gaps between tiles of different resolutions ([@ahocevar](https://github.com/ahocevar))
* [#5935](https://github.com/openlayers/ol3/pull/5935) - Keep transformed coordinates within valid y range ([@tschaub](https://github.com/tschaub))
* [#5937](https://github.com/openlayers/ol3/pull/5937) - One provide per file for vector tiles ([@ahocevar](https://github.com/ahocevar))
* [#5933](https://github.com/openlayers/ol3/pull/5933) - Update phantomjs-prebuilt to version 2.1.13 🚀 ([@openlayers](https://github.com/openlayers))
* [#5932](https://github.com/openlayers/ol3/pull/5932) - Update eslint to version 3.7.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5931](https://github.com/openlayers/ol3/pull/5931) - Update jsdoc to version 3.4.2 🚀 ([@openlayers](https://github.com/openlayers))
* [#5923](https://github.com/openlayers/ol3/pull/5923) - Update pbf to version 3.0.2 🚀 ([@openlayers](https://github.com/openlayers))
* [#5926](https://github.com/openlayers/ol3/pull/5926) - Ensure correct type of event.element ([@adube](https://github.com/adube))
* [#5928](https://github.com/openlayers/ol3/pull/5928) - Update eslint to version 3.7.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5919](https://github.com/openlayers/ol3/pull/5919) - Update resemblejs to version 2.2.2 🚀 ([@openlayers](https://github.com/openlayers))
* [#5909](https://github.com/openlayers/ol3/pull/5909) - Update jquery to version 3.1.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5917](https://github.com/openlayers/ol3/pull/5917) - Accept feature projection in GeoJSON constructor ([@tschaub](https://github.com/tschaub))
* [#5918](https://github.com/openlayers/ol3/pull/5918) - Update mocha to version 3.1.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5916](https://github.com/openlayers/ol3/pull/5916) - Update eslint to version 3.6.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5914](https://github.com/openlayers/ol3/pull/5914) - Allow clipping by MultiPolygon ([@tschaub](https://github.com/tschaub))
* [#5894](https://github.com/openlayers/ol3/pull/5894) - Reuse arrays for rendered tiles and extent ([@ahocevar](https://github.com/ahocevar))
* [#5895](https://github.com/openlayers/ol3/pull/5895) - Always use the frameState's extent ([@ahocevar](https://github.com/ahocevar))
* [#5911](https://github.com/openlayers/ol3/pull/5911) - Update eslint to version 3.6.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5903](https://github.com/openlayers/ol3/pull/5903) - Rename ol.format.ogc.filter namespace to ol.format.filter ([@fredj](https://github.com/fredj))
* [#5913](https://github.com/openlayers/ol3/pull/5913) - Update clean-css to version 3.4.20 🚀 ([@openlayers](https://github.com/openlayers))
* [#5776](https://github.com/openlayers/ol3/pull/5776) - Add ol.style.Circle#setRadius ([@jonataswalker](https://github.com/jonataswalker))
* [#5905](https://github.com/openlayers/ol3/pull/5905) - Update pbf to version 3.0.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5904](https://github.com/openlayers/ol3/pull/5904) - Fix changelog/upgrade-notes.md formating ([@fredj](https://github.com/fredj))
* [#5906](https://github.com/openlayers/ol3/pull/5906) - Update glob to version 7.1.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5898](https://github.com/openlayers/ol3/pull/5898) - Update sinon to version 1.17.6 🚀 ([@openlayers](https://github.com/openlayers))
* [#5888](https://github.com/openlayers/ol3/pull/5888) - Remove unused functions ([@fredj](https://github.com/fredj))
* [#5900](https://github.com/openlayers/ol3/pull/5900) - Update coveralls to version 2.11.14 🚀 ([@openlayers](https://github.com/openlayers))
* [#5897](https://github.com/openlayers/ol3/pull/5897) - Show NEXRAD data in WMS Time example ([@ahocevar](https://github.com/ahocevar))
* [#5896](https://github.com/openlayers/ol3/pull/5896) - Remove plain string from Map renderer option ([@probins](https://github.com/probins))
* [#5893](https://github.com/openlayers/ol3/pull/5893) - Fix fillStyle or strokeStyle defined assertion ([@ahocevar](https://github.com/ahocevar))
* [#5892](https://github.com/openlayers/ol3/pull/5892) - Remove getRendererFromQueryString from examples ([@probins](https://github.com/probins))
* [#5889](https://github.com/openlayers/ol3/pull/5889) - Update coveralls to version 2.11.13 🚀 ([@openlayers](https://github.com/openlayers))
* [#5886](https://github.com/openlayers/ol3/pull/5886) - Remove unused functions ([@fredj](https://github.com/fredj))
* [#5885](https://github.com/openlayers/ol3/pull/5885) - Remove unused pruneTileRange function ([@bartvde](https://github.com/bartvde))
* [#5853](https://github.com/openlayers/ol3/pull/5853) - Allow more than one digit range in ol.TileUrlFunction.expandUrl ([@fredj](https://github.com/fredj))
* [#5445](https://github.com/openlayers/ol3/pull/5445) - Select interaction default styling function can now handle geometry less features ([@fblackburn](https://github.com/fblackburn))
* [#5884](https://github.com/openlayers/ol3/pull/5884) - Fix jsdoc tag indentation ([@fredj](https://github.com/fredj))
* [#5863](https://github.com/openlayers/ol3/pull/5863) - Allow CanvasPattern or CanvasGradient as stroke style ([@fredj](https://github.com/fredj))
* [#5838](https://github.com/openlayers/ol3/pull/5838) - Require ol where ol.DEBUG is being used ([@marcjansen](https://github.com/marcjansen))
* [#5878](https://github.com/openlayers/ol3/pull/5878) - Smarter handling of closed rings and closePath() instructions ([@ahocevar](https://github.com/ahocevar))
* [#5880](https://github.com/openlayers/ol3/pull/5880) - More work towards one provide per file ([@marcjansen](https://github.com/marcjansen))
* [#5857](https://github.com/openlayers/ol3/pull/5857) - Fixed issue with multi option of ol.interaction.Select ([@KlausBenndorf](https://github.com/KlausBenndorf))
* [#5876](https://github.com/openlayers/ol3/pull/5876) - Use clone method in kml format ([@KlausBenndorf](https://github.com/KlausBenndorf))
* [#5832](https://github.com/openlayers/ol3/pull/5832) - Add clone methods to styles ([@KlausBenndorf](https://github.com/KlausBenndorf))
* [#5869](https://github.com/openlayers/ol3/pull/5869) - Update jsdoc to version 3.4.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5872](https://github.com/openlayers/ol3/pull/5872) - Keep ol.Color as Array<number> ([@tschaub](https://github.com/tschaub))
* [#5870](https://github.com/openlayers/ol3/pull/5870) - Update eslint to version 3.5.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5867](https://github.com/openlayers/ol3/pull/5867) - Add dedicated example using CanvasPattern and CanvasGradient for styling vectors ([@marcjansen](https://github.com/marcjansen))
* [#5864](https://github.com/openlayers/ol3/pull/5864) - More renaming ([@fredj](https://github.com/fredj))
* [#5861](https://github.com/openlayers/ol3/pull/5861) - More renaming to have one provide per file ([@fredj](https://github.com/fredj))
* [#5860](https://github.com/openlayers/ol3/pull/5860) - Rename ol.MapProperty and ol.interaction.DragAndDropEvent* ([@fredj](https://github.com/fredj))
* [#5855](https://github.com/openlayers/ol3/pull/5855) - Rename ol.DragBoxEvent* to ol.interaction.DragBox.Event* ([@fredj](https://github.com/fredj))
* [#5859](https://github.com/openlayers/ol3/pull/5859) - Rename ol.RendererType to ol.renderer.Type ([@fredj](https://github.com/fredj))
* [#5846](https://github.com/openlayers/ol3/pull/5846) - Remove unused goog.require('ol') ([@probins](https://github.com/probins))
* [#5854](https://github.com/openlayers/ol3/pull/5854) - Use a canvas pattern in the vector-layer example ([@fredj](https://github.com/fredj))
* [#5852](https://github.com/openlayers/ol3/pull/5852) - ol.interaction.extent cleanup ([@fredj](https://github.com/fredj))
* [#5851](https://github.com/openlayers/ol3/pull/5851) - Remove unused imageByContext_ in ol.ImageTile ([@fredj](https://github.com/fredj))
* [#5849](https://github.com/openlayers/ol3/pull/5849) - Remove 'global' from externs/closure-compiler.js ([@fredj](https://github.com/fredj))
* [#5837](https://github.com/openlayers/ol3/pull/5837) - Remove ol.global ([@tschaub](https://github.com/tschaub))
* [#5842](https://github.com/openlayers/ol3/pull/5842) - Remove extra provide causing a circular dependency ([@ahocevar](https://github.com/ahocevar))
* [#5795](https://github.com/openlayers/ol3/pull/5795) - Render older loaded tiles while waiting for new tiles ([@thomasmoelhave](https://github.com/thomasmoelhave))
* [#5840](https://github.com/openlayers/ol3/pull/5840) - Rename source.wms.ServerType ➛ source.WMSServerType ([@marcjansen](https://github.com/marcjansen))
* [#5839](https://github.com/openlayers/ol3/pull/5839) - Rename source.VectorEvent(*) to source.Vector.Event(*) ([@marcjansen](https://github.com/marcjansen))
* [#5835](https://github.com/openlayers/ol3/pull/5835) - document and test ol.getUid sequence behavior ([@thomasmoelhave](https://github.com/thomasmoelhave))
* [#5834](https://github.com/openlayers/ol3/pull/5834) - Rename goog.DEBUG to ol.DEBUG ([@thomasmoelhave](https://github.com/thomasmoelhave))
* [#5815](https://github.com/openlayers/ol3/pull/5815) - Remove the DOM renderer ([@tschaub](https://github.com/tschaub))
* [#5828](https://github.com/openlayers/ol3/pull/5828) - Always close polygon rings ([@ahocevar](https://github.com/ahocevar))
* [#5794](https://github.com/openlayers/ol3/pull/5794) - Fix more missing requires ([@openlayers](https://github.com/openlayers))
* [#5820](https://github.com/openlayers/ol3/pull/5820) - Change ol.format.Format to ol.format.Feature in format/readme.md ([@fredj](https://github.com/fredj))
* [#5819](https://github.com/openlayers/ol3/pull/5819) - Add ArrayBuffer.isView method in externs/closure-compiler.js ([@fredj](https://github.com/fredj))
* [#5793](https://github.com/openlayers/ol3/pull/5793) - Closure bye bye ([@ahocevar](https://github.com/ahocevar))
* [#5809](https://github.com/openlayers/ol3/pull/5809) - Reuse ol.LayerState object ([@fredj](https://github.com/fredj))
* [#5811](https://github.com/openlayers/ol3/pull/5811) - Use ol.global.getComputedStyle instead of window.getComputedStyle ([@fredj](https://github.com/fredj))
* [#5810](https://github.com/openlayers/ol3/pull/5810) - ESLint rule typo ([@gberaudo](https://github.com/gberaudo))
* [#5807](https://github.com/openlayers/ol3/pull/5807) - Update pbf to version 3.0.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5806](https://github.com/openlayers/ol3/pull/5806) - Fix olx.style.TextOptions.rotateWithView option in externs ([@fredj](https://github.com/fredj))
* [#5770](https://github.com/openlayers/ol3/pull/5770) - Update ol.source.Vector comments ([@fredj](https://github.com/fredj))
* [#5803](https://github.com/openlayers/ol3/pull/5803) - V3.18.1 ([@openlayers](https://github.com/openlayers))
* [#5801](https://github.com/openlayers/ol3/pull/5801) - Remove ol.style.ImageState and use ol.ImageState instead ([@fredj](https://github.com/fredj))
* [#5790](https://github.com/openlayers/ol3/pull/5790) - Fix vector tile rotation on HiDPI devices ([@ahocevar](https://github.com/ahocevar))
* [#5798](https://github.com/openlayers/ol3/pull/5798) - Move to 90° along the circle, not 0° ([@ahocevar](https://github.com/ahocevar))
* [#5800](https://github.com/openlayers/ol3/pull/5800) - Wrap values in <Literal> for InBetween filter ([@tsauerwein](https://github.com/tsauerwein))
* [#5769](https://github.com/openlayers/ol3/pull/5769) - Only call addToDrawing if sketchFeature ([@bartvde](https://github.com/bartvde))
* [#5745](https://github.com/openlayers/ol3/pull/5745) - removed dependencies on goog.object.clone and fixed placemark rendering ([@tamarmot](https://github.com/tamarmot))
* [#5290](https://github.com/openlayers/ol3/pull/5290) - Add extent interaction ([@tbarsballe](https://github.com/tbarsballe))
* [#5786](https://github.com/openlayers/ol3/pull/5786) - Update eslint to version 3.4.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5785](https://github.com/openlayers/ol3/pull/5785) - Release v3.18.0 ([@openlayers](https://github.com/openlayers))

View File

@@ -2,7 +2,7 @@
## Summary ## Summary
The 3.1.0 release includes 70 merged pull requests since 3.1.0. Of note, the KML format [now parses `NetworkingLink` tags](https://github.com/openlayers/ol3/pull/3171). The [measure example](http://openlayers.org/en/v3.2.0/examples/measure.html) was [reworked](https://github.com/openlayers/ol3/pull/3206) to display measurements and help messages while drawing. A WMTS GetCapabilities format was [added](https://github.com/openlayers/ol3/pull/3026). The WebGL renderer [now supports feature hit detection](https://github.com/openlayers/ol3/pull/3065) (on point features). And you can now [detect](https://github.com/openlayers/ol3/pull/3172) features/colored pixels on image and tile layers! See the full list of [changes](#changes) below. The 3.1.0 release includes 70 merged pull requests since 3.1.0. Of note, the KML format [now parses `NetworkingLink` tags](https://github.com/openlayers/ol3/pull/3171). The [measure example](https://openlayers.org/en/v3.2.0/examples/measure.html) was [reworked](https://github.com/openlayers/ol3/pull/3206) to display measurements and help messages while drawing. A WMTS GetCapabilities format was [added](https://github.com/openlayers/ol3/pull/3026). The WebGL renderer [now supports feature hit detection](https://github.com/openlayers/ol3/pull/3065) (on point features). And you can now [detect](https://github.com/openlayers/ol3/pull/3172) features/colored pixels on image and tile layers! See the full list of [changes](#changes) below.
## Upgrade notes ## Upgrade notes

View File

@@ -53,7 +53,7 @@ The 3.5.0 release includes features and fixes from a whopping 129 pull requests
}); });
``` ```
See http://openlayers.org/en/master/examples/vector-layer.html for a real example. See https://openlayers.org/en/master/examples/vector-layer.html for a real example.
Note that you no longer need to set a `projection` on the source! Note that you no longer need to set a `projection` on the source!
@@ -75,7 +75,7 @@ The 3.5.0 release includes features and fixes from a whopping 129 pull requests
The above code uses jQuery to send an Ajax request, but you can obviously use any Ajax library. The above code uses jQuery to send an Ajax request, but you can obviously use any Ajax library.
See http://openlayers.org/en/master/examples/igc.html for a real example. See https://openlayers.org/en/master/examples/igc.html for a real example.
* Note about KML * Note about KML
@@ -133,9 +133,9 @@ The 3.5.0 release includes features and fixes from a whopping 129 pull requests
}); });
``` ```
See http://openlayers.org/en/master/examples/vector-osm.html for a real example. See https://openlayers.org/en/master/examples/vector-osm.html for a real example.
* The experimental `ol.loadingstrategy.createTile` function has been renamed to `ol.loadingstrategy.tile`. The signature of the function hasn't changed. See http://openlayers.org/en/master/examples/vector-osm.html for an example. * The experimental `ol.loadingstrategy.createTile` function has been renamed to `ol.loadingstrategy.tile`. The signature of the function hasn't changed. See https://openlayers.org/en/master/examples/vector-osm.html for an example.
### Change to `ol.style.Icon` ### Change to `ol.style.Icon`

View File

@@ -24,7 +24,7 @@
"externs/topojson.js" "externs/topojson.js"
], ],
"define": [ "define": [
"goog.DEBUG=false" "ol.DEBUG=false"
], ],
"jscomp_error": [ "jscomp_error": [
"*" "*"

View File

@@ -24,7 +24,7 @@
"externs/topojson.js" "externs/topojson.js"
], ],
"define": [ "define": [
"goog.DEBUG=false" "ol.DEBUG=false"
], ],
"jscomp_error": [ "jscomp_error": [
"*" "*"

View File

@@ -66,16 +66,16 @@
<textarea class="hidden" name="css">{{ css.source }}</textarea> <textarea class="hidden" name="css">{{ css.source }}</textarea>
<textarea class="hidden" name="html">{{ contents }}</textarea> <textarea class="hidden" name="html">{{ contents }}</textarea>
<input type="hidden" name="wrap" value="l"> <input type="hidden" name="wrap" value="l">
<input type="hidden" name="resources" value="http://openlayers.org/en/v{{ olVersion }}/css/ol.css,http://openlayers.org/en/v{{ olVersion }}/build/ol.js{{ extraResources }}"> <input type="hidden" name="resources" value="https://openlayers.org/en/v{{ olVersion }}/css/ol.css,https://openlayers.org/en/v{{ olVersion }}/build/ol.js{{ extraResources }}">
</form> </form>
<pre><code id="example-source" class="language-markup">&lt;!DOCTYPE html&gt; <pre><code id="example-source" class="language-markup">&lt;!DOCTYPE html&gt;
&lt;html&gt; &lt;html&gt;
&lt;head&gt; &lt;head&gt;
&lt;title&gt;{{ title }}&lt;/title&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;link rel="stylesheet" href="https://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;!-- 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="https://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}} &lt;script src="https://openlayers.org/en/v{{ olVersion }}/build/ol.js"&gt;&lt;/script&gt;{{#if extraHead.remote}}
{{ indent extraHead.remote spaces=4 }}{{/if}}{{#if css.source}} {{ indent extraHead.remote spaces=4 }}{{/if}}{{#if css.source}}
&lt;style&gt; &lt;style&gt;
{{ indent css.source spaces=6 }} &lt;/style&gt;{{/if}} {{ indent css.source spaces=6 }} &lt;/style&gt;{{/if}}

View File

@@ -15,7 +15,7 @@
"externs/topojson.js" "externs/topojson.js"
], ],
"define": [ "define": [
"goog.DEBUG=false" "ol.DEBUG=false"
], ],
"jscomp_error": [ "jscomp_error": [
"*" "*"

View File

@@ -137,10 +137,6 @@ Invalid `units`. `'degrees'`, `'imperial'`, `'nautical'`, `'metric'` or `'us'` r
Invalid geometry layout. Must be `XY`, `XYZ`, `XYM` or `XYZM`. Invalid geometry layout. Must be `XY`, `XYZ`, `XYM` or `XYZM`.
### 35
Unknown GeoJSON object type. Expected `"Feature"` or `"FeatureCollection"`.
### 36 ### 36
Unknown SRS type. Expected `"name"` or `"EPSG"`. Unknown SRS type. Expected `"name"` or `"EPSG"`.
@@ -165,10 +161,6 @@ Expected `feature` to have a geometry.
Expected an `ol.style.Style` or an array of `ol.style.Style`. Expected an `ol.style.Style` or an array of `ol.style.Style`.
### 42
Expected an `ol.Feature`, but got an `ol.RenderFeature`.
### 43 ### 43
Expected `layers` to be an array or an `ol.Collection`. Expected `layers` to be an array or an `ol.Collection`.

View File

@@ -77,7 +77,7 @@ var map = new ol.Map({
var swissProjection = new ol.proj.Projection({ var swissProjection = new ol.proj.Projection({
code: 'EPSG:21781', code: 'EPSG:21781',
// The extent is used to determine zoom level 0. Recommended values for a // The extent is used to determine zoom level 0. Recommended values for a
// projection's validity extent can be found at http://epsg.io/. // projection's validity extent can be found at https://epsg.io/.
extent: [485869.5728, 76443.1884, 837076.5648, 299941.7864], extent: [485869.5728, 76443.1884, 837076.5648, 299941.7864],
units: 'm' units: 'm'
}); });
@@ -94,7 +94,7 @@ var map = new ol.Map({
``` ```
We recommend to lookup parameters of your projection (like the validity extent) We recommend to lookup parameters of your projection (like the validity extent)
over at [epsg.io](http://epsg.io/). over at [epsg.io](https://epsg.io/).
## Why is my map centered on the gulf of guinea (or africa, the ocean, null-island)? ## Why is my map centered on the gulf of guinea (or africa, the ocean, null-island)?

View File

@@ -13,14 +13,14 @@ Below you'll find a complete working example. Create a new file, copy in the co
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<link rel="stylesheet" href="http://openlayers.org/en/{{ latest }}/css/ol.css" type="text/css"> <link rel="stylesheet" href="https://openlayers.org/en/{{ latest }}/css/ol.css" type="text/css">
<style> <style>
.map { .map {
height: 400px; height: 400px;
width: 100%; width: 100%;
} }
</style> </style>
<script src="http://openlayers.org/en/{{ latest }}/build/ol.js" type="text/javascript"></script> <script src="https://openlayers.org/en/{{ latest }}/build/ol.js" type="text/javascript"></script>
<title>OpenLayers 3 example</title> <title>OpenLayers 3 example</title>
</head> </head>
<body> <body>
@@ -55,7 +55,7 @@ To include a map a web page you will need 3 things:
### Include OpenLayers ### Include OpenLayers
```xml ```xml
<script src="http://openlayers.org/en/{{ latest }}/build/ol.js" type="text/javascript"></script> <script src="https://openlayers.org/en/{{ latest }}/build/ol.js" type="text/javascript"></script>
``` ```
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. 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.
@@ -63,7 +63,7 @@ The first part is to include the JavaScript library. For the purpose of this tut
**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: **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 ```xml
<script src="http://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList"></script> <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList"></script>
``` ```

View File

@@ -169,8 +169,7 @@ The minimum config file looks like this:
"node_modules/openlayers/externs/topojson.js" "node_modules/openlayers/externs/topojson.js"
], ],
"define": [ "define": [
"goog.DEBUG=false", "ol.DEBUG=false",
"ol.ENABLE_DOM=false",
"ol.ENABLE_WEBGL=false" "ol.ENABLE_WEBGL=false"
], ],
"js": [ "js": [
@@ -221,8 +220,7 @@ Here is a version of `config.json` with more compilation checks enabled:
"node_modules/openlayers/externs/topojson.js" "node_modules/openlayers/externs/topojson.js"
], ],
"define": [ "define": [
"goog.DEBUG=false", "ol.DEBUG=false",
"ol.ENABLE_DOM=false",
"ol.ENABLE_WEBGL=false" "ol.ENABLE_WEBGL=false"
], ],
"js": [ "js": [

View File

@@ -60,7 +60,7 @@ Creating a custom build requires writing a build configuration file. The format
"externs/topojson.js" "externs/topojson.js"
], ],
"define": [ "define": [
"goog.DEBUG=false" "ol.DEBUG=false"
], ],
"extra_annotation_name": [ "extra_annotation_name": [
"api", "observable" "api", "observable"
@@ -95,7 +95,7 @@ var map = new ol.Map({
}); });
``` ```
Note that this JavaScript code corresponds to OpenLayers 3's [`simple`](http://openlayers.org/en/master/examples/simple.html) example. Note that this JavaScript code corresponds to OpenLayers 3's [`simple`](https://openlayers.org/en/master/examples/simple.html) example.
You are now ready to create your first OpenLayers 3 build. Use the following command to create the build: You are now ready to create your first OpenLayers 3 build. Use the following command to create the build:
@@ -156,7 +156,6 @@ Setting some of these to `false` means that the portions of the code relating to
You might have noticed that the build file you've just created is considerably smaller than the full build, but it can be reduced further. This is because all three renderers and all layer types are included by default. We only need one renderer, and only need the tile layer, so can exclude the others by setting these properties with `define`s. So add the following to the define section of the config above: You might have noticed that the build file you've just created is considerably smaller than the full build, but it can be reduced further. This is because all three renderers and all layer types are included by default. We only need one renderer, and only need the tile layer, so can exclude the others by setting these properties with `define`s. So add the following to the define section of the config above:
``` ```
"ol.ENABLE_DOM=false",
"ol.ENABLE_WEBGL=false", "ol.ENABLE_WEBGL=false",
"ol.ENABLE_PROJ4JS=false", "ol.ENABLE_PROJ4JS=false",
"ol.ENABLE_IMAGE=false", "ol.ENABLE_IMAGE=false",
@@ -181,7 +180,7 @@ Note that `build.js` currently requires you to enter an output file and will wri
## A more complicated example ## A more complicated example
Now let's try a more complicated example: [`heatmaps-earthquakes`](http://openlayers.org/en/master/examples/heatmap-earthquakes.html). The build configuration file looks like this: Now let's try a more complicated example: [`heatmaps-earthquakes`](https://openlayers.org/en/master/examples/heatmap-earthquakes.html). The build configuration file looks like this:
```json ```json
{ {
@@ -191,7 +190,7 @@ Now let's try a more complicated example: [`heatmaps-earthquakes`](http://openla
"ol.format.KML", "ol.format.KML",
"ol.layer.Heatmap#getSource", "ol.layer.Heatmap#getSource",
"ol.source.Vector#on", "ol.source.Vector#on",
"ol.source.VectorEvent#feature", "ol.source.Vector.Event#feature",
"ol.Feature#get", "ol.Feature#get",
"ol.Feature#set", "ol.Feature#set",
"ol.layer.Tile", "ol.layer.Tile",
@@ -207,11 +206,10 @@ Now let's try a more complicated example: [`heatmaps-earthquakes`](http://openla
"externs/oli.js" "externs/oli.js"
], ],
"define": [ "define": [
"ol.ENABLE_DOM=false",
"ol.ENABLE_WEBGL=false", "ol.ENABLE_WEBGL=false",
"ol.ENABLE_PROJ4JS=false", "ol.ENABLE_PROJ4JS=false",
"ol.ENABLE_IMAGE=false", "ol.ENABLE_IMAGE=false",
"goog.DEBUG=false" "ol.DEBUG=false"
], ],
"compilation_level": "ADVANCED", "compilation_level": "ADVANCED",
"manage_closure_dependencies": true "manage_closure_dependencies": true
@@ -219,7 +217,7 @@ Now let's try a more complicated example: [`heatmaps-earthquakes`](http://openla
} }
``` ```
The exports are given here in the order in which they occur in the `heatmaps-earthquakes` example's JavaScript code. In this example we not only use the `ol.` functions and constructors, but also `prototype` methods where the `ol` namespace is not directly used. In the code, we have for example `vector.getSource().on()`. This means we are using the `getSource` method of `layer.Heatmap` and the `on` method of `source.KML`, so this is what has to be exported. Similarly, `event.feature.get()` means we are using the `feature` property of `source.VectorEvent` and the `get` method of `Feature`. If any of these names are left out, the compile will complete successfully, but the missing names will be obfuscated and you will get a 'property undefined' error when you try and run the script. The exports are given here in the order in which they occur in the `heatmaps-earthquakes` example's JavaScript code. In this example we not only use the `ol.` functions and constructors, but also `prototype` methods where the `ol` namespace is not directly used. In the code, we have for example `vector.getSource().on()`. This means we are using the `getSource` method of `layer.Heatmap` and the `on` method of `source.KML`, so this is what has to be exported. Similarly, `event.feature.get()` means we are using the `feature` property of `source.Vector.Event` and the `get` method of `Feature`. If any of these names are left out, the compile will complete successfully, but the missing names will be obfuscated and you will get a 'property undefined' error when you try and run the script.
As this example uses a vector layer it is necessary to remove `"ol.ENABLE_VECTOR=false"` in the `define` section of the configuration. As this example uses a vector layer it is necessary to remove `"ol.ENABLE_VECTOR=false"` in the `define` section of the configuration.

View File

@@ -10,7 +10,7 @@ Transformation of the map projections of the image happens directly in a web bro
The view in any Proj4js supported coordinate reference system is possible and previously incompatible layers can now be combined and overlaid. The view in any Proj4js supported coordinate reference system is possible and previously incompatible layers can now be combined and overlaid.
# Usage # Usage
The API usage is very simple. Just specify proper projection (using [EPSG](http://epsg.io) code) on `ol.View`: The API usage is very simple. Just specify proper projection (using [EPSG](https://epsg.io) code) on `ol.View`:
``` javascript ``` javascript
var map = new ol.Map({ var map = new ol.Map({
target: 'map', target: 'map',
@@ -35,14 +35,14 @@ var map = new ol.Map({
If a source (based on `ol.source.TileImage` or `ol.source.Image`) has a projection different from the current `ol.View`s projection then the reprojection happens automatically under the hood. If a source (based on `ol.source.TileImage` or `ol.source.Image`) has a projection different from the current `ol.View`s projection then the reprojection happens automatically under the hood.
### Examples ### Examples
- [Raster reprojection demo](http://openlayers.org/en/master/examples/reprojection.html) - [Raster reprojection demo](https://openlayers.org/en/master/examples/reprojection.html)
- [OpenStreetMap to WGS84 reprojection](http://openlayers.org/en/master/examples/reprojection-wgs84.html) - [OpenStreetMap to WGS84 reprojection](https://openlayers.org/en/master/examples/reprojection-wgs84.html)
- [Reprojection with EPSG.io database search](http://openlayers.org/en/master/examples/reprojection-by-code.html) - [Reprojection with EPSG.io database search](https://openlayers.org/en/master/examples/reprojection-by-code.html)
- [Image reprojection](http://openlayers.org/en/master/examples/reprojection-image.html) - [Image reprojection](https://openlayers.org/en/master/examples/reprojection-image.html)
### Custom projection ### Custom projection
The easiest way to use a custom projection is to add the [Proj4js](http://proj4js.org/) library to your project and then define the projection using a proj4 definition string. The easiest way to use a custom projection is to add the [Proj4js](http://proj4js.org/) library to your project and then define the projection using a proj4 definition string.
Following example shows definition of a [British National Grid](http://epsg.io/27700): Following example shows definition of a [British National Grid](https://epsg.io/27700):
``` html ``` html
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js"></script>
@@ -122,7 +122,7 @@ Although this is mathematically correct behavior of the inverse transformation,
A possible general solution would be to calculate the forward transformation for every vertex as well - but this would significantly decrease performance (especially for computationally expensive transformations). A possible general solution would be to calculate the forward transformation for every vertex as well - but this would significantly decrease performance (especially for computationally expensive transformations).
Therefore a recommended workaround is to define a proper visibility extent on the `ol.layer.Tile` in the view projection. Therefore a recommended workaround is to define a proper visibility extent on the `ol.layer.Tile` in the view projection.
Setting such a limit is demonstrated in the [reprojection demo example](http://openlayers.org/en/master/examples/reprojection.html). Setting such a limit is demonstrated in the [reprojection demo example](https://openlayers.org/en/master/examples/reprojection.html).
### Resolution calculation ### Resolution calculation
When determining source tiles to load, the ideal source resolution needs to be calculated. When determining source tiles to load, the ideal source resolution needs to be calculated.

View File

@@ -7,6 +7,7 @@
"d3": false, "d3": false,
"jsPDF": false, "jsPDF": false,
"jsts": false, "jsts": false,
"saveAs": false,
"topojson": false, "topojson": false,
"turf": false "turf": false
}, },

View File

@@ -11,7 +11,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
controls: ol.control.defaults({ controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({ attributionOptions: /** @type {olx.control.AttributionOptions} */ ({

View File

@@ -54,7 +54,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
// Improve user experience by loading tiles while animating. Will make // Improve user experience by loading tiles while animating. Will make
// animations stutter on mobile or slow devices. // animations stutter on mobile or slow devices.
loadTilesWhileAnimating: true, loadTilesWhileAnimating: true,

View File

@@ -5,7 +5,7 @@ goog.require('ol.layer.Image');
goog.require('ol.source.OSM'); goog.require('ol.source.OSM');
goog.require('ol.source.ImageArcGISRest'); goog.require('ol.source.ImageArcGISRest');
var url = 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' + var url = 'https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' +
'Specialty/ESRI_StateCityHighway_USA/MapServer'; 'Specialty/ESRI_StateCityHighway_USA/MapServer';
var layers = [ var layers = [

View File

@@ -4,7 +4,7 @@ goog.require('ol.layer.Tile');
goog.require('ol.source.OSM'); goog.require('ol.source.OSM');
goog.require('ol.source.TileArcGISRest'); goog.require('ol.source.TileArcGISRest');
var url = 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' + var url = 'https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' +
'Specialty/ESRI_StateCityHighway_USA/MapServer'; 'Specialty/ESRI_StateCityHighway_USA/MapServer';
var layers = [ var layers = [

View File

@@ -15,7 +15,6 @@ var map = new ol.Map({
}) })
], ],
controls: ol.control.defaults({attribution: false}).extend([attribution]), controls: ol.control.defaults({attribution: false}).extend([attribution]),
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -28,7 +28,6 @@ for (i = 0, ii = styles.length; i < ii; ++i) {
} }
var map = new ol.Map({ var map = new ol.Map({
layers: layers, layers: layers,
renderer: common.getRendererFromQueryString(),
// Improve user experience by loading tiles while dragging/zooming. Will make // Improve user experience by loading tiles while dragging/zooming. Will make
// zooming choppy on mobile or slow devices. // zooming choppy on mobile or slow devices.
loadTilesWhileInteracting: true, loadTilesWhileInteracting: true,

View File

@@ -25,7 +25,6 @@ var map = new ol.Map({
source: vectorSource source: vectorSource
}) })
], ],
renderer: 'canvas',
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -9,7 +9,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [-8730000, 5930000], center: [-8730000, 5930000],

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
---
layout: example.html
title: Styling feature with CanvasGradient or CanvasPattern
shortdesc: Example showing the countries vector layer styled with patterns and gradients.
docs: >
First this example creates a reusable [`CanvasPattern`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern)
and a [`CanvasGradient`](https://developer.mozilla.org/en/docs/Web/API/CanvasGradient). The countries are loaded from
a GeoJSON file. A style function determines for each country whether to use a fill with the pregenerated
CanvasGradient (rainbow colors) or a CanvasPattern (repeating stacked circles).
tags: "canvas, gradient, pattern, style"
---
<div id="map" class="map"></div>

View File

@@ -0,0 +1,101 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.GeoJSON');
goog.require('ol.has');
goog.require('ol.layer.Vector');
goog.require('ol.proj');
goog.require('ol.source.Vector');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
var canvas = document.createElement('canvas');
var context = canvas.getContext('2d');
// Gradient and pattern are in canvas pixel space, so we adjust for the
// renderer's pixel ratio
var pixelRatio = ol.has.DEVICE_PIXEL_RATIO;
// Generate a rainbow gradient
function gradient(feature, resolution) {
var extent = feature.getGeometry().getExtent();
// Gradient starts on the left edge of each feature, and ends on the right.
// Coordinate origin is [0, 0], so we just divide by resolution and multiply
// with pixelRatio to match the renderer's pixel coordinate system.
var grad = context.createLinearGradient(
extent[0] / resolution * pixelRatio, 0,
extent[2] / resolution * pixelRatio, 0);
grad.addColorStop(0, 'red');
grad.addColorStop(1 / 6, 'orange');
grad.addColorStop(2 / 6, 'yellow');
grad.addColorStop(3 / 6, 'green');
grad.addColorStop(4 / 6, 'aqua');
grad.addColorStop(5 / 6, 'blue');
grad.addColorStop(1, 'purple');
return grad;
}
// Generate a canvasPattern with two circles on white background
var pattern = (function() {
canvas.width = 11 * pixelRatio;
canvas.height = 11 * pixelRatio;
// white background
context.fillStyle = 'white';
context.fillRect(0, 0, canvas.width, canvas.height);
// outer circle
context.fillStyle = 'rgba(102, 0, 102, 0.5)';
context.beginPath();
context.arc(5 * pixelRatio, 5 * pixelRatio, 4 * pixelRatio, 0, 2 * Math.PI);
context.fill();
// inner circle
context.fillStyle = 'rgb(55, 0, 170)';
context.beginPath();
context.arc(5 * pixelRatio, 5 * pixelRatio, 2 * pixelRatio, 0, 2 * Math.PI);
context.fill();
return context.createPattern(canvas, 'repeat');
}());
// Generate style for gradient or pattern fill
var fill = new ol.style.Fill();
var style = new ol.style.Style({
fill: fill,
stroke: new ol.style.Stroke({
color: '#333',
width: 2
})
});
/**
* The styling function for the vector layer, will return an array of styles
* which either contains the aboove gradient or pattern.
*
* @param {ol.Feature} feature The feature to style.
* @param {number} resolution Resolution.
* @return {ol.style.Style} The style to use for the feature.
*/
var getStackedStyle = function(feature, resolution) {
var id = feature.getId();
fill.setColor(id > 'J' ? gradient(feature, resolution) : pattern);
return style;
};
// Create a vector layer that makes use of the style function above…
var vectorLayer = new ol.layer.Vector({
source: new ol.source.Vector({
url: 'data/geojson/countries.geojson',
format: new ol.format.GeoJSON()
}),
style: getStackedStyle
});
// … finally create a map with that layer.
var map = new ol.Map({
layers: [
vectorLayer
],
target: 'map',
view: new ol.View({
center: ol.proj.fromLonLat([7, 52]),
zoom: 3
})
});

View File

@@ -20,7 +20,6 @@ var map = new ol.Map({
}) })
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
controls: ol.control.defaults({ controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({ attributionOptions: /** @type {olx.control.AttributionOptions} */ ({

View File

@@ -69,7 +69,6 @@ var raster = new ol.layer.Tile({
var map = new ol.Map({ var map = new ol.Map({
layers: [raster, clusters], layers: [raster, clusters],
renderer: 'canvas',
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -70,7 +70,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -4,7 +4,7 @@ goog.require('ol.layer.Tile');
goog.require('ol.source.OSM'); goog.require('ol.source.OSM');
var logoElement = document.createElement('a'); var logoElement = document.createElement('a');
logoElement.href = 'http://www.osgeo.org/'; logoElement.href = 'https://www.osgeo.org/';
logoElement.target = '_blank'; logoElement.target = '_blank';
var logoImage = document.createElement('img'); var logoImage = document.createElement('img');

View File

@@ -4,7 +4,7 @@
<description>Created from OpenStreetMap data. Renderer v0.5</description> <description>Created from OpenStreetMap data. Renderer v0.5</description>
<!-- <!--
Copyright (c) OpenStreetMap Contributors Copyright (c) OpenStreetMap Contributors
http://www.openstreetmap.org/ https://www.openstreetmap.org/
This work is licensed under the This work is licensed under the
Creative Commons Attribution-ShareAlike 2.0 License. Creative Commons Attribution-ShareAlike 2.0 License.
@@ -13,7 +13,7 @@ http://creativecommons.org/licenses/by-sa/2.0/
<ScreenOverlay id="CopyrightNotice"> <ScreenOverlay id="CopyrightNotice">
<name>Copyright Notice</name> <name>Copyright Notice</name>
<description> <description>
<![CDATA[The data in this KML file is Copyright <a href="http://www.openstreetmap.org/">OpenStreetMap</a> Contributors. It is available under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike (CC-BY-SA) Version 2.0 License</a>.]]> <![CDATA[The data in this KML file is Copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> Contributors. It is available under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike (CC-BY-SA) Version 2.0 License</a>.]]>
</description> </description>
<Snippet>Copyright (c) OpenStreetMap Contributors. CC-BY-SA 2.0 License.</Snippet> <Snippet>Copyright (c) OpenStreetMap Contributors. CC-BY-SA 2.0 License.</Snippet>
<Icon> <Icon>
@@ -32,7 +32,7 @@ http://creativecommons.org/licenses/by-sa/2.0/
<IconStyle> <IconStyle>
<scale>0.2</scale> <scale>0.2</scale>
<Icon> <Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/parking_lot.png</href> <href>https://maps.google.com/mapfiles/kml/shapes/parking_lot.png</href>
</Icon> </Icon>
</IconStyle> </IconStyle>
</Style> </Style>
@@ -140,7 +140,7 @@ http://creativecommons.org/licenses/by-sa/2.0/
<IconStyle> <IconStyle>
<scale>0.7</scale> <scale>0.7</scale>
<Icon> <Icon>
<href>http://maps.google.com/mapfiles/kml/pal2/icon21.png</href> <href>https://maps.google.com/mapfiles/kml/pal2/icon21.png</href>
</Icon> </Icon>
</IconStyle> </IconStyle>
</Style> </Style>
@@ -170,7 +170,7 @@ http://creativecommons.org/licenses/by-sa/2.0/
<IconStyle> <IconStyle>
<scale>0.7</scale> <scale>0.7</scale>
<Icon> <Icon>
<href>http://maps.google.com/mapfiles/kml/pal2/icon30.png</href> <href>https://maps.google.com/mapfiles/kml/pal2/icon30.png</href>
</Icon> </Icon>
</IconStyle> </IconStyle>
</Style> </Style>
@@ -188,7 +188,7 @@ http://creativecommons.org/licenses/by-sa/2.0/
<IconStyle> <IconStyle>
<scale>0.7</scale> <scale>0.7</scale>
<Icon> <Icon>
<href>http://maps.google.com/mapfiles/kml/pal2/icon28.png</href> <href>https://maps.google.com/mapfiles/kml/pal2/icon28.png</href>
</Icon> </Icon>
</IconStyle> </IconStyle>
</Style> </Style>
@@ -325,7 +325,7 @@ http://creativecommons.org/licenses/by-sa/2.0/
<IconStyle> <IconStyle>
<scale>0.7</scale> <scale>0.7</scale>
<Icon> <Icon>
<href>http://maps.google.com/mapfiles/kml/pal2/icon40.png</href> <href>https://maps.google.com/mapfiles/kml/pal2/icon40.png</href>
</Icon> </Icon>
</IconStyle> </IconStyle>
</Style> </Style>
@@ -548,7 +548,7 @@ http://creativecommons.org/licenses/by-sa/2.0/
<IconStyle> <IconStyle>
<scale>0.7</scale> <scale>0.7</scale>
<Icon> <Icon>
<href>http://maps.google.com/mapfiles/kml/pal3/icon38.png</href> <href>https://maps.google.com/mapfiles/kml/pal3/icon38.png</href>
</Icon> </Icon>
</IconStyle> </IconStyle>
</Style> </Style>
@@ -559,7 +559,7 @@ http://creativecommons.org/licenses/by-sa/2.0/
<IconStyle> <IconStyle>
<scale>0.7</scale> <scale>0.7</scale>
<Icon> <Icon>
<href>http://maps.google.com/mapfiles/kml/pal3/icon38.png</href> <href>https://maps.google.com/mapfiles/kml/pal3/icon38.png</href>
</Icon> </Icon>
</IconStyle> </IconStyle>
</Style> </Style>

View File

@@ -19,7 +19,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
controls: ol.control.defaults({ controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({ attributionOptions: /** @type {olx.control.AttributionOptions} */ ({

View File

@@ -104,7 +104,6 @@ var map = new ol.Map({
}) })
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -15,7 +15,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -5,11 +5,8 @@ shortdesc: Example of using the ol.interaction.Draw interaction.
docs: > docs: >
Example of using the Draw interaction. Select a geometry type from the Example of using the Draw interaction. Select a geometry type from the
dropdown above to start drawing. To finish drawing, click the last dropdown above to start drawing. To finish drawing, click the last
point. To activate freehand drawing for lines and polygons, hold the `Shift` point. To activate freehand drawing for lines, polygons, and circles, hold
key. Square drawing is achieved by using Circle mode with a `geometryFunction` the `Shift` key.
that creates a 4-sided regular polygon instead of a circle. Box drawing uses a
custom `geometryFunction` that takes start and end point of a line with 2
points and creates a rectangular box.
tags: "draw, edit, freehand, vector" tags: "draw, edit, freehand, vector"
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>
@@ -20,8 +17,6 @@ tags: "draw, edit, freehand, vector"
<option value="LineString">LineString</option> <option value="LineString">LineString</option>
<option value="Polygon">Polygon</option> <option value="Polygon">Polygon</option>
<option value="Circle">Circle</option> <option value="Circle">Circle</option>
<option value="Square">Square</option>
<option value="Box">Box</option>
<option value="None">None</option> <option value="None">None</option>
</select> </select>
</form> </form>

View File

@@ -1,15 +1,10 @@
goog.require('ol.Map'); goog.require('ol.Map');
goog.require('ol.View'); goog.require('ol.View');
goog.require('ol.geom.Polygon');
goog.require('ol.interaction.Draw'); goog.require('ol.interaction.Draw');
goog.require('ol.layer.Tile'); goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector'); goog.require('ol.layer.Vector');
goog.require('ol.source.OSM'); goog.require('ol.source.OSM');
goog.require('ol.source.Vector'); goog.require('ol.source.Vector');
goog.require('ol.style.Circle');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
var raster = new ol.layer.Tile({ var raster = new ol.layer.Tile({
source: new ol.source.OSM() source: new ol.source.OSM()
@@ -18,27 +13,11 @@ var raster = new ol.layer.Tile({
var source = new ol.source.Vector({wrapX: false}); var source = new ol.source.Vector({wrapX: false});
var vector = new ol.layer.Vector({ var vector = new ol.layer.Vector({
source: source, source: source
style: new ol.style.Style({
fill: new ol.style.Fill({
color: 'rgba(255, 255, 255, 0.2)'
}),
stroke: new ol.style.Stroke({
color: '#ffcc33',
width: 2
}),
image: new ol.style.Circle({
radius: 7,
fill: new ol.style.Fill({
color: '#ffcc33'
})
})
})
}); });
var map = new ol.Map({ var map = new ol.Map({
layers: [raster, vector], layers: [raster, vector],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [-11000000, 4600000], center: [-11000000, 4600000],
@@ -52,30 +31,9 @@ var draw; // global so we can remove it later
function addInteraction() { function addInteraction() {
var value = typeSelect.value; var value = typeSelect.value;
if (value !== 'None') { if (value !== 'None') {
var geometryFunction, maxPoints;
if (value === 'Square') {
value = 'Circle';
geometryFunction = ol.interaction.Draw.createRegularPolygon(4);
} else if (value === 'Box') {
value = 'LineString';
maxPoints = 2;
geometryFunction = function(coordinates, geometry) {
if (!geometry) {
geometry = new ol.geom.Polygon(null);
}
var start = coordinates[0];
var end = coordinates[1];
geometry.setCoordinates([
[start, [start[0], end[1]], end, [end[0], start[1]], start]
]);
return geometry;
};
}
draw = new ol.interaction.Draw({ draw = new ol.interaction.Draw({
source: source, source: source,
type: /** @type {ol.geom.GeometryType} */ (value), type: /** @type {ol.geom.GeometryType} */ (typeSelect.value)
geometryFunction: geometryFunction,
maxPoints: maxPoints
}); });
map.addInteraction(draw); map.addInteraction(draw);
} }

View File

@@ -0,0 +1,22 @@
---
layout: example.html
title: Freehand Drawing
shortdesc: Example using the ol.interaction.Draw interaction in freehand mode.
docs: >
This example demonstrates the `ol.interaction.Draw` in freehand mode. During
freehand drawing, points are added while dragging. Set `freehand: true` to
enable freehand mode. Note that freehand mode can be conditionally enabled
by using the `freehandCondition` option. For example to toggle freehand mode
with the `Shift` key, use `freehandCondition: ol.events.condition.shiftKeyOnly`.
tags: "draw, edit, freehand, vector"
---
<div id="map" class="map"></div>
<form class="form-inline">
<label>Geometry type &nbsp;</label>
<select id="type">
<option value="LineString">LineString</option>
<option value="Polygon">Polygon</option>
<option value="Circle">Circle</option>
<option value="None">None</option>
</select>
</form>

52
examples/draw-freehand.js Normal file
View File

@@ -0,0 +1,52 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.interaction.Draw');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.source.OSM');
goog.require('ol.source.Vector');
var raster = new ol.layer.Tile({
source: new ol.source.OSM()
});
var source = new ol.source.Vector({wrapX: false});
var vector = new ol.layer.Vector({
source: source
});
var map = new ol.Map({
layers: [raster, vector],
target: 'map',
view: new ol.View({
center: [-11000000, 4600000],
zoom: 4
})
});
var typeSelect = document.getElementById('type');
var draw; // global so we can remove it later
function addInteraction() {
var value = typeSelect.value;
if (value !== 'None') {
draw = new ol.interaction.Draw({
source: source,
type: /** @type {ol.geom.GeometryType} */ (typeSelect.value),
freehand: true
});
map.addInteraction(draw);
}
}
/**
* Handle change event.
*/
typeSelect.onchange = function() {
map.removeInteraction(draw);
addInteraction();
};
addInteraction();

25
examples/draw-shapes.html Normal file
View File

@@ -0,0 +1,25 @@
---
layout: example.html
title: Draw Shapes
shortdesc: Using the ol.interaction.Draw to create regular shapes
docs: >
This demonstrates the use of the `geometryFunction` option for the
`ol.interaction.Draw`. Select a shape type from the dropdown above to start
drawing. To activate freehand drawing, hold the `Shift` key. Square drawing is
achieved by using `type: 'Circle'` type with a `geometryFunction` that creates
a 4-sided regular polygon instead of a circle. Box drawing uses `type: 'Circle'`
with a `geometryFunction` that creates a box-shaped polygon instead of a
circle. Star drawing uses a custom geometry function that coverts a circle
into a start using the center and radius provided by the draw interaction.
tags: "draw, edit, freehand, vector"
---
<div id="map" class="map"></div>
<form class="form-inline">
<label>Shape type &nbsp;</label>
<select id="type">
<option value="Square">Square</option>
<option value="Box">Box</option>
<option value="Star">Star</option>
<option value="None">None</option>
</select>
</form>

86
examples/draw-shapes.js Normal file
View File

@@ -0,0 +1,86 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.geom.Polygon');
goog.require('ol.interaction.Draw');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.source.OSM');
goog.require('ol.source.Vector');
var raster = new ol.layer.Tile({
source: new ol.source.OSM()
});
var source = new ol.source.Vector({wrapX: false});
var vector = new ol.layer.Vector({
source: source
});
var map = new ol.Map({
layers: [raster, vector],
target: 'map',
view: new ol.View({
center: [-11000000, 4600000],
zoom: 4
})
});
var typeSelect = document.getElementById('type');
var draw; // global so we can remove it later
function addInteraction() {
var value = typeSelect.value;
if (value !== 'None') {
var geometryFunction;
if (value === 'Square') {
value = 'Circle';
geometryFunction = ol.interaction.Draw.createRegularPolygon(4);
} else if (value === 'Box') {
value = 'Circle';
geometryFunction = ol.interaction.Draw.createBox();
} else if (value === 'Star') {
value = 'Circle';
geometryFunction = function(coordinates, geometry) {
if (!geometry) {
geometry = new ol.geom.Polygon(null);
}
var center = coordinates[0];
var last = coordinates[1];
var dx = center[0] - last[0];
var dy = center[1] - last[1];
var radius = Math.sqrt(dx * dx + dy * dy);
var rotation = Math.atan2(dy, dx);
var newCoordinates = [];
var numPoints = 12;
for (var i = 0; i < numPoints; ++i) {
var angle = rotation + i * 2 * Math.PI / numPoints;
var fraction = i % 2 === 0 ? 1 : 0.5;
var offsetX = radius * fraction * Math.cos(angle);
var offsetY = radius * fraction * Math.sin(angle);
newCoordinates.push([center[0] + offsetX, center[1] + offsetY]);
}
newCoordinates.push(newCoordinates[0].slice());
geometry.setCoordinates([newCoordinates]);
return geometry;
};
}
draw = new ol.interaction.Draw({
source: source,
type: /** @type {ol.geom.GeometryType} */ (value),
geometryFunction: geometryFunction
});
map.addInteraction(draw);
}
}
/**
* Handle change event.
*/
typeSelect.onchange = function() {
map.removeInteraction(draw);
addInteraction();
};
addInteraction();

View File

@@ -16,7 +16,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -9,7 +9,7 @@ goog.require('ol.source.TileWMS');
var layers = [ var layers = [
new ol.layer.Tile({ new ol.layer.Tile({
source: new ol.source.TileWMS({ source: new ol.source.TileWMS({
url: 'http://demo.boundlessgeo.com/geoserver/wms', url: 'https://ahocevar.com/geoserver/wms',
params: { params: {
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR' 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR'
} }

View File

@@ -3,12 +3,12 @@ layout: example.html
title: Map Export title: Map Export
shortdesc: Example of exporting a map as a PNG image. shortdesc: Example of exporting a map as a PNG image.
docs: > docs: >
Example of exporting a map as a PNG image. Example of exporting a map as a PNG image. This example requires a browser
that supports <a href="https://developer.mozilla.org/de/docs/Web/API/HTMLCanvasElement/toBlob#Browser_compatibility">
<code>canvas.toBlob()</code></a>.
tags: "export, png, openstreetmap" tags: "export, png, openstreetmap"
resources:
- https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>
<div id="no-download" class="alert alert-danger" style="display: none"> <a id="export-png" class="btn btn-default"><i class="fa fa-download"></i> Download PNG</a>
This example requires a browser that supports the
<a href="http://caniuse.com/#feat=download">link download</a> attribute.
</div>
<a id="export-png" class="btn btn-default" download="map.png"><i class="fa fa-download"></i> Download PNG</a>

View File

@@ -1,3 +1,5 @@
// NOCOMPILE
// this example uses FileSaver.js for which we don't have an externs file.
goog.require('ol.Map'); goog.require('ol.Map');
goog.require('ol.View'); goog.require('ol.View');
goog.require('ol.control'); goog.require('ol.control');
@@ -31,20 +33,12 @@ var map = new ol.Map({
}) })
}); });
var exportPNGElement = document.getElementById('export-png'); document.getElementById('export-png').addEventListener('click', function() {
if ('download' in exportPNGElement) {
exportPNGElement.addEventListener('click', function() {
map.once('postcompose', function(event) { map.once('postcompose', function(event) {
var canvas = event.context.canvas; var canvas = event.context.canvas;
exportPNGElement.href = canvas.toDataURL('image/png'); canvas.toBlob(function(blob) {
saveAs(blob, 'map.png');
});
}); });
map.renderSync(); map.renderSync();
}, false); });
} else {
var info = document.getElementById('no-download');
/**
* display error message
*/
info.style.display = '';
}

View File

@@ -0,0 +1,12 @@
---
layout: example.html
title: Extent Interaction
shortdesc: Using an Extent interaction to draw an extent.
docs: >
<p>This example shows how to use an <code>Extent</code> interaction to draw a modifiable extent.</p>
<p>Use <code>Shift+Drag</code> to draw an extent.
<code>Shift+Drag</code> on the corners or edges of the extent to resize it. <code>Shift+Click</code> off the extent to remove it.
</p>
tags: "Extent, interaction, box"
---
<div id="map" class="map"></div>

View File

@@ -0,0 +1,48 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.events.condition');
goog.require('ol.format.GeoJSON');
goog.require('ol.interaction.Extent');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.source.OSM');
goog.require('ol.source.Vector');
var vectorSource = new ol.source.Vector({
url: 'data/geojson/countries.geojson',
format: new ol.format.GeoJSON()
});
var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
}),
new ol.layer.Vector({
source: vectorSource
})
],
target: 'map',
view: new ol.View({
center: [0, 0],
zoom: 2
})
});
var extent = new ol.interaction.Extent({
condition: ol.events.condition.platformModifierKeyOnly
});
map.addInteraction(extent);
extent.setActive(false);
//Enable interaction by holding shift
this.addEventListener('keydown', function(event) {
if (event.keyCode == 16) {
extent.setActive(true);
}
});
this.addEventListener('keyup', function(event) {
if (event.keyCode == 16) {
extent.setActive(false);
}
});

View File

@@ -28,7 +28,6 @@ var map = new ol.Map({
collapsible: false collapsible: false
}) })
}), }),
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -22,7 +22,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: view view: view
}); });

View File

@@ -23,7 +23,6 @@ var map = new ol.Map({
}) })
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: view view: view
}); });

View File

@@ -44,7 +44,6 @@ tags: "fullscreen, geolocation, orientation, mobile"
<button id="geolocate">Geolocate Me!</button> <button id="geolocate">Geolocate Me!</button>
<button id="simulate">Simulate</button> <button id="simulate">Simulate</button>
</div> </div>
<script src="http://code.jquery.com/jquery-2.2.3.min.js" type="text/javascript"></script>
<script src="./resources/common.js" type="text/javascript"></script> <script src="./resources/common.js" type="text/javascript"></script>
<script src="loader.js?id=geolocation-orientation" type="text/javascript"></script> <script src="loader.js?id=geolocation-orientation" type="text/javascript"></script>
</body> </body>

View File

@@ -5,7 +5,7 @@ goog.require('ol.source.ImageWMS');
var wmsSource = new ol.source.ImageWMS({ var wmsSource = new ol.source.ImageWMS({
url: 'http://demo.boundlessgeo.com/geoserver/wms', url: 'https://ahocevar.com/geoserver/wms',
params: {'LAYERS': 'ne:ne'}, params: {'LAYERS': 'ne:ne'},
serverType: 'geoserver', serverType: 'geoserver',
crossOrigin: 'anonymous' crossOrigin: 'anonymous'
@@ -21,7 +21,6 @@ var view = new ol.View({
}); });
var map = new ol.Map({ var map = new ol.Map({
renderer: common.getRendererFromQueryString(),
layers: [wmsLayer], layers: [wmsLayer],
target: 'map', target: 'map',
view: view view: view

View File

@@ -5,7 +5,7 @@ goog.require('ol.source.TileWMS');
var wmsSource = new ol.source.TileWMS({ var wmsSource = new ol.source.TileWMS({
url: 'http://demo.boundlessgeo.com/geoserver/wms', url: 'https://ahocevar.com/geoserver/wms',
params: {'LAYERS': 'ne:ne'}, params: {'LAYERS': 'ne:ne'},
serverType: 'geoserver', serverType: 'geoserver',
crossOrigin: 'anonymous' crossOrigin: 'anonymous'
@@ -21,7 +21,6 @@ var view = new ol.View({
}); });
var map = new ol.Map({ var map = new ol.Map({
renderer: common.getRendererFromQueryString(),
layers: [wmsLayer], layers: [wmsLayer],
target: 'map', target: 'map',
view: view view: view

View File

@@ -13,7 +13,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: 'canvas',
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: ol.proj.fromLonLat([4.8, 47.75]), center: ol.proj.fromLonLat([4.8, 47.75]),

View File

@@ -69,7 +69,6 @@ for (i = 0, ii = hereLayers.length; i < ii; ++i) {
var map = new ol.Map({ var map = new ol.Map({
layers: layers, layers: layers,
renderer: common.getRendererFromQueryString(),
// Improve user experience by loading tiles while dragging/zooming. Will make // Improve user experience by loading tiles while dragging/zooming. Will make
// zooming choppy on mobile or slow devices. // zooming choppy on mobile or slow devices.
loadTilesWhileInteracting: true, loadTilesWhileInteracting: true,

View File

@@ -61,7 +61,6 @@ var rasterLayer = new ol.layer.Tile({
}); });
var map = new ol.Map({ var map = new ol.Map({
renderer: common.getRendererFromQueryString(),
layers: [rasterLayer, vectorLayer], layers: [rasterLayer, vectorLayer],
target: document.getElementById('map'), target: document.getElementById('map'),
view: new ol.View({ view: new ol.View({

View File

@@ -79,7 +79,7 @@ var vector = new ol.layer.Vector({
}); });
var map = new ol.Map({ var map = new ol.Map({
renderer: common.getRendererFromQueryString('webgl'), renderer: /** @type {ol.renderer.Type} */ ('webgl'),
layers: [vector], layers: [vector],
target: document.getElementById('map'), target: document.getElementById('map'),
view: new ol.View({ view: new ol.View({

View File

@@ -45,7 +45,6 @@ var rasterLayer = new ol.layer.Tile({
}); });
var map = new ol.Map({ var map = new ol.Map({
renderer: common.getRendererFromQueryString(),
layers: [rasterLayer, vectorLayer], layers: [rasterLayer, vectorLayer],
target: document.getElementById('map'), target: document.getElementById('map'),
view: new ol.View({ view: new ol.View({

View File

@@ -3,7 +3,7 @@ layout: example.html
title: IGC Data title: IGC Data
shortdesc: Example of tracks recorded from multiple paraglider flights on the same day, read from an IGC file. shortdesc: Example of tracks recorded from multiple paraglider flights on the same day, read from an IGC file.
docs: > docs: >
<p>The five tracks contain a total of 49,707 unique coordinates. Zoom in to see more detail. The background layer is from <a href="http://www.opencyclemap.org/">OpenCycleMap</a>.</p> <p>The five tracks contain a total of 49,707 unique coordinates. Zoom in to see more detail. The background layer is from <a href="https://www.opencyclemap.org/">OpenCycleMap</a>.</p>
tags: "complex-geometry, closest-feature, igc, opencyclemap" tags: "complex-geometry, closest-feature, igc, opencyclemap"
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>

View File

@@ -85,10 +85,10 @@ var map = new ol.Map({
new ol.layer.Tile({ new ol.layer.Tile({
source: new ol.source.OSM({ source: new ol.source.OSM({
attributions: [ attributions: [
'All maps © <a href="http://www.opencyclemap.org/">OpenCycleMap</a>', 'All maps © <a href="https://www.opencyclemap.org/">OpenCycleMap</a>',
ol.source.OSM.ATTRIBUTION ol.source.OSM.ATTRIBUTION
], ],
url: 'http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png' url: 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png'
}) })
}), }),
new ol.layer.Vector({ new ol.layer.Vector({

View File

@@ -78,7 +78,7 @@ Progress.prototype.hide = function() {
var progress = new Progress(document.getElementById('progress')); var progress = new Progress(document.getElementById('progress'));
var source = new ol.source.ImageWMS({ var source = new ol.source.ImageWMS({
url: 'http://demo.boundlessgeo.com/geoserver/wms', url: 'https://ahocevar.com/geoserver/wms',
params: {'LAYERS': 'topp:states'}, params: {'LAYERS': 'topp:states'},
serverType: 'geoserver' serverType: 'geoserver'
}); });
@@ -99,7 +99,6 @@ var map = new ol.Map({
layers: [ layers: [
new ol.layer.Image({source: source}) new ol.layer.Image({source: source})
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [-10997148, 4569099], center: [-10997148, 4569099],

View File

@@ -19,7 +19,7 @@ if (!ol.has.WEBGL) {
var map = new ol.Map({ var map = new ol.Map({
layers: [osm], layers: [osm],
renderer: 'webgl', renderer: /** @type {ol.renderer.Type} */ ('webgl'),
target: 'map', target: 'map',
controls: ol.control.defaults({ controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({ attributionOptions: /** @type {olx.control.AttributionOptions} */ ({

View File

@@ -32,7 +32,6 @@ var overlay = new ol.layer.Tile({
var map = new ol.Map({ var map = new ol.Map({
layers: [base, overlay], layers: [base, overlay],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -27,7 +27,6 @@ var map = new ol.Map({
] ]
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: ol.proj.fromLonLat([37.40570, 8.81566]), center: ol.proj.fromLonLat([37.40570, 8.81566]),

View File

@@ -9,7 +9,6 @@ var layer = new ol.layer.Tile();
var map = new ol.Map({ var map = new ol.Map({
layers: [layer], layers: [layer],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -53,7 +53,6 @@ var vector = new ol.layer.Vector({
var map = new ol.Map({ var map = new ol.Map({
layers: [raster, vector], layers: [raster, vector],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [-11000000, 4600000], center: [-11000000, 4600000],

View File

@@ -3,7 +3,7 @@ layout: example.html
title: Localized OpenStreetMap title: Localized OpenStreetMap
shortdesc: Example of a localized OpenStreetMap map with a custom tile server and a custom attribution. shortdesc: Example of a localized OpenStreetMap map with a custom tile server and a custom attribution.
docs: > docs: >
<p>The base layer is <a href="http://www.opencyclemap.org/">OpenCycleMap</a> with an overlay from <a href="http://www.openseamap.org/">OpenSeaMap</a>. <p>The base layer is <a href="https://www.opencyclemap.org/">OpenCycleMap</a> with an overlay from <a href="http://www.openseamap.org/">OpenSeaMap</a>.
tags: "localized-openstreetmap, openseamap, openstreetmap" tags: "localized-openstreetmap, openseamap, openstreetmap"
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>

View File

@@ -8,10 +8,10 @@ goog.require('ol.source.OSM');
var openCycleMapLayer = new ol.layer.Tile({ var openCycleMapLayer = new ol.layer.Tile({
source: new ol.source.OSM({ source: new ol.source.OSM({
attributions: [ attributions: [
'All maps © <a href="http://www.opencyclemap.org/">OpenCycleMap</a>', 'All maps © <a href="https://www.opencyclemap.org/">OpenCycleMap</a>',
ol.source.OSM.ATTRIBUTION ol.source.OSM.ATTRIBUTION
], ],
url: 'http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png' url: 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png'
}) })
}); });
@@ -22,7 +22,7 @@ var openSeaMapLayer = new ol.layer.Tile({
ol.source.OSM.ATTRIBUTION ol.source.OSM.ATTRIBUTION
], ],
opaque: false, opaque: false,
url: 'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png' url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png'
}) })
}); });

View File

@@ -47,7 +47,7 @@ var map = new ol.Map({
preload: Infinity, preload: Infinity,
source: new ol.source.VectorTile({ source: new ol.source.VectorTile({
attributions: '© <a href="https://www.mapbox.com/map-feedback/">Mapbox</a> ' + attributions: '© <a href="https://www.mapbox.com/map-feedback/">Mapbox</a> ' +
'© <a href="http://www.openstreetmap.org/copyright">' + '© <a href="https://www.openstreetmap.org/copyright">' +
'OpenStreetMap contributors</a>', 'OpenStreetMap contributors</a>',
format: new ol.format.MVT(), format: new ol.format.MVT(),
tileGrid: new ol.tilegrid.TileGrid({ tileGrid: new ol.tilegrid.TileGrid({

View File

@@ -20,7 +20,7 @@ var map = new ol.Map({
new ol.layer.VectorTile({ new ol.layer.VectorTile({
source: new ol.source.VectorTile({ source: new ol.source.VectorTile({
attributions: '© <a href="https://www.mapbox.com/map-feedback/">Mapbox</a> ' + attributions: '© <a href="https://www.mapbox.com/map-feedback/">Mapbox</a> ' +
'© <a href="http://www.openstreetmap.org/copyright">' + '© <a href="https://www.openstreetmap.org/copyright">' +
'OpenStreetMap contributors</a>', 'OpenStreetMap contributors</a>',
format: new ol.format.MVT(), format: new ol.format.MVT(),
tileGrid: ol.tilegrid.createXYZ({maxZoom: 22}), tileGrid: ol.tilegrid.createXYZ({maxZoom: 22}),

View File

@@ -25,7 +25,6 @@ var map = new ol.Map({
maxResolution: 20000 maxResolution: 20000
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
controls: ol.control.defaults({ controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({ attributionOptions: /** @type {olx.control.AttributionOptions} */ ({

View File

@@ -19,7 +19,6 @@ var map = new ol.Map({
}) })
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: view view: view
}); });

View File

@@ -28,7 +28,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -13,7 +13,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
controls: ol.control.defaults({ controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({ attributionOptions: /** @type {olx.control.AttributionOptions} */ ({

View File

@@ -24,7 +24,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -1,3 +1,4 @@
goog.require('ol.Attribution');
goog.require('ol.Map'); goog.require('ol.Map');
goog.require('ol.View'); goog.require('ol.View');
goog.require('ol.format.TopoJSON'); goog.require('ol.format.TopoJSON');
@@ -41,7 +42,7 @@ var map = new ol.Map({
attributions: attribution, attributions: attribution,
format: format, format: format,
tileGrid: tileGrid, tileGrid: tileGrid,
url: 'https://vector.mapzen.com/osm/water/{z}/{x}/{y}.topojson?api_key=' + key url: 'https://tile.mapzen.com/mapzen/vector/v1/water/{z}/{x}/{y}.topojson?api_key=' + key
}), }),
style: new ol.style.Style({ style: new ol.style.Style({
fill: new ol.style.Fill({ fill: new ol.style.Fill({
@@ -54,7 +55,7 @@ var map = new ol.Map({
attributions: attribution, attributions: attribution,
format: format, format: format,
tileGrid: tileGrid, tileGrid: tileGrid,
url: 'https://vector.mapzen.com/osm/roads/{z}/{x}/{y}.topojson?api_key=' + key url: 'https://tile.mapzen.com/mapzen/vector/v1/roads/{z}/{x}/{y}.topojson?api_key=' + key
}), }),
style: function(feature) { style: function(feature) {
var kind = feature.get('kind'); var kind = feature.get('kind');
@@ -88,7 +89,7 @@ var map = new ol.Map({
attributions: attribution, attributions: attribution,
format: format, format: format,
tileGrid: tileGrid, tileGrid: tileGrid,
url: 'https://vector.mapzen.com/osm/buildings/{z}/{x}/{y}.topojson?api_key=' + key url: 'https://tile.mapzen.com/mapzen/vector/v1/buildings/{z}/{x}/{y}.topojson?api_key=' + key
}), }),
style: function(f, resolution) { style: function(f, resolution) {
return (resolution < 10) ? buildingStyle : null; return (resolution < 10) ? buildingStyle : null;

View File

@@ -13,7 +13,6 @@ var layer = new ol.layer.Tile({
var map = new ol.Map({ var map = new ol.Map({
layers: [layer], layers: [layer],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

View File

@@ -14,7 +14,7 @@ var overviewMapControl = new ol.control.OverviewMap({
layers: [ layers: [
new ol.layer.Tile({ new ol.layer.Tile({
source: new ol.source.OSM({ source: new ol.source.OSM({
'url': 'http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png' 'url': 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png'
}) })
}) })
], ],

View File

@@ -50,7 +50,6 @@ var map = new ol.Map({
}) })
}) })
], ],
renderer: common.getRendererFromQueryString(),
overlays: [overlay], overlays: [overlay],
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({

View File

@@ -19,7 +19,6 @@ var map1 = new ol.Map({
}) })
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map1', target: 'map1',
view: view view: view
}); });
@@ -34,7 +33,6 @@ var map2 = new ol.Map({
}) })
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map2', target: 'map2',
view: view view: view
}); });

View File

@@ -5,10 +5,10 @@ shortdesc: Demonstrates client-side raster reprojection of OSM to arbitrary proj
docs: > docs: >
This example shows client-side raster reprojection capabilities from This example shows client-side raster reprojection capabilities from
OSM (EPSG:3857) to arbitrary projection by searching OSM (EPSG:3857) to arbitrary projection by searching
in <a href="http://epsg.io/">EPSG.io</a> database. in <a href="https://epsg.io/">EPSG.io</a> database.
tags: "reprojection, projection, proj4js, epsg.io" tags: "reprojection, projection, proj4js, epsg.io"
resources: resources:
- https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js - https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.15/proj4.js
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>
<form class="form-inline"> <form class="form-inline">

View File

@@ -13,7 +13,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
projection: 'EPSG:3857', projection: 'EPSG:3857',
@@ -64,7 +63,7 @@ function setProjection(code, name, proj4def, bbox) {
function search(query) { function search(query) {
resultSpan.innerHTML = 'Searching ...'; resultSpan.innerHTML = 'Searching ...';
fetch('http://epsg.io/?format=json&q=' + query).then(function(response) { fetch('https://epsg.io/?format=json&q=' + query).then(function(response) {
return response.json(); return response.json();
}).then(function(json) { }).then(function(json) {
var results = json['results']; var results = json['results'];

View File

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

View File

@@ -21,7 +21,7 @@ var map = new ol.Map({
}), }),
new ol.layer.Image({ new ol.layer.Image({
source: new ol.source.ImageStatic({ source: new ol.source.ImageStatic({
url: 'http://upload.wikimedia.org/wikipedia/commons/thumb/1/18/' + url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/' +
'British_National_Grid.svg/2000px-British_National_Grid.svg.png', 'British_National_Grid.svg/2000px-British_National_Grid.svg.png',
crossOrigin: '', crossOrigin: '',
projection: 'EPSG:27700', projection: 'EPSG:27700',
@@ -29,7 +29,6 @@ var map = new ol.Map({
}) })
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: ol.proj.transform( center: ol.proj.transform(

View File

@@ -9,7 +9,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
projection: 'EPSG:4326', projection: 'EPSG:4326',

View File

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

View File

@@ -69,7 +69,7 @@ layers['osm'] = new ol.layer.Tile({
layers['wms4326'] = new ol.layer.Tile({ layers['wms4326'] = new ol.layer.Tile({
source: new ol.source.TileWMS({ source: new ol.source.TileWMS({
url: 'http://demo.boundlessgeo.com/geoserver/wms', url: 'https://ahocevar.com/geoserver/wms',
crossOrigin: '', crossOrigin: '',
params: { params: {
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR' 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR'
@@ -93,7 +93,7 @@ layers['wms21781'] = new ol.layer.Tile({
}); });
var parser = new ol.format.WMTSCapabilities(); var parser = new ol.format.WMTSCapabilities();
var url = 'http://map1.vis.earthdata.nasa.gov/wmts-arctic/' + var url = 'https://map1.vis.earthdata.nasa.gov/wmts-arctic/' +
'wmts.cgi?SERVICE=WMTS&request=GetCapabilities'; 'wmts.cgi?SERVICE=WMTS&request=GetCapabilities';
fetch(url).then(function(response) { fetch(url).then(function(response) {
return response.text(); return response.text();
@@ -129,7 +129,7 @@ for (var i = 0, ii = resolutions.length; i < ii; ++i) {
layers['states'] = new ol.layer.Tile({ layers['states'] = new ol.layer.Tile({
source: new ol.source.TileWMS({ source: new ol.source.TileWMS({
url: 'http://demo.boundlessgeo.com/geoserver/wms', url: 'https://ahocevar.com/geoserver/wms',
crossOrigin: '', crossOrigin: '',
params: {'LAYERS': 'topp:states', 'TILED': true}, params: {'LAYERS': 'topp:states', 'TILED': true},
serverType: 'geoserver', serverType: 'geoserver',
@@ -148,7 +148,6 @@ var map = new ol.Map({
layers['osm'], layers['osm'],
layers['bng'] layers['bng']
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
projection: 'EPSG:3857', projection: 'EPSG:3857',

View File

@@ -79,24 +79,3 @@
container.appendChild(form); container.appendChild(form);
})(); })();
var common = {};
common.getRendererFromQueryString = function(opt_default) {
var obj = {};
var queryString = location.search.slice(1);
var re = /([^&=]+)=([^&]*)/g;
var m = re.exec(queryString);
while (m) {
obj[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
m = re.exec(queryString);
}
if ('renderers' in obj) {
return obj['renderers'].split(',');
} else if ('renderer' in obj) {
return [obj['renderer']];
} else {
return opt_default;
}
};

View File

@@ -11,7 +11,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
controls: ol.control.defaults({ controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({ attributionOptions: /** @type {olx.control.AttributionOptions} */ ({

View File

@@ -21,7 +21,6 @@ var map = new ol.Map({
source: new ol.source.OSM() source: new ol.source.OSM()
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: [0, 0], center: [0, 0],

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. 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" tags: "reprojection, projection, openstreetmap, nad83, tile, scaleline"
resources: resources:
- https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js - https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.15/proj4.js
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>

View File

@@ -18,7 +18,6 @@ var map = new ol.Map({
}) })
}) })
], ],
renderer: common.getRendererFromQueryString(),
target: 'map', target: 'map',
view: new ol.View({ view: new ol.View({
center: ol.proj.fromLonLat([-77.93255, 37.9555]), center: ol.proj.fromLonLat([-77.93255, 37.9555]),

View File

@@ -1,10 +1,10 @@
--- ---
layout: example.html layout: example.html
title: Shared Views title: Shared Views
shortdesc: The three maps, one WebGL, one Canvas, one DOM, share the same center, resolution, rotation and layers. shortdesc: Two maps with different renderers share view properties
docs: > docs: >
The three maps, one WebGL, one Canvas, one DOM, share the same center, resolution, rotation and layers. Two maps (one with the Canvas renderer, one with the WebGL renderer) share the same center, resolution, rotation and layers.
tags: "side-by-side, canvas, webgl, dom, canvas, sync, object" tags: "side-by-side, canvas, webgl"
--- ---
<h4>Canvas</h4> <h4>Canvas</h4>
<div id="canvasMap" class="map"></div> <div id="canvasMap" class="map"></div>
@@ -13,5 +13,3 @@ tags: "side-by-side, canvas, webgl, dom, canvas, sync, object"
<div id="no-webgl" class="alert alert-danger" style="display: none"> <div id="no-webgl" class="alert alert-danger" style="display: none">
This map requires a browser that supports <a href="http://get.webgl.org/">WebGL</a>. This map requires a browser that supports <a href="http://get.webgl.org/">WebGL</a>.
</div> </div>
<h4>DOM</h4>
<div id="domMap" class="map"></div>

View File

@@ -4,33 +4,27 @@ goog.require('ol.has');
goog.require('ol.layer.Tile'); goog.require('ol.layer.Tile');
goog.require('ol.source.OSM'); goog.require('ol.source.OSM');
var layer = new ol.layer.Tile({
var map1 = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.OSM() source: new ol.source.OSM()
})
],
renderer: 'dom',
target: 'domMap',
view: new ol.View({
center: [0, 0],
zoom: 1
})
}); });
var map2 = new ol.Map({ var view = new ol.View({
center: [0, 0],
zoom: 1
});
var map1 = new ol.Map({
target: 'canvasMap', target: 'canvasMap',
layers: map1.getLayers(), layers: [layer],
view: map1.getView() view: view
}); });
if (ol.has.WEBGL) { if (ol.has.WEBGL) {
var map3 = new ol.Map({ var map2 = new ol.Map({
renderer: 'webgl',
target: 'webglMap', target: 'webglMap',
layers: map1.getLayers(), renderer: /** @type {ol.renderer.Type} */ ('webgl'),
view: map1.getView() layers: [layer],
view: view
}); });
} else { } else {
var info = document.getElementById('no-webgl'); var info = document.getElementById('no-webgl');

View File

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

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