Compare commits
1085 Commits
v3.12.1
...
v3.16.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df6cd8e54d | ||
|
|
c4eb0ffcb5 | ||
|
|
a948d4b3ea | ||
|
|
2c1353f6e9 | ||
|
|
783721951a | ||
|
|
c5dcde4455 | ||
|
|
47cc4aac62 | ||
|
|
f86e7e5a71 | ||
|
|
9f501aeb0e | ||
|
|
8afae37c4c | ||
|
|
2bff721227 | ||
|
|
7a1756d8a9 | ||
|
|
412dc0457e | ||
|
|
693e91970e | ||
|
|
557a3aee04 | ||
|
|
7080c508a4 | ||
|
|
bc95ec053c | ||
|
|
443d252ec1 | ||
|
|
9a83339724 | ||
|
|
1a1d55d54e | ||
|
|
57e9e96e5f | ||
|
|
5949170df0 | ||
|
|
70dd26a412 | ||
|
|
21e8f69d97 | ||
|
|
9b9d006d75 | ||
|
|
350c4d525b | ||
|
|
1c03814860 | ||
|
|
532275e779 | ||
|
|
ef52a757b1 | ||
|
|
048865d975 | ||
|
|
fb402d120e | ||
|
|
5a5ad7ce31 | ||
|
|
476191b0d0 | ||
|
|
94b8c853a7 | ||
|
|
a810feb257 | ||
|
|
5c07628044 | ||
|
|
4c82b3403c | ||
|
|
cce7b148bb | ||
|
|
176ddd3403 | ||
|
|
4626554a18 | ||
|
|
9523fb6edd | ||
|
|
31d0278dfb | ||
|
|
e74434299e | ||
|
|
3fc70bac00 | ||
|
|
0d2b833e06 | ||
|
|
19692ed60a | ||
|
|
0daa2cf574 | ||
|
|
dd358af0f2 | ||
|
|
ab9ff536f5 | ||
|
|
c7aeebed8c | ||
|
|
a1c86ed560 | ||
|
|
4f0b4dacbd | ||
|
|
ed34caa25a | ||
|
|
535e8f5e35 | ||
|
|
d0e5b1e395 | ||
|
|
49e2fd0df3 | ||
|
|
d59ace1a61 | ||
|
|
d6395a3c82 | ||
|
|
d27ea0974e | ||
|
|
b49546d2af | ||
|
|
8c8c4c3df4 | ||
|
|
fa067b7e8a | ||
|
|
c4387c14ff | ||
|
|
afcaa2ea51 | ||
|
|
e55dc30257 | ||
|
|
cb50e4a102 | ||
|
|
7d805393fc | ||
|
|
684d49cb78 | ||
|
|
2a44669e18 | ||
|
|
39087b2fa4 | ||
|
|
5c76cb01af | ||
|
|
f57065c412 | ||
|
|
e94939d01b | ||
|
|
56a365acf4 | ||
|
|
fbb9194923 | ||
|
|
ffe8daec66 | ||
|
|
7984cc2b57 | ||
|
|
7944144c65 | ||
|
|
ae46b40def | ||
|
|
ed421ce4b2 | ||
|
|
51397ee294 | ||
|
|
d316651c35 | ||
|
|
ff37fe128f | ||
|
|
72468f3470 | ||
|
|
b2c6bb11cf | ||
|
|
088c439c34 | ||
|
|
0b4ef31750 | ||
|
|
f3cc873d65 | ||
|
|
b1648c949e | ||
|
|
18520cd89d | ||
|
|
e2b2004aa4 | ||
|
|
a6a0c88641 | ||
|
|
54e1e3408b | ||
|
|
9ea297c54f | ||
|
|
5044c49ac3 | ||
|
|
f835d86333 | ||
|
|
7c15280e81 | ||
|
|
9f3c951c71 | ||
|
|
6abecb0192 | ||
|
|
4e17f58b26 | ||
|
|
15b6921bc9 | ||
|
|
c7898bcb0e | ||
|
|
c28fd2ae1c | ||
|
|
690ef18ee2 | ||
|
|
cd2ea6c7d6 | ||
|
|
36b8f31f40 | ||
|
|
0151d802d3 | ||
|
|
a54c686691 | ||
|
|
ebc28aefd4 | ||
|
|
d49bcdeedc | ||
|
|
2939ebc9b9 | ||
|
|
c17e23f2ae | ||
|
|
73a04c14f5 | ||
|
|
88d20a69ad | ||
|
|
138fe6ede1 | ||
|
|
12849a678e | ||
|
|
c72a39ff53 | ||
|
|
ec832243a2 | ||
|
|
c5f81a5706 | ||
|
|
664507b79b | ||
|
|
c3217e8d30 | ||
|
|
e3e0d23a83 | ||
|
|
6002d4c3e8 | ||
|
|
63ebed437b | ||
|
|
762aa3029c | ||
|
|
1ca28506ac | ||
|
|
c11e95099c | ||
|
|
3a1ff59cfb | ||
|
|
9186d1fbda | ||
|
|
2f72804fc3 | ||
|
|
af294bd44e | ||
|
|
ed6ac93222 | ||
|
|
8f96251618 | ||
|
|
343f41e99e | ||
|
|
255e449dd3 | ||
|
|
b37cd3fae6 | ||
|
|
d425f75bea | ||
|
|
989c04cf12 | ||
|
|
e85d8fa749 | ||
|
|
394ef94fd3 | ||
|
|
5934f9d416 | ||
|
|
ead6063170 | ||
|
|
c7af6bd494 | ||
|
|
2076ef02ca | ||
|
|
130b4d9459 | ||
|
|
60926626df | ||
|
|
405ed2af56 | ||
|
|
44f09497f0 | ||
|
|
c40993d0d3 | ||
|
|
18a29ea6d3 | ||
|
|
f7147960a9 | ||
|
|
0e4692e69e | ||
|
|
3de5a021a9 | ||
|
|
b7278f184c | ||
|
|
e46c8370d5 | ||
|
|
dca7d6fc8f | ||
|
|
db9dbc96b2 | ||
|
|
2496662070 | ||
|
|
8e3e47bed4 | ||
|
|
92c96b95f9 | ||
|
|
8e1ffbf91e | ||
|
|
8562c9a4fc | ||
|
|
400204357f | ||
|
|
e6e9b12bac | ||
|
|
a2c3dfd5de | ||
|
|
72e354dce3 | ||
|
|
f92a38b28c | ||
|
|
c15f8c8f07 | ||
|
|
de4e51efe8 | ||
|
|
d4ac5800d5 | ||
|
|
9507020218 | ||
|
|
ccfc3f7798 | ||
|
|
593132c902 | ||
|
|
6a6a906e83 | ||
|
|
ed4ac8d83b | ||
|
|
35f0928802 | ||
|
|
044f6638ea | ||
|
|
936d38ca6f | ||
|
|
737daaeea9 | ||
|
|
01a6612ab3 | ||
|
|
05ceaab620 | ||
|
|
f9fd73c44e | ||
|
|
27f20e2f54 | ||
|
|
50b956b108 | ||
|
|
33db3d4941 | ||
|
|
06ac1b603c | ||
|
|
fb96ed94ec | ||
|
|
664efa18fc | ||
|
|
2a64d9ef55 | ||
|
|
1ecd47aeb9 | ||
|
|
bb5b461192 | ||
|
|
9fb4a88841 | ||
|
|
231234f9d0 | ||
|
|
c92223d792 | ||
|
|
cd6494149b | ||
|
|
6efd3dab0b | ||
|
|
935eb9994c | ||
|
|
cd32875f37 | ||
|
|
6fc4427f4f | ||
|
|
481bcbd5b3 | ||
|
|
880d4b89a2 | ||
|
|
fe33910ec2 | ||
|
|
c9ffcef766 | ||
|
|
8c9ac5932f | ||
|
|
6be704af69 | ||
|
|
c549fadc01 | ||
|
|
e099dcd9a9 | ||
|
|
53a9341ef0 | ||
|
|
18e9ff98ee | ||
|
|
f011b5266e | ||
|
|
d275b1cf74 | ||
|
|
b691c47e78 | ||
|
|
f2c30cffe2 | ||
|
|
f645d81fee | ||
|
|
38718ee5e6 | ||
|
|
fc6b078642 | ||
|
|
587e8a6ecd | ||
|
|
db9c6a99c8 | ||
|
|
5302882fba | ||
|
|
60fb3b55ff | ||
|
|
f20e446689 | ||
|
|
e36ffca838 | ||
|
|
4b832708e5 | ||
|
|
a7f61e6dda | ||
|
|
825d525d3f | ||
|
|
a42d76d69d | ||
|
|
02d262e387 | ||
|
|
fe372847f8 | ||
|
|
9a57c8745e | ||
|
|
84401c132f | ||
|
|
2ee1969de7 | ||
|
|
19fd3d6987 | ||
|
|
4b14c86fd1 | ||
|
|
c535cf04e2 | ||
|
|
80e984a9c3 | ||
|
|
1cd7b76efe | ||
|
|
fb4992b580 | ||
|
|
4141572725 | ||
|
|
02f4f8b1d5 | ||
|
|
0dc7313afb | ||
|
|
3ba2d71784 | ||
|
|
3416991166 | ||
|
|
106657572d | ||
|
|
c9aff61110 | ||
|
|
e222409f50 | ||
|
|
b96de85044 | ||
|
|
3f0de09dd7 | ||
|
|
13a0eb4ca7 | ||
|
|
fb6353a816 | ||
|
|
24665747b3 | ||
|
|
c2749bbdd1 | ||
|
|
4077886165 | ||
|
|
44e04be67f | ||
|
|
baf5287ad2 | ||
|
|
548e4abd35 | ||
|
|
cc9d4d8794 | ||
|
|
ee53fd772d | ||
|
|
18f3d7243d | ||
|
|
dfc1bb7592 | ||
|
|
5a00289e8e | ||
|
|
d3de8c38b5 | ||
|
|
627632ce1b | ||
|
|
c3447873b6 | ||
|
|
03d78cdd1c | ||
|
|
19b0c65e4c | ||
|
|
4d26305564 | ||
|
|
863589e5ed | ||
|
|
68fd5267c2 | ||
|
|
126e49cd39 | ||
|
|
b9073013db | ||
|
|
8f8068b88c | ||
|
|
85f11b093d | ||
|
|
4a33db370b | ||
|
|
2fd6352a57 | ||
|
|
94998c8ec7 | ||
|
|
8389c16315 | ||
|
|
cf9e24feb1 | ||
|
|
f4b4e26f19 | ||
|
|
e5012856a1 | ||
|
|
927d73d410 | ||
|
|
f29bc74b7f | ||
|
|
03038b123f | ||
|
|
bc1b9b9677 | ||
|
|
0bb3f1e228 | ||
|
|
8ef230768b | ||
|
|
64654e1e72 | ||
|
|
ae905593b3 | ||
|
|
09370952fd | ||
|
|
9425088610 | ||
|
|
94f83b53df | ||
|
|
b3796aa3a1 | ||
|
|
5276fd0580 | ||
|
|
2f67fca2a6 | ||
|
|
690152a07b | ||
|
|
feabf58740 | ||
|
|
8bf208558d | ||
|
|
d9d46bc1f7 | ||
|
|
f835364822 | ||
|
|
c0de5a6835 | ||
|
|
a18bf636f8 | ||
|
|
2159a35bb8 | ||
|
|
f9a16898a5 | ||
|
|
35ac1c4577 | ||
|
|
26ed4c33a3 | ||
|
|
3e5e271331 | ||
|
|
e752a8cea3 | ||
|
|
290f8b5c7d | ||
|
|
c9cb9b6d36 | ||
|
|
ce61fb300c | ||
|
|
92ef1724d1 | ||
|
|
fe5219eb84 | ||
|
|
e9cf0bbf6e | ||
|
|
051ed439ca | ||
|
|
e126df11e7 | ||
|
|
e742181fe9 | ||
|
|
399d8ce326 | ||
|
|
9fc2f5c19f | ||
|
|
0554c7f685 | ||
|
|
587817af94 | ||
|
|
a2a3ca84e2 | ||
|
|
1634aaa9dd | ||
|
|
f35887d6e7 | ||
|
|
14bed81994 | ||
|
|
e00149562a | ||
|
|
0f86b1df69 | ||
|
|
5001f0896e | ||
|
|
579ce6c5ad | ||
|
|
4e3d6bd556 | ||
|
|
caf3e4b062 | ||
|
|
cf6baf2cd1 | ||
|
|
e65c522cb4 | ||
|
|
1e8f0026eb | ||
|
|
bd47db8a55 | ||
|
|
d41bfde25d | ||
|
|
7990bb3bf6 | ||
|
|
c6f568f99b | ||
|
|
f380f34468 | ||
|
|
d8f7aa193c | ||
|
|
d7ad543c12 | ||
|
|
8437f95c86 | ||
|
|
01d2b84ee1 | ||
|
|
cd70f58e34 | ||
|
|
234e8c2fde | ||
|
|
22d03cb2ee | ||
|
|
309843b53d | ||
|
|
f0cca94456 | ||
|
|
a421b4fb65 | ||
|
|
ed71cf74f6 | ||
|
|
0eb7e8220d | ||
|
|
f0814628b7 | ||
|
|
ec2daf2118 | ||
|
|
ef0487c3ab | ||
|
|
42c2dd8702 | ||
|
|
42f41e1cf4 | ||
|
|
05cf57dcfc | ||
|
|
51dfe89425 | ||
|
|
1339d6b3a6 | ||
|
|
d0b2016bb6 | ||
|
|
f77c7dded2 | ||
|
|
88f8515fb6 | ||
|
|
2133d6d081 | ||
|
|
ef40f66c93 | ||
|
|
cf0c4dcf3f | ||
|
|
873e4176c6 | ||
|
|
8f0f278832 | ||
|
|
109bda60d0 | ||
|
|
3492628dc4 | ||
|
|
19cfc140a8 | ||
|
|
577e45cd97 | ||
|
|
658a2b317e | ||
|
|
9c573a5b3c | ||
|
|
908d4051cd | ||
|
|
a81150508d | ||
|
|
8f9a8e9bb1 | ||
|
|
5ba64024ab | ||
|
|
f4bb232279 | ||
|
|
242a0937a3 | ||
|
|
a857a66a98 | ||
|
|
def755f1eb | ||
|
|
6f2747cf14 | ||
|
|
0181e525ce | ||
|
|
5da0fe3300 | ||
|
|
2f079ad059 | ||
|
|
9ba4208616 | ||
|
|
4b5bb42961 | ||
|
|
24886f2710 | ||
|
|
c30ecace75 | ||
|
|
b0984070db | ||
|
|
1c57686d1f | ||
|
|
0d24be6767 | ||
|
|
074eff1efd | ||
|
|
648011c64d | ||
|
|
37899a3feb | ||
|
|
d46407f7b6 | ||
|
|
7b1e92580d | ||
|
|
88701db4c4 | ||
|
|
339c7c5c23 | ||
|
|
08b19549ce | ||
|
|
f58b7cf347 | ||
|
|
3186a411b2 | ||
|
|
10fa741476 | ||
|
|
44d0578389 | ||
|
|
0a3b7e56a9 | ||
|
|
9db16bfa94 | ||
|
|
c0b27bca8f | ||
|
|
93abfc9a03 | ||
|
|
8eb3e55aa0 | ||
|
|
a2175afcad | ||
|
|
67e511765a | ||
|
|
5b21ab8811 | ||
|
|
a3cc322593 | ||
|
|
600c139a61 | ||
|
|
6c191d0fef | ||
|
|
9365fbdb7e | ||
|
|
9cc628939a | ||
|
|
410dddaa46 | ||
|
|
7230b83cbd | ||
|
|
194c47d962 | ||
|
|
da40527077 | ||
|
|
c1263af9b1 | ||
|
|
3197972e14 | ||
|
|
5b43e8a31e | ||
|
|
df4f1c1389 | ||
|
|
74006a91fe | ||
|
|
fdee0d73de | ||
|
|
3164dc874e | ||
|
|
7c5e1b808d | ||
|
|
fb6cd4f586 | ||
|
|
166dd98b72 | ||
|
|
fedf477f29 | ||
|
|
bf30e86b84 | ||
|
|
6062128b4b | ||
|
|
cda6d678dc | ||
|
|
0dd36736c7 | ||
|
|
6e45eef2a0 | ||
|
|
a118eeded9 | ||
|
|
ef2121bb70 | ||
|
|
8a6962da9e | ||
|
|
02aee14600 | ||
|
|
4157882f2e | ||
|
|
441a7c093f | ||
|
|
cb251f1648 | ||
|
|
0b3155a47e | ||
|
|
249f3b2e47 | ||
|
|
40397aa39e | ||
|
|
47a18d41f0 | ||
|
|
9ea9b29a69 | ||
|
|
8b1ad633be | ||
|
|
7cf433eb68 | ||
|
|
091e8059c5 | ||
|
|
fd256027ec | ||
|
|
d5564a04db | ||
|
|
0377e4a322 | ||
|
|
6c74e90c5d | ||
|
|
2564bb3e58 | ||
|
|
8a279dd94b | ||
|
|
acd76a10b6 | ||
|
|
b5dc619e0e | ||
|
|
93f26a90d0 | ||
|
|
8c487d3036 | ||
|
|
951b400227 | ||
|
|
f3479a4bc4 | ||
|
|
26078e1f34 | ||
|
|
1cbb482900 | ||
|
|
a3d7a216d5 | ||
|
|
263f5bb8ab | ||
|
|
44de935ef0 | ||
|
|
8b95602211 | ||
|
|
dc2faea5eb | ||
|
|
2113c749b1 | ||
|
|
7fe1d1d68c | ||
|
|
bfb73c992e | ||
|
|
f1fee79ca4 | ||
|
|
4a73335839 | ||
|
|
124badb961 | ||
|
|
8725b4fcf4 | ||
|
|
d12dce1c03 | ||
|
|
afb8efc0e9 | ||
|
|
bef31dc386 | ||
|
|
e8cd5e322f | ||
|
|
82020bcd1f | ||
|
|
258765dc48 | ||
|
|
787e5d4dbf | ||
|
|
3793bb18ae | ||
|
|
167ee487d6 | ||
|
|
beb80ce987 | ||
|
|
0ab9dd8bd0 | ||
|
|
9ba059a159 | ||
|
|
7da7cba812 | ||
|
|
b09f7e30b2 | ||
|
|
57f7811cd0 | ||
|
|
90b4eea1cd | ||
|
|
544de3b91c | ||
|
|
811eea0d3a | ||
|
|
e210328dba | ||
|
|
1e98f1227b | ||
|
|
b87a912ecc | ||
|
|
750a01aa80 | ||
|
|
143af1e091 | ||
|
|
e1f0e8d75b | ||
|
|
2f9d4e68eb | ||
|
|
4eb6997be9 | ||
|
|
afb64ed2bf | ||
|
|
71faef3dfd | ||
|
|
09eee46822 | ||
|
|
ae4d8195c0 | ||
|
|
df4f154a93 | ||
|
|
34d8d77344 | ||
|
|
c9852250e4 | ||
|
|
1877910b7e | ||
|
|
9c594bc997 | ||
|
|
1925e39b69 | ||
|
|
0c8bec2126 | ||
|
|
8b2259bf25 | ||
|
|
8ba04ac77a | ||
|
|
f6f22b155c | ||
|
|
2cb48d3d62 | ||
|
|
e3b88b8785 | ||
|
|
efdc892219 | ||
|
|
5aa175241a | ||
|
|
bc01fdb59a | ||
|
|
66f23c1aed | ||
|
|
4cebe3d92b | ||
|
|
ad0a13ebb2 | ||
|
|
e8e5dc6332 | ||
|
|
f271fdb993 | ||
|
|
fbbbcf5cdb | ||
|
|
9fe2970fb3 | ||
|
|
b4c4a81afb | ||
|
|
7478e82b9a | ||
|
|
4b586df2b5 | ||
|
|
ed62203527 | ||
|
|
fbb3ffc9e5 | ||
|
|
9819aa38f5 | ||
|
|
58d8b290af | ||
|
|
16f63a7e0c | ||
|
|
23172a3695 | ||
|
|
8553da6679 | ||
|
|
8256ff60b6 | ||
|
|
d5fb6dda49 | ||
|
|
e9a5fadacc | ||
|
|
8465875b24 | ||
|
|
41c12bcea9 | ||
|
|
cf23d0541c | ||
|
|
aaf03a8fc2 | ||
|
|
5b38eaa116 | ||
|
|
9b8ab88e41 | ||
|
|
3194d0ebd4 | ||
|
|
2a1bc70b97 | ||
|
|
2427d0e684 | ||
|
|
941f220f3d | ||
|
|
50aad8f42d | ||
|
|
24069fa7bf | ||
|
|
0e5dfec3bf | ||
|
|
7b6820a012 | ||
|
|
a172e04d5b | ||
|
|
750830b887 | ||
|
|
a51e7804b8 | ||
|
|
94debcfc3a | ||
|
|
c5d3dfd41c | ||
|
|
7491b90c30 | ||
|
|
e3f25ee71f | ||
|
|
588dd54fb6 | ||
|
|
00a0f14743 | ||
|
|
ef42267cfe | ||
|
|
0407e779f9 | ||
|
|
78d6d5ab1b | ||
|
|
fa180cfa13 | ||
|
|
d190d27534 | ||
|
|
916127d8f6 | ||
|
|
7583d8d434 | ||
|
|
b19aa01b72 | ||
|
|
148ef7afef | ||
|
|
5ad42f3b25 | ||
|
|
33bcd7194f | ||
|
|
edf2096b1b | ||
|
|
7fcf2650ee | ||
|
|
81e563b2b3 | ||
|
|
68088341d6 | ||
|
|
348f61951c | ||
|
|
48064306a1 | ||
|
|
373393dce7 | ||
|
|
bd5c85acc3 | ||
|
|
8a6afb3836 | ||
|
|
d8d7ae8e1b | ||
|
|
805b81cea7 | ||
|
|
514243a8e9 | ||
|
|
37113837d1 | ||
|
|
73d4c3565c | ||
|
|
cc30f5f3da | ||
|
|
8395bea72d | ||
|
|
ac17a2f2a7 | ||
|
|
a365f185cc | ||
|
|
7e7d8ac4e2 | ||
|
|
4e11a86b4e | ||
|
|
9f21f1dac4 | ||
|
|
d0f71bf64f | ||
|
|
950bb1810c | ||
|
|
81d0e9ea63 | ||
|
|
4b55175b7e | ||
|
|
cdf9eda132 | ||
|
|
7a953a166e | ||
|
|
f2d5d572ab | ||
|
|
02904cda8e | ||
|
|
24b7b27836 | ||
|
|
9da8cd890e | ||
|
|
eaab8e47ce | ||
|
|
b440872e60 | ||
|
|
247eb62e3b | ||
|
|
960c51f95d | ||
|
|
8e489304c1 | ||
|
|
2df40f4b88 | ||
|
|
c2d4bf113d | ||
|
|
806588edc6 | ||
|
|
ad6c731823 | ||
|
|
17749dbf96 | ||
|
|
a8c6baa188 | ||
|
|
ef63908539 | ||
|
|
d642fe6783 | ||
|
|
268d6eda8f | ||
|
|
84288cd8bb | ||
|
|
996e119b25 | ||
|
|
345763fcd3 | ||
|
|
f54a8ea432 | ||
|
|
5b21d61688 | ||
|
|
1f04495dc3 | ||
|
|
8373814243 | ||
|
|
d7c0aa4887 | ||
|
|
e6c2fa52f5 | ||
|
|
17b667d6e0 | ||
|
|
81750ea6b1 | ||
|
|
12b8624cdb | ||
|
|
a546e09b96 | ||
|
|
1e8bbb0ae4 | ||
|
|
6c7d6817bd | ||
|
|
8e72eb8652 | ||
|
|
308e37a48e | ||
|
|
82f6fb9e6d | ||
|
|
1d21f76ad3 | ||
|
|
59574da74c | ||
|
|
ccf47de448 | ||
|
|
84b418b5c6 | ||
|
|
7b8feaa48f | ||
|
|
612280c676 | ||
|
|
35579ab714 | ||
|
|
83e251621a | ||
|
|
6e7b130a45 | ||
|
|
69aa277848 | ||
|
|
a9675576d3 | ||
|
|
38e43e018c | ||
|
|
7cc43d36ef | ||
|
|
9cb86df61c | ||
|
|
00fbb77c19 | ||
|
|
2d2ebe0e12 | ||
|
|
92da3629d7 | ||
|
|
7822f5ce5d | ||
|
|
f77480ec28 | ||
|
|
2d6ce527e2 | ||
|
|
9baa296a49 | ||
|
|
f36c02b0b8 | ||
|
|
5bc00d8535 | ||
|
|
9f0fefd42d | ||
|
|
068960e4b2 | ||
|
|
6276bbce38 | ||
|
|
5e4e9100e4 | ||
|
|
c836f97ec3 | ||
|
|
e8ed9c7e49 | ||
|
|
bcf379cc8e | ||
|
|
7e6115a763 | ||
|
|
a5e463464a | ||
|
|
126e065d77 | ||
|
|
1902d597ef | ||
|
|
03761642ed | ||
|
|
44c6972f31 | ||
|
|
55d56d65bc | ||
|
|
7f02b63ccc | ||
|
|
25f5776d8e | ||
|
|
952b99742e | ||
|
|
a109062b1f | ||
|
|
aa508acde4 | ||
|
|
296ec9799f | ||
|
|
34392b464c | ||
|
|
7431990f70 | ||
|
|
e7c57ada95 | ||
|
|
7003920163 | ||
|
|
332d6e9d5c | ||
|
|
95fd0e177f | ||
|
|
cf083e4f42 | ||
|
|
2f3c25cb95 | ||
|
|
df977d50b6 | ||
|
|
ff07f3a385 | ||
|
|
0303604c37 | ||
|
|
27f1fb6fc6 | ||
|
|
cd2dfc7f10 | ||
|
|
09517659b1 | ||
|
|
c27b1e4e3b | ||
|
|
58416b9883 | ||
|
|
0432c863c7 | ||
|
|
2336bbf5ef | ||
|
|
160294e05d | ||
|
|
a11ab03b99 | ||
|
|
9dbf9541e9 | ||
|
|
27908edea1 | ||
|
|
d15992bfc2 | ||
|
|
f1fdfb7971 | ||
|
|
726e5613b3 | ||
|
|
48ff0b90d3 | ||
|
|
98b823c5fc | ||
|
|
557372203f | ||
|
|
6fbe160159 | ||
|
|
d7e275a309 | ||
|
|
0704453aff | ||
|
|
3e9683d88d | ||
|
|
4722d341af | ||
|
|
b53d74285b | ||
|
|
6c1d0f1bbe | ||
|
|
cf5006617c | ||
|
|
adb5b78cb6 | ||
|
|
6779ab5e29 | ||
|
|
a513754d25 | ||
|
|
9703be932d | ||
|
|
0493f3f5f8 | ||
|
|
a664dbb507 | ||
|
|
f3a3d34f71 | ||
|
|
b584a9aeb5 | ||
|
|
c621f8606b | ||
|
|
f7e20377ec | ||
|
|
b46cc5a241 | ||
|
|
a924908f12 | ||
|
|
2035bec7ad | ||
|
|
42100e0ab1 | ||
|
|
00583e9b39 | ||
|
|
efa82dccf9 | ||
|
|
057633c2c4 | ||
|
|
d0eb6322c3 | ||
|
|
3f36e0967f | ||
|
|
a44e71aad1 | ||
|
|
57c5632de2 | ||
|
|
8c6883db34 | ||
|
|
ca5eaddfa0 | ||
|
|
0c23d9a7ff | ||
|
|
72ea0ecfd8 | ||
|
|
d67f33bcd6 | ||
|
|
e2fe897811 | ||
|
|
417dbf36c8 | ||
|
|
fd394151fd | ||
|
|
f38d8bf824 | ||
|
|
8b9c393820 | ||
|
|
8aecb3270c | ||
|
|
0dce343d4f | ||
|
|
1a9367228d | ||
|
|
554887ae14 | ||
|
|
3c0ef430db | ||
|
|
a74af66d5f | ||
|
|
619e070d80 | ||
|
|
3a4b504a5d | ||
|
|
17a2466894 | ||
|
|
a2171124e1 | ||
|
|
49b210973e | ||
|
|
aedbf45c8c | ||
|
|
c43de104ce | ||
|
|
ff1f44773a | ||
|
|
8444d066f5 | ||
|
|
f73dbc513b | ||
|
|
edb4f233b0 | ||
|
|
a910ab626a | ||
|
|
04db1c3e4d | ||
|
|
b9b4778d05 | ||
|
|
46fc1c2a1b | ||
|
|
289e571fb0 | ||
|
|
473cbba26e | ||
|
|
a29e7027ca | ||
|
|
00116b7c74 | ||
|
|
a848321842 | ||
|
|
42df157a04 | ||
|
|
af1f2bdda8 | ||
|
|
7a8d15fe47 | ||
|
|
f3b97d6bef | ||
|
|
f10c90bdba | ||
|
|
78f44dcc8a | ||
|
|
e48ab95735 | ||
|
|
c62e76ab67 | ||
|
|
80df1f5ae8 | ||
|
|
dc0393acff | ||
|
|
73f5e11039 | ||
|
|
ac1d7572e4 | ||
|
|
ec6f2e575b | ||
|
|
8b171d3ca6 | ||
|
|
136c8af878 | ||
|
|
8d0ef13505 | ||
|
|
cf4556f115 | ||
|
|
5ba8b13ccf | ||
|
|
c51d717657 | ||
|
|
d7497f9686 | ||
|
|
f35d0106b8 | ||
|
|
2b451e7893 | ||
|
|
7e27ba1d42 | ||
|
|
6ac3f30c8f | ||
|
|
1a6daa297e | ||
|
|
0f216659f9 | ||
|
|
3f2d79b7fe | ||
|
|
d87482e415 | ||
|
|
9f2e2cd1e8 | ||
|
|
cf7d30d41c | ||
|
|
e5428a0738 | ||
|
|
ebc98ec1bb | ||
|
|
1771df0109 | ||
|
|
6586c7f007 | ||
|
|
665fdbdc2b | ||
|
|
57f4d8cefb | ||
|
|
31e1fbaf40 | ||
|
|
434349cb55 | ||
|
|
4b17721a33 | ||
|
|
2fb33ba940 | ||
|
|
d81af7594c | ||
|
|
e08a88b76c | ||
|
|
ef0e95847f | ||
|
|
9bcf624382 | ||
|
|
5bd3fb494c | ||
|
|
ab793a58b6 | ||
|
|
9b492f49c7 | ||
|
|
d820b54443 | ||
|
|
640c59d9af | ||
|
|
d743ada8fd | ||
|
|
d1b6a17773 | ||
|
|
1089934486 | ||
|
|
0d5168ca0b | ||
|
|
39ead1bb49 | ||
|
|
29a644d48c | ||
|
|
3264d9a6ea | ||
|
|
21b740ccf9 | ||
|
|
6c2302f6d3 | ||
|
|
a1fbe2428f | ||
|
|
7b202c4112 | ||
|
|
44e17c440d | ||
|
|
d8330d56a0 | ||
|
|
c989de3175 | ||
|
|
39b9ba87fc | ||
|
|
b6fa480c97 | ||
|
|
ecb2a42900 | ||
|
|
dad92e723c | ||
|
|
ae74ff1db7 | ||
|
|
0a51e4ac32 | ||
|
|
80f6fb5802 | ||
|
|
9cda669b3b | ||
|
|
8b64e9b3ea | ||
|
|
950ce4c88e | ||
|
|
f67a52d9ef | ||
|
|
6f525bfd2e | ||
|
|
552d77f041 | ||
|
|
474fd8d47e | ||
|
|
5e6b4e55c5 | ||
|
|
10c6d86d13 | ||
|
|
49a5c832ea | ||
|
|
415ac07a60 | ||
|
|
aff41cfcc0 | ||
|
|
aca849ffb1 | ||
|
|
a9cbea1563 | ||
|
|
2b523fff7c | ||
|
|
e53d8226db | ||
|
|
9562756eeb | ||
|
|
a05c932973 | ||
|
|
398a292053 | ||
|
|
551a2edf4b | ||
|
|
9bf2242626 | ||
|
|
be3e985344 | ||
|
|
58abb9b165 | ||
|
|
98da9f1800 | ||
|
|
44764ec1d1 | ||
|
|
f4582d2f46 | ||
|
|
e674255ebe | ||
|
|
7b78c215ae | ||
|
|
52c6739b95 | ||
|
|
6290fb3227 | ||
|
|
ebcccd2cf7 | ||
|
|
73b6adba49 | ||
|
|
d8631c35eb | ||
|
|
4c2b17a42e | ||
|
|
483376deb2 | ||
|
|
d091f3f835 | ||
|
|
299a62804c | ||
|
|
98338565d0 | ||
|
|
682e65fead | ||
|
|
b7cbd20b6f | ||
|
|
0b70124cdd | ||
|
|
906a132e89 | ||
|
|
b9c3981261 | ||
|
|
9132d91f66 | ||
|
|
f2c1fd207e | ||
|
|
d32d6e6851 | ||
|
|
f0e396678c | ||
|
|
7787bc2c07 | ||
|
|
aec4e468e3 | ||
|
|
7d168cb6e2 | ||
|
|
d2cc04d770 | ||
|
|
ccdb189e77 | ||
|
|
b5e7a2673d | ||
|
|
e782e1262c | ||
|
|
2975b92fea | ||
|
|
031c31d367 | ||
|
|
30d8d6efd7 | ||
|
|
268298d2d8 | ||
|
|
10837fb91a | ||
|
|
7277e295e6 | ||
|
|
85ead5486c | ||
|
|
b134b080db | ||
|
|
eb395894e1 | ||
|
|
86c7f950d6 | ||
|
|
4b441dc503 | ||
|
|
1ad3d4e764 | ||
|
|
f0b0e00b06 | ||
|
|
4dbc4c5bfd | ||
|
|
d8296e5dac | ||
|
|
2d151fb353 | ||
|
|
341ba5b859 | ||
|
|
308565f8f4 | ||
|
|
5b98066d16 | ||
|
|
93ed1ee50a | ||
|
|
5961431505 | ||
|
|
d6a8c9465e | ||
|
|
dc820fced4 | ||
|
|
db3ad70a3d | ||
|
|
5b40190cbe | ||
|
|
69ad741dd4 | ||
|
|
ffb9674243 | ||
|
|
22dab733f0 | ||
|
|
ace3ac4f1d | ||
|
|
3a368809fb | ||
|
|
50daa17c2a | ||
|
|
cd308e47d2 | ||
|
|
5dfb4199ca | ||
|
|
83e173d91f | ||
|
|
fdc2f9d97e | ||
|
|
f725a46220 | ||
|
|
08e51d1c8e | ||
|
|
3f5a8085b6 | ||
|
|
4ef1f5e63f | ||
|
|
936cd6a028 | ||
|
|
3df9ae8c5e | ||
|
|
63b17022f6 | ||
|
|
d2ecb1e819 | ||
|
|
1757fa973b | ||
|
|
dccf867308 | ||
|
|
3607cddcca | ||
|
|
c9e2b384e7 | ||
|
|
11bd31c15b | ||
|
|
2c3ed38714 | ||
|
|
5504916b80 | ||
|
|
fd77ab64ad | ||
|
|
13a981c94b | ||
|
|
8d80924ba8 | ||
|
|
0a5d15db50 | ||
|
|
8f0ecc4df2 | ||
|
|
534124ec2f | ||
|
|
8c38d22b60 | ||
|
|
0555bb081a | ||
|
|
3cf8618fc7 | ||
|
|
59a66c7aaa | ||
|
|
e6f6dcc230 | ||
|
|
b1d00af58b | ||
|
|
fd0e2436da | ||
|
|
932bf4deb3 | ||
|
|
54df314936 | ||
|
|
ec10b661f3 | ||
|
|
29a723166d | ||
|
|
4e0cddcb41 | ||
|
|
cca86886f1 | ||
|
|
3602a37c96 | ||
|
|
f627f7679b | ||
|
|
154b8babc4 | ||
|
|
3f23dfb87b | ||
|
|
aac1d921c7 | ||
|
|
179b241aec | ||
|
|
f0fc4d4e73 | ||
|
|
9ae748408a | ||
|
|
8ab5a338b5 | ||
|
|
227c984d89 | ||
|
|
abd0d66e66 | ||
|
|
23eebf396c | ||
|
|
98dedfd2ff | ||
|
|
681948e71c | ||
|
|
b3578325cb | ||
|
|
b0a70b0ca6 | ||
|
|
38d0e98ff5 | ||
|
|
23f3e21ba4 | ||
|
|
1d65bab158 | ||
|
|
80f9a7c5a5 | ||
|
|
c2f90f21db | ||
|
|
a3147c5d08 | ||
|
|
7222af3284 | ||
|
|
d916e8ccaf | ||
|
|
5001272a2e | ||
|
|
d05b519f2f | ||
|
|
0f8373dd2d | ||
|
|
dfb534f1d4 | ||
|
|
7a644730a5 | ||
|
|
4066d38e4a | ||
|
|
393a95e41c | ||
|
|
7a8451adeb | ||
|
|
b8fc917016 | ||
|
|
6b8da1237c | ||
|
|
5c49e399ce | ||
|
|
32dadc008b | ||
|
|
aff6449c74 | ||
|
|
2237dc8e72 | ||
|
|
a4b34c16d7 | ||
|
|
e336947e8d | ||
|
|
bc0d783f50 | ||
|
|
4ba443e829 | ||
|
|
3d8adaab67 | ||
|
|
24f8cba0a1 | ||
|
|
607d8ad154 | ||
|
|
cde6dce939 | ||
|
|
1caaf6d75f | ||
|
|
1300cde76c | ||
|
|
310023e179 | ||
|
|
8c6d9c9e66 | ||
|
|
bd6566f85b | ||
|
|
b8d69e0f3b | ||
|
|
10e2510f0f | ||
|
|
15be53e98c | ||
|
|
ce3030268b | ||
|
|
aeffd48ccb | ||
|
|
2f1975636a | ||
|
|
b7be16eac7 | ||
|
|
d55afd57b5 | ||
|
|
22b1460595 | ||
|
|
efc601a76d | ||
|
|
ffd9ace84e | ||
|
|
251cddfa96 | ||
|
|
d9b89a8ebe | ||
|
|
a1c72d8890 | ||
|
|
9fe3d8b2e2 | ||
|
|
52667c1166 | ||
|
|
de1f18417a | ||
|
|
acd8b3ddc1 | ||
|
|
a65d2d4078 | ||
|
|
9f43716723 | ||
|
|
d6235e714e | ||
|
|
cdf9a8e84d | ||
|
|
437412362e | ||
|
|
7a364e0593 | ||
|
|
65b90df4b8 | ||
|
|
38fd9f2685 | ||
|
|
de3e3d74ce | ||
|
|
becaf20ee9 | ||
|
|
3f16b340fc | ||
|
|
5c70d37da6 | ||
|
|
c0b6eac0c2 | ||
|
|
a34c0e262b | ||
|
|
31a1aae02e | ||
|
|
b208550e6e | ||
|
|
cd1304aaae | ||
|
|
767ac44e99 | ||
|
|
28240adaf5 | ||
|
|
9cdf7678bb | ||
|
|
300b5cad44 | ||
|
|
72ec3fd48d | ||
|
|
e1712eb44a | ||
|
|
552063aeac | ||
|
|
dad58ba622 | ||
|
|
bbc49ca805 | ||
|
|
38bb1569af | ||
|
|
e07c0ec829 | ||
|
|
6dbb4e6737 | ||
|
|
20be8980e1 | ||
|
|
34139f4dce | ||
|
|
9affb99899 | ||
|
|
f395a0f8c5 | ||
|
|
80f10ce824 | ||
|
|
46a266fa5c | ||
|
|
4f2df30f1d | ||
|
|
c1b16217f2 | ||
|
|
34fb85a9d7 | ||
|
|
6bc6fd9cbc | ||
|
|
945f1e7580 | ||
|
|
ae90c32f01 | ||
|
|
25e0053a13 | ||
|
|
88255fd776 | ||
|
|
e0be143ed5 | ||
|
|
dd4e88525e | ||
|
|
195e802f7c | ||
|
|
0c3aed0083 | ||
|
|
004e7ad0d0 | ||
|
|
8b0bd11fc8 |
2
.eslintignore
Normal file
2
.eslintignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
examples/Jugl.js
|
||||||
|
examples/resources/
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
sudo: required
|
sudo: false
|
||||||
dist: trusty
|
|
||||||
|
|
||||||
language: node_js
|
language: node_js
|
||||||
|
|
||||||
node_js:
|
node_js:
|
||||||
- "4"
|
- "6"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
@@ -14,11 +13,11 @@ env:
|
|||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- "npm prune"
|
- "npm prune"
|
||||||
- "sudo pip install -r requirements.txt"
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- "rm src/ol/renderer/webgl/*shader.js"
|
- "rm src/ol/renderer/webgl/*shader.js"
|
||||||
- "sh -e /etc/init.d/xvfb start"
|
- "sh -e /etc/init.d/xvfb start"
|
||||||
|
- "npm ls"
|
||||||
|
|
||||||
script: "make ci"
|
script: "make ci"
|
||||||
|
|
||||||
|
|||||||
@@ -81,8 +81,7 @@ include:
|
|||||||
|
|
||||||
OpenLayers 3 follows [Google's JavaScript Style
|
OpenLayers 3 follows [Google's JavaScript Style
|
||||||
Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml).
|
Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml).
|
||||||
This is checked using the [Closure
|
This is checked using [ESLint](http://eslint.org/), you
|
||||||
Linter](https://developers.google.com/closure/utilities/) in strict mode. You
|
|
||||||
can run the linter locally on your machine before committing using the `lint`
|
can run the linter locally on your machine before committing using the `lint`
|
||||||
target:
|
target:
|
||||||
|
|
||||||
@@ -102,20 +101,6 @@ style of the existing OpenLayers 3 code, which includes:
|
|||||||
|
|
||||||
* Do not use assignments inside expressions.
|
* Do not use assignments inside expressions.
|
||||||
|
|
||||||
* Avoid the use of `goog.array.clone` with arrays (use slice instead).
|
|
||||||
|
|
||||||
* Use `array.length = 0` instead of `goog.array.clear`.
|
|
||||||
|
|
||||||
* Use `v !== undefined` instead of `goog.isDef(v)` and `v === null` instead of
|
|
||||||
`goog.isNull(v)`.
|
|
||||||
|
|
||||||
* Use ECMAScript 5.1 functions instead of the `goog` equivalents. For example,
|
|
||||||
use `Object.keys(obj)` instead of `goog.object.getKeys(obj)`, `arr.forEach(f)`
|
|
||||||
instead of `goog.array.forEach(arr, f)`, etc ...
|
|
||||||
|
|
||||||
* Use bracket notation instead of `goog.object.set` and `goog.object.get` (with
|
|
||||||
two arguments).
|
|
||||||
|
|
||||||
* Use uppercase for `@const` variables.
|
* Use uppercase for `@const` variables.
|
||||||
|
|
||||||
### Configure your editor
|
### Configure your editor
|
||||||
|
|||||||
@@ -11,25 +11,17 @@ The Travis CI hook is enabled on the Github repository. This means every pull re
|
|||||||
is run through a full test suite to ensure it compiles and passes the tests. Failing
|
is run through a full test suite to ensure it compiles and passes the tests. Failing
|
||||||
pull requests will not be merged.
|
pull requests will not be merged.
|
||||||
|
|
||||||
Although not mandatory, it is also recommended to set up Travis CI for your ol3 fork.
|
|
||||||
For that go to your ol3 fork's Service Hooks page and set up the Travis hook.
|
|
||||||
Then every time you push to your fork, the test suite will be run. This means
|
|
||||||
errors can be caught before creating a pull request. For those making
|
|
||||||
small or occasional contributions, this may be enough to check that your contributions
|
|
||||||
are ok; in this case, you do not need to install the build tools on your local environment
|
|
||||||
as described below.
|
|
||||||
|
|
||||||
### Development dependencies
|
### Development dependencies
|
||||||
|
|
||||||
The minimum requirements are:
|
The minimum requirements are:
|
||||||
|
|
||||||
* GNU Make
|
* GNU Make
|
||||||
* Git
|
* Git
|
||||||
* [Node.js](http://nodejs.org/) (0.10.x or higher)
|
* [Node.js](http://nodejs.org/) (higher than 0.12.x)
|
||||||
* Python 2.6 or 2.7 with a couple of extra modules (see below)
|
* Python 2.6 or 2.7
|
||||||
* Java 7 (JRE and JDK)
|
* Java 7 (JRE and JDK)
|
||||||
|
|
||||||
The executables `git`, `node`, `python` and `java` should be in your `PATH`.
|
The executables `git`, `node`, and `java` should be in your `PATH`.
|
||||||
|
|
||||||
You can check your configuration by running:
|
You can check your configuration by running:
|
||||||
|
|
||||||
@@ -39,17 +31,6 @@ To install the Node.js dependencies run
|
|||||||
|
|
||||||
$ npm install
|
$ npm install
|
||||||
|
|
||||||
To install the extra Python modules, run:
|
|
||||||
|
|
||||||
$ sudo pip install -r requirements.txt
|
|
||||||
or
|
|
||||||
|
|
||||||
$ cat requirements.txt | sudo xargs easy_install
|
|
||||||
|
|
||||||
depending on your OS and Python installation.
|
|
||||||
|
|
||||||
(You can also install the Python modules in a Python virtual environment if you want to.)
|
|
||||||
|
|
||||||
## Working with the build tool
|
## Working with the build tool
|
||||||
|
|
||||||
As an ol3 developer you will use `make` to run build targets defined in the
|
As an ol3 developer you will use `make` to run build targets defined in the
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2005-2015 OpenLayers Contributors. All rights reserved.
|
Copyright 2005-2016 OpenLayers Contributors. All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|||||||
39
Makefile
39
Makefile
@@ -93,8 +93,7 @@ compile-examples: build/compiled-examples/all.combined.js
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f build/timestamps/gjslint-timestamp
|
rm -f build/timestamps/eslint-timestamp
|
||||||
rm -f build/timestamps/jshint-timestamp
|
|
||||||
rm -f build/timestamps/check-*-timestamp
|
rm -f build/timestamps/check-*-timestamp
|
||||||
rm -f build/ol.css
|
rm -f build/ol.css
|
||||||
rm -f build/ol.js
|
rm -f build/ol.js
|
||||||
@@ -120,9 +119,7 @@ examples: $(BUILD_EXAMPLES)
|
|||||||
install: build/timestamps/node-modules-timestamp
|
install: build/timestamps/node-modules-timestamp
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: build/timestamps/gjslint-timestamp build/timestamps/jshint-timestamp \
|
lint: build/timestamps/eslint-timestamp
|
||||||
build/timestamps/check-requires-timestamp \
|
|
||||||
build/timestamps/check-whitespace-timestamp
|
|
||||||
|
|
||||||
.PHONY: npm-install
|
.PHONY: npm-install
|
||||||
npm-install: build/timestamps/node-modules-timestamp
|
npm-install: build/timestamps/node-modules-timestamp
|
||||||
@@ -183,21 +180,7 @@ build/timestamps/check-%-timestamp: $(BUILD_HOSTED)/examples/%.html \
|
|||||||
$(BUILD_HOSTED)/build/ol.js \
|
$(BUILD_HOSTED)/build/ol.js \
|
||||||
$(BUILD_HOSTED)/css/ol.css
|
$(BUILD_HOSTED)/css/ol.css
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
./node_modules/.bin/phantomjs --ssl-protocol=any --ignore-ssl-errors=true bin/check-example.js $(addsuffix ?mode=advanced, $<)
|
./node_modules/.bin/phantomjs --local-to-remote-url-access=true --ssl-protocol=any --ignore-ssl-errors=true bin/check-example.js $<
|
||||||
@touch $@
|
|
||||||
|
|
||||||
build/timestamps/check-requires-timestamp: $(SRC_JS) $(EXAMPLES_JS) \
|
|
||||||
$(SRC_SHADER_JS) $(SPEC_JS) \
|
|
||||||
$(SPEC_RENDERING_JS)
|
|
||||||
@mkdir -p $(@D)
|
|
||||||
@python bin/check-requires.py $(CLOSURE_LIB) $^
|
|
||||||
@touch $@
|
|
||||||
|
|
||||||
build/timestamps/check-whitespace-timestamp: $(SRC_JS) $(EXAMPLES_JS) \
|
|
||||||
$(SPEC_JS) $(SPEC_RENDERING_JS) \
|
|
||||||
$(SRC_JSDOC)
|
|
||||||
@mkdir -p $(@D)
|
|
||||||
@python bin/check-whitespace.py $^
|
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
build/compiled-examples/all.js: $(EXAMPLES_JS)
|
build/compiled-examples/all.js: $(EXAMPLES_JS)
|
||||||
@@ -228,14 +211,7 @@ build/timestamps/jsdoc-$(BRANCH)-timestamp: config/jsdoc/api/index.md \
|
|||||||
build/timestamps/node-modules-timestamp
|
build/timestamps/node-modules-timestamp
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
@rm -rf $(BUILD_HOSTED)/apidoc
|
@rm -rf $(BUILD_HOSTED)/apidoc
|
||||||
./node_modules/.bin/jsdoc config/jsdoc/api/index.md -c config/jsdoc/api/conf.json -d $(BUILD_HOSTED)/apidoc
|
./node_modules/.bin/jsdoc config/jsdoc/api/index.md -c config/jsdoc/api/conf.json --package package.json -d $(BUILD_HOSTED)/apidoc
|
||||||
@touch $@
|
|
||||||
|
|
||||||
build/timestamps/gjslint-timestamp: $(SRC_JS) $(SPEC_JS) $(SPEC_RENDERING_JS) \
|
|
||||||
$(EXAMPLES_JS)
|
|
||||||
@mkdir -p $(@D)
|
|
||||||
@echo "Running gjslint..."
|
|
||||||
@gjslint --jslint_error=all --custom_jsdoc_tags=event,fires,function,classdesc,api,observable --strict $?
|
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
$(BUILD_HOSTED_EXAMPLES_JS): $(BUILD_HOSTED)/examples/%.js: build/examples/%.js
|
$(BUILD_HOSTED_EXAMPLES_JS): $(BUILD_HOSTED)/examples/%.js: build/examples/%.js
|
||||||
@@ -271,13 +247,12 @@ $(BUILD_HOSTED)/build/ol-deps.js: host-libraries
|
|||||||
--root_with_prefix "$(BUILD_HOSTED)/closure-library/third_party ../../third_party" \
|
--root_with_prefix "$(BUILD_HOSTED)/closure-library/third_party ../../third_party" \
|
||||||
--output_file $@
|
--output_file $@
|
||||||
|
|
||||||
build/timestamps/jshint-timestamp: $(SRC_JS) $(SPEC_JS) $(SPEC_RENDERING_JS) \
|
build/timestamps/eslint-timestamp: $(SRC_JS) $(SPEC_JS) $(SPEC_RENDERING_JS) \
|
||||||
$(TASKS_JS) $(EXAMPLES_JS) \
|
$(TASKS_JS) $(EXAMPLES_JS) \
|
||||||
examples/resources/common.js \
|
|
||||||
build/timestamps/node-modules-timestamp
|
build/timestamps/node-modules-timestamp
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
@echo "Running jshint..."
|
@echo "Running eslint..."
|
||||||
@./node_modules/.bin/jshint --verbose $?
|
@./node_modules/.bin/eslint $?
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
build/timestamps/node-modules-timestamp: package.json
|
build/timestamps/node-modules-timestamp: package.json
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
[](http://travis-ci.org/#!/openlayers/ol3)
|
[](http://travis-ci.org/#!/openlayers/ol3)
|
||||||
[](https://coveralls.io/r/openlayers/ol3?branch=master)
|
[](https://coveralls.io/r/openlayers/ol3?branch=master)
|
||||||
|
[](http://osgeo.org/)
|
||||||
|
|
||||||
[OpenLayers 3](http://openlayers.org/) is a high-performance, feature-packed library for creating interactive maps on the web.
|
[OpenLayers 3](http://openlayers.org/) is a high-performance, feature-packed library for creating interactive maps on the web.
|
||||||
|
|
||||||
|
|||||||
@@ -1,193 +0,0 @@
|
|||||||
import os
|
|
||||||
import logging
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
logging.basicConfig(format='%(asctime)s %(name)s: %(message)s',
|
|
||||||
level=logging.INFO)
|
|
||||||
|
|
||||||
logger = logging.getLogger('check-requires')
|
|
||||||
|
|
||||||
|
|
||||||
class Node(object):
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.present = False
|
|
||||||
self.children = {}
|
|
||||||
|
|
||||||
def _build_re(self, key):
|
|
||||||
if key == '*':
|
|
||||||
assert len(self.children) == 0
|
|
||||||
# We want to match `.doIt` but not `.SomeClass` or `.more.stuff`
|
|
||||||
return '(?=\\.[a-z]\\w*\\b(?!\\.))'
|
|
||||||
elif len(self.children) == 1:
|
|
||||||
child_key, child = next(self.children.iteritems())
|
|
||||||
child_re = child._build_re(child_key)
|
|
||||||
if child_key != '*':
|
|
||||||
child_re = '\\.' + child_re
|
|
||||||
if self.present:
|
|
||||||
return key + '(' + child_re + ')?'
|
|
||||||
else:
|
|
||||||
return key + child_re
|
|
||||||
elif self.children:
|
|
||||||
children_re = '(?:' + '|'.join(
|
|
||||||
('\\.' if k != '*' else '') + self.children[k]._build_re(k)
|
|
||||||
for k in sorted(self.children.keys())) + ')'
|
|
||||||
if self.present:
|
|
||||||
return key + children_re + '?'
|
|
||||||
else:
|
|
||||||
return key + children_re
|
|
||||||
else:
|
|
||||||
assert self.present
|
|
||||||
return key
|
|
||||||
|
|
||||||
def build_re(self, key):
|
|
||||||
return re.compile('\\b' + self._build_re(key) + '\\b')
|
|
||||||
|
|
||||||
|
|
||||||
def ifind(*paths):
|
|
||||||
"""ifind is an iterative version of os.walk, yielding all walked paths and
|
|
||||||
normalizing paths to use forward slashes."""
|
|
||||||
for path in paths:
|
|
||||||
for dirpath, dirnames, names in os.walk(path):
|
|
||||||
for name in names:
|
|
||||||
if os.sep == '/':
|
|
||||||
yield os.path.join(dirpath, name)
|
|
||||||
else:
|
|
||||||
yield '/'.join(dirpath.split(os.sep) + [name])
|
|
||||||
|
|
||||||
|
|
||||||
def _strip_comments(lines):
|
|
||||||
# FIXME this is a horribe hack, we should use a proper JavaScript parser
|
|
||||||
# here
|
|
||||||
in_multiline_comment = False
|
|
||||||
lineno = 0
|
|
||||||
for line in lines:
|
|
||||||
lineno += 1
|
|
||||||
if in_multiline_comment:
|
|
||||||
index = line.find('*/')
|
|
||||||
if index != -1:
|
|
||||||
in_multiline_comment = False
|
|
||||||
line = line[index + 2:]
|
|
||||||
if not in_multiline_comment:
|
|
||||||
line = re.sub(r'//[^\n]*', '', line)
|
|
||||||
line = re.sub(r'/\*.*?\*/', '', line)
|
|
||||||
index = line.find('/*')
|
|
||||||
if index != -1:
|
|
||||||
yield lineno, line[:index]
|
|
||||||
in_multiline_comment = True
|
|
||||||
else:
|
|
||||||
yield lineno, line
|
|
||||||
|
|
||||||
|
|
||||||
def check_requires(closure_lib, *filenames):
|
|
||||||
unused_count = 0
|
|
||||||
all_provides = set()
|
|
||||||
|
|
||||||
for filename in ifind(closure_lib):
|
|
||||||
if filename.endswith('.js'):
|
|
||||||
if not re.match(r'.*/closure/goog/', filename):
|
|
||||||
continue
|
|
||||||
# Skip goog.i18n because it contains so many modules that it causes
|
|
||||||
# the generated regular expression to exceed Python's limits
|
|
||||||
if re.match(r'.*/closure/goog/i18n/', filename):
|
|
||||||
continue
|
|
||||||
for line in open(filename, 'rU'):
|
|
||||||
m = re.match(r'goog.provide\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
all_provides.add(m.group(1))
|
|
||||||
|
|
||||||
for filename in sorted(filenames):
|
|
||||||
require_linenos = {}
|
|
||||||
uses = set()
|
|
||||||
lines = open(filename, 'rU').readlines()
|
|
||||||
for lineno, line in _strip_comments(lines):
|
|
||||||
m = re.match(r'goog.provide\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
all_provides.add(m.group(1))
|
|
||||||
continue
|
|
||||||
m = re.match(r'goog.require\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
require_linenos[m.group(1)] = lineno
|
|
||||||
continue
|
|
||||||
ignore_linenos = require_linenos.values()
|
|
||||||
for lineno, line in enumerate(lines):
|
|
||||||
if lineno in ignore_linenos:
|
|
||||||
continue
|
|
||||||
for require in require_linenos.iterkeys():
|
|
||||||
if require in line:
|
|
||||||
uses.add(require)
|
|
||||||
for require in sorted(set(require_linenos.keys()) - uses):
|
|
||||||
logger.info('%s:%d: unused goog.require: %r' % (
|
|
||||||
filename, require_linenos[require], require))
|
|
||||||
unused_count += 1
|
|
||||||
|
|
||||||
all_provides.discard('ol')
|
|
||||||
all_provides.discard('ol.MapProperty')
|
|
||||||
|
|
||||||
root = Node()
|
|
||||||
for provide in all_provides:
|
|
||||||
node = root
|
|
||||||
for component in provide.split('.'):
|
|
||||||
if component not in node.children:
|
|
||||||
node.children[component] = Node()
|
|
||||||
node = node.children[component]
|
|
||||||
if component[0].islower():
|
|
||||||
# We've arrived at a namespace provide like `ol.foo`.
|
|
||||||
# In this case, we want to match uses like `ol.foo.doIt()` but
|
|
||||||
# not match things like `new ol.foo.SomeClass()`.
|
|
||||||
# For this purpose, we use the special wildcard key for the child.
|
|
||||||
node.children['*'] = Node()
|
|
||||||
else:
|
|
||||||
node.present = True
|
|
||||||
provide_res = [child.build_re(key)
|
|
||||||
for key, child in root.children.iteritems()]
|
|
||||||
missing_count = 0
|
|
||||||
for filename in sorted(filenames):
|
|
||||||
provides = set()
|
|
||||||
requires = set()
|
|
||||||
uses = set()
|
|
||||||
uses_linenos = {}
|
|
||||||
for lineno, line in _strip_comments(open(filename, 'rU')):
|
|
||||||
m = re.match(r'goog.provide\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
provides.add(m.group(1))
|
|
||||||
continue
|
|
||||||
m = re.match(r'goog.require\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
requires.add(m.group(1))
|
|
||||||
continue
|
|
||||||
while True:
|
|
||||||
for provide_re in provide_res:
|
|
||||||
m = provide_re.search(line)
|
|
||||||
if m:
|
|
||||||
uses.add(m.group())
|
|
||||||
uses_linenos[m.group()] = lineno
|
|
||||||
line = line[:m.start()] + line[m.end():]
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
if filename == 'src/ol/renderer/layerrenderer.js':
|
|
||||||
uses.discard('ol.renderer.Map')
|
|
||||||
m = re.match(
|
|
||||||
r'src/ol/renderer/(\w+)/\1(\w*)layerrenderer\.js\Z', filename)
|
|
||||||
if m:
|
|
||||||
uses.discard('ol.renderer.Map')
|
|
||||||
uses.discard('ol.renderer.%s.Map' % (m.group(1),))
|
|
||||||
missing_requires = uses - requires - provides
|
|
||||||
if missing_requires:
|
|
||||||
for missing_require in sorted(missing_requires):
|
|
||||||
logger.info("%s:%d missing goog.require('%s')" %
|
|
||||||
(filename, uses_linenos[missing_require],
|
|
||||||
missing_require))
|
|
||||||
missing_count += 1
|
|
||||||
|
|
||||||
return (unused_count, missing_count)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
unused_count, missing_count = check_requires(*sys.argv[1:])
|
|
||||||
if unused_count > 0 or missing_count > 0:
|
|
||||||
logger.error('%d unused goog.requires, %d missing goog.requires' %
|
|
||||||
(unused_count, missing_count))
|
|
||||||
sys.exit(1)
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
import logging
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
logging.basicConfig(format='%(asctime)s %(name)s: %(message)s',
|
|
||||||
level=logging.INFO)
|
|
||||||
|
|
||||||
logger = logging.getLogger('check-whitespace')
|
|
||||||
|
|
||||||
CR_RE = re.compile(r'\r')
|
|
||||||
LEADING_WHITESPACE_RE = re.compile(r'\s+')
|
|
||||||
TRAILING_WHITESPACE_RE = re.compile(r'\s+\n\Z')
|
|
||||||
NO_NEWLINE_RE = re.compile(r'[^\n]\Z')
|
|
||||||
ALL_WHITESPACE_RE = re.compile(r'\s+\Z')
|
|
||||||
|
|
||||||
|
|
||||||
def check_whitespace(*filenames):
|
|
||||||
errors = 0
|
|
||||||
for filename in sorted(filenames):
|
|
||||||
whitespace = False
|
|
||||||
for lineno, line in enumerate(open(filename, 'rU')):
|
|
||||||
if lineno == 0 and LEADING_WHITESPACE_RE.match(line):
|
|
||||||
logger.info('%s:%d: leading whitespace', filename, lineno + 1)
|
|
||||||
errors += 1
|
|
||||||
if CR_RE.search(line):
|
|
||||||
logger.info('%s:%d: carriage return character in line',
|
|
||||||
filename, lineno + 1)
|
|
||||||
errors += 1
|
|
||||||
if TRAILING_WHITESPACE_RE.search(line):
|
|
||||||
logger.info('%s:%d: trailing whitespace', filename, lineno + 1)
|
|
||||||
errors += 1
|
|
||||||
if NO_NEWLINE_RE.search(line):
|
|
||||||
logger.info('%s:%d: no newline at end of file', filename,
|
|
||||||
lineno + 1)
|
|
||||||
errors += 1
|
|
||||||
whitespace = ALL_WHITESPACE_RE.match(line)
|
|
||||||
if whitespace:
|
|
||||||
logger.info('%s: trailing whitespace at end of file', filename)
|
|
||||||
errors += 1
|
|
||||||
return errors
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
errors = check_whitespace(*sys.argv[1:])
|
|
||||||
if errors > 0:
|
|
||||||
logger.error('%d whitespace errors' % (errors,))
|
|
||||||
sys.exit(1)
|
|
||||||
@@ -1,5 +1,147 @@
|
|||||||
## Upgrade notes
|
## Upgrade notes
|
||||||
|
|
||||||
|
#### Move of typedefs out of code and into separate file
|
||||||
|
|
||||||
|
This change should not affect the great majority of application developers, but it's possible there are edge cases when compiling application code together with the library which cause compiler errors or warnings. In this case, please raise a GitHub issue. `goog.require`s for typedefs should not be necessary.
|
||||||
|
|
||||||
|
#### Removal of `opaque` option for `ol.source.VectorTile`
|
||||||
|
|
||||||
|
This option is no longer needed, so it was removed from the API.
|
||||||
|
|
||||||
|
#### XHR loading for `ol.source.TileUTFGrid`
|
||||||
|
|
||||||
|
The `ol.source.TileUTFGrid` now uses XMLHttpRequest to load UTFGrid tiles by default. This works out of the box with the v4 Mapbox API. To work with the v3 API, you must use the new `jsonp` option on the source. See the examples below for detail.
|
||||||
|
|
||||||
|
```js
|
||||||
|
// To work with the v4 API
|
||||||
|
var v4source = new ol.source.TileUTFGrid({
|
||||||
|
url: 'https://api.tiles.mapbox.com/v4/example.json?access_token=' + YOUR_KEY_HERE
|
||||||
|
});
|
||||||
|
|
||||||
|
// To work with the v3 API
|
||||||
|
var v3source = new ol.source.TileUTFGrid({
|
||||||
|
jsonp: true, // <--- this is required for v3
|
||||||
|
url: 'http://api.tiles.mapbox.com/v3/example.json'
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### v3.15.0
|
||||||
|
|
||||||
|
#### 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.
|
||||||
|
|
||||||
|
#### Immediate rendering API
|
||||||
|
|
||||||
|
Listeners for `precompose`, `render`, and `postcompose` receive an event with a `vectorContext` property with methods for immediate vector rendering. The previous geometry drawing methods have been replaced with a single `vectorContext.drawGeometry(geometry)` method. If you were using any of the following experimental methods on the vector context, replace them with `drawGeometry`:
|
||||||
|
|
||||||
|
* Removed experimental geometry drawing methods: `drawPointGeometry`, `drawLineStringGeometry`, `drawPolygonGeometry`, `drawMultiPointGeometry`, `drawMultiLineStringGeometry`, `drawMultiPolygonGeometry`, and `drawCircleGeometry` (all have been replaced with `drawGeometry`).
|
||||||
|
|
||||||
|
In addition, the previous methods for setting style parts have been replaced with a single `vectorContext.setStyle(style)` method. If you were using any of the following experimental methods on the vector context, replace them with `setStyle`:
|
||||||
|
|
||||||
|
* Removed experimental style setting methods: `setFillStrokeStyle`, `setImageStyle`, `setTextStyle` (all have been replaced with `setStyle`).
|
||||||
|
|
||||||
|
Below is an example of how the vector context might have been used in the past:
|
||||||
|
|
||||||
|
```js
|
||||||
|
// OLD WAY, NO LONGER SUPPORTED
|
||||||
|
map.on('postcompose', function(event) {
|
||||||
|
event.vectorContext.setFillStrokeStyle(style.getFill(), style.getStroke());
|
||||||
|
event.vectorContext.drawPointGeometry(geometry);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
Here is an example of how you could accomplish the same with the new methods:
|
||||||
|
```js
|
||||||
|
// NEW WAY, USE THIS INSTEAD OF THE CODE ABOVE
|
||||||
|
map.on('postcompose', function(event) {
|
||||||
|
event.vectorContext.setStyle(style);
|
||||||
|
event.vectorContext.drawGeometry(geometry);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
A final change to the immediate rendering API is that `vectorContext.drawFeature()` calls are now "immediate" as well. The drawing now occurs synchronously. This means that any `zIndex` in a style passed to `drawFeature()` will be ignored. To achieve `zIndex` ordering, order your calls to `drawFeature()` instead.
|
||||||
|
|
||||||
|
#### Removal of `ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK`
|
||||||
|
|
||||||
|
The `ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK` define has been removed. The size of the cache can now be defined on every tile based `ol.source`:
|
||||||
|
```js
|
||||||
|
new ol.layer.Tile({
|
||||||
|
source: new ol.source.OSM({
|
||||||
|
cacheSize: 128
|
||||||
|
})
|
||||||
|
})
|
||||||
|
```
|
||||||
|
The default cache size is `2048`.
|
||||||
|
|
||||||
|
### v3.14.0
|
||||||
|
|
||||||
|
#### 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.
|
||||||
|
|
||||||
|
#### Layer pre-/postcompose event changes
|
||||||
|
|
||||||
|
It is the responsibility of the application to undo any canvas transform changes at the end of a layer 'precompose' or 'postcompose' handler. Previously, it was ok to set a null transform. The API now guarantees a device pixel coordinate system on the canvas with its origin in the top left corner of the map. However, applications should not rely on the underlying canvas being the same size as the visible viewport.
|
||||||
|
|
||||||
|
Old code:
|
||||||
|
```js
|
||||||
|
layer.on('precompose', function(e) {
|
||||||
|
// rely on canvas dimensions to move coordinate origin to center
|
||||||
|
e.context.translate(e.context.canvas.width / 2, e.context.canvas.height / 2);
|
||||||
|
e.context.scale(3, 3);
|
||||||
|
// draw an x in the center of the viewport
|
||||||
|
e.context.moveTo(-20, -20);
|
||||||
|
e.context.lineTo(20, 20);
|
||||||
|
e.context.moveTo(-20, 20);
|
||||||
|
e.context.lineTo(20, -20);
|
||||||
|
// rely on the canvas having a null transform
|
||||||
|
e.context.setTransform(1, 0, 0, 1, 0, 0);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
New code:
|
||||||
|
```js
|
||||||
|
layer.on('precompose', function(e) {
|
||||||
|
// use map size and pixel ratio to move coordinate origin to center
|
||||||
|
var size = map.getSize();
|
||||||
|
var pixelRatio = e.frameState.pixelRatio;
|
||||||
|
e.context.translate(size[0] / 2 * pixelRatio, size[1] / 2 * pixelRatio);
|
||||||
|
e.context.scale(3, 3);
|
||||||
|
// draw an x in the center of the viewport
|
||||||
|
e.context.moveTo(-20, -20);
|
||||||
|
e.context.lineTo(20, 20);
|
||||||
|
e.context.moveTo(-20, 20);
|
||||||
|
e.context.lineTo(20, -20);
|
||||||
|
// undo all transforms
|
||||||
|
e.context.scale(1 / 3, 1 / 3);
|
||||||
|
e.context.translate(-size[0] / 2 * pixelRatio, -size[1] / 2 * pixelRatio);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### v3.13.0
|
||||||
|
|
||||||
|
#### `proj4js` integration
|
||||||
|
|
||||||
|
Before this release, OpenLayers depended on the global proj4 namespace. When using a module loader like Browserify, you might not want to depend on the global `proj4` namespace. You can use the `ol.proj.setProj4` function to set the proj4 function object. For example in a browserify ES6 environment:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import ol from 'openlayers';
|
||||||
|
import proj4 from 'proj4';
|
||||||
|
ol.proj.setProj4(proj4);
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `ol.source.TileJSON` changes
|
||||||
|
|
||||||
|
The `ol.source.TileJSON` now uses `XMLHttpRequest` to load the TileJSON instead of JSONP with callback.
|
||||||
|
When using server without proper CORS support, `jsonp: true` option can be passed to the constructor to get the same behavior as before:
|
||||||
|
```js
|
||||||
|
new ol.source.TileJSON({
|
||||||
|
url: 'http://serverwithoutcors.com/tilejson.json',
|
||||||
|
jsonp: true
|
||||||
|
})
|
||||||
|
```
|
||||||
|
Also for Mapbox v3, make sure you use urls ending with `.json` (which are able to handle both `XMLHttpRequest` and JSONP) instead of `.jsonp`.
|
||||||
|
|
||||||
### v3.12.0
|
### v3.12.0
|
||||||
|
|
||||||
#### `ol.Map#forEachFeatureAtPixel` changes
|
#### `ol.Map#forEachFeatureAtPixel` changes
|
||||||
|
|||||||
109
changelog/v3.13.0.md
Normal file
109
changelog/v3.13.0.md
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
# v3.13.0
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The v3.13.0 release includes features and fixes from 68 pull requests since the v3.12.1 release. New features and improvements include:
|
||||||
|
|
||||||
|
* Improved tiles rendering for the canvas renderer
|
||||||
|
* Improved MapQuest rendering
|
||||||
|
* Add color option to ol.style.Icon
|
||||||
|
* Load TileJSON sources via XMLHttpRequest by default
|
||||||
|
* Add new ol.geom.LineString#getCoordinateAt function
|
||||||
|
* Simplify meters per unit handling
|
||||||
|
* Use ESLint as a replacement for gjslint.py and jshint
|
||||||
|
|
||||||
|
## Upgrade notes
|
||||||
|
|
||||||
|
#### `proj4js` integration
|
||||||
|
|
||||||
|
Before this release, OpenLayers depended on the global proj4 namespace. When using a module loader like Browserify, you might not want to depend on the global `proj4` namespace. You can use the `ol.proj.setProj4` function to set the proj4 function object. For example in a browserify ES6 environment:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import ol from 'openlayers';
|
||||||
|
import proj4 from 'proj4';
|
||||||
|
ol.proj.setProj4(proj4);
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `ol.source.TileJSON` changes
|
||||||
|
|
||||||
|
The `ol.source.TileJSON` now uses `XMLHttpRequest` to load the TileJSON instead of JSONP with callback.
|
||||||
|
When using server without proper CORS support, `jsonp: true` option can be passed to the constructor to get the same behavior as before:
|
||||||
|
```js
|
||||||
|
new ol.source.TileJSON({
|
||||||
|
url: 'http://serverwithoutcors.com/tilejson.json',
|
||||||
|
jsonp: true
|
||||||
|
})
|
||||||
|
```
|
||||||
|
Also for Mapbox v3, make sure you use urls ending with `.json` (which are able to handle both `XMLHttpRequest` and JSONP) instead of `.jsonp`.
|
||||||
|
|
||||||
|
|
||||||
|
## Full list of changes
|
||||||
|
|
||||||
|
* [#4694](https://github.com/openlayers/ol3/pull/4694) - Fix eslint errors in wms-time example ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4527](https://github.com/openlayers/ol3/pull/4527) - Add support for smooth TileWMS dimensions ([@bartvde](https://github.com/bartvde))
|
||||||
|
* [#4691](https://github.com/openlayers/ol3/pull/4691) - Updated Bing Maps key. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4673](https://github.com/openlayers/ol3/pull/4673) - Respect fixed tile url functions when setting url(s) ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4689](https://github.com/openlayers/ol3/pull/4689) - Revert "Do not render in handleDownEvent" ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4688](https://github.com/openlayers/ol3/pull/4688) - Give map a focus-outline in accessible-example ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4642](https://github.com/openlayers/ol3/pull/4642) - Move the icon style color to its own example ([@alexbrault](https://github.com/alexbrault))
|
||||||
|
* [#4685](https://github.com/openlayers/ol3/pull/4685) - Remove bin/check-whitespace.py ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4684](https://github.com/openlayers/ol3/pull/4684) - Update eslint-config-openlayers to version 3.0.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4677](https://github.com/openlayers/ol3/pull/4677) - Make pixel projection handling work in compiled mode ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4639](https://github.com/openlayers/ol3/pull/4639) - Remove use of goog.bind and use ES5 .bind. ([@nicholas-l](https://github.com/nicholas-l))
|
||||||
|
* [#4655](https://github.com/openlayers/ol3/pull/4655) - Update browserify to version 13.0.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4666](https://github.com/openlayers/ol3/pull/4666) - Add a 'boxdrag' event to ol.interaction.DragBox. Resolves #4563 . ([@WeaveTeam](https://github.com/WeaveTeam))
|
||||||
|
* [#4669](https://github.com/openlayers/ol3/pull/4669) - Remove reference to Closure Linter in CONTRIBUTING.md ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4665](https://github.com/openlayers/ol3/pull/4665) - Update istanbul to version 0.4.2 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4663](https://github.com/openlayers/ol3/pull/4663) - Update glob to version 6.0.4 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4667](https://github.com/openlayers/ol3/pull/4667) - Fix rendering of transparent MapQuest layer type ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4661](https://github.com/openlayers/ol3/pull/4661) - Fixes #4654 Developer Documentation Updated ([@gaf-ag](https://github.com/gaf-ag))
|
||||||
|
* [#4658](https://github.com/openlayers/ol3/pull/4658) - Update jquery to version 2.2.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4659](https://github.com/openlayers/ol3/pull/4659) - Make sure icons show up in Safari ([@bartvde](https://github.com/bartvde))
|
||||||
|
* [#4652](https://github.com/openlayers/ol3/pull/4652) - Use map.getTargetElement instead of map.getTarget ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4649](https://github.com/openlayers/ol3/pull/4649) - Missing parameter description for ol.source.Tile#getOpaque ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4602](https://github.com/openlayers/ol3/pull/4602) - Use ESLint. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4628](https://github.com/openlayers/ol3/pull/4628) - Fix for reprojecting opaque tile sources ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4618](https://github.com/openlayers/ol3/pull/4618) - Update resemblejs to version 2.1.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4647](https://github.com/openlayers/ol3/pull/4647) - Proper rounding for possibly negative numbers ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4641](https://github.com/openlayers/ol3/pull/4641) - Remove extra options from icon example. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4629](https://github.com/openlayers/ol3/pull/4629) - Simplify scaleline calculation ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4457](https://github.com/openlayers/ol3/pull/4457) - Add color option to ol.style.Icon ([@alexbrault](https://github.com/alexbrault))
|
||||||
|
* [#4638](https://github.com/openlayers/ol3/pull/4638) - Do not rely on projection extent ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4635](https://github.com/openlayers/ol3/pull/4635) - Update async to version 1.5.2 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4581](https://github.com/openlayers/ol3/pull/4581) - Do not render in handleDownEvent ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4541](https://github.com/openlayers/ol3/pull/4541) - Add new ol.geom.LineString#getCoordinateAt function ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4489](https://github.com/openlayers/ol3/pull/4489) - Update phantomjs to version 1.9.19 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4625](https://github.com/openlayers/ol3/pull/4625) - Use XHR by default to load TileJSON in ol.source.TileJSON ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4622](https://github.com/openlayers/ol3/pull/4622) - Update fs-extra to version 0.26.4 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4630](https://github.com/openlayers/ol3/pull/4630) - Simplify meters per unit handling ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4490](https://github.com/openlayers/ol3/pull/4490) - Update istanbul to version 0.4.1 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4574](https://github.com/openlayers/ol3/pull/4574) - Added boxEndCondition to DragBoxOptions to replace the hardcoded chec… ([@WeaveTeam](https://github.com/WeaveTeam))
|
||||||
|
* [#4553](https://github.com/openlayers/ol3/pull/4553) - Update mustache to version 2.2.1 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4626](https://github.com/openlayers/ol3/pull/4626) - Fixed documentation error ([@simonseyock](https://github.com/simonseyock))
|
||||||
|
* [#4606](https://github.com/openlayers/ol3/pull/4606) - Include originating MapBrowserEvent in ol.DragBoxEvent ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4614](https://github.com/openlayers/ol3/pull/4614) - Remove checksum interface. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4613](https://github.com/openlayers/ol3/pull/4613) - Include own layer in layerFilter and only select unselected features ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4612](https://github.com/openlayers/ol3/pull/4612) - Set oli.source.VectorEvent#feature to ol.Feature|undefined ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4620](https://github.com/openlayers/ol3/pull/4620) - Fix olx.format.PolylineOptions#factor type ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4621](https://github.com/openlayers/ol3/pull/4621) - Fix olx.format.GPXOptions#readExtensions type ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4619](https://github.com/openlayers/ol3/pull/4619) - Add option to load TileJSON via XHR ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4617](https://github.com/openlayers/ol3/pull/4617) - Add missing return type to GeoJSON format ([@gberaudo](https://github.com/gberaudo))
|
||||||
|
* [#4615](https://github.com/openlayers/ol3/pull/4615) - Adjust copyright to include 2016 ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4616](https://github.com/openlayers/ol3/pull/4616) - Update closure-util to version 1.10.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4596](https://github.com/openlayers/ol3/pull/4596) - Use consistent tile coordinate keys ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4609](https://github.com/openlayers/ol3/pull/4609) - Add ol.proj.setProj4 function ([@bartvde](https://github.com/bartvde))
|
||||||
|
* [#4603](https://github.com/openlayers/ol3/pull/4603) - Update async to version 1.5.1 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4604](https://github.com/openlayers/ol3/pull/4604) - Update clean-css to version 3.4.9 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4600](https://github.com/openlayers/ol3/pull/4600) - Update glob to version 6.0.3 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4595](https://github.com/openlayers/ol3/pull/4595) - Pass 'opaque' option on to superclass ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4598](https://github.com/openlayers/ol3/pull/4598) - Make ol.source.Tile#getTilePixelRatio work correctly for all sources ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4594](https://github.com/openlayers/ol3/pull/4594) - Fix for TileQueue gradually choking up when using raster reprojection ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4557](https://github.com/openlayers/ol3/pull/4557) - Conditionally render tiles to a separate tile canvas ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4580](https://github.com/openlayers/ol3/pull/4580) - Update fs-extra to version 0.26.3 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4579](https://github.com/openlayers/ol3/pull/4579) - Release v3.12.1 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4578](https://github.com/openlayers/ol3/pull/4578) - Fix apidoc landing page markup ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4575](https://github.com/openlayers/ol3/pull/4575) - Update rbush to version 1.4.2 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4571](https://github.com/openlayers/ol3/pull/4571) - Correct typedef of selectinteraction options obj ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4570](https://github.com/openlayers/ol3/pull/4570) - Rename defaultSort to numberSafeCompareFunction on ol.array ([@bartvde](https://github.com/bartvde))
|
||||||
|
* [#4567](https://github.com/openlayers/ol3/pull/4567) - Always pass on a compare function to sort ([@bartvde](https://github.com/bartvde))
|
||||||
|
* [#4001](https://github.com/openlayers/ol3/pull/4001) - Export PDF's using jsPDF ([@bartvde](https://github.com/bartvde))
|
||||||
10
changelog/v3.13.1.md
Normal file
10
changelog/v3.13.1.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# v3.13.1
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The v3.13.1 release is a patch release that addresses a few regressions in the v3.13.0 release. See the [v3.13.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.13.0) for details on upgrading from v3.12.
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
|
||||||
|
* [#4736](https://github.com/openlayers/ol3/pull/4736) - Properly detect feature on unmanaged layer for toggle selection ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4777](https://github.com/openlayers/ol3/pull/4777) - Fix source.UrlTile URL expansion ([@gberaudo](https://github.com/gberaudo))
|
||||||
154
changelog/v3.14.0.md
Normal file
154
changelog/v3.14.0.md
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
# v3.14.0
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The v3.14.0 release includes features and fixes from 93 pull requests since the v3.13.1 release. New features and improvements include:
|
||||||
|
|
||||||
|
* New `source` option for the `ol.control.FullScreen`, to allow including other elements besides the map in a full screen view (#4679).
|
||||||
|
* New `target` property for the Drag&Drop interaction allows using a different drop target than the map viewport (#4876).
|
||||||
|
* `ol.style.RegularShape` has a new `rotateWithView` option, for controlling how regular shape symbols are rendered on rotated views (#4698).
|
||||||
|
* New `layers` option for `ol.format.WMSGetFeatureInfo` format, to selectively only read features from specific layers (#4700).
|
||||||
|
* New `precision` parameter for formatting coordinates with `ol.coordinate.toStringHDMS` (#4787).
|
||||||
|
* Smarter tile queue for improved tile loading user experience when more than one tile layer is used (#4794).
|
||||||
|
* Improved rendering performance for tile layers by rendering tiles directly to the map canvas (#4597).
|
||||||
|
* The `goog.events` event system was replaced with our own lightweight event system. This significally reduces the build size (#4711). Replacement of other `goog.*` components with ES5 features or custom code marks a huge step towards the complete removal of the Closure Library dependency.
|
||||||
|
|
||||||
|
## Upgrade notes
|
||||||
|
|
||||||
|
#### 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.
|
||||||
|
|
||||||
|
#### Layer pre-/postcompose event changes
|
||||||
|
|
||||||
|
It is the responsibility of the application to undo any canvas transform changes at the end of a layer 'precompose' or 'postcompose' handler. Previously, it was ok to set a null transform. The API now guarantees a device pixel coordinate system on the canvas with its origin in the top left corner of the map. However, applications should not rely on the underlying canvas being the same size as the visible viewport.
|
||||||
|
|
||||||
|
Old code:
|
||||||
|
```js
|
||||||
|
layer.on('precompose', function(e) {
|
||||||
|
// rely on canvas dimensions to move coordinate origin to center
|
||||||
|
e.context.translate(e.context.canvas.width / 2, e.context.canvas.height / 2);
|
||||||
|
e.context.scale(3, 3);
|
||||||
|
// draw an x in the center of the viewport
|
||||||
|
e.context.moveTo(-20, -20);
|
||||||
|
e.context.lineTo(20, 20);
|
||||||
|
e.context.moveTo(-20, 20);
|
||||||
|
e.context.lineTo(20, -20);
|
||||||
|
// rely on the canvas having a null transform
|
||||||
|
e.context.setTransform(1, 0, 0, 1, 0, 0);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
New code:
|
||||||
|
```js
|
||||||
|
layer.on('precompose', function(e) {
|
||||||
|
// use map size and pixel ratio to move coordinate origin to center
|
||||||
|
var size = map.getSize();
|
||||||
|
var pixelRatio = e.frameState.pixelRatio;
|
||||||
|
e.context.translate(size[0] / 2 * pixelRatio, size[1] / 2 * pixelRatio);
|
||||||
|
e.context.scale(3, 3);
|
||||||
|
// draw an x in the center of the viewport
|
||||||
|
e.context.moveTo(-20, -20);
|
||||||
|
e.context.lineTo(20, 20);
|
||||||
|
e.context.moveTo(-20, 20);
|
||||||
|
e.context.lineTo(20, -20);
|
||||||
|
// undo all transforms
|
||||||
|
e.context.scale(1 / 3, 1 / 3);
|
||||||
|
e.context.translate(-size[0] / 2 * pixelRatio, -size[1] / 2 * pixelRatio);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Full list of changes
|
||||||
|
|
||||||
|
* [#4896](https://github.com/openlayers/ol3/pull/4896) - Ignore XML sequence when comparing GML ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4890](https://github.com/openlayers/ol3/pull/4890) - ol.format.KML cleanup ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4894](https://github.com/openlayers/ol3/pull/4894) - Only run raster operations after image sources have loaded. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4892](https://github.com/openlayers/ol3/pull/4892) - Stricter check for ImageData constructor ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4891](https://github.com/openlayers/ol3/pull/4891) - Fix tests so they all pass in IE9 ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4889](https://github.com/openlayers/ol3/pull/4889) - Use requestAnimation polyfill for examples and update release notes ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4887](https://github.com/openlayers/ol3/pull/4887) - Use less aggressive DOM function overrides ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4885](https://github.com/openlayers/ol3/pull/4885) - Mark overlayContainer and overlayContainerStopEvent as non-nullable ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4884](https://github.com/openlayers/ol3/pull/4884) - Remove use of goog.math.isFiniteNumber() ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4881](https://github.com/openlayers/ol3/pull/4881) - Update jquery to version 2.2.1 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4780](https://github.com/openlayers/ol3/pull/4780) - Adapt the code for the new closure-compiler version ([@fredj](https://github.com/fredj))
|
||||||
|
* [#3453](https://github.com/openlayers/ol3/pull/3453) - Consider multi in add/remove/toggle select logic ([@bjornharrtell](https://github.com/bjornharrtell))
|
||||||
|
* [#4876](https://github.com/openlayers/ol3/pull/4876) - Add `target` property to Drag&Drop interaction ([@tsauerwein](https://github.com/tsauerwein))
|
||||||
|
* [#4854](https://github.com/openlayers/ol3/pull/4854) - Always report skipped feature hits for the original layer ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4877](https://github.com/openlayers/ol3/pull/4877) - Update eslint to version 2.2.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4870](https://github.com/openlayers/ol3/pull/4870) - Reuse dragListenerKeys_ local variable ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4721](https://github.com/openlayers/ol3/pull/4721) - Fix reprojection of raster sources with gutter ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4874](https://github.com/openlayers/ol3/pull/4874) - Assert we have a feature id ([@bartvde](https://github.com/bartvde))
|
||||||
|
* [#4869](https://github.com/openlayers/ol3/pull/4869) - Improve precision of ol.reproj.render ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4866](https://github.com/openlayers/ol3/pull/4866) - Use requestAnimationFrame polyfill (for IE9) ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4863](https://github.com/openlayers/ol3/pull/4863) - Remove use of goog.dom.createElement ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4864](https://github.com/openlayers/ol3/pull/4864) - Use querySelectorAll instead of goog.dom.getElementsByClass ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4597](https://github.com/openlayers/ol3/pull/4597) - Render tiles directly to the map canvas ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4862](https://github.com/openlayers/ol3/pull/4862) - Add OSGeo badge ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4845](https://github.com/openlayers/ol3/pull/4845) - Fix geolocation error cast ([@gberaudo](https://github.com/gberaudo))
|
||||||
|
* [#4851](https://github.com/openlayers/ol3/pull/4851) - Don't use goog.isBoolean() ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4852](https://github.com/openlayers/ol3/pull/4852) - Don't use goog.isString() ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4849](https://github.com/openlayers/ol3/pull/4849) - Fix docs of LogoOptions.prototype.src ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4794](https://github.com/openlayers/ol3/pull/4794) - Make tile loading count no longer depend on source count ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4843](https://github.com/openlayers/ol3/pull/4843) - Remove use of goog.dom.getParentElement ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4839](https://github.com/openlayers/ol3/pull/4839) - Add template type to ol.Collection ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4847](https://github.com/openlayers/ol3/pull/4847) - Update eslint to version 2.1.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4632](https://github.com/openlayers/ol3/pull/4632) - Overloading fill color (polygon or text) with CanvasPattern and CanvasGradient ([@bjnsn](https://github.com/bjnsn))
|
||||||
|
* [#4842](https://github.com/openlayers/ol3/pull/4842) - Remove use of goog.dom.createDom ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4808](https://github.com/openlayers/ol3/pull/4808) - Type cleanup ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4737](https://github.com/openlayers/ol3/pull/4737) - Use olx.format.ReadOptions in ol.interaction.DragAndDrop ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4830](https://github.com/openlayers/ol3/pull/4830) - Make sure window.proj4 is always restored in tests ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4838](https://github.com/openlayers/ol3/pull/4838) - Use regular expression instead of String#endsWith() check ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4837](https://github.com/openlayers/ol3/pull/4837) - Update metalsmith-layouts to version 1.5.4 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4836](https://github.com/openlayers/ol3/pull/4836) - Use lowercase for all user agent checks ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4833](https://github.com/openlayers/ol3/pull/4833) - Upgrade linter and config. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4831](https://github.com/openlayers/ol3/pull/4831) - Add navigation header to examples page ([@jonataswalker](https://github.com/jonataswalker))
|
||||||
|
* [#4824](https://github.com/openlayers/ol3/pull/4824) - Don't use goog.string.newlines.* ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4825](https://github.com/openlayers/ol3/pull/4825) - Don't use goog.string.isEmpty ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4823](https://github.com/openlayers/ol3/pull/4823) - Fix type for layers option on ol.interaction.Select ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4815](https://github.com/openlayers/ol3/pull/4815) - wrapX false in synthetic examples ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4810](https://github.com/openlayers/ol3/pull/4810) - Add checks for undefined in controls ([@gberaudo](https://github.com/gberaudo))
|
||||||
|
* [#4787](https://github.com/openlayers/ol3/pull/4787) - Add precision parameter for HDMS coordinate ([@pfanguin](https://github.com/pfanguin))
|
||||||
|
* [#4811](https://github.com/openlayers/ol3/pull/4811) - Make ol.style.Style a @struct ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4800](https://github.com/openlayers/ol3/pull/4800) - Update phantomjs-prebuilt to version 2.1.4 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4792](https://github.com/openlayers/ol3/pull/4792) - Use ol.events.listen instead of ol.Observable#on ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4796](https://github.com/openlayers/ol3/pull/4796) - Remove use of goog.isString() ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4795](https://github.com/openlayers/ol3/pull/4795) - Cleanup after goog.array, goog.object and goog.isDef removal ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4791](https://github.com/openlayers/ol3/pull/4791) - Remove unnecessary cast ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4778](https://github.com/openlayers/ol3/pull/4778) - Remove use of goog.object. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4789](https://github.com/openlayers/ol3/pull/4789) - Use ol.array instead of goog.array ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4788](https://github.com/openlayers/ol3/pull/4788) - Remove unnecessary newlines ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4731](https://github.com/openlayers/ol3/pull/4731) - Remove all remaining unnecessary casts ([@gberaudo](https://github.com/gberaudo))
|
||||||
|
* [#4776](https://github.com/openlayers/ol3/pull/4776) - Correct assertion message in ol.array.binarySearch-test ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4711](https://github.com/openlayers/ol3/pull/4711) - Removal of goog.events.* ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4777](https://github.com/openlayers/ol3/pull/4777) - Fix source.UrlTile URL expansion ([@gberaudo](https://github.com/gberaudo))
|
||||||
|
* [#4730](https://github.com/openlayers/ol3/pull/4730) - Document ol.Geolocation error event ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4772](https://github.com/openlayers/ol3/pull/4772) - Use node.setAttribute to set namespaceURI of a node ([@adube](https://github.com/adube))
|
||||||
|
* [#4774](https://github.com/openlayers/ol3/pull/4774) - Update graceful-fs to version 4.1.3 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4680](https://github.com/openlayers/ol3/pull/4680) - Remove goog array. ([@nicholas-l](https://github.com/nicholas-l))
|
||||||
|
* [#4771](https://github.com/openlayers/ol3/pull/4771) - Use innerHTML instead of innerText to populate the status element ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4769](https://github.com/openlayers/ol3/pull/4769) - Add opaque option to olx.source.OSMOptions ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4736](https://github.com/openlayers/ol3/pull/4736) - Properly detect feature on unmanaged layer for toggle selection ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4756](https://github.com/openlayers/ol3/pull/4756) - Remove VectorTile getSource re-definition of return value ([@adube](https://github.com/adube))
|
||||||
|
* [#4733](https://github.com/openlayers/ol3/pull/4733) - Avoid rendering too big and too small images for vector tiles ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4754](https://github.com/openlayers/ol3/pull/4754) - Upgrade to mocha@2.4.5. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4750](https://github.com/openlayers/ol3/pull/4750) - Update metalsmith-layouts to version 1.4.4 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4751](https://github.com/openlayers/ol3/pull/4751) - Update phantomjs to version 2.1.3 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4741](https://github.com/openlayers/ol3/pull/4741) - Report on installed versions in Travis. ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4742](https://github.com/openlayers/ol3/pull/4742) - Upgrade to eslint@2.0.0-beta.2. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4746](https://github.com/openlayers/ol3/pull/4746) - Downgrade to mocha@2.3.4. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4740](https://github.com/openlayers/ol3/pull/4740) - Update fs-extra to version 0.26.5 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4738](https://github.com/openlayers/ol3/pull/4738) - Add unit tests for ol.control.Rotate and ol.control.Zoom ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4718](https://github.com/openlayers/ol3/pull/4718) - Improve raster reprojection behavior when tiles fail to load ([@klokantech](https://github.com/klokantech))
|
||||||
|
* [#4734](https://github.com/openlayers/ol3/pull/4734) - Update sinon to version 1.17.3 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4726](https://github.com/openlayers/ol3/pull/4726) - Update mocha to version 2.4.2 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4725](https://github.com/openlayers/ol3/pull/4725) - Untangle vector tile feature reprojection ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4735](https://github.com/openlayers/ol3/pull/4735) - Add default value for defaultDataProjection ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4732](https://github.com/openlayers/ol3/pull/4732) - Fix '@see' link in src/ol/deviceorientation.js ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4720](https://github.com/openlayers/ol3/pull/4720) - Improve tileLoadFunction docs ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4717](https://github.com/openlayers/ol3/pull/4717) - Update phantomjs to version 2.1.2 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4679](https://github.com/openlayers/ol3/pull/4679) - Add a source option for the full screen control ([@gaf-ag](https://github.com/gaf-ag))
|
||||||
|
* [#4712](https://github.com/openlayers/ol3/pull/4712) - Add missing JSDoc tags ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4700](https://github.com/openlayers/ol3/pull/4700) - Add 'layers' option for WMSGetFeatureInfo format ([@adube](https://github.com/adube))
|
||||||
|
* [#4705](https://github.com/openlayers/ol3/pull/4705) - Remove remaining unnecessary ol.source.State casts ([@gberaudo](https://github.com/gberaudo))
|
||||||
|
* [#4703](https://github.com/openlayers/ol3/pull/4703) - Source options fixes. ([@gberaudo](https://github.com/gberaudo))
|
||||||
|
* [#4698](https://github.com/openlayers/ol3/pull/4698) - Add rotateWithView option to ol.style.RegularShape ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4697](https://github.com/openlayers/ol3/pull/4697) - Bind tileUrlFunction to the source ([@gberaudo](https://github.com/gberaudo))
|
||||||
10
changelog/v3.14.1.md
Normal file
10
changelog/v3.14.1.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# v3.14.1
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The v3.14.1 release is a patch release that addresses a few regressions in the v3.14.0 release. See the [v3.14.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.14.0) for details on upgrading from v3.13.x.
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
|
||||||
|
* [#4939](https://github.com/openlayers/ol3/pull/4939) - Fix rendering of opaque layers with opacity != 1 ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4921](https://github.com/openlayers/ol3/pull/4921) - Unlisten before calling listener and bind to target by default ([@ahocevar](https://github.com/ahocevar))
|
||||||
13
changelog/v3.14.2.md
Normal file
13
changelog/v3.14.2.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# v3.14.2
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The v3.14.2 release is a patch release that addresses a few regressions in the v3.14.1 release. See the [v3.14.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.14.0) for details on upgrading from v3.13.x.
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
|
||||||
|
* [#4963](https://github.com/openlayers/ol3/pull/4963) - Handle more XHR errors in the TileJSON source ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4960](https://github.com/openlayers/ol3/pull/4960) - Simplify clipping of lower resolution regions ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4958](https://github.com/openlayers/ol3/pull/4958) - Stop wheel events instead of DOMMouseScroll events ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4956](https://github.com/openlayers/ol3/pull/4956) - Fix Examples layout page ([@jonataswalker](https://github.com/jonataswalker))
|
||||||
|
* [#4809](https://github.com/openlayers/ol3/pull/4809) - Fix multipolygon clone. ([@fperucic](https://github.com/fperucic))
|
||||||
204
changelog/v3.15.0.md
Normal file
204
changelog/v3.15.0.md
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
# v3.15.0
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The v3.15.0 release includes features and fixes from 136 pull requests since the v3.14.2 release. New features and improvements include:
|
||||||
|
|
||||||
|
* Make ol.source.Cluster more flexible by adding a geometryFunction option (#4917).
|
||||||
|
* Add new CartoDB tile source (#4926).
|
||||||
|
* Improved rendering performance for vector layers by batching polygon fill and stroke instructions (#5149).
|
||||||
|
* Make the tile cache size configurable (#4805).
|
||||||
|
* Add new ol.geom.Geometry#rotate function (#4984).
|
||||||
|
* Accept simpler forms of specifying attribution(s) for sources (#5007).
|
||||||
|
* Support zooming out for ol.interaction.DragZoom (#5031).
|
||||||
|
|
||||||
|
## Upgrade notes
|
||||||
|
|
||||||
|
### v3.15.0
|
||||||
|
|
||||||
|
#### 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.
|
||||||
|
|
||||||
|
#### Immediate rendering API
|
||||||
|
|
||||||
|
Listeners for `precompose`, `render`, and `postcompose` receive an event with a `vectorContext` property with methods for immediate vector rendering. The previous geometry drawing methods have been replaced with a single `vectorContext.drawGeometry(geometry)` method. If you were using any of the following experimental methods on the vector context, replace them with `drawGeometry`:
|
||||||
|
|
||||||
|
* Removed experimental geometry drawing methods: `drawPointGeometry`, `drawLineStringGeometry`, `drawPolygonGeometry`, `drawMultiPointGeometry`, `drawMultiLineStringGeometry`, `drawMultiPolygonGeometry`, and `drawCircleGeometry` (all have been replaced with `drawGeometry`).
|
||||||
|
|
||||||
|
In addition, the previous methods for setting style parts have been replaced with a single `vectorContext.setStyle(style)` method. If you were using any of the following experimental methods on the vector context, replace them with `setStyle`:
|
||||||
|
|
||||||
|
* Removed experimental style setting methods: `setFillStrokeStyle`, `setImageStyle`, `setTextStyle` (all have been replaced with `setStyle`).
|
||||||
|
|
||||||
|
Below is an example of how the vector context might have been used in the past:
|
||||||
|
|
||||||
|
```js
|
||||||
|
// OLD WAY, NO LONGER SUPPORTED
|
||||||
|
map.on('postcompose', function(event) {
|
||||||
|
event.vectorContext.setFillStrokeStyle(style.getFill(), style.getStroke());
|
||||||
|
event.vectorContext.drawPointGeometry(geometry);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
Here is an example of how you could accomplish the same with the new methods:
|
||||||
|
```js
|
||||||
|
// NEW WAY, USE THIS INSTEAD OF THE CODE ABOVE
|
||||||
|
map.on('postcompose', function(event) {
|
||||||
|
event.vectorContext.setStyle(style);
|
||||||
|
event.vectorContext.drawGeometry(geometry);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
A final change to the immediate rendering API is that `vectorContext.drawFeature()` calls are now "immediate" as well. The drawing now occurs synchronously. This means that any `zIndex` in a style passed to `drawFeature()` will be ignored. To achieve `zIndex` ordering, order your calls to `drawFeature()` instead.
|
||||||
|
|
||||||
|
#### Removal of `ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK`
|
||||||
|
|
||||||
|
The `ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK` define has been removed. The size of the cache can now be defined on every tile based `ol.source`:
|
||||||
|
```js
|
||||||
|
new ol.layer.Tile({
|
||||||
|
source: new ol.source.OSM({
|
||||||
|
cacheSize: 128
|
||||||
|
})
|
||||||
|
})
|
||||||
|
```
|
||||||
|
The default cache size is `2048`.
|
||||||
|
|
||||||
|
## Full list of changes
|
||||||
|
|
||||||
|
* [#4775](https://github.com/openlayers/ol3/pull/4775) - Remove goog.math.modulo and goog.math.lerp ([@nicholas-l](https://github.com/nicholas-l))
|
||||||
|
* [#5152](https://github.com/openlayers/ol3/pull/5152) - Cartodb cleanup ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4804](https://github.com/openlayers/ol3/pull/4804) - Use Array.isArray instead of goog.isArray ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5149](https://github.com/openlayers/ol3/pull/5149) - Batch polygon fill and stroke instructions ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#5159](https://github.com/openlayers/ol3/pull/5159) - Update eslint to version 2.6.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5160](https://github.com/openlayers/ol3/pull/5160) - Update clean-css to version 3.4.11 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5157](https://github.com/openlayers/ol3/pull/5157) - Improve docs for measure example ([@probins](https://github.com/probins))
|
||||||
|
* [#5155](https://github.com/openlayers/ol3/pull/5155) - Fix ol.source.Zoomify tests on firefox ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5086](https://github.com/openlayers/ol3/pull/5086) - Get rid of goog.functions ([@bjornharrtell](https://github.com/bjornharrtell))
|
||||||
|
* [#5105](https://github.com/openlayers/ol3/pull/5105) - Support minZoom in ol.source.Stamen ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4926](https://github.com/openlayers/ol3/pull/4926) - Add CartoDB tile source. ([@aisaacs](https://github.com/aisaacs))
|
||||||
|
* [#5151](https://github.com/openlayers/ol3/pull/5151) - Use fs-extra as fs, remove usage of graceful-fs ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#5124](https://github.com/openlayers/ol3/pull/5124) - Removed goog.dom.classlist ([@nicholas-l](https://github.com/nicholas-l))
|
||||||
|
* [#5150](https://github.com/openlayers/ol3/pull/5150) - Use fs-extra instead of wrench ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5109](https://github.com/openlayers/ol3/pull/5109) - Add some tests for ol.source.TileUTFGrid ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#5139](https://github.com/openlayers/ol3/pull/5139) - Update closure-util to version 1.13.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5141](https://github.com/openlayers/ol3/pull/5141) - Reuse dragListenerKeys_ variable in ol.control.ZoomSlider ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5118](https://github.com/openlayers/ol3/pull/5118) - Remove goog.dom.classlist usage ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5115](https://github.com/openlayers/ol3/pull/5115) - Clarify that lineDash has no effect in IE 10 and below ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#5136](https://github.com/openlayers/ol3/pull/5136) - Update eslint to version 2.5.3 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5123](https://github.com/openlayers/ol3/pull/5123) - Update coveralls to version 2.11.9 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5131](https://github.com/openlayers/ol3/pull/5131) - Update phantomjs-prebuilt to version 2.1.7 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5122](https://github.com/openlayers/ol3/pull/5122) - Update browser support info in intro tutorial ([@probins](https://github.com/probins))
|
||||||
|
* [#5112](https://github.com/openlayers/ol3/pull/5112) - Add decimals option to format write ([@probins](https://github.com/probins))
|
||||||
|
* [#5120](https://github.com/openlayers/ol3/pull/5120) - Add tileJSON option to ol.source.TileUTFGrid ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#5119](https://github.com/openlayers/ol3/pull/5119) - Add ol.source.Raster events on API docs page ([@drnextgis](https://github.com/drnextgis))
|
||||||
|
* [#5116](https://github.com/openlayers/ol3/pull/5116) - Improve examples pages on mobile devices a bit ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#5113](https://github.com/openlayers/ol3/pull/5113) - Memory leak in ol.control.FullScreen ([@AvatharDG](https://github.com/AvatharDG))
|
||||||
|
* [#5111](https://github.com/openlayers/ol3/pull/5111) - Remove CSS filter in examples ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5108](https://github.com/openlayers/ol3/pull/5108) - Remove unused ol.xml.getAttributeNodeNS function ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5106](https://github.com/openlayers/ol3/pull/5106) - Get rid of goog.math.Vec2 ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5096](https://github.com/openlayers/ol3/pull/5096) - Add tests for ol.source.Zoomify ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#5102](https://github.com/openlayers/ol3/pull/5102) - Fix typo in API docs ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5098](https://github.com/openlayers/ol3/pull/5098) - Reintroduce log messages for relevant WebGL assertions ([@bjornharrtell](https://github.com/bjornharrtell))
|
||||||
|
* [#5094](https://github.com/openlayers/ol3/pull/5094) - FAQ: answer question 4 ([@probins](https://github.com/probins))
|
||||||
|
* [#5092](https://github.com/openlayers/ol3/pull/5092) - add raster.jsdoc ([@drnextgis](https://github.com/drnextgis))
|
||||||
|
* [#5081](https://github.com/openlayers/ol3/pull/5081) - Snap to vertices or edges ([@drnextgis](https://github.com/drnextgis))
|
||||||
|
* [#5090](https://github.com/openlayers/ol3/pull/5090) - Update custom-builds.md ([@probins](https://github.com/probins))
|
||||||
|
* [#5089](https://github.com/openlayers/ol3/pull/5089) - Test for both transform coords should use roughlyEqual ([@probins](https://github.com/probins))
|
||||||
|
* [#5080](https://github.com/openlayers/ol3/pull/5080) - Fix geojson write GeometryCollection ([@probins](https://github.com/probins))
|
||||||
|
* [#5088](https://github.com/openlayers/ol3/pull/5088) - DEVELOPING.md: remove section on running Travis on fork ([@probins](https://github.com/probins))
|
||||||
|
* [#5087](https://github.com/openlayers/ol3/pull/5087) - assertion to check that there's a DOM node for target element ([@drnextgis](https://github.com/drnextgis))
|
||||||
|
* [#5069](https://github.com/openlayers/ol3/pull/5069) - Update jquery to version 2.2.2 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5083](https://github.com/openlayers/ol3/pull/5083) - Remove unnecessary lineTo calls in immediate polygon rendering ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#5082](https://github.com/openlayers/ol3/pull/5082) - Get rid of goog.log. ([@bjornharrtell](https://github.com/bjornharrtell))
|
||||||
|
* [#5079](https://github.com/openlayers/ol3/pull/5079) - Correcting a typo in the upgrade notes ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#5076](https://github.com/openlayers/ol3/pull/5076) - Update phantomjs-prebuilt to version 2.1.6 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5077](https://github.com/openlayers/ol3/pull/5077) - Make immediate API uniformly synchronous. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#5072](https://github.com/openlayers/ol3/pull/5072) - Add setStyle() and drawGeometry() to the immediate rendering API. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#5074](https://github.com/openlayers/ol3/pull/5074) - Do not rotate map canvas after composition ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#5071](https://github.com/openlayers/ol3/pull/5071) - correct way to determine freehand mode is enabled ([@drnextgis](https://github.com/drnextgis))
|
||||||
|
* [#5066](https://github.com/openlayers/ol3/pull/5066) - Add more getters to ol.source.Vector ([@bartvde](https://github.com/bartvde))
|
||||||
|
* [#5064](https://github.com/openlayers/ol3/pull/5064) - Fix inconsistency in geom docs ([@probins](https://github.com/probins))
|
||||||
|
* [#5063](https://github.com/openlayers/ol3/pull/5063) - Remove inappropriate information from API docs ([@drnextgis](https://github.com/drnextgis))
|
||||||
|
* [#5061](https://github.com/openlayers/ol3/pull/5061) - Remove redundant required option ([@drnextgis](https://github.com/drnextgis))
|
||||||
|
* [#5058](https://github.com/openlayers/ol3/pull/5058) - Note in docs that DOM renderer can also render vectors ([@probins](https://github.com/probins))
|
||||||
|
* [#5056](https://github.com/openlayers/ol3/pull/5056) - Note in docs that WebGL can render points ([@probins](https://github.com/probins))
|
||||||
|
* [#5055](https://github.com/openlayers/ol3/pull/5055) - Fix cruft on kml scale output ([@probins](https://github.com/probins))
|
||||||
|
* [#5051](https://github.com/openlayers/ol3/pull/5051) - Handle aborted tiles in ol.TileQueue ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5049](https://github.com/openlayers/ol3/pull/5049) - Supported browsers all have getComputedStyle ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#5048](https://github.com/openlayers/ol3/pull/5048) - Add tests for ol.dom methods ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#5031](https://github.com/openlayers/ol3/pull/5031) - support zooming out for ol.interaction.DragZoom ([@drnextgis](https://github.com/drnextgis))
|
||||||
|
* [#5036](https://github.com/openlayers/ol3/pull/5036) - Use imgSize when provided ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#5020](https://github.com/openlayers/ol3/pull/5020) - Update gaze to version 1.0.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5039](https://github.com/openlayers/ol3/pull/5039) - Update fs-extra to version 0.26.6 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5033](https://github.com/openlayers/ol3/pull/5033) - Document GPX geometry output types ([@probins](https://github.com/probins))
|
||||||
|
* [#5024](https://github.com/openlayers/ol3/pull/5024) - Resize the map canvas less aggressively ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#5000](https://github.com/openlayers/ol3/pull/5000) - Remove use of goog.math.Size and goog.style.setBorderBoxSize ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5027](https://github.com/openlayers/ol3/pull/5027) - Clarify default value of featureProjection on geometry write ([@probins](https://github.com/probins))
|
||||||
|
* [#5019](https://github.com/openlayers/ol3/pull/5019) - Update eslint to version 2.4.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5016](https://github.com/openlayers/ol3/pull/5016) - Add basic tests for ol.geom.flat.center ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#5015](https://github.com/openlayers/ol3/pull/5015) - Update proj4 to version 2.3.14 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5013](https://github.com/openlayers/ol3/pull/5013) - Fix typo in test description ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#5007](https://github.com/openlayers/ol3/pull/5007) - Accept simpler forms of specifying attribution(s) for sources. ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#5011](https://github.com/openlayers/ol3/pull/5011) - Add missing setProjection function to ol.VectorTile API ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#5010](https://github.com/openlayers/ol3/pull/5010) - Add and fix API docs for ol.events.Event stack ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#5009](https://github.com/openlayers/ol3/pull/5009) - Update tutorials ([@gberaudo](https://github.com/gberaudo))
|
||||||
|
* [#5006](https://github.com/openlayers/ol3/pull/5006) - Use the maintained slimerjs package ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#5003](https://github.com/openlayers/ol3/pull/5003) - Add 'function' jsdoc tag to ol.geom.Geometry#rotate ([@fredj](https://github.com/fredj))
|
||||||
|
* [#5002](https://github.com/openlayers/ol3/pull/5002) - Update eslint-config-openlayers to version 4.1.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4999](https://github.com/openlayers/ol3/pull/4999) - Remove use of goog.dom.removeNode ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4990](https://github.com/openlayers/ol3/pull/4990) - Add new ol.source.TileJSON#getTileJSON function ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4998](https://github.com/openlayers/ol3/pull/4998) - Remove unused ol.Map#isDef function ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4995](https://github.com/openlayers/ol3/pull/4995) - Remove unused ol.color functions. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4991](https://github.com/openlayers/ol3/pull/4991) - Do not remove listeners while dispatching event ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4984](https://github.com/openlayers/ol3/pull/4984) - Add new ol.geom.Geometry#rotate function ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4994](https://github.com/openlayers/ol3/pull/4994) - Add alpha default value to ol.Color array form ([@jonataswalker](https://github.com/jonataswalker))
|
||||||
|
* [#4992](https://github.com/openlayers/ol3/pull/4992) - Allow configuration of the test reporter ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4988](https://github.com/openlayers/ol3/pull/4988) - Update phantomjs-prebuilt to version 2.1.5 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4983](https://github.com/openlayers/ol3/pull/4983) - Update Bing Maps Portal url ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4981](https://github.com/openlayers/ol3/pull/4981) - Remove the viewport on map dispose ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4980](https://github.com/openlayers/ol3/pull/4980) - Remove unused goog.require ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4977](https://github.com/openlayers/ol3/pull/4977) - Add basic tests for ol.geom.flat.length methods ([@marcjansen](https://github.com/marcjansen))
|
||||||
|
* [#4973](https://github.com/openlayers/ol3/pull/4973) - Update eslint to version 2.3.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4971](https://github.com/openlayers/ol3/pull/4971) - Release v3.14.2 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4970](https://github.com/openlayers/ol3/pull/4970) - Tests for ol.Disposable. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4967](https://github.com/openlayers/ol3/pull/4967) - Add missing goog.inherits for ol.render.canvas.Immediate ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4955](https://github.com/openlayers/ol3/pull/4955) - Remove IE workarounds in src/ol/xml.js ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4960](https://github.com/openlayers/ol3/pull/4960) - Simplify clipping of lower resolution regions ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4950](https://github.com/openlayers/ol3/pull/4950) - Remove use of goog.Disposable(). ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4963](https://github.com/openlayers/ol3/pull/4963) - Handle more XHR errors in the TileJSON source ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4962](https://github.com/openlayers/ol3/pull/4962) - Skip tests where features are not available ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4956](https://github.com/openlayers/ol3/pull/4956) - Fix Examples layout page ([@jonataswalker](https://github.com/jonataswalker))
|
||||||
|
* [#4958](https://github.com/openlayers/ol3/pull/4958) - Stop wheel events instead of DOMMouseScroll events ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4947](https://github.com/openlayers/ol3/pull/4947) - IE support for ol.source.Raster. ([@tschaub](https://github.com/tschaub))
|
||||||
|
* [#4944](https://github.com/openlayers/ol3/pull/4944) - Update resemblejs to version 2.2.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4942](https://github.com/openlayers/ol3/pull/4942) - Remove unused files in examples/data/ ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4805](https://github.com/openlayers/ol3/pull/4805) - Add new cacheSize option to ol.source ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4940](https://github.com/openlayers/ol3/pull/4940) - Release v3.14.1 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4939](https://github.com/openlayers/ol3/pull/4939) - Fix rendering of opaque layers with opacity != 1 ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4938](https://github.com/openlayers/ol3/pull/4938) - Get rid of goog.dom.getFirstElementChild ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4937](https://github.com/openlayers/ol3/pull/4937) - Get rid of goog.json ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4936](https://github.com/openlayers/ol3/pull/4936) - Remove jquery from getfeatureinfo-layers example ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4930](https://github.com/openlayers/ol3/pull/4930) - Use ADVANCED instead of ADVANCED_OPTIMIZATIONS ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4917](https://github.com/openlayers/ol3/pull/4917) - Make ol.source.Cluster more flexible by adding a geometryFunction option ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4918](https://github.com/openlayers/ol3/pull/4918) - Don't change the canvas size to clear it ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4923](https://github.com/openlayers/ol3/pull/4923) - Update custom-builds.md ([@xlhomme](https://github.com/xlhomme))
|
||||||
|
* [#4929](https://github.com/openlayers/ol3/pull/4929) - Update clean-css to version 3.4.10 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4928](https://github.com/openlayers/ol3/pull/4928) - Upgrade to JSTS 1.0.2 in example ([@bjornharrtell](https://github.com/bjornharrtell))
|
||||||
|
* [#4927](https://github.com/openlayers/ol3/pull/4927) - Upgrade JSTS in example. ([@bjornharrtell](https://github.com/bjornharrtell))
|
||||||
|
* [#4809](https://github.com/openlayers/ol3/pull/4809) - Fix multipolygon clone. ([@fperucic](https://github.com/fperucic))
|
||||||
|
* [#4924](https://github.com/openlayers/ol3/pull/4924) - Update coveralls to version 2.11.8 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4921](https://github.com/openlayers/ol3/pull/4921) - Unlisten before calling listener and bind to target by default ([@ahocevar](https://github.com/ahocevar))
|
||||||
|
* [#4868](https://github.com/openlayers/ol3/pull/4868) - Allow to refresh a source and reload its data. ([@sebasbaumh](https://github.com/sebasbaumh))
|
||||||
|
* [#4903](https://github.com/openlayers/ol3/pull/4903) - Remove use of goog.style.getRelativePosition ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4902](https://github.com/openlayers/ol3/pull/4902) - Remove use of goog.style.getClientPosition ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4916](https://github.com/openlayers/ol3/pull/4916) - Fix ol.format.GeoJSON#writeFeatureObject return type ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4909](https://github.com/openlayers/ol3/pull/4909) - Add ol.renderer.dom.VectorLayer#clearFrame ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4915](https://github.com/openlayers/ol3/pull/4915) - Use {} instead of Object ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4914](https://github.com/openlayers/ol3/pull/4914) - Export ol.proj.equivalent ([@sebasbaumh](https://github.com/sebasbaumh))
|
||||||
|
* [#4908](https://github.com/openlayers/ol3/pull/4908) - Remove use of goog.math.Rect ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4900](https://github.com/openlayers/ol3/pull/4900) - Make ol.format.XML a @struct ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4880](https://github.com/openlayers/ol3/pull/4880) - Update closure-util to version 1.11.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4905](https://github.com/openlayers/ol3/pull/4905) - Remove use of goog.style.setPosition ([@fredj](https://github.com/fredj))
|
||||||
|
* [#4879](https://github.com/openlayers/ol3/pull/4879) - Update metalsmith-layouts to version 1.6.4 🚀 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4901](https://github.com/openlayers/ol3/pull/4901) - Release v3.14.0 ([@openlayers](https://github.com/openlayers))
|
||||||
|
* [#4899](https://github.com/openlayers/ol3/pull/4899) - Use ol.format.GMLBase#srsName instead of undeclared srsName_ ([@fredj](https://github.com/fredj))
|
||||||
9
changelog/v3.15.1.md
Normal file
9
changelog/v3.15.1.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# v3.15.1
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The v3.15.1 release is a patch release that addresses a regression in the v3.15.0 release. See the [v3.15.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.15.0) for details on upgrading from v3.14.x.
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
|
||||||
|
* [#5190](https://github.com/openlayers/ol3/pull/5190) - Revert "Batch polygon fill and stroke instructions" ([@ahocevar](https://github.com/ahocevar))
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"library_url": "https://github.com/google/closure-library/archive/5b25e65.zip"
|
|
||||||
}
|
|
||||||
@@ -12,11 +12,11 @@
|
|||||||
],
|
],
|
||||||
"externs": [
|
"externs": [
|
||||||
"externs/bingmaps.js",
|
"externs/bingmaps.js",
|
||||||
|
"externs/cartodb.js",
|
||||||
"externs/bootstrap.js",
|
"externs/bootstrap.js",
|
||||||
"externs/closure-compiler.js",
|
"externs/closure-compiler.js",
|
||||||
"externs/esrijson.js",
|
"externs/esrijson.js",
|
||||||
"externs/example.js",
|
"externs/example.js",
|
||||||
"externs/fastclick.js",
|
|
||||||
"externs/geojson.js",
|
"externs/geojson.js",
|
||||||
"externs/jquery-1.9.js",
|
"externs/jquery-1.9.js",
|
||||||
"externs/proj4js.js",
|
"externs/proj4js.js",
|
||||||
@@ -24,18 +24,17 @@
|
|||||||
"externs/topojson.js"
|
"externs/topojson.js"
|
||||||
],
|
],
|
||||||
"define": [
|
"define": [
|
||||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
|
||||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||||
"goog.json.USE_NATIVE_JSON=true",
|
|
||||||
"goog.DEBUG=false"
|
"goog.DEBUG=false"
|
||||||
],
|
],
|
||||||
"jscomp_error": [
|
"jscomp_error": [
|
||||||
"*"
|
"*"
|
||||||
],
|
],
|
||||||
"jscomp_off": [
|
"jscomp_off": [
|
||||||
"useOfGoogBase",
|
|
||||||
"unnecessaryCasts",
|
"unnecessaryCasts",
|
||||||
|
"useOfGoogBase",
|
||||||
"lintChecks",
|
"lintChecks",
|
||||||
|
"analyzerChecks",
|
||||||
"missingProvide",
|
"missingProvide",
|
||||||
"unknownDefines"
|
"unknownDefines"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,10 +13,10 @@
|
|||||||
"externs": [
|
"externs": [
|
||||||
"externs/bingmaps.js",
|
"externs/bingmaps.js",
|
||||||
"externs/bootstrap.js",
|
"externs/bootstrap.js",
|
||||||
|
"externs/cartodb.js",
|
||||||
"externs/closure-compiler.js",
|
"externs/closure-compiler.js",
|
||||||
"externs/esrijson.js",
|
"externs/esrijson.js",
|
||||||
"externs/example.js",
|
"externs/example.js",
|
||||||
"externs/fastclick.js",
|
|
||||||
"externs/geojson.js",
|
"externs/geojson.js",
|
||||||
"externs/jquery-1.9.js",
|
"externs/jquery-1.9.js",
|
||||||
"externs/proj4js.js",
|
"externs/proj4js.js",
|
||||||
@@ -24,18 +24,17 @@
|
|||||||
"externs/topojson.js"
|
"externs/topojson.js"
|
||||||
],
|
],
|
||||||
"define": [
|
"define": [
|
||||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
|
||||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||||
"goog.json.USE_NATIVE_JSON=true",
|
|
||||||
"goog.DEBUG=false"
|
"goog.DEBUG=false"
|
||||||
],
|
],
|
||||||
"jscomp_error": [
|
"jscomp_error": [
|
||||||
"*"
|
"*"
|
||||||
],
|
],
|
||||||
"jscomp_off": [
|
"jscomp_off": [
|
||||||
"useOfGoogBase",
|
|
||||||
"unnecessaryCasts",
|
"unnecessaryCasts",
|
||||||
"lintChecks"
|
"useOfGoogBase",
|
||||||
|
"lintChecks",
|
||||||
|
"analyzerChecks"
|
||||||
],
|
],
|
||||||
"extra_annotation_name": [
|
"extra_annotation_name": [
|
||||||
"api", "observable"
|
"api", "observable"
|
||||||
|
|||||||
@@ -5,26 +5,42 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" type="text/css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" type="text/css">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" type="text/css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css">
|
||||||
<link rel="stylesheet" href="./resources/prism/prism.css" type="text/css">
|
<link rel="stylesheet" href="./resources/prism/prism.css" type="text/css">
|
||||||
<link rel="stylesheet" href="../css/ol.css" type="text/css">
|
<link rel="stylesheet" href="../css/ol.css" type="text/css">
|
||||||
<link rel="stylesheet" href="./resources/layout.css" type="text/css">
|
<link rel="stylesheet" href="./resources/layout.css" type="text/css">
|
||||||
{{{ extraHead.local }}}
|
{{{ extraHead.local }}}
|
||||||
{{{ css.tag }}}
|
{{{ css.tag }}}
|
||||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch"></script>
|
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList"></script>
|
||||||
<script src="./resources/zeroclipboard/ZeroClipboard.min.js"></script>
|
<script src="./resources/zeroclipboard/ZeroClipboard.min.js"></script>
|
||||||
<title>{{ title }}</title>
|
<title>{{ title }}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<header class="navbar" role="navigation">
|
<header class="navbar" role="navigation">
|
||||||
<div class="container" id="navbar-inner-container">
|
<div class="container">
|
||||||
<a class="navbar-brand" href="./"><img src="./resources/logo-70x70.png"> OpenLayers 3 Examples</a>
|
<div class="display-table pull-left" id="navbar-logo-container">
|
||||||
|
<a class="navbar-brand" href="./"><img src="./resources/logo-70x70.png"> OpenLayers Examples</a>
|
||||||
|
</div>
|
||||||
|
<!-- menu items that get hidden below 768px width -->
|
||||||
|
<nav class='collapse navbar-collapse navbar-responsive-collapse'>
|
||||||
|
<ul class="nav navbar-nav pull-right">
|
||||||
|
<li><a href="../doc">Docs</a></li>
|
||||||
|
<li><a class="active" href="index.html">Examples</a></li>
|
||||||
|
<li><a href="../apidoc">API</a></li>
|
||||||
|
<li><a href="https://github.com/openlayers/ol3">Code</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
|
||||||
|
<button id="latest-dismiss" type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
This example uses OpenLayers v<span>{{ olVersion }}</span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4 id="title">{{ title }}</h4>
|
<h4 id="title">{{ title }}</h4>
|
||||||
@@ -74,4 +90,30 @@
|
|||||||
<script src="./resources/prism/prism.min.js"></script>
|
<script src="./resources/prism/prism.min.js"></script>
|
||||||
{{{ js.tag }}}
|
{{{ js.tag }}}
|
||||||
</body>
|
</body>
|
||||||
|
<script>
|
||||||
|
var packageUrl = 'https://raw.githubusercontent.com/openlayers/openlayers.github.io/build/package.json';
|
||||||
|
fetch(packageUrl).then(function(response) {
|
||||||
|
return response.json();
|
||||||
|
}).then(function(json) {
|
||||||
|
var latestVersion = json.version;
|
||||||
|
document.getElementById('latest-version').innerHTML = latestVersion;
|
||||||
|
var url = window.location.href;
|
||||||
|
var branchSearch = url.match(/\/([^\/]*)\/examples\//);
|
||||||
|
var cookieText = 'dismissed=-' + latestVersion + '-';
|
||||||
|
var dismissed = document.cookie.indexOf(cookieText) != -1;
|
||||||
|
if (!dismissed && /^v[0-9\.]*$/.test(branchSearch[1]) && '{{ olVersion }}' != latestVersion) {
|
||||||
|
var link = url.replace(branchSearch[0], '/latest/examples/');
|
||||||
|
fetch(link, {method: 'head'}).then(function(response) {
|
||||||
|
var a = document.getElementById('latest-link');
|
||||||
|
a.href = response.status == 200 ? link : '../../latest/examples/';
|
||||||
|
});
|
||||||
|
var latestCheck = document.getElementById('latest-check');
|
||||||
|
latestCheck.style.display = '';
|
||||||
|
document.getElementById('latest-dismiss').onclick = function() {
|
||||||
|
latestCheck.style.display = 'none';
|
||||||
|
document.cookie = cookieText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -39,3 +39,26 @@ Interactions for [vector features](ol.Feature.html)
|
|||||||
[ol.Geolocation](ol.Geolocation.html)<br>
|
[ol.Geolocation](ol.Geolocation.html)<br>
|
||||||
[ol.Overlay](ol.Overlay.html)<br></td>
|
[ol.Overlay](ol.Overlay.html)<br></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### API change policy
|
||||||
|
|
||||||
|
The OpenLayers 3.x API consists of
|
||||||
|
* names of classes, class methods and properties
|
||||||
|
* names of static functions and constants
|
||||||
|
* order and types of function arguments
|
||||||
|
* types of function return values
|
||||||
|
|
||||||
|
API elements marked as `experimental` provide stable and functioning code, but may change.
|
||||||
|
Any changes will be documented in upgrade notes so application code can be changed appropriately
|
||||||
|
before using the new version of the library. All other API elements will remain compatible throughout the 3.x releases so that no changes to existing application code are necessary when upgrading to a later version.
|
||||||
|
|
||||||
|
*Note*: The API change policy does not cover CSS class names that are used to theme the
|
||||||
|
OpenLayers UI.
|
||||||
|
|
||||||
|
*Note for Closure Compiler users compiling their application code together with OpenLayers*:
|
||||||
|
The names of types other than those in the list above (e.g. `ol.Pixel`) are subject to change. It
|
||||||
|
is therefore recommended to either use the resolved type as listed in the API docs (e.g.
|
||||||
|
`Array.<number>` instead of `ol.Pixel`), or pay attention to the upgrade notes, which will list
|
||||||
|
the changes for those types.
|
||||||
|
|||||||
@@ -113,7 +113,8 @@ function generate(title, docs, filename, resolveLinks) {
|
|||||||
var docData = {
|
var docData = {
|
||||||
filename: filename,
|
filename: filename,
|
||||||
title: title,
|
title: title,
|
||||||
docs: docs
|
docs: docs,
|
||||||
|
packageInfo: ( find({kind: 'package'}) || [] ) [0]
|
||||||
};
|
};
|
||||||
|
|
||||||
var outpath = path.join(outdir, filename),
|
var outpath = path.join(outdir, filename),
|
||||||
@@ -327,11 +328,6 @@ exports.publish = function(taffyData, opts, tutorials) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// update outdir if necessary, then create outdir
|
|
||||||
var packageInfo = ( find({kind: 'package'}) || [] ) [0];
|
|
||||||
if (packageInfo && packageInfo.name) {
|
|
||||||
outdir = path.join(outdir, packageInfo.name, packageInfo.version);
|
|
||||||
}
|
|
||||||
fs.mkPath(outdir);
|
fs.mkPath(outdir);
|
||||||
|
|
||||||
// copy the template's static files to outdir
|
// copy the template's static files to outdir
|
||||||
@@ -439,13 +435,10 @@ exports.publish = function(taffyData, opts, tutorials) {
|
|||||||
if (members.globals.length) { generate('Global', [{kind: 'globalobj'}], globalUrl); }
|
if (members.globals.length) { generate('Global', [{kind: 'globalobj'}], globalUrl); }
|
||||||
|
|
||||||
// index page displays information from package.json and lists files
|
// index page displays information from package.json and lists files
|
||||||
var files = find({kind: 'file'}),
|
var files = find({kind: 'file'});
|
||||||
packages = find({kind: 'package'});
|
|
||||||
|
|
||||||
generate('Index',
|
generate('Index',
|
||||||
packages.concat(
|
[{kind: 'mainpage', readme: opts.readme, longname: (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'}].concat(files),
|
||||||
[{kind: 'mainpage', readme: opts.readme, longname: (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'}]
|
|
||||||
).concat(files),
|
|
||||||
indexUrl);
|
indexUrl);
|
||||||
|
|
||||||
// set up the lists that we'll use to generate pages
|
// set up the lists that we'll use to generate pages
|
||||||
|
|||||||
@@ -53,20 +53,44 @@ $(function () {
|
|||||||
$(window).on('resize', _onResize);
|
$(window).on('resize', _onResize);
|
||||||
_onResize();
|
_onResize();
|
||||||
|
|
||||||
|
var currentVersion = document.getElementById('package-version').innerHTML;
|
||||||
|
|
||||||
|
// warn about outdated version
|
||||||
|
var packageUrl = 'https://raw.githubusercontent.com/openlayers/openlayers.github.io/build/package.json';
|
||||||
|
fetch(packageUrl).then(function(response) {
|
||||||
|
return response.json();
|
||||||
|
}).then(function(json) {
|
||||||
|
var latestVersion = json.version;
|
||||||
|
document.getElementById('latest-version').innerHTML = latestVersion;
|
||||||
|
var url = window.location.href;
|
||||||
|
var branchSearch = url.match(/\/([^\/]*)\/apidoc\//);
|
||||||
|
var cookieText = 'dismissed=-' + latestVersion + '-';
|
||||||
|
var dismissed = document.cookie.indexOf(cookieText) != -1;
|
||||||
|
if (!dismissed && /^v[0-9\.]*$/.test(branchSearch[1]) && currentVersion != latestVersion) {
|
||||||
|
var link = url.replace(branchSearch[0], '/latest/apidoc/');
|
||||||
|
fetch(link, {method: 'head'}).then(function(response) {
|
||||||
|
var a = document.getElementById('latest-link');
|
||||||
|
a.href = response.status == 200 ? link : '../../latest/apidoc/';
|
||||||
|
});
|
||||||
|
var latestCheck = document.getElementById('latest-check');
|
||||||
|
latestCheck.style.display = '';
|
||||||
|
document.getElementById('latest-dismiss').onclick = function() {
|
||||||
|
latestCheck.style.display = 'none';
|
||||||
|
document.cookie = cookieText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// create source code links to github
|
// create source code links to github
|
||||||
var srcLinks = $('div.tag-source');
|
var srcLinks = $('div.tag-source');
|
||||||
var masterSearch = window.location.href.match(/\/([^\/]*\/)apidoc\//);
|
srcLinks.each(function(i, el) {
|
||||||
if (masterSearch && masterSearch.length) {
|
var textParts = el.innerHTML.trim().split(', ');
|
||||||
var branch = masterSearch[1];
|
var link = 'https://github.com/openlayers/ol3/blob/v' + currentVersion + '/' +
|
||||||
srcLinks.each(function(i, el) {
|
textParts[0];
|
||||||
var textParts = el.innerHTML.trim().split(', ');
|
el.innerHTML = '<a href="' + link + '">' + textParts[0] + '</a>, ' +
|
||||||
var link = 'https://github.com/openlayers/ol3/blob/' + branch +
|
'<a href="' + link + textParts[1].replace('line ', '#l') + '">' +
|
||||||
textParts[0];
|
textParts[1] + '</a>';
|
||||||
el.innerHTML = '<a href="' + link + '">' + textParts[0] + '</a>, ' +
|
});
|
||||||
'<a href="' + link + textParts[1].replace('line ', '#l') + '">' +
|
|
||||||
textParts[1] + '</a>';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// show/hide unstable items
|
// show/hide unstable items
|
||||||
var links = $('a[href^="ol."]');
|
var links = $('a[href^="ol."]');
|
||||||
|
|||||||
@@ -416,3 +416,7 @@ footer {
|
|||||||
left: 250px;
|
left: 250px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
#latest-check {
|
||||||
|
margin-top: -10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
|
<?js
|
||||||
|
var version = obj.packageInfo.version;
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>OpenLayers 3 API Reference - <?js= title ?></title>
|
<title>OpenLayers v<?js= version ?> API - <?js= title ?></title>
|
||||||
|
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch"></script>
|
||||||
<script src="scripts/prettify/prettify.js"> </script>
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
<script src="scripts/prettify/lang-css.js"> </script>
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
<script src="scripts/jquery.min.js"> </script>
|
<script src="scripts/jquery.min.js"> </script>
|
||||||
@@ -36,6 +40,10 @@
|
|||||||
<?js= this.partial('navigation.tmpl', this) ?>
|
<?js= this.partial('navigation.tmpl', this) ?>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<h1 class="page-title" data-filename="<?js= filename ?>"><?js= title ?></h1>
|
<h1 class="page-title" data-filename="<?js= filename ?>"><?js= title ?></h1>
|
||||||
|
<div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
|
||||||
|
<button id="latest-dismiss" type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
This documentation is for OpenLayers v<span id="package-version"><?js= version ?></span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
|
||||||
|
</div>
|
||||||
<?js= content ?>
|
<?js= content ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -84,4 +84,4 @@ var self = this;
|
|||||||
</li>
|
</li>
|
||||||
<?js }); ?>
|
<?js }); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"compile": {
|
"compile": {
|
||||||
"externs": [
|
"externs": [
|
||||||
"externs/bingmaps.js",
|
"externs/bingmaps.js",
|
||||||
|
"externs/cartodb.js",
|
||||||
"externs/closure-compiler.js",
|
"externs/closure-compiler.js",
|
||||||
"externs/esrijson.js",
|
"externs/esrijson.js",
|
||||||
"externs/geojson.js",
|
"externs/geojson.js",
|
||||||
@@ -14,18 +15,17 @@
|
|||||||
"externs/topojson.js"
|
"externs/topojson.js"
|
||||||
],
|
],
|
||||||
"define": [
|
"define": [
|
||||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
|
||||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||||
"goog.json.USE_NATIVE_JSON=true",
|
|
||||||
"goog.DEBUG=false"
|
"goog.DEBUG=false"
|
||||||
],
|
],
|
||||||
"jscomp_error": [
|
"jscomp_error": [
|
||||||
"*"
|
"*"
|
||||||
],
|
],
|
||||||
"jscomp_off": [
|
"jscomp_off": [
|
||||||
"useOfGoogBase",
|
|
||||||
"unnecessaryCasts",
|
"unnecessaryCasts",
|
||||||
"lintChecks"
|
"useOfGoogBase",
|
||||||
|
"lintChecks",
|
||||||
|
"analyzerChecks"
|
||||||
],
|
],
|
||||||
"extra_annotation_name": [
|
"extra_annotation_name": [
|
||||||
"api", "observable"
|
"api", "observable"
|
||||||
|
|||||||
16
doc/faq.md
16
doc/faq.md
@@ -161,6 +161,22 @@ var swissCoord = ol.proj.transform([8.23, 46.86], 'EPSG:4326', 'EPSG:21781');
|
|||||||
|
|
||||||
## Why is the order of a coordinate [lon,lat], and not [lat,lon]?
|
## Why is the order of a coordinate [lon,lat], and not [lat,lon]?
|
||||||
|
|
||||||
|
Because of two different and incompatible conventions. Latitude and longitude
|
||||||
|
are normally given in that order. Maps are 2D representations/projections
|
||||||
|
of the earth's surface, with coordinates expressed in the `x,y` grid of the
|
||||||
|
[Cartesian system](https://en.wikipedia.org/wiki/Cartesian_coordinate_system).
|
||||||
|
As they are by convention drawn with west on the left and north at the top,
|
||||||
|
this means that `x` represents longitude, and `y` latitude. As stated above,
|
||||||
|
OpenLayers is designed to handle all projections, but the default view is in
|
||||||
|
projected Cartesian coordinates. It would make no sense to have duplicate
|
||||||
|
functions to handle coordinates in both the Cartesian `x,y` and `lat,lon`
|
||||||
|
systems, so the degrees of latitude and longitude should be entered as though
|
||||||
|
they were Cartesian, in other words, they are `lon,lat`.
|
||||||
|
|
||||||
|
If you have difficulty remembering which way round it is, use the language code
|
||||||
|
for English, `en`, as a mnemonic: East before North.
|
||||||
|
|
||||||
|
#### A practical example
|
||||||
So you want to center your map on a certain place on the earth and obviously you
|
So you want to center your map on a certain place on the earth and obviously you
|
||||||
need to have its coordinates for this. Let's assume you want your map centered
|
need to have its coordinates for this. Let's assume you want your map centered
|
||||||
on Schladming, a beautiful place in Austria. Head over to the wikipedia
|
on Schladming, a beautiful place in Austria. Head over to the wikipedia
|
||||||
|
|||||||
@@ -167,9 +167,6 @@ The minimum config file looks like this:
|
|||||||
"node_modules/openlayers/externs/topojson.js"
|
"node_modules/openlayers/externs/topojson.js"
|
||||||
],
|
],
|
||||||
"define": [
|
"define": [
|
||||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
|
||||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
|
||||||
"goog.json.USE_NATIVE_JSON=true",
|
|
||||||
"goog.DEBUG=false",
|
"goog.DEBUG=false",
|
||||||
"ol.ENABLE_DOM=false",
|
"ol.ENABLE_DOM=false",
|
||||||
"ol.ENABLE_WEBGL=false"
|
"ol.ENABLE_WEBGL=false"
|
||||||
@@ -178,9 +175,6 @@ The minimum config file looks like this:
|
|||||||
"node_modules/openlayers/externs/olx.js",
|
"node_modules/openlayers/externs/olx.js",
|
||||||
"node_modules/openlayers/externs/oli.js"
|
"node_modules/openlayers/externs/oli.js"
|
||||||
],
|
],
|
||||||
"jscomp_off": [
|
|
||||||
"unknownDefines"
|
|
||||||
],
|
|
||||||
"extra_annotation_name": [
|
"extra_annotation_name": [
|
||||||
"api", "observable"
|
"api", "observable"
|
||||||
],
|
],
|
||||||
@@ -223,9 +217,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.array.ASSUME_NATIVE_FUNCTIONS=true",
|
|
||||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||||
"goog.json.USE_NATIVE_JSON=true",
|
|
||||||
"goog.DEBUG=false",
|
"goog.DEBUG=false",
|
||||||
"ol.ENABLE_DOM=false",
|
"ol.ENABLE_DOM=false",
|
||||||
"ol.ENABLE_WEBGL=false"
|
"ol.ENABLE_WEBGL=false"
|
||||||
@@ -235,41 +227,13 @@ Here is a version of `config.json` with more compilation checks enabled:
|
|||||||
"node_modules/openlayers/externs/oli.js"
|
"node_modules/openlayers/externs/oli.js"
|
||||||
],
|
],
|
||||||
"jscomp_error": [
|
"jscomp_error": [
|
||||||
"accessControls",
|
"*"
|
||||||
"ambiguousFunctionDecl",
|
|
||||||
"checkEventfulObjectDisposal",
|
|
||||||
"checkRegExp",
|
|
||||||
"checkTypes",
|
|
||||||
"checkVars",
|
|
||||||
"const",
|
|
||||||
"constantProperty",
|
|
||||||
"deprecated",
|
|
||||||
"duplicateMessage",
|
|
||||||
"es3",
|
|
||||||
"es5Strict",
|
|
||||||
"externsValidation",
|
|
||||||
"fileoverviewTags",
|
|
||||||
"globalThis",
|
|
||||||
"internetExplorerChecks",
|
|
||||||
"invalidCasts",
|
|
||||||
"misplacedTypeAnnotation",
|
|
||||||
"missingGetCssName",
|
|
||||||
"missingProperties",
|
|
||||||
"missingProvide",
|
|
||||||
"missingRequire",
|
|
||||||
"missingReturn",
|
|
||||||
"newCheckTypes",
|
|
||||||
"nonStandardJsDocs",
|
|
||||||
"suspiciousCode",
|
|
||||||
"strictModuleDepCheck",
|
|
||||||
"typeInvalidation",
|
|
||||||
"undefinedNames",
|
|
||||||
"undefinedVars",
|
|
||||||
"uselessCode",
|
|
||||||
"visibility"
|
|
||||||
],
|
],
|
||||||
"jscomp_off": [
|
"jscomp_off": [
|
||||||
"unknownDefines"
|
"unknownDefines"
|
||||||
|
"useOfGoogBase",
|
||||||
|
"lintChecks",
|
||||||
|
"analyzerChecks"
|
||||||
],
|
],
|
||||||
"extra_annotation_name": [
|
"extra_annotation_name": [
|
||||||
"api", "observable"
|
"api", "observable"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ This particular tutorial explains how to create custom builds of OpenLayers 3.
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
OpenLayers 3's build tools use Node and Java, so you need to have Node and Java installed on your machine. You can run `node --version` and `java -version` to test that Node and Java are installed, respectively.
|
OpenLayers 3's build tools use Node and Java, so you need to have Node and Java installed on your machine. You can run `node --version` and `java -version` to test that Node and Java are installed, respectively. See [developing guide](https://github.com/openlayers/ol3/blob/master/DEVELOPING.md) for minimum version numbers required.
|
||||||
|
|
||||||
## Download OpenLayers
|
## Download OpenLayers
|
||||||
|
|
||||||
@@ -60,18 +60,12 @@ Creating a custom build requires writing a build configuration file. The format
|
|||||||
"externs/topojson.js"
|
"externs/topojson.js"
|
||||||
],
|
],
|
||||||
"define": [
|
"define": [
|
||||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
|
||||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
|
||||||
"goog.json.USE_NATIVE_JSON=true",
|
|
||||||
"goog.DEBUG=false"
|
"goog.DEBUG=false"
|
||||||
],
|
],
|
||||||
"jscomp_off": [
|
|
||||||
"unknownDefines"
|
|
||||||
],
|
|
||||||
"extra_annotation_name": [
|
"extra_annotation_name": [
|
||||||
"api", "observable"
|
"api", "observable"
|
||||||
],
|
],
|
||||||
"compilation_level": "ADVANCED_OPTIMIZATIONS",
|
"compilation_level": "ADVANCED",
|
||||||
"manage_closure_dependencies": true
|
"manage_closure_dependencies": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -193,16 +187,19 @@ Now let's try a more complicated example: [`heatmaps-earthquakes`](http://openla
|
|||||||
{
|
{
|
||||||
"exports": [
|
"exports": [
|
||||||
"ol.layer.Heatmap",
|
"ol.layer.Heatmap",
|
||||||
"ol.source.KML",
|
"ol.source.Vector",
|
||||||
|
"ol.format.KML",
|
||||||
"ol.layer.Heatmap#getSource",
|
"ol.layer.Heatmap#getSource",
|
||||||
"ol.source.KML#on",
|
"ol.source.Vector#on",
|
||||||
"ol.source.VectorEvent#feature",
|
"ol.source.VectorEvent#feature",
|
||||||
"ol.Feature#get",
|
"ol.Feature#get",
|
||||||
"ol.Feature#set",
|
"ol.Feature#set",
|
||||||
"ol.layer.Tile",
|
"ol.layer.Tile",
|
||||||
"ol.source.Stamen",
|
"ol.source.Stamen",
|
||||||
"ol.Map",
|
"ol.Map",
|
||||||
"ol.View"
|
"ol.View",
|
||||||
|
"ol.layer.Heatmap#setRadius",
|
||||||
|
"ol.layer.Heatmap#setBlur"
|
||||||
],
|
],
|
||||||
"compile": {
|
"compile": {
|
||||||
"externs": [
|
"externs": [
|
||||||
@@ -214,10 +211,9 @@ Now let's try a more complicated example: [`heatmaps-earthquakes`](http://openla
|
|||||||
"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.dom.ASSUME_STANDARDS_MODE=true",
|
|
||||||
"goog.DEBUG=false"
|
"goog.DEBUG=false"
|
||||||
],
|
],
|
||||||
"compilation_level": "ADVANCED_OPTIMIZATIONS",
|
"compilation_level": "ADVANCED",
|
||||||
"manage_closure_dependencies": true
|
"manage_closure_dependencies": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,6 +223,10 @@ The exports are given here in the order in which they occur in the `heatmaps-ear
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
## Maintaining the code
|
||||||
|
|
||||||
|
If you installed OpenLayers from the Node package, you can use `npm` to upgrade to the latest version. If you cloned the Github repo, simply pulling in the latest code may not be enough, as some of the packages used, for example, the compiler, may need upgrading too. Do this by using `npm install` rather than `npm update`.
|
||||||
|
|
||||||
## Conclusion
|
## Conclusion
|
||||||
|
|
||||||
This tutorial should have given you the information you need to create custom builds, i.e. builds tailored to your application. See the [tasks readme](https://github.com/openlayers/ol3/tree/master/tasks/readme.md) for more information on the build scripts and the properties you can use in the build configuration file.
|
This tutorial should have given you the information you need to create custom builds, i.e. builds tailored to your application. See the [tasks readme](https://github.com/openlayers/ol3/tree/master/tasks/readme.md) for more information on the build scripts and the properties you can use in the build configuration file.
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Although Closure library functions are widely used within OL3, none of them are
|
|||||||
Unlike in, say, Node, where a module's exports are fixed in the source, with Closure Compiler, exports can be defined at compile time. This makes it easy to create builds that are customized to the needs of a particular site or application: a __custom build__ only exports those properties and methods needed by the site or application. As the full build is large, and will probably become larger as new features are added to the API, it's recommended that sites create a custom build for production software.
|
Unlike in, say, Node, where a module's exports are fixed in the source, with Closure Compiler, exports can be defined at compile time. This makes it easy to create builds that are customized to the needs of a particular site or application: a __custom build__ only exports those properties and methods needed by the site or application. As the full build is large, and will probably become larger as new features are added to the API, it's recommended that sites create a custom build for production software.
|
||||||
|
|
||||||
## Renderers and Browser Support
|
## Renderers and Browser Support
|
||||||
The library currently includes three renderers: Canvas, DOM, and WebGL. All three support raster data from tile/image servers, but only the Canvas renderer currently supports vector data. This means that only those browsers that [support Canvas](http://caniuse.com/canvas) can handle vector data. In particular, this excludes Internet Explorer versions before 9, though there is some support for those in the DOM renderer. Clearly, the WebGL renderer can only be used on those devices and browsers supporting WebGL.
|
The library currently includes three renderers: Canvas, DOM, and WebGL. All three support both raster data from tile/image servers, and vector data; WebGL however only supports Point vectors and does not support labels. Clearly only those browsers that [support Canvas](http://caniuse.com/canvas) can use the Canvas renderer. Equally, the WebGL renderer can only be used on those devices and [browsers](http://caniuse.com/webgl) that support WebGL. Internet Explorer versions before 9 are not supported at all.
|
||||||
|
|
||||||
The library is intended for use on both desktop/laptop and mobile devices.
|
The library is intended for use on both desktop/laptop and mobile devices.
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ The easiest way to use a custom projection is to add the [Proj4js](http://proj4j
|
|||||||
Following example shows definition of a [British National Grid](http://epsg.io/27700):
|
Following example shows definition of a [British National Grid](http://epsg.io/27700):
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.12/proj4.js"></script>
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.14/proj4.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
|
|||||||
16
examples/.eslintrc
Normal file
16
examples/.eslintrc
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"globals": {
|
||||||
|
"$": false,
|
||||||
|
"arc": false,
|
||||||
|
"common": false,
|
||||||
|
"createMapboxStreetsV6Style": false,
|
||||||
|
"d3": false,
|
||||||
|
"jsPDF": false,
|
||||||
|
"jsts": false,
|
||||||
|
"topojson": false,
|
||||||
|
"turf": false
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-unused-vars": [2, {"varsIgnorePattern": "^map"}]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,3 +14,6 @@ a.skiplink:focus {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0.3em;
|
padding: 0.3em;
|
||||||
}
|
}
|
||||||
|
#map:focus {
|
||||||
|
outline: #4A74A8 solid 0.15em;
|
||||||
|
}
|
||||||
|
|||||||
11
examples/arcgis-image.html
Normal file
11
examples/arcgis-image.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
layout: example.html
|
||||||
|
title: Image ArcGIS MapServer
|
||||||
|
shortdesc: Example of an image ArcGIS layer.
|
||||||
|
docs: >
|
||||||
|
This example shows how to use a dynamic ArcGIS REST MapService.
|
||||||
|
This source type supports Map and Image Services. For dyamic ArcGIS
|
||||||
|
services.
|
||||||
|
tags: arcgis, image, dynamiclayer"
|
||||||
|
---
|
||||||
|
<div id="map" class="map"></div>
|
||||||
29
examples/arcgis-image.js
Normal file
29
examples/arcgis-image.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
goog.require('ol.Map');
|
||||||
|
goog.require('ol.View');
|
||||||
|
goog.require('ol.layer.Tile');
|
||||||
|
goog.require('ol.layer.Image');
|
||||||
|
goog.require('ol.source.MapQuest');
|
||||||
|
goog.require('ol.source.ImageArcGISRest');
|
||||||
|
|
||||||
|
var url = 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' +
|
||||||
|
'Specialty/ESRI_StateCityHighway_USA/MapServer';
|
||||||
|
|
||||||
|
var layers = [
|
||||||
|
new ol.layer.Tile({
|
||||||
|
source: new ol.source.MapQuest({layer: 'sat'})
|
||||||
|
}),
|
||||||
|
new ol.layer.Image({
|
||||||
|
source: new ol.source.ImageArcGISRest({
|
||||||
|
params: {},
|
||||||
|
url: url
|
||||||
|
})
|
||||||
|
})
|
||||||
|
];
|
||||||
|
var map = new ol.Map({
|
||||||
|
layers: layers,
|
||||||
|
target: 'map',
|
||||||
|
view: new ol.View({
|
||||||
|
center: [-10997148, 4569099],
|
||||||
|
zoom: 4
|
||||||
|
})
|
||||||
|
});
|
||||||
@@ -14,7 +14,7 @@ var map = new ol.Map({
|
|||||||
source: new ol.source.OSM()
|
source: new ol.source.OSM()
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
controls: ol.control.defaults({ attribution: false }).extend([attribution]),
|
controls: ol.control.defaults({attribution: false}).extend([attribution]),
|
||||||
renderer: common.getRendererFromQueryString(),
|
renderer: common.getRendererFromQueryString(),
|
||||||
target: 'map',
|
target: 'map',
|
||||||
view: new ol.View({
|
view: new ol.View({
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ docs: >
|
|||||||
<p>When the Bing Maps tile service doesn't have tiles for a given resolution and region it returns "placeholder" tiles indicating that. Zoom the map beyond level 19 to see the "placeholder" tiles. If you want OpenLayers to display stretched tiles in place of "placeholder" tiles beyond zoom level 19 then set <code>maxZoom</code> to <code>19</code> in the options passed to <code>ol.source.BingMaps</code>.</p>
|
<p>When the Bing Maps tile service doesn't have tiles for a given resolution and region it returns "placeholder" tiles indicating that. Zoom the map beyond level 19 to see the "placeholder" tiles. If you want OpenLayers to display stretched tiles in place of "placeholder" tiles beyond zoom level 19 then set <code>maxZoom</code> to <code>19</code> in the options passed to <code>ol.source.BingMaps</code>.</p>
|
||||||
tags: "bing, bing-maps"
|
tags: "bing, bing-maps"
|
||||||
cloak:
|
cloak:
|
||||||
Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here
|
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://www.bingmapsportal.com/ here
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
<select id="layer-select">
|
<select id="layer-select">
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ for (i = 0, ii = styles.length; i < ii; ++i) {
|
|||||||
visible: false,
|
visible: false,
|
||||||
preload: Infinity,
|
preload: Infinity,
|
||||||
source: new ol.source.BingMaps({
|
source: new ol.source.BingMaps({
|
||||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3',
|
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF',
|
||||||
imagerySet: styles[i]
|
imagerySet: styles[i]
|
||||||
// use maxZoom 19 to see stretched tiles instead of the BingMaps
|
// use maxZoom 19 to see stretched tiles instead of the BingMaps
|
||||||
// "no photos at this zoom level" tiles
|
// "no photos at this zoom level" tiles
|
||||||
|
|||||||
@@ -85,8 +85,13 @@ var map = new ol.Map({
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Get the form elements and bind the listeners
|
||||||
|
var select = document.getElementById('blend-mode');
|
||||||
|
var affectRed = document.getElementById('affect-red');
|
||||||
|
var affectGreen = document.getElementById('affect-green');
|
||||||
|
var affectBlue = document.getElementById('affect-blue');
|
||||||
|
|
||||||
|
|
||||||
// Various helper methods and event handlers
|
|
||||||
/**
|
/**
|
||||||
* This method sets the globalCompositeOperation to the value of the select
|
* This method sets the globalCompositeOperation to the value of the select
|
||||||
* field and it is bound to the precompose event of the layers.
|
* field and it is bound to the precompose event of the layers.
|
||||||
@@ -154,12 +159,6 @@ var affectLayerClicked = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Get the form elements and bind the listeners
|
|
||||||
var select = document.getElementById('blend-mode');
|
|
||||||
var affectRed = document.getElementById('affect-red');
|
|
||||||
var affectGreen = document.getElementById('affect-green');
|
|
||||||
var affectBlue = document.getElementById('affect-blue');
|
|
||||||
|
|
||||||
// Rerender map when blend mode changes
|
// Rerender map when blend mode changes
|
||||||
select.addEventListener('change', function() {
|
select.addEventListener('change', function() {
|
||||||
map.render();
|
map.render();
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ map.addInteraction(dragBox);
|
|||||||
|
|
||||||
var infoBox = document.getElementById('info');
|
var infoBox = document.getElementById('info');
|
||||||
|
|
||||||
dragBox.on('boxend', function(e) {
|
dragBox.on('boxend', function() {
|
||||||
// features that intersect the box are added to the collection of
|
// features that intersect the box are added to the collection of
|
||||||
// selected features, and their names are displayed in the "info"
|
// selected features, and their names are displayed in the "info"
|
||||||
// div
|
// div
|
||||||
@@ -64,7 +64,7 @@ dragBox.on('boxend', function(e) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// clear selection when drawing a new box and when clicking on the map
|
// clear selection when drawing a new box and when clicking on the map
|
||||||
dragBox.on('boxstart', function(e) {
|
dragBox.on('boxstart', function() {
|
||||||
selectedFeatures.clear();
|
selectedFeatures.clear();
|
||||||
infoBox.innerHTML = ' ';
|
infoBox.innerHTML = ' ';
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ docs: >
|
|||||||
This example shows how to customize the buttons tooltips with <a href="http://getbootstrap.com/javascript/#tooltips">Bootstrap</a>.
|
This example shows how to customize the buttons tooltips with <a href="http://getbootstrap.com/javascript/#tooltips">Bootstrap</a>.
|
||||||
tags: "custom, tooltip"
|
tags: "custom, tooltip"
|
||||||
resources:
|
resources:
|
||||||
- https://code.jquery.com/jquery-1.11.2.min.js
|
- https://code.jquery.com/jquery-2.2.3.min.js
|
||||||
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css
|
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
|
||||||
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js
|
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
|
|||||||
26
examples/cartodb.html
Normal file
26
examples/cartodb.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
layout: example.html
|
||||||
|
title: CartoDB source example
|
||||||
|
shortdesc: Example of a cartodb map.
|
||||||
|
docs: >
|
||||||
|
A simple example with an anonymous cartodb map
|
||||||
|
tags: "simple, openstreetmap, attribution"
|
||||||
|
---
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<div id="map" class="map"></div>
|
||||||
|
<div>
|
||||||
|
<form class="form-horizontal">
|
||||||
|
<label>
|
||||||
|
Show countries larger than
|
||||||
|
<select id="country-area" class="form-control">
|
||||||
|
<option value="0" default>0 ㎢</option>
|
||||||
|
<option value="5000">5000 ㎢</option>
|
||||||
|
<option value="10000">10000 ㎢</option>
|
||||||
|
<option value="50000">50000 ㎢</option>
|
||||||
|
<option value="100000">100000 ㎢</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
48
examples/cartodb.js
Normal file
48
examples/cartodb.js
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
goog.require('ol.Map');
|
||||||
|
goog.require('ol.View');
|
||||||
|
goog.require('ol.layer.Tile');
|
||||||
|
goog.require('ol.source.CartoDB');
|
||||||
|
goog.require('ol.source.OSM');
|
||||||
|
|
||||||
|
var mapConfig = {
|
||||||
|
'layers': [{
|
||||||
|
'type': 'cartodb',
|
||||||
|
'options': {
|
||||||
|
'cartocss_version': '2.1.1',
|
||||||
|
'cartocss': '#layer { polygon-fill: #F00; }',
|
||||||
|
'sql': 'select * from european_countries_e where area > 0'
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
|
||||||
|
var cartoDBSource = new ol.source.CartoDB({
|
||||||
|
account: 'documentation',
|
||||||
|
config: mapConfig
|
||||||
|
});
|
||||||
|
|
||||||
|
var map = new ol.Map({
|
||||||
|
layers: [
|
||||||
|
new ol.layer.Tile({
|
||||||
|
source: new ol.source.OSM()
|
||||||
|
}),
|
||||||
|
new ol.layer.Tile({
|
||||||
|
source: cartoDBSource
|
||||||
|
})
|
||||||
|
],
|
||||||
|
target: 'map',
|
||||||
|
view: new ol.View({
|
||||||
|
center: [0, 0],
|
||||||
|
zoom: 2
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
function setArea(n) {
|
||||||
|
mapConfig.layers[0].options.sql =
|
||||||
|
'select * from european_countries_e where area > ' + n;
|
||||||
|
cartoDBSource.setConfig(mapConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById('country-area').addEventListener('change', function() {
|
||||||
|
setArea(this.value);
|
||||||
|
});
|
||||||
@@ -65,14 +65,7 @@ zoomtoswitzerlandbest.addEventListener('click', function() {
|
|||||||
var feature = source.getFeatures()[0];
|
var feature = source.getFeatures()[0];
|
||||||
var polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
var polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
||||||
var size = /** @type {ol.Size} */ (map.getSize());
|
var size = /** @type {ol.Size} */ (map.getSize());
|
||||||
view.fit(
|
view.fit(polygon, size, {padding: [170, 50, 30, 150], constrainResolution: false});
|
||||||
polygon,
|
|
||||||
size,
|
|
||||||
{
|
|
||||||
padding: [170, 50, 30, 150],
|
|
||||||
constrainResolution: false
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
var zoomtoswitzerlandconstrained =
|
var zoomtoswitzerlandconstrained =
|
||||||
@@ -81,13 +74,7 @@ zoomtoswitzerlandconstrained.addEventListener('click', function() {
|
|||||||
var feature = source.getFeatures()[0];
|
var feature = source.getFeatures()[0];
|
||||||
var polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
var polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
||||||
var size = /** @type {ol.Size} */ (map.getSize());
|
var size = /** @type {ol.Size} */ (map.getSize());
|
||||||
view.fit(
|
view.fit(polygon, size, {padding: [170, 50, 30, 150]});
|
||||||
polygon,
|
|
||||||
size,
|
|
||||||
{
|
|
||||||
padding: [170, 50, 30, 150]
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
var zoomtoswitzerlandnearest =
|
var zoomtoswitzerlandnearest =
|
||||||
@@ -96,14 +83,7 @@ zoomtoswitzerlandnearest.addEventListener('click', function() {
|
|||||||
var feature = source.getFeatures()[0];
|
var feature = source.getFeatures()[0];
|
||||||
var polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
var polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
||||||
var size = /** @type {ol.Size} */ (map.getSize());
|
var size = /** @type {ol.Size} */ (map.getSize());
|
||||||
view.fit(
|
view.fit(polygon, size, {padding: [170, 50, 30, 150], nearest: true});
|
||||||
polygon,
|
|
||||||
size,
|
|
||||||
{
|
|
||||||
padding: [170, 50, 30, 150],
|
|
||||||
nearest: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
var zoomtolausanne = document.getElementById('zoomtolausanne');
|
var zoomtolausanne = document.getElementById('zoomtolausanne');
|
||||||
@@ -111,14 +91,7 @@ zoomtolausanne.addEventListener('click', function() {
|
|||||||
var feature = source.getFeatures()[1];
|
var feature = source.getFeatures()[1];
|
||||||
var point = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
var point = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
||||||
var size = /** @type {ol.Size} */ (map.getSize());
|
var size = /** @type {ol.Size} */ (map.getSize());
|
||||||
view.fit(
|
view.fit(point, size, {padding: [170, 50, 30, 150], minResolution: 50});
|
||||||
point,
|
|
||||||
size,
|
|
||||||
{
|
|
||||||
padding: [170, 50, 30, 150],
|
|
||||||
minResolution: 50
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
var centerlausanne = document.getElementById('centerlausanne');
|
var centerlausanne = document.getElementById('centerlausanne');
|
||||||
@@ -126,9 +99,5 @@ centerlausanne.addEventListener('click', function() {
|
|||||||
var feature = source.getFeatures()[1];
|
var feature = source.getFeatures()[1];
|
||||||
var point = /** @type {ol.geom.Point} */ (feature.getGeometry());
|
var point = /** @type {ol.geom.Point} */ (feature.getGeometry());
|
||||||
var size = /** @type {ol.Size} */ (map.getSize());
|
var size = /** @type {ol.Size} */ (map.getSize());
|
||||||
view.centerOn(
|
view.centerOn(point.getCoordinates(), size, [570, 500]);
|
||||||
point.getCoordinates(),
|
|
||||||
size,
|
|
||||||
[570, 500]
|
|
||||||
);
|
|
||||||
}, false);
|
}, false);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ var clusterSource = new ol.source.Cluster({
|
|||||||
var styleCache = {};
|
var styleCache = {};
|
||||||
var clusters = new ol.layer.Vector({
|
var clusters = new ol.layer.Vector({
|
||||||
source: clusterSource,
|
source: clusterSource,
|
||||||
style: function(feature, resolution) {
|
style: function(feature) {
|
||||||
var size = feature.get('features').length;
|
var size = feature.get('features').length;
|
||||||
var style = styleCache[size];
|
var style = styleCache[size];
|
||||||
if (!style) {
|
if (!style) {
|
||||||
@@ -65,10 +65,6 @@ var raster = new ol.layer.Tile({
|
|||||||
source: new ol.source.MapQuest({layer: 'sat'})
|
source: new ol.source.MapQuest({layer: 'sat'})
|
||||||
});
|
});
|
||||||
|
|
||||||
var raw = new ol.layer.Vector({
|
|
||||||
source: source
|
|
||||||
});
|
|
||||||
|
|
||||||
var map = new ol.Map({
|
var map = new ol.Map({
|
||||||
layers: [raster, clusters],
|
layers: [raster, clusters],
|
||||||
renderer: 'canvas',
|
renderer: 'canvas',
|
||||||
|
|||||||
@@ -138,6 +138,8 @@ var raster = new ol.source.Raster({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var controls = {};
|
||||||
|
|
||||||
raster.on('beforeoperations', function(event) {
|
raster.on('beforeoperations', function(event) {
|
||||||
var data = event.data;
|
var data = event.data;
|
||||||
for (var id in controls) {
|
for (var id in controls) {
|
||||||
@@ -160,7 +162,6 @@ var map = new ol.Map({
|
|||||||
});
|
});
|
||||||
|
|
||||||
var controlIds = ['hue', 'chroma', 'lightness'];
|
var controlIds = ['hue', 'chroma', 'lightness'];
|
||||||
var controls = {};
|
|
||||||
controlIds.forEach(function(id) {
|
controlIds.forEach(function(id) {
|
||||||
var control = document.getElementById(id);
|
var control = document.getElementById(id);
|
||||||
var output = document.getElementById(id + 'Out');
|
var output = document.getElementById(id + 'Out');
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ var app = window.app;
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
@@ -33,7 +32,7 @@ app.RotateNorthControl = function(opt_options) {
|
|||||||
button.innerHTML = 'N';
|
button.innerHTML = 'N';
|
||||||
|
|
||||||
var this_ = this;
|
var this_ = this;
|
||||||
var handleRotateNorth = function(e) {
|
var handleRotateNorth = function() {
|
||||||
this_.getMap().getView().setRotation(0);
|
this_.getMap().getView().setRotation(0);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
9
examples/custom-icon.html
Normal file
9
examples/custom-icon.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
layout: example.html
|
||||||
|
title: Custom Icon
|
||||||
|
shortdesc: Example using a custom attribution icon object
|
||||||
|
docs: >
|
||||||
|
This example creates a custom element for the attribution icon
|
||||||
|
tags: "icon, element"
|
||||||
|
---
|
||||||
|
<div id="map" class="map"><div id="popup"></div></div>
|
||||||
27
examples/custom-icon.js
Normal file
27
examples/custom-icon.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
goog.require('ol.Map');
|
||||||
|
goog.require('ol.View');
|
||||||
|
goog.require('ol.layer.Tile');
|
||||||
|
goog.require('ol.source.OSM');
|
||||||
|
|
||||||
|
var logoElement = document.createElement('a');
|
||||||
|
logoElement.href = 'http://www.osgeo.org/';
|
||||||
|
logoElement.target = '_blank';
|
||||||
|
|
||||||
|
var logoImage = document.createElement('img');
|
||||||
|
logoImage.src = 'http://www.osgeo.org/sites/all/themes/osgeo/logo.png';
|
||||||
|
|
||||||
|
logoElement.appendChild(logoImage);
|
||||||
|
|
||||||
|
var map = new ol.Map({
|
||||||
|
layers: [
|
||||||
|
new ol.layer.Tile({
|
||||||
|
source: new ol.source.OSM()
|
||||||
|
})
|
||||||
|
],
|
||||||
|
target: 'map',
|
||||||
|
view: new ol.View({
|
||||||
|
center: [0, 0],
|
||||||
|
zoom: 2
|
||||||
|
}),
|
||||||
|
logo: logoElement
|
||||||
|
});
|
||||||
@@ -22,7 +22,6 @@ goog.require('ol.style.Style');
|
|||||||
var app = {};
|
var app = {};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Pointer}
|
* @extends {ol.interaction.Pointer}
|
||||||
@@ -72,7 +71,7 @@ app.Drag.prototype.handleDownEvent = function(evt) {
|
|||||||
var map = evt.map;
|
var map = evt.map;
|
||||||
|
|
||||||
var feature = map.forEachFeatureAtPixel(evt.pixel,
|
var feature = map.forEachFeatureAtPixel(evt.pixel,
|
||||||
function(feature, layer) {
|
function(feature) {
|
||||||
return feature;
|
return feature;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -89,13 +88,6 @@ app.Drag.prototype.handleDownEvent = function(evt) {
|
|||||||
* @param {ol.MapBrowserEvent} evt Map browser event.
|
* @param {ol.MapBrowserEvent} evt Map browser event.
|
||||||
*/
|
*/
|
||||||
app.Drag.prototype.handleDragEvent = function(evt) {
|
app.Drag.prototype.handleDragEvent = function(evt) {
|
||||||
var map = evt.map;
|
|
||||||
|
|
||||||
var feature = map.forEachFeatureAtPixel(evt.pixel,
|
|
||||||
function(feature, layer) {
|
|
||||||
return feature;
|
|
||||||
});
|
|
||||||
|
|
||||||
var deltaX = evt.coordinate[0] - this.coordinate_[0];
|
var deltaX = evt.coordinate[0] - this.coordinate_[0];
|
||||||
var deltaY = evt.coordinate[1] - this.coordinate_[1];
|
var deltaY = evt.coordinate[1] - this.coordinate_[1];
|
||||||
|
|
||||||
@@ -115,7 +107,7 @@ app.Drag.prototype.handleMoveEvent = function(evt) {
|
|||||||
if (this.cursor_) {
|
if (this.cursor_) {
|
||||||
var map = evt.map;
|
var map = evt.map;
|
||||||
var feature = map.forEachFeatureAtPixel(evt.pixel,
|
var feature = map.forEachFeatureAtPixel(evt.pixel,
|
||||||
function(feature, layer) {
|
function(feature) {
|
||||||
return feature;
|
return feature;
|
||||||
});
|
});
|
||||||
var element = evt.map.getTargetElement();
|
var element = evt.map.getTargetElement();
|
||||||
@@ -133,10 +125,9 @@ app.Drag.prototype.handleMoveEvent = function(evt) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.MapBrowserEvent} evt Map browser event.
|
|
||||||
* @return {boolean} `false` to stop the drag sequence.
|
* @return {boolean} `false` to stop the drag sequence.
|
||||||
*/
|
*/
|
||||||
app.Drag.prototype.handleUpEvent = function(evt) {
|
app.Drag.prototype.handleUpEvent = function() {
|
||||||
this.coordinate_ = null;
|
this.coordinate_ = null;
|
||||||
this.feature_ = null;
|
this.feature_ = null;
|
||||||
return false;
|
return false;
|
||||||
@@ -158,7 +149,7 @@ var map = new ol.Map({
|
|||||||
layers: [
|
layers: [
|
||||||
new ol.layer.Tile({
|
new ol.layer.Tile({
|
||||||
source: new ol.source.TileJSON({
|
source: new ol.source.TileJSON({
|
||||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp'
|
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json'
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
new ol.layer.Vector({
|
new ol.layer.Vector({
|
||||||
|
|||||||
2
examples/d3.js
vendored
2
examples/d3.js
vendored
@@ -39,7 +39,7 @@ d3.json('data/topojson/us.json', function(error, us) {
|
|||||||
* @param {number} pixelRatio Pixel ratio.
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @param {ol.Size} size Size.
|
* @param {ol.Size} size Size.
|
||||||
* @param {ol.proj.Projection} projection Projection.
|
* @param {ol.proj.Projection} projection Projection.
|
||||||
* @return {HTMLCanvasElement}
|
* @return {HTMLCanvasElement} A canvas element.
|
||||||
*/
|
*/
|
||||||
var canvasFunction = function(extent, resolution, pixelRatio,
|
var canvasFunction = function(extent, resolution, pixelRatio,
|
||||||
size, projection) {
|
size, projection) {
|
||||||
|
|||||||
BIN
examples/data/dot.png
Normal file
BIN
examples/data/dot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 478 B |
File diff suppressed because one or more lines are too long
@@ -1,43 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">
|
|
||||||
<sld:NamedLayer>
|
|
||||||
<sld:Name>countries</sld:Name>
|
|
||||||
<sld:UserStyle>
|
|
||||||
<sld:Name>countries</sld:Name>
|
|
||||||
<sld:Title>A sample style for countries</sld:Title>
|
|
||||||
<sld:IsDefault>1</sld:IsDefault>
|
|
||||||
<sld:Abstract>A sample style for countries</sld:Abstract>
|
|
||||||
<sld:FeatureTypeStyle>
|
|
||||||
<sld:Name>name</sld:Name>
|
|
||||||
<sld:Rule>
|
|
||||||
<sld:Name>Sample</sld:Name>
|
|
||||||
<sld:Title>Sample</sld:Title>
|
|
||||||
<sld:PolygonSymbolizer>
|
|
||||||
<sld:Fill>
|
|
||||||
<sld:CssParameter name="fill">#ff0000</sld:CssParameter>
|
|
||||||
<sld:CssParameter name="fill-opacity">0.6</sld:CssParameter>
|
|
||||||
</sld:Fill>
|
|
||||||
<sld:Stroke>
|
|
||||||
<sld:CssParameter name="stroke">#00FF00</sld:CssParameter>
|
|
||||||
<sld:CssParameter name="stroke-opacity">0.5</sld:CssParameter>
|
|
||||||
<sld:CssParameter name="stroke-width">4</sld:CssParameter>
|
|
||||||
</sld:Stroke>
|
|
||||||
</sld:PolygonSymbolizer>
|
|
||||||
</sld:Rule>
|
|
||||||
<sld:Rule>
|
|
||||||
<sld:MaxScaleDenominator>20000000</sld:MaxScaleDenominator>
|
|
||||||
<sld:TextSymbolizer>
|
|
||||||
<sld:Label>
|
|
||||||
<ogc:PropertyName>name</ogc:PropertyName>
|
|
||||||
</sld:Label>
|
|
||||||
<sld:Font>
|
|
||||||
<sld:CssParameter name="font-family">Arial</sld:CssParameter>
|
|
||||||
<sld:CssParameter name="font-size">10</sld:CssParameter>
|
|
||||||
<sld:CssParameter name="font-style">Normal</sld:CssParameter>
|
|
||||||
</sld:Font>
|
|
||||||
</sld:TextSymbolizer>
|
|
||||||
</sld:Rule>
|
|
||||||
</sld:FeatureTypeStyle>
|
|
||||||
</sld:UserStyle>
|
|
||||||
</sld:NamedLayer>
|
|
||||||
</sld:StyledLayerDescriptor>
|
|
||||||
283
examples/data/wmsgetfeatureinfo/osm-restaurant-hotel.xml
Normal file
283
examples/data/wmsgetfeatureinfo/osm-restaurant-hotel.xml
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<msGMLOutput
|
||||||
|
xmlns:gml="http://www.opengis.net/gml"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<restaurant_layer>
|
||||||
|
<gml:name>Restaurants</gml:name>
|
||||||
|
<restaurant_feature>
|
||||||
|
<gml:boundedBy>
|
||||||
|
<gml:Box srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537750.006175,150923.784252 537750.006175,150923.784252</gml:coordinates>
|
||||||
|
</gml:Box>
|
||||||
|
</gml:boundedBy>
|
||||||
|
<THE_GEOM>
|
||||||
|
<gml:Point srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537750.006175,150923.784252</gml:coordinates>
|
||||||
|
</gml:Point>
|
||||||
|
</THE_GEOM>
|
||||||
|
<display_name>Château d'Ouchy</display_name>
|
||||||
|
<name>Château d'Ouchy</name>
|
||||||
|
<osm_id>1230808910</osm_id>
|
||||||
|
<access></access>
|
||||||
|
<aerialway></aerialway>
|
||||||
|
<amenity>restaurant</amenity>
|
||||||
|
<barrier></barrier>
|
||||||
|
<bicycle></bicycle>
|
||||||
|
<brand></brand>
|
||||||
|
<building></building>
|
||||||
|
<covered></covered>
|
||||||
|
<denomination></denomination>
|
||||||
|
<ele></ele>
|
||||||
|
<foot></foot>
|
||||||
|
<highway></highway>
|
||||||
|
<layer></layer>
|
||||||
|
<leisure></leisure>
|
||||||
|
<man_made></man_made>
|
||||||
|
<motorcar></motorcar>
|
||||||
|
<natural></natural>
|
||||||
|
<operator></operator>
|
||||||
|
<population></population>
|
||||||
|
<power></power>
|
||||||
|
<place></place>
|
||||||
|
<railway></railway>
|
||||||
|
<ref></ref>
|
||||||
|
<religion></religion>
|
||||||
|
<shop></shop>
|
||||||
|
<sport></sport>
|
||||||
|
<surface></surface>
|
||||||
|
<tourism></tourism>
|
||||||
|
<waterway></waterway>
|
||||||
|
<wood></wood>
|
||||||
|
</restaurant_feature>
|
||||||
|
<restaurant_feature>
|
||||||
|
<gml:boundedBy>
|
||||||
|
<gml:Box srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537770.247124,150975.613968 537770.247124,150975.613968</gml:coordinates>
|
||||||
|
</gml:Box>
|
||||||
|
</gml:boundedBy>
|
||||||
|
<THE_GEOM>
|
||||||
|
<gml:Point srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537770.247124,150975.613968</gml:coordinates>
|
||||||
|
</gml:Point>
|
||||||
|
</THE_GEOM>
|
||||||
|
<display_name>Cafe du Vieil Ouchy</display_name>
|
||||||
|
<name>Cafe du Vieil Ouchy</name>
|
||||||
|
<osm_id>1433812389</osm_id>
|
||||||
|
<access></access>
|
||||||
|
<aerialway></aerialway>
|
||||||
|
<amenity>restaurant</amenity>
|
||||||
|
<barrier></barrier>
|
||||||
|
<bicycle></bicycle>
|
||||||
|
<brand></brand>
|
||||||
|
<building></building>
|
||||||
|
<covered></covered>
|
||||||
|
<denomination></denomination>
|
||||||
|
<ele></ele>
|
||||||
|
<foot></foot>
|
||||||
|
<highway></highway>
|
||||||
|
<layer></layer>
|
||||||
|
<leisure></leisure>
|
||||||
|
<man_made></man_made>
|
||||||
|
<motorcar></motorcar>
|
||||||
|
<natural></natural>
|
||||||
|
<operator>Carine Duca</operator>
|
||||||
|
<population></population>
|
||||||
|
<power></power>
|
||||||
|
<place></place>
|
||||||
|
<railway></railway>
|
||||||
|
<ref></ref>
|
||||||
|
<religion></religion>
|
||||||
|
<shop></shop>
|
||||||
|
<sport></sport>
|
||||||
|
<surface></surface>
|
||||||
|
<tourism></tourism>
|
||||||
|
<waterway></waterway>
|
||||||
|
<wood></wood>
|
||||||
|
</restaurant_feature>
|
||||||
|
<restaurant_feature>
|
||||||
|
<gml:boundedBy>
|
||||||
|
<gml:Box srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537789.197617,150976.218227 537789.197617,150976.218227</gml:coordinates>
|
||||||
|
</gml:Box>
|
||||||
|
</gml:boundedBy>
|
||||||
|
<THE_GEOM>
|
||||||
|
<gml:Point srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537789.197617,150976.218227</gml:coordinates>
|
||||||
|
</gml:Point>
|
||||||
|
</THE_GEOM>
|
||||||
|
<display_name>Creperie</display_name>
|
||||||
|
<name>Creperie</name>
|
||||||
|
<osm_id>1433812391</osm_id>
|
||||||
|
<access></access>
|
||||||
|
<aerialway></aerialway>
|
||||||
|
<amenity>restaurant</amenity>
|
||||||
|
<barrier></barrier>
|
||||||
|
<bicycle></bicycle>
|
||||||
|
<brand></brand>
|
||||||
|
<building></building>
|
||||||
|
<covered></covered>
|
||||||
|
<denomination></denomination>
|
||||||
|
<ele></ele>
|
||||||
|
<foot></foot>
|
||||||
|
<highway></highway>
|
||||||
|
<layer></layer>
|
||||||
|
<leisure></leisure>
|
||||||
|
<man_made></man_made>
|
||||||
|
<motorcar></motorcar>
|
||||||
|
<natural></natural>
|
||||||
|
<operator></operator>
|
||||||
|
<population></population>
|
||||||
|
<power></power>
|
||||||
|
<place></place>
|
||||||
|
<railway></railway>
|
||||||
|
<ref></ref>
|
||||||
|
<religion></religion>
|
||||||
|
<shop></shop>
|
||||||
|
<sport></sport>
|
||||||
|
<surface></surface>
|
||||||
|
<tourism></tourism>
|
||||||
|
<waterway></waterway>
|
||||||
|
<wood></wood>
|
||||||
|
</restaurant_feature>
|
||||||
|
<restaurant_feature>
|
||||||
|
<gml:boundedBy>
|
||||||
|
<gml:Box srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537810.679909,150983.377694 537810.679909,150983.377694</gml:coordinates>
|
||||||
|
</gml:Box>
|
||||||
|
</gml:boundedBy>
|
||||||
|
<THE_GEOM>
|
||||||
|
<gml:Point srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537810.679909,150983.377694</gml:coordinates>
|
||||||
|
</gml:Point>
|
||||||
|
</THE_GEOM>
|
||||||
|
<display_name>1433812390</display_name>
|
||||||
|
<name></name>
|
||||||
|
<osm_id>1433812390</osm_id>
|
||||||
|
<access></access>
|
||||||
|
<aerialway></aerialway>
|
||||||
|
<amenity>restaurant</amenity>
|
||||||
|
<barrier></barrier>
|
||||||
|
<bicycle></bicycle>
|
||||||
|
<brand></brand>
|
||||||
|
<building></building>
|
||||||
|
<covered></covered>
|
||||||
|
<denomination></denomination>
|
||||||
|
<ele></ele>
|
||||||
|
<foot></foot>
|
||||||
|
<highway></highway>
|
||||||
|
<layer></layer>
|
||||||
|
<leisure></leisure>
|
||||||
|
<man_made></man_made>
|
||||||
|
<motorcar></motorcar>
|
||||||
|
<natural></natural>
|
||||||
|
<operator></operator>
|
||||||
|
<population></population>
|
||||||
|
<power></power>
|
||||||
|
<place></place>
|
||||||
|
<railway></railway>
|
||||||
|
<ref></ref>
|
||||||
|
<religion></religion>
|
||||||
|
<shop></shop>
|
||||||
|
<sport></sport>
|
||||||
|
<surface></surface>
|
||||||
|
<tourism></tourism>
|
||||||
|
<waterway></waterway>
|
||||||
|
<wood></wood>
|
||||||
|
</restaurant_feature>
|
||||||
|
</restaurant_layer>
|
||||||
|
<hotel_layer>
|
||||||
|
<gml:name>Hôtels</gml:name>
|
||||||
|
<hotel_feature>
|
||||||
|
<gml:boundedBy>
|
||||||
|
<gml:Box srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537762.425297,150971.904013 537762.425297,150971.904013</gml:coordinates>
|
||||||
|
</gml:Box>
|
||||||
|
</gml:boundedBy>
|
||||||
|
<THE_GEOM>
|
||||||
|
<gml:Point srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537762.425297,150971.904013</gml:coordinates>
|
||||||
|
</gml:Point>
|
||||||
|
</THE_GEOM>
|
||||||
|
<display_name>Hotel du port</display_name>
|
||||||
|
<name>Hotel du port</name>
|
||||||
|
<osm_id>2886793101</osm_id>
|
||||||
|
<access></access>
|
||||||
|
<aerialway></aerialway>
|
||||||
|
<amenity></amenity>
|
||||||
|
<barrier></barrier>
|
||||||
|
<bicycle></bicycle>
|
||||||
|
<brand></brand>
|
||||||
|
<building></building>
|
||||||
|
<covered></covered>
|
||||||
|
<denomination></denomination>
|
||||||
|
<ele></ele>
|
||||||
|
<foot></foot>
|
||||||
|
<highway></highway>
|
||||||
|
<layer></layer>
|
||||||
|
<leisure></leisure>
|
||||||
|
<man_made></man_made>
|
||||||
|
<motorcar></motorcar>
|
||||||
|
<natural></natural>
|
||||||
|
<operator></operator>
|
||||||
|
<population></population>
|
||||||
|
<power></power>
|
||||||
|
<place></place>
|
||||||
|
<railway></railway>
|
||||||
|
<ref></ref>
|
||||||
|
<religion></religion>
|
||||||
|
<shop></shop>
|
||||||
|
<sport></sport>
|
||||||
|
<surface></surface>
|
||||||
|
<tourism>hotel</tourism>
|
||||||
|
<waterway></waterway>
|
||||||
|
<wood></wood>
|
||||||
|
</hotel_feature>
|
||||||
|
<hotel_feature>
|
||||||
|
<gml:boundedBy>
|
||||||
|
<gml:Box srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537798.352160,150985.584164 537798.352160,150985.584164</gml:coordinates>
|
||||||
|
</gml:Box>
|
||||||
|
</gml:boundedBy>
|
||||||
|
<THE_GEOM>
|
||||||
|
<gml:Point srsName="EPSG:21781">
|
||||||
|
<gml:coordinates>537798.352160,150985.584164</gml:coordinates>
|
||||||
|
</gml:Point>
|
||||||
|
</THE_GEOM>
|
||||||
|
<display_name>Angleterre</display_name>
|
||||||
|
<name>Angleterre</name>
|
||||||
|
<osm_id>1433812387</osm_id>
|
||||||
|
<access></access>
|
||||||
|
<aerialway></aerialway>
|
||||||
|
<amenity></amenity>
|
||||||
|
<barrier></barrier>
|
||||||
|
<bicycle></bicycle>
|
||||||
|
<brand></brand>
|
||||||
|
<building></building>
|
||||||
|
<covered></covered>
|
||||||
|
<denomination></denomination>
|
||||||
|
<ele></ele>
|
||||||
|
<foot></foot>
|
||||||
|
<highway></highway>
|
||||||
|
<layer></layer>
|
||||||
|
<leisure></leisure>
|
||||||
|
<man_made></man_made>
|
||||||
|
<motorcar></motorcar>
|
||||||
|
<natural></natural>
|
||||||
|
<operator></operator>
|
||||||
|
<population></population>
|
||||||
|
<power></power>
|
||||||
|
<place></place>
|
||||||
|
<railway></railway>
|
||||||
|
<ref></ref>
|
||||||
|
<religion></religion>
|
||||||
|
<shop></shop>
|
||||||
|
<sport></sport>
|
||||||
|
<surface></surface>
|
||||||
|
<tourism>hotel</tourism>
|
||||||
|
<waterway></waterway>
|
||||||
|
<wood></wood>
|
||||||
|
</hotel_feature>
|
||||||
|
</hotel_layer>
|
||||||
|
</msGMLOutput>
|
||||||
@@ -39,7 +39,7 @@ el('track').addEventListener('change', function() {
|
|||||||
deviceOrientation.setTracking(this.checked);
|
deviceOrientation.setTracking(this.checked);
|
||||||
});
|
});
|
||||||
|
|
||||||
deviceOrientation.on('change', function(event) {
|
deviceOrientation.on('change', function() {
|
||||||
el('alpha').innerText = deviceOrientation.getAlpha() + ' [rad]';
|
el('alpha').innerText = deviceOrientation.getAlpha() + ' [rad]';
|
||||||
el('beta').innerText = deviceOrientation.getBeta() + ' [rad]';
|
el('beta').innerText = deviceOrientation.getBeta() + ' [rad]';
|
||||||
el('gamma').innerText = deviceOrientation.getGamma() + ' [rad]';
|
el('gamma').innerText = deviceOrientation.getGamma() + ' [rad]';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ docs: >
|
|||||||
Example of using the drag-and-drop interaction with a ol.source.ImageVector. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. Each file is rendered to an image on the client.
|
Example of using the drag-and-drop interaction with a ol.source.ImageVector. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. Each file is rendered to an image on the client.
|
||||||
tags: "drag-and-drop-image-vector, gpx, geojson, igc, kml, topojson, vector, image"
|
tags: "drag-and-drop-image-vector, gpx, geojson, igc, kml, topojson, vector, image"
|
||||||
cloak:
|
cloak:
|
||||||
Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here
|
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://www.bingmapsportal.com/ here
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
<div id="info"> </div>
|
<div id="info"> </div>
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ var map = new ol.Map({
|
|||||||
new ol.layer.Tile({
|
new ol.layer.Tile({
|
||||||
source: new ol.source.BingMaps({
|
source: new ol.source.BingMaps({
|
||||||
imagerySet: 'Aerial',
|
imagerySet: 'Aerial',
|
||||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3'
|
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
@@ -128,7 +128,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
|
|||||||
|
|
||||||
var displayFeatureInfo = function(pixel) {
|
var displayFeatureInfo = function(pixel) {
|
||||||
var features = [];
|
var features = [];
|
||||||
map.forEachFeatureAtPixel(pixel, function(feature, layer) {
|
map.forEachFeatureAtPixel(pixel, function(feature) {
|
||||||
features.push(feature);
|
features.push(feature);
|
||||||
});
|
});
|
||||||
if (features.length > 0) {
|
if (features.length > 0) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ docs: >
|
|||||||
Example of using the drag-and-drop interaction. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. There is no projection transform support, so this will only work with data in EPSG:4326 and EPSG:3857.
|
Example of using the drag-and-drop interaction. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. There is no projection transform support, so this will only work with data in EPSG:4326 and EPSG:3857.
|
||||||
tags: "drag-and-drop, gpx, geojson, igc, kml, topojson"
|
tags: "drag-and-drop, gpx, geojson, igc, kml, topojson"
|
||||||
cloak:
|
cloak:
|
||||||
Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here
|
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://www.bingmapsportal.com/ here
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
<div id="info"> </div>
|
<div id="info"> </div>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ var map = new ol.Map({
|
|||||||
new ol.layer.Tile({
|
new ol.layer.Tile({
|
||||||
source: new ol.source.BingMaps({
|
source: new ol.source.BingMaps({
|
||||||
imagerySet: 'Aerial',
|
imagerySet: 'Aerial',
|
||||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3'
|
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
@@ -124,7 +124,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
|
|||||||
|
|
||||||
var displayFeatureInfo = function(pixel) {
|
var displayFeatureInfo = function(pixel) {
|
||||||
var features = [];
|
var features = [];
|
||||||
map.forEachFeatureAtPixel(pixel, function(feature, layer) {
|
map.forEachFeatureAtPixel(pixel, function(feature) {
|
||||||
features.push(feature);
|
features.push(feature);
|
||||||
});
|
});
|
||||||
if (features.length > 0) {
|
if (features.length > 0) {
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ var modify = new ol.interaction.Modify({
|
|||||||
map.addInteraction(modify);
|
map.addInteraction(modify);
|
||||||
|
|
||||||
var draw; // global so we can remove it later
|
var draw; // global so we can remove it later
|
||||||
|
var typeSelect = document.getElementById('type');
|
||||||
|
|
||||||
function addInteraction() {
|
function addInteraction() {
|
||||||
draw = new ol.interaction.Draw({
|
draw = new ol.interaction.Draw({
|
||||||
features: features,
|
features: features,
|
||||||
@@ -68,14 +70,11 @@ function addInteraction() {
|
|||||||
map.addInteraction(draw);
|
map.addInteraction(draw);
|
||||||
}
|
}
|
||||||
|
|
||||||
var typeSelect = document.getElementById('type');
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Let user change the geometry type.
|
* Handle change event.
|
||||||
* @param {Event} e Change event.
|
|
||||||
*/
|
*/
|
||||||
typeSelect.onchange = function(e) {
|
typeSelect.onchange = function() {
|
||||||
map.removeInteraction(draw);
|
map.removeInteraction(draw);
|
||||||
addInteraction();
|
addInteraction();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -83,10 +83,9 @@ function addInteraction() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Let user change the geometry type.
|
* Handle change event.
|
||||||
* @param {Event} e Change event.
|
|
||||||
*/
|
*/
|
||||||
typeSelect.onchange = function(e) {
|
typeSelect.onchange = function() {
|
||||||
map.removeInteraction(draw);
|
map.removeInteraction(draw);
|
||||||
addInteraction();
|
addInteraction();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,11 +25,13 @@ var map = new ol.Map({
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
var imageStyle = new ol.style.Circle({
|
var imageStyle = new ol.style.Style({
|
||||||
radius: 5,
|
image: new ol.style.Circle({
|
||||||
snapToPixel: false,
|
radius: 5,
|
||||||
fill: new ol.style.Fill({color: 'yellow'}),
|
snapToPixel: false,
|
||||||
stroke: new ol.style.Stroke({color: 'red', width: 1})
|
fill: new ol.style.Fill({color: 'yellow'}),
|
||||||
|
stroke: new ol.style.Stroke({color: 'red', width: 1})
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
var headInnerImageStyle = new ol.style.Style({
|
var headInnerImageStyle = new ol.style.Style({
|
||||||
@@ -40,10 +42,12 @@ var headInnerImageStyle = new ol.style.Style({
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
var headOuterImageStyle = new ol.style.Circle({
|
var headOuterImageStyle = new ol.style.Style({
|
||||||
radius: 5,
|
image: new ol.style.Circle({
|
||||||
snapToPixel: false,
|
radius: 5,
|
||||||
fill: new ol.style.Fill({color: 'black'})
|
snapToPixel: false,
|
||||||
|
fill: new ol.style.Fill({color: 'black'})
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
var n = 200;
|
var n = 200;
|
||||||
@@ -63,16 +67,16 @@ map.on('postcompose', function(event) {
|
|||||||
var y = (R + r) * Math.sin(t) + p * Math.sin((R + r) * t / r);
|
var y = (R + r) * Math.sin(t) + p * Math.sin((R + r) * t / r);
|
||||||
coordinates.push([x, y]);
|
coordinates.push([x, y]);
|
||||||
}
|
}
|
||||||
vectorContext.setImageStyle(imageStyle);
|
vectorContext.setStyle(imageStyle);
|
||||||
vectorContext.drawMultiPointGeometry(
|
vectorContext.drawGeometry(new ol.geom.MultiPoint(coordinates));
|
||||||
new ol.geom.MultiPoint(coordinates), null);
|
|
||||||
|
|
||||||
var headPoint = new ol.geom.Point(coordinates[coordinates.length - 1]);
|
var headPoint = new ol.geom.Point(coordinates[coordinates.length - 1]);
|
||||||
var headFeature = new ol.Feature(headPoint);
|
|
||||||
vectorContext.drawFeature(headFeature, headInnerImageStyle);
|
|
||||||
|
|
||||||
vectorContext.setImageStyle(headOuterImageStyle);
|
vectorContext.setStyle(headOuterImageStyle);
|
||||||
vectorContext.drawMultiPointGeometry(headPoint, null);
|
vectorContext.drawGeometry(headPoint);
|
||||||
|
|
||||||
|
vectorContext.setStyle(headInnerImageStyle);
|
||||||
|
vectorContext.drawGeometry(headPoint);
|
||||||
|
|
||||||
map.render();
|
map.render();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
}
|
}
|
||||||
.tooltip.in {
|
.tooltip.in {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
filter: alpha(opacity=100);
|
|
||||||
}
|
}
|
||||||
.tooltip.top .tooltip-arrow {
|
.tooltip.top .tooltip-arrow {
|
||||||
border-top-color: white;
|
border-top-color: white;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ function createEarthquakeStyle(feature) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var maxFeatureCount;
|
var maxFeatureCount, vector;
|
||||||
function calculateClusterInfo(resolution) {
|
function calculateClusterInfo(resolution) {
|
||||||
maxFeatureCount = 0;
|
maxFeatureCount = 0;
|
||||||
var features = vector.getSource().getFeatures();
|
var features = vector.getSource().getFeatures();
|
||||||
@@ -65,7 +65,8 @@ function calculateClusterInfo(resolution) {
|
|||||||
feature = features[i];
|
feature = features[i];
|
||||||
var originalFeatures = feature.get('features');
|
var originalFeatures = feature.get('features');
|
||||||
var extent = ol.extent.createEmpty();
|
var extent = ol.extent.createEmpty();
|
||||||
for (var j = 0, jj = originalFeatures.length; j < jj; ++j) {
|
var j, jj;
|
||||||
|
for (j = 0, jj = originalFeatures.length; j < jj; ++j) {
|
||||||
ol.extent.extend(extent, originalFeatures[j].getGeometry().getExtent());
|
ol.extent.extend(extent, originalFeatures[j].getGeometry().getExtent());
|
||||||
}
|
}
|
||||||
maxFeatureCount = Math.max(maxFeatureCount, jj);
|
maxFeatureCount = Math.max(maxFeatureCount, jj);
|
||||||
@@ -104,7 +105,7 @@ function styleFunction(feature, resolution) {
|
|||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectStyleFunction(feature, resolution) {
|
function selectStyleFunction(feature) {
|
||||||
var styles = [new ol.style.Style({
|
var styles = [new ol.style.Style({
|
||||||
image: new ol.style.Circle({
|
image: new ol.style.Circle({
|
||||||
radius: feature.get('radius'),
|
radius: feature.get('radius'),
|
||||||
@@ -120,7 +121,7 @@ function selectStyleFunction(feature, resolution) {
|
|||||||
return styles;
|
return styles;
|
||||||
}
|
}
|
||||||
|
|
||||||
var vector = new ol.layer.Vector({
|
vector = new ol.layer.Vector({
|
||||||
source: new ol.source.Cluster({
|
source: new ol.source.Cluster({
|
||||||
distance: 40,
|
distance: 40,
|
||||||
source: new ol.source.Vector({
|
source: new ol.source.Vector({
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ goog.require('ol.style.Style');
|
|||||||
|
|
||||||
|
|
||||||
var styleCache = {};
|
var styleCache = {};
|
||||||
var styleFunction = function(feature, resolution) {
|
var styleFunction = function(feature) {
|
||||||
// 2012_Earthquakes_Mag5.kml stores the magnitude of each earthquake in a
|
// 2012_Earthquakes_Mag5.kml stores the magnitude of each earthquake in a
|
||||||
// standards-violating <magnitude> tag in each Placemark. We extract it from
|
// standards-violating <magnitude> tag in each Placemark. We extract it from
|
||||||
// the Placemark's name instead.
|
// the Placemark's name instead.
|
||||||
@@ -25,13 +25,14 @@ var styleFunction = function(feature, resolution) {
|
|||||||
if (!style) {
|
if (!style) {
|
||||||
var canvas =
|
var canvas =
|
||||||
/** @type {HTMLCanvasElement} */ (document.createElement('canvas'));
|
/** @type {HTMLCanvasElement} */ (document.createElement('canvas'));
|
||||||
var render = ol.render.toContext(
|
var vectorContext = ol.render.toContext(
|
||||||
/** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d')),
|
/** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d')),
|
||||||
{size: [size + 2, size + 2], pixelRatio: size / 10});
|
{size: [size + 2, size + 2], pixelRatio: size / 10});
|
||||||
render.setFillStrokeStyle(
|
vectorContext.setStyle(new ol.style.Style({
|
||||||
new ol.style.Fill({ color: 'rgba(255, 153, 0, 0.4)' }),
|
fill: new ol.style.Fill({color: 'rgba(255, 153, 0, 0.4)'}),
|
||||||
new ol.style.Stroke({ color: 'rgba(255, 204, 0, 0.2)', width: 1 }));
|
stroke: new ol.style.Stroke({color: 'rgba(255, 204, 0, 0.2)', width: 1})
|
||||||
render.drawPolygonGeometry(new ol.geom.Polygon(
|
}));
|
||||||
|
vectorContext.drawGeometry(new ol.geom.Polygon(
|
||||||
[[[0, 0], [4, 2], [6, 0], [10, 5], [6, 3], [4, 5], [0, 0]]]));
|
[[[0, 0], [4, 2], [6, 0], [10, 5], [6, 3], [4, 5], [0, 0]]]));
|
||||||
style = new ol.style.Style({
|
style = new ol.style.Style({
|
||||||
image: new ol.style.Icon({
|
image: new ol.style.Icon({
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ var map = new ol.Map({
|
|||||||
var exportPNGElement = document.getElementById('export-png');
|
var exportPNGElement = document.getElementById('export-png');
|
||||||
|
|
||||||
if ('download' in exportPNGElement) {
|
if ('download' in exportPNGElement) {
|
||||||
exportPNGElement.addEventListener('click', function(e) {
|
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');
|
exportPNGElement.href = canvas.toDataURL('image/png');
|
||||||
|
|||||||
3
examples/export-pdf.css
Normal file
3
examples/export-pdf.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.map {
|
||||||
|
max-width: 566px;
|
||||||
|
}
|
||||||
33
examples/export-pdf.html
Normal file
33
examples/export-pdf.html
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
layout: example.html
|
||||||
|
title: Export PDF example
|
||||||
|
shortdesc: Example of exporting a map as a PDF.
|
||||||
|
docs: >
|
||||||
|
Example of exporting a map as a PDF using the <a href="https://github.com/MrRio/jsPDF" target="_blank">jsPDF</a> library.
|
||||||
|
tags: "export, pdf, openstreetmap"
|
||||||
|
resources:
|
||||||
|
- http://mrrio.github.io/jsPDF/dist/jspdf.min.js
|
||||||
|
---
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<div id="map" class="map"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form class="form">
|
||||||
|
<label>Page size </label>
|
||||||
|
<select id="format">
|
||||||
|
<option value="a0">A0 (slow)</option>
|
||||||
|
<option value="a1">A1</option>
|
||||||
|
<option value="a2">A2</option>
|
||||||
|
<option value="a3">A3</option>
|
||||||
|
<option value="a4" selected>A4</option>
|
||||||
|
<option value="a5">A5 (fast)</option>
|
||||||
|
</select>
|
||||||
|
<label>Resolution </label>
|
||||||
|
<select id="resolution">
|
||||||
|
<option value="72">72 dpi (fast)</option>
|
||||||
|
<option value="150">150 dpi</option>
|
||||||
|
<option value="300">300 dpi (slow)</option>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
<button id="export-pdf">Export PDF</button>
|
||||||
110
examples/export-pdf.js
Normal file
110
examples/export-pdf.js
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
// NOCOMPILE
|
||||||
|
goog.require('ol.Map');
|
||||||
|
goog.require('ol.View');
|
||||||
|
goog.require('ol.control');
|
||||||
|
goog.require('ol.format.WKT');
|
||||||
|
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 format = new ol.format.WKT();
|
||||||
|
var feature = format.readFeature(
|
||||||
|
'POLYGON((10.689697265625 -25.0927734375, 34.595947265625 ' +
|
||||||
|
'-20.1708984375, 38.814697265625 -35.6396484375, 13.502197265625 ' +
|
||||||
|
'-39.1552734375, 10.689697265625 -25.0927734375))');
|
||||||
|
feature.getGeometry().transform('EPSG:4326', 'EPSG:3857');
|
||||||
|
|
||||||
|
var vector = new ol.layer.Vector({
|
||||||
|
source: new ol.source.Vector({
|
||||||
|
features: [feature]
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var map = new ol.Map({
|
||||||
|
layers: [raster, vector],
|
||||||
|
target: 'map',
|
||||||
|
controls: ol.control.defaults({
|
||||||
|
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||||
|
collapsible: false
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
view: new ol.View({
|
||||||
|
center: [0, 0],
|
||||||
|
zoom: 2
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var dims = {
|
||||||
|
a0: [1189, 841],
|
||||||
|
a1: [841, 594],
|
||||||
|
a2: [594, 420],
|
||||||
|
a3: [420, 297],
|
||||||
|
a4: [297, 210],
|
||||||
|
a5: [210, 148]
|
||||||
|
};
|
||||||
|
|
||||||
|
var loading = 0;
|
||||||
|
var loaded = 0;
|
||||||
|
|
||||||
|
var exportButton = document.getElementById('export-pdf');
|
||||||
|
|
||||||
|
exportButton.addEventListener('click', function() {
|
||||||
|
|
||||||
|
exportButton.disabled = true;
|
||||||
|
document.body.style.cursor = 'progress';
|
||||||
|
|
||||||
|
var format = document.getElementById('format').value;
|
||||||
|
var resolution = document.getElementById('resolution').value;
|
||||||
|
var dim = dims[format];
|
||||||
|
var width = Math.round(dim[0] * resolution / 25.4);
|
||||||
|
var height = Math.round(dim[1] * resolution / 25.4);
|
||||||
|
var size = /** @type {ol.Size} */ (map.getSize());
|
||||||
|
var extent = map.getView().calculateExtent(size);
|
||||||
|
|
||||||
|
var source = raster.getSource();
|
||||||
|
|
||||||
|
var tileLoadStart = function() {
|
||||||
|
++loading;
|
||||||
|
};
|
||||||
|
|
||||||
|
var tileLoadEnd = function() {
|
||||||
|
++loaded;
|
||||||
|
if (loading === loaded) {
|
||||||
|
var canvas = this;
|
||||||
|
window.setTimeout(function() {
|
||||||
|
loading = 0;
|
||||||
|
loaded = 0;
|
||||||
|
var data = canvas.toDataURL('image/png');
|
||||||
|
var pdf = new jsPDF('landscape', undefined, format);
|
||||||
|
pdf.addImage(data, 'JPEG', 0, 0, dim[0], dim[1]);
|
||||||
|
pdf.save('map.pdf');
|
||||||
|
source.un('tileloadstart', tileLoadStart);
|
||||||
|
source.un('tileloadend', tileLoadEnd, canvas);
|
||||||
|
source.un('tileloaderror', tileLoadEnd, canvas);
|
||||||
|
map.setSize(size);
|
||||||
|
map.getView().fit(extent, size);
|
||||||
|
map.renderSync();
|
||||||
|
exportButton.disabled = false;
|
||||||
|
document.body.style.cursor = 'auto';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
map.once('postcompose', function(event) {
|
||||||
|
source.on('tileloadstart', tileLoadStart);
|
||||||
|
source.on('tileloadend', tileLoadEnd, event.context.canvas);
|
||||||
|
source.on('tileloaderror', tileLoadEnd, event.context.canvas);
|
||||||
|
});
|
||||||
|
|
||||||
|
map.setSize([width, height]);
|
||||||
|
map.getView().fit(extent, /** @type {ol.Size} */ (map.getSize()));
|
||||||
|
map.renderSync();
|
||||||
|
|
||||||
|
}, false);
|
||||||
@@ -12,6 +12,7 @@ goog.require('ol.source.OSM');
|
|||||||
goog.require('ol.source.Vector');
|
goog.require('ol.source.Vector');
|
||||||
goog.require('ol.style.Circle');
|
goog.require('ol.style.Circle');
|
||||||
goog.require('ol.style.Stroke');
|
goog.require('ol.style.Stroke');
|
||||||
|
goog.require('ol.style.Style');
|
||||||
|
|
||||||
|
|
||||||
var map = new ol.Map({
|
var map = new ol.Map({
|
||||||
@@ -67,17 +68,19 @@ function flash(feature) {
|
|||||||
var radius = ol.easing.easeOut(elapsedRatio) * 25 + 5;
|
var radius = ol.easing.easeOut(elapsedRatio) * 25 + 5;
|
||||||
var opacity = ol.easing.easeOut(1 - elapsedRatio);
|
var opacity = ol.easing.easeOut(1 - elapsedRatio);
|
||||||
|
|
||||||
var flashStyle = new ol.style.Circle({
|
var style = new ol.style.Style({
|
||||||
radius: radius,
|
image: new ol.style.Circle({
|
||||||
snapToPixel: false,
|
radius: radius,
|
||||||
stroke: new ol.style.Stroke({
|
snapToPixel: false,
|
||||||
color: 'rgba(255, 0, 0, ' + opacity + ')',
|
stroke: new ol.style.Stroke({
|
||||||
width: 1
|
color: 'rgba(255, 0, 0, ' + opacity + ')',
|
||||||
|
width: 0.25 + opacity
|
||||||
|
})
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
vectorContext.setImageStyle(flashStyle);
|
vectorContext.setStyle(style);
|
||||||
vectorContext.drawPointGeometry(flashGeom, null);
|
vectorContext.drawGeometry(flashGeom);
|
||||||
if (elapsed > duration) {
|
if (elapsed > duration) {
|
||||||
ol.Observable.unByKey(listenerKey);
|
ol.Observable.unByKey(listenerKey);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -108,11 +108,16 @@ var styles = {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var animating = false;
|
||||||
|
var speed, now;
|
||||||
|
var speedInput = document.getElementById('speed');
|
||||||
|
var startButton = document.getElementById('start-animation');
|
||||||
|
|
||||||
var vectorLayer = new ol.layer.Vector({
|
var vectorLayer = new ol.layer.Vector({
|
||||||
source: new ol.source.Vector({
|
source: new ol.source.Vector({
|
||||||
features: [routeFeature, geoMarker, startMarker, endMarker]
|
features: [routeFeature, geoMarker, startMarker, endMarker]
|
||||||
}),
|
}),
|
||||||
style: function(feature, resolution) {
|
style: function(feature) {
|
||||||
// hide geoMarker if animation is active
|
// hide geoMarker if animation is active
|
||||||
if (animating && feature.get('type') === 'geoMarker') {
|
if (animating && feature.get('type') === 'geoMarker') {
|
||||||
return null;
|
return null;
|
||||||
@@ -135,7 +140,7 @@ var map = new ol.Map({
|
|||||||
new ol.layer.Tile({
|
new ol.layer.Tile({
|
||||||
source: new ol.source.BingMaps({
|
source: new ol.source.BingMaps({
|
||||||
imagerySet: 'AerialWithLabels',
|
imagerySet: 'AerialWithLabels',
|
||||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3'
|
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF'
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
vectorLayer
|
vectorLayer
|
||||||
@@ -198,8 +203,4 @@ function stopAnimation(ended) {
|
|||||||
map.un('postcompose', moveFeature);
|
map.un('postcompose', moveFeature);
|
||||||
}
|
}
|
||||||
|
|
||||||
var speed, now;
|
|
||||||
var animating = false;
|
|
||||||
var speedInput = document.getElementById('speed');
|
|
||||||
var startButton = document.getElementById('start-animation');
|
|
||||||
startButton.addEventListener('click', startAnimation, false);
|
startButton.addEventListener('click', startAnimation, false);
|
||||||
|
|||||||
@@ -27,26 +27,32 @@ var map = new ol.Map({
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
var defaultStroke = new ol.style.Stroke({
|
var style = new ol.style.Style({
|
||||||
color: '#EAE911',
|
stroke: new ol.style.Stroke({
|
||||||
width: 2
|
color: '#EAE911',
|
||||||
});
|
width: 2
|
||||||
var defaultStyle = new ol.style.Style({
|
})
|
||||||
stroke: defaultStroke
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var flightsSource;
|
||||||
|
var addLater = function(feature, timeout) {
|
||||||
|
window.setTimeout(function() {
|
||||||
|
feature.set('start', new Date().getTime());
|
||||||
|
flightsSource.addFeature(feature);
|
||||||
|
}, timeout);
|
||||||
|
};
|
||||||
|
|
||||||
var pointsPerMs = 0.1;
|
var pointsPerMs = 0.1;
|
||||||
var animateFlights = function(event) {
|
var animateFlights = function(event) {
|
||||||
var vectorContext = event.vectorContext;
|
var vectorContext = event.vectorContext;
|
||||||
var frameState = event.frameState;
|
var frameState = event.frameState;
|
||||||
vectorContext.setFillStrokeStyle(null, defaultStroke);
|
vectorContext.setStyle(style);
|
||||||
|
|
||||||
var features = flightsSource.getFeatures();
|
var features = flightsSource.getFeatures();
|
||||||
for (var i = 0; i < features.length; i++) {
|
for (var i = 0; i < features.length; i++) {
|
||||||
var feature = features[i];
|
var feature = features[i];
|
||||||
if (!feature.get('finished')) {
|
if (!feature.get('finished')) {
|
||||||
// only draw the lines for which the animation has not
|
// only draw the lines for which the animation has not finished yet
|
||||||
// finished yet
|
|
||||||
var coords = feature.getGeometry().getCoordinates();
|
var coords = feature.getGeometry().getCoordinates();
|
||||||
var elapsedTime = frameState.time - feature.get('start');
|
var elapsedTime = frameState.time - feature.get('start');
|
||||||
var elapsedPoints = elapsedTime * pointsPerMs;
|
var elapsedPoints = elapsedTime * pointsPerMs;
|
||||||
@@ -59,27 +65,18 @@ var animateFlights = function(event) {
|
|||||||
var currentLine = new ol.geom.LineString(coords.slice(0, maxIndex));
|
var currentLine = new ol.geom.LineString(coords.slice(0, maxIndex));
|
||||||
|
|
||||||
// directly draw the line with the vector context
|
// directly draw the line with the vector context
|
||||||
vectorContext.drawLineStringGeometry(currentLine, feature);
|
vectorContext.drawGeometry(currentLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// tell OL3 to continue the postcompose animation
|
// tell OL3 to continue the animation
|
||||||
map.render();
|
map.render();
|
||||||
};
|
};
|
||||||
|
|
||||||
var addLater = function(feature, timeout) {
|
flightsSource = new ol.source.Vector({
|
||||||
window.setTimeout(function() {
|
|
||||||
feature.set('start', new Date().getTime());
|
|
||||||
flightsSource.addFeature(feature);
|
|
||||||
}, timeout);
|
|
||||||
};
|
|
||||||
|
|
||||||
var flightsSource = new ol.source.Vector({
|
|
||||||
wrapX: false,
|
wrapX: false,
|
||||||
attributions: [new ol.Attribution({
|
attributions: 'Flight data by ' +
|
||||||
html: 'Flight data by ' +
|
'<a href="http://openflights.org/data.html">OpenFlights</a>,',
|
||||||
'<a href="http://openflights.org/data.html">OpenFlights</a>,'
|
loader: function() {
|
||||||
})],
|
|
||||||
loader: function(extent, resolution, projection) {
|
|
||||||
var url = 'data/openflights/flights.json';
|
var url = 'data/openflights/flights.json';
|
||||||
fetch(url).then(function(response) {
|
fetch(url).then(function(response) {
|
||||||
return response.json();
|
return response.json();
|
||||||
@@ -116,11 +113,11 @@ var flightsSource = new ol.source.Vector({
|
|||||||
|
|
||||||
var flightsLayer = new ol.layer.Vector({
|
var flightsLayer = new ol.layer.Vector({
|
||||||
source: flightsSource,
|
source: flightsSource,
|
||||||
style: function(feature, resolution) {
|
style: function(feature) {
|
||||||
// if the animation is still active for a feature, do not
|
// if the animation is still active for a feature, do not
|
||||||
// render the feature with the layer style
|
// render the feature with the layer style
|
||||||
if (feature.get('finished')) {
|
if (feature.get('finished')) {
|
||||||
return defaultStyle;
|
return style;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ var map = new ol.Map({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function makeFractal(depth) {
|
function makeFractal(depth) {
|
||||||
var geometry = /** @type {ol.geom.LineString} */ (triangle.clone());
|
var geometry = triangle.clone();
|
||||||
var graph = coordsToGraph(geometry.getCoordinates());
|
var graph = coordsToGraph(geometry.getCoordinates());
|
||||||
for (var i = 0; i < depth; ++i) {
|
for (var i = 0; i < depth; ++i) {
|
||||||
var node = graph;
|
var node = graph;
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ docs: >
|
|||||||
<p>If there is no button on the map, your browser does not support the <a href="http://caniuse.com/#feat=fullscreen">Full Screen API</a>.</p>
|
<p>If there is no button on the map, your browser does not support the <a href="http://caniuse.com/#feat=fullscreen">Full Screen API</a>.</p>
|
||||||
tags: "full-screen, drag, rotate, zoom, bing, bing-maps"
|
tags: "full-screen, drag, rotate, zoom, bing, bing-maps"
|
||||||
cloak:
|
cloak:
|
||||||
Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here
|
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://www.bingmapsportal.com/ here
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ var map = new ol.Map({
|
|||||||
layers: [
|
layers: [
|
||||||
new ol.layer.Tile({
|
new ol.layer.Tile({
|
||||||
source: new ol.source.BingMaps({
|
source: new ol.source.BingMaps({
|
||||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3',
|
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF',
|
||||||
imagerySet: 'Aerial'
|
imagerySet: 'Aerial'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
44
examples/full-screen-source.css
Normal file
44
examples/full-screen-source.css
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
.fullscreen:-moz-full-screen {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.fullscreen:-webkit-full-screen {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.fullscreen:-ms-fullscreen {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullscreen:fullscreen {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullscreen {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
width: 100%;
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-rotate {
|
||||||
|
top: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map {
|
||||||
|
width: 80%;
|
||||||
|
height: 100%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidepanel {
|
||||||
|
background: #1F6B75;
|
||||||
|
width: 20%;
|
||||||
|
height: 100%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidepanel-title {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 3em;
|
||||||
|
color: #ffffff;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
16
examples/full-screen-source.html
Normal file
16
examples/full-screen-source.html
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
layout: example.html
|
||||||
|
title: Full Screen Control with extended source element
|
||||||
|
shortdesc: Example of a full screen control with a source option definition.
|
||||||
|
docs: >
|
||||||
|
<p>Click the control in the top right corner to go full screen. Click it again to exit full screen.</p>
|
||||||
|
<p>If there is no button on the map, your browser does not support the <a href="http://caniuse.com/#feat=fullscreen">Full Screen API</a>.</p>
|
||||||
|
tags: "full-screen, source, fullScreenSource, osm, osm-maps"
|
||||||
|
---
|
||||||
|
<div id="fullscreen" class="fullscreen">
|
||||||
|
<div id="map" class="map"></div>
|
||||||
|
<div class="sidepanel">
|
||||||
|
<span class="sidepanel-title">Side Panel</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
28
examples/full-screen-source.js
Normal file
28
examples/full-screen-source.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
goog.require('ol.Map');
|
||||||
|
goog.require('ol.View');
|
||||||
|
goog.require('ol.control');
|
||||||
|
goog.require('ol.control.FullScreen');
|
||||||
|
goog.require('ol.layer.Tile');
|
||||||
|
goog.require('ol.source.OSM');
|
||||||
|
|
||||||
|
|
||||||
|
var view = new ol.View({
|
||||||
|
center: [-9101767, 2822912],
|
||||||
|
zoom: 14
|
||||||
|
});
|
||||||
|
|
||||||
|
var map = new ol.Map({
|
||||||
|
controls: ol.control.defaults().extend([
|
||||||
|
new ol.control.FullScreen({
|
||||||
|
source: 'fullscreen'
|
||||||
|
})
|
||||||
|
]),
|
||||||
|
layers: [
|
||||||
|
new ol.layer.Tile({
|
||||||
|
source: new ol.source.OSM()
|
||||||
|
})
|
||||||
|
],
|
||||||
|
renderer: common.getRendererFromQueryString(),
|
||||||
|
target: 'map',
|
||||||
|
view: view
|
||||||
|
});
|
||||||
@@ -7,6 +7,6 @@ docs: >
|
|||||||
<p>If there is no button on the map, your browser does not support the <a href="http://caniuse.com/#feat=fullscreen">Full Screen API</a>.</p>
|
<p>If there is no button on the map, your browser does not support the <a href="http://caniuse.com/#feat=fullscreen">Full Screen API</a>.</p>
|
||||||
tags: "full-screen, bing, bing-maps"
|
tags: "full-screen, bing, bing-maps"
|
||||||
cloak:
|
cloak:
|
||||||
Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here
|
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://www.bingmapsportal.com/ here
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ var map = new ol.Map({
|
|||||||
layers: [
|
layers: [
|
||||||
new ol.layer.Tile({
|
new ol.layer.Tile({
|
||||||
source: new ol.source.BingMaps({
|
source: new ol.source.BingMaps({
|
||||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3',
|
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF',
|
||||||
imagerySet: 'Aerial'
|
imagerySet: 'Aerial'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ var styles = {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
var styleFunction = function(feature, resolution) {
|
var styleFunction = function(feature) {
|
||||||
return styles[feature.getGeometry().getType()];
|
return styles[feature.getGeometry().getType()];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -97,79 +97,67 @@ var geojsonObject = {
|
|||||||
'name': 'EPSG:3857'
|
'name': 'EPSG:3857'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'features': [
|
'features': [{
|
||||||
{
|
'type': 'Feature',
|
||||||
'type': 'Feature',
|
'geometry': {
|
||||||
'geometry': {
|
'type': 'Point',
|
||||||
'type': 'Point',
|
'coordinates': [0, 0]
|
||||||
'coordinates': [0, 0]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'Feature',
|
|
||||||
'geometry': {
|
|
||||||
'type': 'LineString',
|
|
||||||
'coordinates': [[4e6, -2e6], [8e6, 2e6]]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'Feature',
|
|
||||||
'geometry': {
|
|
||||||
'type': 'LineString',
|
|
||||||
'coordinates': [[4e6, 2e6], [8e6, -2e6]]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'Feature',
|
|
||||||
'geometry': {
|
|
||||||
'type': 'Polygon',
|
|
||||||
'coordinates': [[[-5e6, -1e6], [-4e6, 1e6], [-3e6, -1e6]]]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'Feature',
|
|
||||||
'geometry': {
|
|
||||||
'type': 'MultiLineString',
|
|
||||||
'coordinates': [
|
|
||||||
[[-1e6, -7.5e5], [-1e6, 7.5e5]],
|
|
||||||
[[1e6, -7.5e5], [1e6, 7.5e5]],
|
|
||||||
[[-7.5e5, -1e6], [7.5e5, -1e6]],
|
|
||||||
[[-7.5e5, 1e6], [7.5e5, 1e6]]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'Feature',
|
|
||||||
'geometry': {
|
|
||||||
'type': 'MultiPolygon',
|
|
||||||
'coordinates': [
|
|
||||||
[[[-5e6, 6e6], [-5e6, 8e6], [-3e6, 8e6], [-3e6, 6e6]]],
|
|
||||||
[[[-2e6, 6e6], [-2e6, 8e6], [0, 8e6], [0, 6e6]]],
|
|
||||||
[[[1e6, 6e6], [1e6, 8e6], [3e6, 8e6], [3e6, 6e6]]]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'Feature',
|
|
||||||
'geometry': {
|
|
||||||
'type': 'GeometryCollection',
|
|
||||||
'geometries': [
|
|
||||||
{
|
|
||||||
'type': 'LineString',
|
|
||||||
'coordinates': [[-5e6, -5e6], [0, -5e6]]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'Point',
|
|
||||||
'coordinates': [4e6, -5e6]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'Polygon',
|
|
||||||
'coordinates': [[[1e6, -6e6], [2e6, -4e6], [3e6, -6e6]]]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
}, {
|
||||||
|
'type': 'Feature',
|
||||||
|
'geometry': {
|
||||||
|
'type': 'LineString',
|
||||||
|
'coordinates': [[4e6, -2e6], [8e6, 2e6]]
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'type': 'Feature',
|
||||||
|
'geometry': {
|
||||||
|
'type': 'LineString',
|
||||||
|
'coordinates': [[4e6, 2e6], [8e6, -2e6]]
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'type': 'Feature',
|
||||||
|
'geometry': {
|
||||||
|
'type': 'Polygon',
|
||||||
|
'coordinates': [[[-5e6, -1e6], [-4e6, 1e6], [-3e6, -1e6]]]
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'type': 'Feature',
|
||||||
|
'geometry': {
|
||||||
|
'type': 'MultiLineString',
|
||||||
|
'coordinates': [
|
||||||
|
[[-1e6, -7.5e5], [-1e6, 7.5e5]],
|
||||||
|
[[1e6, -7.5e5], [1e6, 7.5e5]],
|
||||||
|
[[-7.5e5, -1e6], [7.5e5, -1e6]],
|
||||||
|
[[-7.5e5, 1e6], [7.5e5, 1e6]]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'type': 'Feature',
|
||||||
|
'geometry': {
|
||||||
|
'type': 'MultiPolygon',
|
||||||
|
'coordinates': [
|
||||||
|
[[[-5e6, 6e6], [-5e6, 8e6], [-3e6, 8e6], [-3e6, 6e6]]],
|
||||||
|
[[[-2e6, 6e6], [-2e6, 8e6], [0, 8e6], [0, 6e6]]],
|
||||||
|
[[[1e6, 6e6], [1e6, 8e6], [3e6, 8e6], [3e6, 6e6]]]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'type': 'Feature',
|
||||||
|
'geometry': {
|
||||||
|
'type': 'GeometryCollection',
|
||||||
|
'geometries': [{
|
||||||
|
'type': 'LineString',
|
||||||
|
'coordinates': [[-5e6, -5e6], [0, -5e6]]
|
||||||
|
}, {
|
||||||
|
'type': 'Point',
|
||||||
|
'coordinates': [4e6, -5e6]
|
||||||
|
}, {
|
||||||
|
'type': 'Polygon',
|
||||||
|
'coordinates': [[[1e6, -6e6], [2e6, -4e6], [3e6, -6e6]]]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}]
|
||||||
};
|
};
|
||||||
|
|
||||||
var vectorSource = new ol.source.Vector({
|
var vectorSource = new ol.source.Vector({
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ tags: "fullscreen, geolocation, orientation, mobile"
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" type="text/css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css">
|
||||||
<link rel="stylesheet" href="../css/ol.css" type="text/css">
|
<link rel="stylesheet" href="../css/ol.css" type="text/css">
|
||||||
<link rel="stylesheet" href="./resources/layout.css" type="text/css">
|
<link rel="stylesheet" href="./resources/layout.css" type="text/css">
|
||||||
<title>Mobile Geolocation Tracking with Orientation</title>
|
<title>Mobile Geolocation Tracking with Orientation</title>
|
||||||
@@ -44,7 +44,7 @@ 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-1.9.1.min.js" type="text/javascript"></script>
|
<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>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ var geolocation = new ol.Geolocation(/** @type {olx.GeolocationOptions} */ ({
|
|||||||
var deltaMean = 500; // the geolocation sampling period mean in ms
|
var deltaMean = 500; // the geolocation sampling period mean in ms
|
||||||
|
|
||||||
// Listen to position changes
|
// Listen to position changes
|
||||||
geolocation.on('change', function(evt) {
|
geolocation.on('change', function() {
|
||||||
var position = geolocation.getPosition();
|
var position = geolocation.getPosition();
|
||||||
var accuracy = geolocation.getAccuracy();
|
var accuracy = geolocation.getAccuracy();
|
||||||
var heading = geolocation.getHeading() || 0;
|
var heading = geolocation.getHeading() || 0;
|
||||||
@@ -113,7 +113,7 @@ function addPosition(position, heading, m, speed) {
|
|||||||
// force the rotation change to be less than 180°
|
// force the rotation change to be less than 180°
|
||||||
if (Math.abs(headingDiff) > Math.PI) {
|
if (Math.abs(headingDiff) > Math.PI) {
|
||||||
var sign = (headingDiff >= 0) ? 1 : -1;
|
var sign = (headingDiff >= 0) ? 1 : -1;
|
||||||
headingDiff = - sign * (2 * Math.PI - Math.abs(headingDiff));
|
headingDiff = -sign * (2 * Math.PI - Math.abs(headingDiff));
|
||||||
}
|
}
|
||||||
heading = prevHeading + headingDiff;
|
heading = prevHeading + headingDiff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ geolocation.on('change:position', function() {
|
|||||||
new ol.geom.Point(coordinates) : null);
|
new ol.geom.Point(coordinates) : null);
|
||||||
});
|
});
|
||||||
|
|
||||||
var featuresOverlay = new ol.layer.Vector({
|
new ol.layer.Vector({
|
||||||
map: map,
|
map: map,
|
||||||
source: new ol.source.Vector({
|
source: new ol.source.Vector({
|
||||||
features: [accuracyFeature, positionFeature]
|
features: [accuracyFeature, positionFeature]
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ map.on('pointermove', function(evt) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var pixel = map.getEventPixel(evt.originalEvent);
|
var pixel = map.getEventPixel(evt.originalEvent);
|
||||||
var hit = map.forEachLayerAtPixel(pixel, function(layer) {
|
var hit = map.forEachLayerAtPixel(pixel, function() {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
map.getTargetElement().style.cursor = hit ? 'pointer' : '';
|
map.getTargetElement().style.cursor = hit ? 'pointer' : '';
|
||||||
|
|||||||
26
examples/getfeatureinfo-layers.html
Normal file
26
examples/getfeatureinfo-layers.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
layout: example.html
|
||||||
|
title: WMS GetFeatureInfo (Layers)
|
||||||
|
shortdesc: >
|
||||||
|
Shows how to fetch features per layer name in a single WMS GetFeatureInfo
|
||||||
|
request
|
||||||
|
docs: >
|
||||||
|
Demonstrates the use of the `layers` option in the
|
||||||
|
`ol.format.WMSGetFeatureInfo` format object, which allows features returned
|
||||||
|
by a single WMS GetFeatureInfo request that asks for more than one layer
|
||||||
|
to be read by layer name.
|
||||||
|
---
|
||||||
|
<table id="info">
|
||||||
|
<tr>
|
||||||
|
<td>All features:</td>
|
||||||
|
<td id="all"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Hotel features:</td>
|
||||||
|
<td id="hotel"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Restaurant features:</td>
|
||||||
|
<td id="restaurant"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
23
examples/getfeatureinfo-layers.js
Normal file
23
examples/getfeatureinfo-layers.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
goog.require('ol.format.WMSGetFeatureInfo');
|
||||||
|
|
||||||
|
fetch('data/wmsgetfeatureinfo/osm-restaurant-hotel.xml').then(function(response) {
|
||||||
|
return response.text();
|
||||||
|
}).then(function(response) {
|
||||||
|
|
||||||
|
// this is the standard way to read the features
|
||||||
|
var allFeatures = new ol.format.WMSGetFeatureInfo().readFeatures(response);
|
||||||
|
document.getElementById('all').innerText = allFeatures.length.toString();
|
||||||
|
|
||||||
|
// when specifying the 'layers' options, only the features of those
|
||||||
|
// layers are returned by the format
|
||||||
|
var hotelFeatures = new ol.format.WMSGetFeatureInfo({
|
||||||
|
layers: ['hotel']
|
||||||
|
}).readFeatures(response);
|
||||||
|
document.getElementById('hotel').innerText = hotelFeatures.length.toString();
|
||||||
|
|
||||||
|
var restaurantFeatures = new ol.format.WMSGetFeatureInfo({
|
||||||
|
layers: ['restaurant']
|
||||||
|
}).readFeatures(response);
|
||||||
|
document.getElementById('restaurant').innerText = restaurantFeatures.length.toString();
|
||||||
|
|
||||||
|
});
|
||||||
@@ -44,7 +44,7 @@ map.on('pointermove', function(evt) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var pixel = map.getEventPixel(evt.originalEvent);
|
var pixel = map.getEventPixel(evt.originalEvent);
|
||||||
var hit = map.forEachLayerAtPixel(pixel, function(layer) {
|
var hit = map.forEachLayerAtPixel(pixel, function() {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
map.getTargetElement().style.cursor = hit ? 'pointer' : '';
|
map.getTargetElement().style.cursor = hit ? 'pointer' : '';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ docs: >
|
|||||||
Example of using the GPX source.
|
Example of using the GPX source.
|
||||||
tags: "GPX"
|
tags: "GPX"
|
||||||
cloak:
|
cloak:
|
||||||
Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3: Your Bing Maps Key from http://bingmapsportal.com/ here
|
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://www.bingmapsportal.com/ here
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
<div id="info"> </div>
|
<div id="info"> </div>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ goog.require('ol.View');
|
|||||||
goog.require('ol.format.GPX');
|
goog.require('ol.format.GPX');
|
||||||
goog.require('ol.layer.Tile');
|
goog.require('ol.layer.Tile');
|
||||||
goog.require('ol.layer.Vector');
|
goog.require('ol.layer.Vector');
|
||||||
goog.require('ol.proj');
|
|
||||||
goog.require('ol.source.BingMaps');
|
goog.require('ol.source.BingMaps');
|
||||||
goog.require('ol.source.Vector');
|
goog.require('ol.source.Vector');
|
||||||
goog.require('ol.style.Circle');
|
goog.require('ol.style.Circle');
|
||||||
@@ -11,12 +10,10 @@ goog.require('ol.style.Fill');
|
|||||||
goog.require('ol.style.Stroke');
|
goog.require('ol.style.Stroke');
|
||||||
goog.require('ol.style.Style');
|
goog.require('ol.style.Style');
|
||||||
|
|
||||||
var projection = ol.proj.get('EPSG:3857');
|
|
||||||
|
|
||||||
var raster = new ol.layer.Tile({
|
var raster = new ol.layer.Tile({
|
||||||
source: new ol.source.BingMaps({
|
source: new ol.source.BingMaps({
|
||||||
imagerySet: 'Aerial',
|
imagerySet: 'Aerial',
|
||||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3'
|
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -52,7 +49,7 @@ var vector = new ol.layer.Vector({
|
|||||||
url: 'data/gpx/fells_loop.gpx',
|
url: 'data/gpx/fells_loop.gpx',
|
||||||
format: new ol.format.GPX()
|
format: new ol.format.GPX()
|
||||||
}),
|
}),
|
||||||
style: function(feature, resolution) {
|
style: function(feature) {
|
||||||
return style[feature.getGeometry().getType()];
|
return style[feature.getGeometry().getType()];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -68,7 +65,7 @@ var map = new ol.Map({
|
|||||||
|
|
||||||
var displayFeatureInfo = function(pixel) {
|
var displayFeatureInfo = function(pixel) {
|
||||||
var features = [];
|
var features = [];
|
||||||
map.forEachFeatureAtPixel(pixel, function(feature, layer) {
|
map.forEachFeatureAtPixel(pixel, function(feature) {
|
||||||
features.push(feature);
|
features.push(feature);
|
||||||
});
|
});
|
||||||
if (features.length > 0) {
|
if (features.length > 0) {
|
||||||
|
|||||||
3
examples/icon-color.css
Normal file
3
examples/icon-color.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#map {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
10
examples/icon-color.html
Normal file
10
examples/icon-color.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
layout: example.html
|
||||||
|
title: Icon Colors
|
||||||
|
shortdesc: Example assigning a custom color to an icon
|
||||||
|
docs: >
|
||||||
|
Example assigning a custom color to an icon. The features in this examples are all using the same image with the different colors coming from the javascript file
|
||||||
|
tags: "vector, style, icon, marker"
|
||||||
|
resources:
|
||||||
|
---
|
||||||
|
<div id="map" class="map"></div>
|
||||||
71
examples/icon-color.js
Normal file
71
examples/icon-color.js
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
goog.require('ol.Feature');
|
||||||
|
goog.require('ol.Map');
|
||||||
|
goog.require('ol.View');
|
||||||
|
goog.require('ol.geom.Point');
|
||||||
|
goog.require('ol.layer.Tile');
|
||||||
|
goog.require('ol.layer.Vector');
|
||||||
|
goog.require('ol.proj');
|
||||||
|
goog.require('ol.source.TileJSON');
|
||||||
|
goog.require('ol.source.Vector');
|
||||||
|
goog.require('ol.style.Icon');
|
||||||
|
goog.require('ol.style.Style');
|
||||||
|
|
||||||
|
|
||||||
|
var rome = new ol.Feature({
|
||||||
|
geometry: new ol.geom.Point(ol.proj.fromLonLat([12.5, 41.9]))
|
||||||
|
});
|
||||||
|
|
||||||
|
var london = new ol.Feature({
|
||||||
|
geometry: new ol.geom.Point(ol.proj.fromLonLat([-0.12755, 51.507222]))
|
||||||
|
});
|
||||||
|
|
||||||
|
var madrid = new ol.Feature({
|
||||||
|
geometry: new ol.geom.Point(ol.proj.fromLonLat([-3.683333, 40.4]))
|
||||||
|
});
|
||||||
|
|
||||||
|
rome.setStyle(new ol.style.Style({
|
||||||
|
image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({
|
||||||
|
color: '#8959A8',
|
||||||
|
src: 'data/dot.png'
|
||||||
|
}))
|
||||||
|
}));
|
||||||
|
|
||||||
|
london.setStyle(new ol.style.Style({
|
||||||
|
image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({
|
||||||
|
color: '#4271AE',
|
||||||
|
src: 'data/dot.png'
|
||||||
|
}))
|
||||||
|
}));
|
||||||
|
|
||||||
|
madrid.setStyle(new ol.style.Style({
|
||||||
|
image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({
|
||||||
|
color: [113, 140, 0],
|
||||||
|
src: 'data/dot.png'
|
||||||
|
}))
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
var vectorSource = new ol.source.Vector({
|
||||||
|
features: [rome, london, madrid]
|
||||||
|
});
|
||||||
|
|
||||||
|
var vectorLayer = new ol.layer.Vector({
|
||||||
|
source: vectorSource
|
||||||
|
});
|
||||||
|
|
||||||
|
var rasterLayer = new ol.layer.Tile({
|
||||||
|
source: new ol.source.TileJSON({
|
||||||
|
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json',
|
||||||
|
crossOrigin: ''
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
var map = new ol.Map({
|
||||||
|
renderer: common.getRendererFromQueryString(),
|
||||||
|
layers: [rasterLayer, vectorLayer],
|
||||||
|
target: document.getElementById('map'),
|
||||||
|
view: new ol.View({
|
||||||
|
center: ol.proj.fromLonLat([2.896372, 44.60240]),
|
||||||
|
zoom: 3
|
||||||
|
})
|
||||||
|
});
|
||||||
@@ -28,11 +28,13 @@ iconFeature.set('style', createStyle('data/icon.png', undefined));
|
|||||||
var map = new ol.Map({
|
var map = new ol.Map({
|
||||||
layers: [
|
layers: [
|
||||||
new ol.layer.Tile({
|
new ol.layer.Tile({
|
||||||
source: new ol.source.Stamen({ layer: 'watercolor' })
|
source: new ol.source.Stamen({layer: 'watercolor'})
|
||||||
}),
|
}),
|
||||||
new ol.layer.Vector({
|
new ol.layer.Vector({
|
||||||
style: function(feature) { return feature.get('style'); },
|
style: function(feature) {
|
||||||
source: new ol.source.Vector({ features: [iconFeature] })
|
return feature.get('style');
|
||||||
|
},
|
||||||
|
source: new ol.source.Vector({features: [iconFeature]})
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
target: document.getElementById('map'),
|
target: document.getElementById('map'),
|
||||||
@@ -44,7 +46,7 @@ var map = new ol.Map({
|
|||||||
|
|
||||||
var selectStyle = {};
|
var selectStyle = {};
|
||||||
var select = new ol.interaction.Select({
|
var select = new ol.interaction.Select({
|
||||||
style: function(feature, resolution) {
|
style: function(feature) {
|
||||||
var image = feature.get('style').getImage().getImage();
|
var image = feature.get('style').getImage().getImage();
|
||||||
if (!selectStyle[image.src]) {
|
if (!selectStyle[image.src]) {
|
||||||
var canvas = document.createElement('canvas');
|
var canvas = document.createElement('canvas');
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ for (i = 0; i < featureCount; i += 30) {
|
|||||||
overlayFeatures.push(clone);
|
overlayFeatures.push(clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
var featureOverlay = new ol.layer.Vector({
|
new ol.layer.Vector({
|
||||||
map: map,
|
map: map,
|
||||||
source: new ol.source.Vector({
|
source: new ol.source.Vector({
|
||||||
features: overlayFeatures
|
features: overlayFeatures
|
||||||
@@ -112,8 +112,8 @@ map.on('click', function(evt) {
|
|||||||
|
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
var features = [];
|
var features = [];
|
||||||
map.forEachFeatureAtPixel(evt.pixel, function(feature, layer) {
|
map.forEachFeatureAtPixel(evt.pixel, function(feature) {
|
||||||
features.push(features);
|
features.push(feature);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ docs: >
|
|||||||
Example using an icon to symbolize a point.
|
Example using an icon to symbolize a point.
|
||||||
tags: "vector, style, icon, marker, popup"
|
tags: "vector, style, icon, marker, popup"
|
||||||
resources:
|
resources:
|
||||||
- https://code.jquery.com/jquery-1.11.2.min.js
|
- https://code.jquery.com/jquery-2.2.3.min.js
|
||||||
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css
|
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
|
||||||
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js
|
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js
|
||||||
---
|
---
|
||||||
<div id="map" class="map"><div id="popup"></div></div>
|
<div id="map" class="map"><div id="popup"></div></div>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user