Compare commits
992 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4c4a81afb | ||
|
|
7478e82b9a | ||
|
|
4b586df2b5 | ||
|
|
ed62203527 | ||
|
|
73d4c3565c | ||
|
|
cc30f5f3da | ||
|
|
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 | ||
|
|
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 | ||
|
|
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 | ||
|
|
863cc1bae3 | ||
|
|
60179e9ab9 | ||
|
|
a512a5b115 | ||
|
|
46647373ee | ||
|
|
4b7e8f5f83 | ||
|
|
20be8980e1 | ||
|
|
34139f4dce | ||
|
|
9affb99899 | ||
|
|
f395a0f8c5 | ||
|
|
80f10ce824 | ||
|
|
46a266fa5c | ||
|
|
4f2df30f1d | ||
|
|
c1b16217f2 | ||
|
|
34fb85a9d7 | ||
|
|
6bc6fd9cbc | ||
|
|
945f1e7580 | ||
|
|
ae90c32f01 | ||
|
|
25e0053a13 | ||
|
|
88255fd776 | ||
|
|
e0be143ed5 | ||
|
|
dd4e88525e | ||
|
|
5d64762bcb | ||
|
|
7c98e922c3 | ||
|
|
41c81dec88 | ||
|
|
887e90af1e | ||
|
|
69c44e50df | ||
|
|
bd4c1f8da6 | ||
|
|
95443d0c88 | ||
|
|
9b1416da29 | ||
|
|
195e802f7c | ||
|
|
48c8f9ea84 | ||
|
|
9f5d85f2c6 | ||
|
|
c4237c7858 | ||
|
|
fbb59d29b9 | ||
|
|
554aaf1574 | ||
|
|
2ebcadfcd5 | ||
|
|
d9bb3adbe8 | ||
|
|
070a6b11f0 | ||
|
|
43e1c86b6e | ||
|
|
b0b202f112 | ||
|
|
2fdf7f508d | ||
|
|
e14197c060 | ||
|
|
814fd858d8 | ||
|
|
97995cf20b | ||
|
|
8fc85198b0 | ||
|
|
2b64a7af7b | ||
|
|
fc2c9176a6 | ||
|
|
7192644c07 | ||
|
|
992870e2d2 | ||
|
|
ad3c6713da | ||
|
|
3fef07f9e9 | ||
|
|
0c3aed0083 | ||
|
|
a5abd8df23 | ||
|
|
73158b8c71 | ||
|
|
4f85cbec54 | ||
|
|
8f4c6a5bbf | ||
|
|
5b7227a0bf | ||
|
|
f387bb75bf | ||
|
|
e27bfc4fa6 | ||
|
|
aa2838cdcd | ||
|
|
be16ba01ca | ||
|
|
3413f6d138 | ||
|
|
954a5077cf | ||
|
|
0050f00703 | ||
|
|
867bcce1cc | ||
|
|
257abb63d7 | ||
|
|
004e7ad0d0 | ||
|
|
ba93698c20 | ||
|
|
35064a45f7 | ||
|
|
a940cdd6a7 | ||
|
|
e978133b85 | ||
|
|
0b4c0ee41c | ||
|
|
5a1588a2dc | ||
|
|
abb680d28f | ||
|
|
8fcedb03a4 | ||
|
|
7ecb6700fb | ||
|
|
4892a2f039 | ||
|
|
9363a6a340 | ||
|
|
6e58be72bb | ||
|
|
6530fbe6c3 | ||
|
|
612aa3493b | ||
|
|
609e94a58a | ||
|
|
652638e902 | ||
|
|
7149113ab6 | ||
|
|
2215f49617 | ||
|
|
40fec9ca35 | ||
|
|
279eae1dba | ||
|
|
cf1b1822b8 | ||
|
|
952a282756 | ||
|
|
51b62fb188 | ||
|
|
5a123d0840 | ||
|
|
a186254e14 | ||
|
|
8b0bd11fc8 | ||
|
|
d96d82939a | ||
|
|
1ebdba13a6 | ||
|
|
f6326fcc99 | ||
|
|
c8e35afecb | ||
|
|
a2e3f28060 | ||
|
|
ef54dddbbc | ||
|
|
46b7f80fef | ||
|
|
890b515e44 | ||
|
|
7174f65da3 | ||
|
|
fb52d472d2 | ||
|
|
5f0ea2c2c7 | ||
|
|
f0048a5611 | ||
|
|
a9cd2cd278 | ||
|
|
8d72589743 | ||
|
|
90e224bd96 | ||
|
|
290a83e2ed | ||
|
|
44a3595d77 | ||
|
|
6525bda9fd | ||
|
|
1b36050621 | ||
|
|
7cc2a070e8 | ||
|
|
230f24208b | ||
|
|
0ecf981673 | ||
|
|
cacf2629fd | ||
|
|
2c935dc4e0 | ||
|
|
a2d7f56933 | ||
|
|
b338c77726 | ||
|
|
40e9f0eaf2 | ||
|
|
a2011b035d | ||
|
|
e34c18a26e | ||
|
|
1092f6b2a2 | ||
|
|
6897e3cc52 | ||
|
|
2242224a0f | ||
|
|
f63963403b | ||
|
|
498e3aa3ee | ||
|
|
b0c14cfe05 | ||
|
|
0259977fa9 | ||
|
|
eb5607544c | ||
|
|
4999c792f1 | ||
|
|
5af338f92b | ||
|
|
071aad4815 | ||
|
|
a43cca7720 | ||
|
|
aa260f800e | ||
|
|
a4fb2501d8 | ||
|
|
627abaf1a7 | ||
|
|
5ead77bcd1 | ||
|
|
9ffed70ffd | ||
|
|
cbfd533d49 | ||
|
|
d3ff8d7fb0 | ||
|
|
19fe73e78e | ||
|
|
72a0f70e7a | ||
|
|
645a0ce2d4 | ||
|
|
d19bf0970b | ||
|
|
10eb041199 | ||
|
|
99ca4047dd | ||
|
|
d838214f96 | ||
|
|
c463321643 | ||
|
|
a94a00de1d | ||
|
|
9a35c08300 | ||
|
|
8bd97532df | ||
|
|
baed03d50d | ||
|
|
c984bedd09 | ||
|
|
e6343ca272 | ||
|
|
f88681951a | ||
|
|
87fcca91bd | ||
|
|
6fd6b794ef | ||
|
|
2fff18fd0c | ||
|
|
91a772a952 | ||
|
|
88ec3b9f6c | ||
|
|
2e8f4806d2 | ||
|
|
b8cf2b213b | ||
|
|
3035bbdfd3 | ||
|
|
c3165252f8 | ||
|
|
5a511c7591 | ||
|
|
48be3ee572 | ||
|
|
734712bf9c | ||
|
|
a2f84b144f | ||
|
|
74f2b4cb74 | ||
|
|
58d22350d8 | ||
|
|
b69e453061 | ||
|
|
a8cd6b735f | ||
|
|
51d5182592 | ||
|
|
6240162ecf | ||
|
|
5c592731f3 | ||
|
|
aef097e348 | ||
|
|
77ca38aa10 | ||
|
|
0b23eae429 | ||
|
|
b92565a096 | ||
|
|
3dcc2843ae | ||
|
|
34dd7b76b1 | ||
|
|
b435723b8c | ||
|
|
749dacc749 | ||
|
|
fd44295b17 | ||
|
|
17e69f9326 | ||
|
|
b44d1f4fec | ||
|
|
10ed2997d8 | ||
|
|
bfd33becbc | ||
|
|
50c28cdd60 | ||
|
|
764875147a | ||
|
|
440a8bdea7 | ||
|
|
faf9e467e4 | ||
|
|
072a347a54 | ||
|
|
eee205c688 | ||
|
|
f0dbedd39d | ||
|
|
f4ad1214e7 | ||
|
|
ca575bd35d | ||
|
|
fabda7c4b2 | ||
|
|
18c41bfc19 | ||
|
|
dfbe7447c9 | ||
|
|
5e0b0e69a5 | ||
|
|
6280ed2201 | ||
|
|
44cfb190f3 | ||
|
|
f86a7455c4 | ||
|
|
69c332b023 | ||
|
|
6280b35035 | ||
|
|
4a97e26bd9 | ||
|
|
152dc6e5d0 | ||
|
|
f5a148e6b3 | ||
|
|
a8a796f922 | ||
|
|
4c19e13bf6 | ||
|
|
1c6a56f781 | ||
|
|
3aabc44746 | ||
|
|
b426fa5509 | ||
|
|
70d376f215 | ||
|
|
c5f4710b8d | ||
|
|
14338e9c16 | ||
|
|
41a232de60 | ||
|
|
ce5ab5b59c | ||
|
|
c3c8c4fa73 | ||
|
|
0f70a21ba6 | ||
|
|
132861e175 | ||
|
|
bd1febeb41 | ||
|
|
f588fcf7b0 | ||
|
|
99a902a311 | ||
|
|
e8c99e4e63 | ||
|
|
afba132c13 | ||
|
|
8a7907e4cf | ||
|
|
bb5377fb8c | ||
|
|
657af1983d | ||
|
|
ab7e608129 | ||
|
|
0c2c058534 | ||
|
|
a52187a276 | ||
|
|
a9987de308 | ||
|
|
c02fdf2393 | ||
|
|
ca50e9e5b7 | ||
|
|
069a81db74 | ||
|
|
df460d2ed1 | ||
|
|
b29b969cfe | ||
|
|
a020251f69 | ||
|
|
b2292cc6fd | ||
|
|
647c1a6351 | ||
|
|
bfbb802b85 | ||
|
|
a446147902 | ||
|
|
d968f32456 | ||
|
|
1aea2c2b0c | ||
|
|
5b817f3146 | ||
|
|
a58f66a9a9 | ||
|
|
8e15f80d7a | ||
|
|
a35b3a5f52 | ||
|
|
9cf26f1fac | ||
|
|
fadf63cbd0 | ||
|
|
daa970fe4c | ||
|
|
3254e08785 | ||
|
|
544f951c14 | ||
|
|
08a640b793 | ||
|
|
d29f3b9068 | ||
|
|
d68991e982 | ||
|
|
5c536aafc7 | ||
|
|
757d46541c | ||
|
|
dc3bf0d04b | ||
|
|
9cde0ab860 | ||
|
|
bb00f4dafd | ||
|
|
16670e4015 | ||
|
|
4b85dd89a5 | ||
|
|
71f7c70279 | ||
|
|
2d24c8942e | ||
|
|
d24dcc7753 | ||
|
|
bea1501bb7 | ||
|
|
5751d342ff | ||
|
|
8514a85353 | ||
|
|
4a163b54f3 | ||
|
|
ad85e0e98d | ||
|
|
66a99dd6c4 | ||
|
|
eb762b6f4a | ||
|
|
14a1add08d | ||
|
|
cbd1aee0cc | ||
|
|
135d66dac7 | ||
|
|
3f30072de5 | ||
|
|
925a89ecdb | ||
|
|
d5c7f805ab | ||
|
|
67f42ed33a | ||
|
|
610ed7294f | ||
|
|
6c813020c2 | ||
|
|
0149924551 | ||
|
|
85264111cd | ||
|
|
921d736340 | ||
|
|
98c9b0eb39 | ||
|
|
7946298e67 | ||
|
|
c0271e3509 | ||
|
|
ad3ee7cb33 | ||
|
|
363ef8f45e | ||
|
|
9529200d4f | ||
|
|
85ca4e1888 | ||
|
|
c0da5ff8ef | ||
|
|
0b7cd12eaa | ||
|
|
9e25251891 | ||
|
|
e5c44b37c9 | ||
|
|
979342091a | ||
|
|
dc0e37b782 | ||
|
|
7f4c6e3634 | ||
|
|
085a6c8135 | ||
|
|
c5dac0aa70 | ||
|
|
40c1a6d112 | ||
|
|
6d9dd030a1 | ||
|
|
9f5240dd15 | ||
|
|
4a8782f1e0 | ||
|
|
d59f6979f7 | ||
|
|
7b8b058190 | ||
|
|
c6803838ab | ||
|
|
4846a49258 | ||
|
|
7cf12d1c12 | ||
|
|
2f06d214f5 | ||
|
|
80b78b8b5a | ||
|
|
5d264d2bf0 | ||
|
|
5832943773 | ||
|
|
2b2ac47b1f | ||
|
|
4be89715ed | ||
|
|
80fa26ddd8 | ||
|
|
656023e569 | ||
|
|
b99954e93a | ||
|
|
8daff341d0 | ||
|
|
66338a662d | ||
|
|
4784b7f2e2 | ||
|
|
af69933c64 | ||
|
|
8e9b20db51 | ||
|
|
0e8e104a2d | ||
|
|
29b64d8628 | ||
|
|
bda3a6803c | ||
|
|
cd2a2ebbc5 | ||
|
|
9df280a884 | ||
|
|
6e2f82c397 | ||
|
|
63629e1ee2 | ||
|
|
dbedbc19ee | ||
|
|
c0c5443782 | ||
|
|
4b942bc4f6 | ||
|
|
7d3fc3ccc7 | ||
|
|
fa88b578a4 | ||
|
|
598111b78e | ||
|
|
8f4756c99b | ||
|
|
05dfc226b7 | ||
|
|
a60a7f7c09 | ||
|
|
a3dbe4b658 | ||
|
|
c9beb6d4f4 | ||
|
|
eb75f4eedf | ||
|
|
80caaa5399 | ||
|
|
15c1323ff9 | ||
|
|
48f98717b6 | ||
|
|
09063b47b5 | ||
|
|
bd9aff46af | ||
|
|
b27acb8d5e | ||
|
|
9764dac149 | ||
|
|
79d803aba8 | ||
|
|
78a961e6ef | ||
|
|
a84db3add6 | ||
|
|
519e7976cd | ||
|
|
7d95df1a9d | ||
|
|
1c1010a65d | ||
|
|
ac84e98c7f | ||
|
|
945847d0a1 | ||
|
|
e5c2a226dd | ||
|
|
5541e9a236 | ||
|
|
c8eb3adf1e | ||
|
|
c2bde4e482 | ||
|
|
eb174f7a82 | ||
|
|
55a969f95f | ||
|
|
f344f2cdb2 | ||
|
|
ecdbab40ba | ||
|
|
819b9ce6ca | ||
|
|
c86a61eacb | ||
|
|
571760fb32 | ||
|
|
965b88d7c8 | ||
|
|
d950dada31 | ||
|
|
e49f529fe6 | ||
|
|
6f9fa4c12e | ||
|
|
b816128728 | ||
|
|
70021be919 | ||
|
|
32fa3501df | ||
|
|
a7cde96056 | ||
|
|
52a7c5e582 | ||
|
|
f52f9b6817 | ||
|
|
9f8ab48f1f | ||
|
|
8fb1d1f244 | ||
|
|
f3d5d16a82 | ||
|
|
783acfa961 | ||
|
|
3f897cfb79 | ||
|
|
c6e2c6a16e | ||
|
|
6431622881 | ||
|
|
00a8b4da16 | ||
|
|
0f09607725 | ||
|
|
94caa07168 | ||
|
|
5388f96551 | ||
|
|
3353eeb0c3 | ||
|
|
402697c369 | ||
|
|
4bcea473eb | ||
|
|
043b206705 | ||
|
|
76974a5888 | ||
|
|
59bce75d2a | ||
|
|
7a1533925a | ||
|
|
a2ae2f0f3e | ||
|
|
f078a9c935 | ||
|
|
404fa10bb7 | ||
|
|
8f1aab9236 | ||
|
|
c899100dab | ||
|
|
0c48a560b2 | ||
|
|
690a5f1f90 | ||
|
|
87337570e0 | ||
|
|
7864ed7861 | ||
|
|
03c75a8648 | ||
|
|
726bcbef83 | ||
|
|
016df5b902 | ||
|
|
14e20e23a0 | ||
|
|
aad5f94556 | ||
|
|
615b54eb67 | ||
|
|
fc23a38692 | ||
|
|
3b1d72202a | ||
|
|
4c236a64b8 | ||
|
|
3cc8291df4 | ||
|
|
c2b21985f4 | ||
|
|
168b675191 | ||
|
|
ebc1bc0096 | ||
|
|
be6bf00d74 | ||
|
|
f481070f82 | ||
|
|
9a460b5f6b | ||
|
|
8b38928aad | ||
|
|
30cd0aa584 | ||
|
|
8ab197eba6 | ||
|
|
6482ccf2f7 | ||
|
|
0f408e341f | ||
|
|
ed1e49045a | ||
|
|
be0a0de759 | ||
|
|
15575288e0 | ||
|
|
f2f77091ad | ||
|
|
c205323ff2 | ||
|
|
b0694c1e3b | ||
|
|
e0cfa1951a | ||
|
|
63084d30e9 | ||
|
|
9b82f19cc2 | ||
|
|
3f567b0bf0 | ||
|
|
bc74273208 | ||
|
|
6e08fc9e13 | ||
|
|
bf65b8a4fe | ||
|
|
e14bede9e9 | ||
|
|
ac76989447 | ||
|
|
b221e1ac1f | ||
|
|
ebc3f24671 | ||
|
|
fcffce46b4 | ||
|
|
2cc2027353 | ||
|
|
c425b9c0e6 | ||
|
|
1222287f22 | ||
|
|
44a64ba451 | ||
|
|
df6b90246a | ||
|
|
2d50511527 | ||
|
|
fcdff1c841 | ||
|
|
7a070dd859 | ||
|
|
afdd22bd1d | ||
|
|
a04022e8df | ||
|
|
c27bcd86d3 | ||
|
|
a3550a5b00 | ||
|
|
b477367099 | ||
|
|
671f774593 | ||
|
|
552e345fbf | ||
|
|
4d43fe3346 | ||
|
|
6ec5e9a07d | ||
|
|
ee82fde184 | ||
|
|
5dbaeb9ee5 | ||
|
|
cd99d44704 | ||
|
|
449131a516 | ||
|
|
93f371ab9f | ||
|
|
2f5ccbd54d | ||
|
|
718f32b177 | ||
|
|
1f8ee3a5ae | ||
|
|
16b3893166 | ||
|
|
fce065e185 | ||
|
|
b54bc6cd42 | ||
|
|
257313969c | ||
|
|
657b9dc018 | ||
|
|
bd4b7a890d | ||
|
|
d29e5eaef1 | ||
|
|
a639291ea7 | ||
|
|
53704379fa | ||
|
|
3d82da1c7e | ||
|
|
b4061e7b35 | ||
|
|
00a6357c4d | ||
|
|
0a76145a93 | ||
|
|
b75ef3ae18 | ||
|
|
f2df971eb0 | ||
|
|
47a7b03e0e | ||
|
|
9386415633 | ||
|
|
e111e30f33 | ||
|
|
61ce463cf9 | ||
|
|
758bab8e30 | ||
|
|
dea723bac3 | ||
|
|
dcfeff11bf | ||
|
|
475504cd85 | ||
|
|
936118955f | ||
|
|
d5ec75a643 | ||
|
|
d0f5585157 | ||
|
|
2cd64d33ec | ||
|
|
ba3e65c919 | ||
|
|
03ed8085b9 | ||
|
|
fa91748741 | ||
|
|
c067f40ecf | ||
|
|
1f7bdd10f8 | ||
|
|
7d2c8be391 | ||
|
|
4a66289e5a | ||
|
|
9a923cc5dc | ||
|
|
0188809918 | ||
|
|
5c274adddb | ||
|
|
b5a6eba175 | ||
|
|
946ef8878d | ||
|
|
2fd894ffb9 | ||
|
|
5569bd9113 | ||
|
|
b044372cd8 | ||
|
|
a3a33c1dcd | ||
|
|
75a3c5f6ff |
2
.eslintignore
Normal file
2
.eslintignore
Normal file
@@ -0,0 +1,2 @@
|
||||
examples/Jugl.js
|
||||
examples/resources/
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,3 @@
|
||||
*.pyc
|
||||
/build/
|
||||
/node_modules/
|
||||
/dist/
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
*.pyc
|
||||
/build/
|
||||
|
||||
10
.travis.yml
10
.travis.yml
@@ -1,5 +1,10 @@
|
||||
language: python
|
||||
sudo: false
|
||||
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- "4"
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
@@ -7,11 +12,12 @@ env:
|
||||
- DISPLAY=:99.0
|
||||
|
||||
before_install:
|
||||
- "npm install -g npm && npm install"
|
||||
- "npm prune"
|
||||
|
||||
before_script:
|
||||
- "rm src/ol/renderer/webgl/*shader.js"
|
||||
- "sh -e /etc/init.d/xvfb start"
|
||||
- "npm ls"
|
||||
|
||||
script: "make ci"
|
||||
|
||||
|
||||
168
CONTRIBUTING.md
168
CONTRIBUTING.md
@@ -21,11 +21,14 @@ Look for `readme.md` files! Several directories contain a `readme.md` file that
|
||||
|
||||
## Contributing Code
|
||||
|
||||
See [`DEVELOPING.md`](https://github.com/openlayers/ol3/blob/master/DEVELOPING.md) to learn how to get started developing.
|
||||
|
||||
Our preferred means of receiving contributions is through [pull requests](https://help.github.com/articles/using-pull-requests). Make sure
|
||||
that your pull request follows our pull request guidelines below before submitting it.
|
||||
|
||||
This page describes what you need to know to contribute code to ol3 as a developer.
|
||||
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
Before accepting a contribution, we ask that you provide us a Contributor
|
||||
@@ -35,162 +38,11 @@ Contributor License Agreement](https://raw.github.com/openlayers/cla/master/ccla
|
||||
making your contribution as an individual, you can submit a digital [Individual
|
||||
Contributor License Agreement](https://docs.google.com/spreadsheet/viewform?formkey=dGNNVUJEMXF2dERTU0FXM3JjNVBQblE6MQ).
|
||||
|
||||
## Setting up development environment
|
||||
|
||||
You will obviously start by
|
||||
[forking](https://github.com/openlayers/ol3/fork) the ol3 repository.
|
||||
|
||||
### Travis CI
|
||||
|
||||
The Travis CI hook is enabled on the Github repository. This means every pull request
|
||||
is run through a full test suite to ensure it compiles and passes the tests. Failing
|
||||
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
|
||||
|
||||
The minimum requirements are:
|
||||
|
||||
* GNU Make
|
||||
* Git
|
||||
* [Node.js](http://nodejs.org/) (0.10.x or higher)
|
||||
* Python 2.6 or 2.7 with a couple of extra modules (see below)
|
||||
* Java 7 (JRE and JDK)
|
||||
|
||||
The executables `git`, `node`, `python` and `java` should be in your `PATH`.
|
||||
|
||||
You can check your configuration by running:
|
||||
|
||||
$ make check-deps
|
||||
|
||||
To install the Node.js dependencies run
|
||||
|
||||
$ 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
|
||||
|
||||
As an ol3 developer you will use `make` to run build targets defined in the
|
||||
`Makefile` located at the root of the repository. The `Makefile` includes
|
||||
targets for running the linter, the compiler, the tests, etc.
|
||||
|
||||
The usage of `make` is as follows:
|
||||
|
||||
$ make <target>
|
||||
|
||||
where `<target>` is the name of the build target you want to execute. For
|
||||
example:
|
||||
|
||||
$ make test
|
||||
|
||||
The main build targets are `serve`, `lint`, `build`, `test`, and `check`. The
|
||||
latter is a meta-target that basically runs `lint`, `build`, and `test`.
|
||||
|
||||
The `serve` target starts a node-based web server, which we will refer to as the *dev server*. You'll need to start that server for running the examples and the tests in a browser. More information on that further down.
|
||||
|
||||
Other targets include `apidoc` and `ci`. The latter is the target used on Travis CI. See ol3's [Travis configuration file](https://github.com/openlayers/ol3/blob/master/.travis.yml).
|
||||
|
||||
## Running the `check` target
|
||||
|
||||
The `check` target is to be run before pushing code to GitHub and opening pull
|
||||
requests. Branches that don't pass `check` won't pass the integration tests,
|
||||
and have therefore no chance of being merged into `master`.
|
||||
|
||||
To run the `check` target:
|
||||
|
||||
$ make check
|
||||
|
||||
If you want to run the full suite of integration tests, see "Running the integration
|
||||
tests" below.
|
||||
|
||||
## Running examples
|
||||
|
||||
To run the examples you first need to start the dev server:
|
||||
|
||||
$ make serve
|
||||
|
||||
Then, just point your browser <http://localhost:3000/build/examples> in your browser. For example <http://localhost:3000/build/examples/side-by-side.html>.
|
||||
|
||||
Run examples against the `ol.js` standalone build:
|
||||
|
||||
The examples can also be run against the `ol.js` standalone build, just like
|
||||
the examples [hosted](http://openlayers.org/en/master/examples/) on GitHub.
|
||||
Start by executing the `host-examples` build target:
|
||||
|
||||
$ make host-examples
|
||||
|
||||
After running `host-examples` you can now open the examples index page in the browser: <http://localhost:3000/build/hosted/master/examples/>. (This assumes that you still have the dev server running.)
|
||||
|
||||
Append `?mode=raw` to make the example work in full debug mode. In raw mode the OpenLayers and Closure Library scripts are loaded individually by the Closure Library's `base.js` script (which the example page loads and executes before any other script).
|
||||
|
||||
## Running tests
|
||||
|
||||
To run the tests in a browser start the dev server (`make serve`) and open <http://localhost:3000/test/index.html> in the browser.
|
||||
|
||||
To run the tests on the console (headless testing with PhantomJS) use the `test` target:
|
||||
|
||||
$ make test
|
||||
|
||||
See also the test-specific [README](../master/test/README.md).
|
||||
|
||||
## Running the integration tests
|
||||
|
||||
When you submit a pull request the [Travis continuous integration
|
||||
server](https://travis-ci.org/) will run a full suite of tests, including
|
||||
building all versions of the library and checking that all of the examples
|
||||
work. You will receive an email with the results, and the status will be
|
||||
displayed in the pull request.
|
||||
|
||||
To run the full suite of integration tests use the `ci` target:
|
||||
|
||||
$ make ci
|
||||
|
||||
Running the full suite of integration tests currently takes 5-10 minutes.
|
||||
|
||||
This makes sure that your commit won't break the build. It also runs JSDoc3 to
|
||||
make sure that there are no invalid API doc directives.
|
||||
|
||||
## Adding examples
|
||||
|
||||
Adding functionality often implies adding one or several examples. This
|
||||
section provides explanations related to adding examples.
|
||||
|
||||
The examples are located in the `examples` directory. Adding a new example
|
||||
implies creating two or three files in this directory, an `.html` file, a `.js`
|
||||
file, and, optionally, a `.css` file.
|
||||
|
||||
You can use `simple.js` and `simple.html` as templates for new examples.
|
||||
|
||||
### Use of the `goog` namespace in examples
|
||||
|
||||
Short story: the ol3 examples should not use the `goog` namespace, except
|
||||
for `goog.require`.
|
||||
|
||||
Longer story: we want that the ol3 examples work in multiple modes, with the
|
||||
standalone lib (which has implications of the symbols and properties we
|
||||
export), and compiled together with the ol3 library.
|
||||
|
||||
Compiling the examples together with the library makes it mandatory to declare dependencies with `goog.require` statements.
|
||||
|
||||
## Pull request guidelines
|
||||
|
||||
Before working on a pull request, create an issue explaining what you want to contribute. This ensures that your pull request won't go unnoticed, and that you are not contributing something that is not suitable for the project. Once a core developer has set the `pull request accepted` label on the issue, you can submit a pull request. The pull request description should reference the original issue.
|
||||
|
||||
Your pull request must:
|
||||
|
||||
* Follow OpenLayers 3's coding style.
|
||||
@@ -229,8 +81,7 @@ include:
|
||||
|
||||
OpenLayers 3 follows [Google's JavaScript Style
|
||||
Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml).
|
||||
This is checked using the [Closure
|
||||
Linter](https://developers.google.com/closure/utilities/) in strict mode. You
|
||||
This is checked using [ESLint](http://eslint.org/), you
|
||||
can run the linter locally on your machine before committing using the `lint`
|
||||
target:
|
||||
|
||||
@@ -250,13 +101,6 @@ style of the existing OpenLayers 3 code, which includes:
|
||||
|
||||
* 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 bracket notation instead of `goog.object.set` and `goog.object.get` (with
|
||||
two arguments).
|
||||
|
||||
* Use uppercase for `@const` variables.
|
||||
|
||||
### Configure your editor
|
||||
|
||||
144
DEVELOPING.md
Normal file
144
DEVELOPING.md
Normal file
@@ -0,0 +1,144 @@
|
||||
# Developing
|
||||
|
||||
## Setting up development environment
|
||||
|
||||
You will obviously start by
|
||||
[forking](https://github.com/openlayers/ol3/fork) the ol3 repository.
|
||||
|
||||
### Travis CI
|
||||
|
||||
The Travis CI hook is enabled on the Github repository. This means every pull request
|
||||
is run through a full test suite to ensure it compiles and passes the tests. Failing
|
||||
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
|
||||
|
||||
The minimum requirements are:
|
||||
|
||||
* GNU Make
|
||||
* Git
|
||||
* [Node.js](http://nodejs.org/) (higher than 0.12.x)
|
||||
* Python 2.6 or 2.7
|
||||
* Java 7 (JRE and JDK)
|
||||
|
||||
The executables `git`, `node`, and `java` should be in your `PATH`.
|
||||
|
||||
You can check your configuration by running:
|
||||
|
||||
$ make check-deps
|
||||
|
||||
To install the Node.js dependencies run
|
||||
|
||||
$ npm install
|
||||
|
||||
## Working with the build tool
|
||||
|
||||
As an ol3 developer you will use `make` to run build targets defined in the
|
||||
`Makefile` located at the root of the repository. The `Makefile` includes
|
||||
targets for running the linter, the compiler, the tests, etc.
|
||||
|
||||
The usage of `make` is as follows:
|
||||
|
||||
$ make <target>
|
||||
|
||||
where `<target>` is the name of the build target you want to execute. For
|
||||
example:
|
||||
|
||||
$ make test
|
||||
|
||||
The main build targets are `serve`, `lint`, `build`, `test`, and `check`. The
|
||||
latter is a meta-target that basically runs `lint`, `build`, and `test`.
|
||||
|
||||
The `serve` target starts a node-based web server, which we will refer to as the *dev server*. You'll need to start that server for running the examples and the tests in a browser. More information on that further down.
|
||||
|
||||
Other targets include `apidoc` and `ci`. The latter is the target used on Travis CI. See ol3's [Travis configuration file](https://github.com/openlayers/ol3/blob/master/.travis.yml).
|
||||
|
||||
## Running the `check` target
|
||||
|
||||
The `check` target is to be run before pushing code to GitHub and opening pull
|
||||
requests. Branches that don't pass `check` won't pass the integration tests,
|
||||
and have therefore no chance of being merged into `master`.
|
||||
|
||||
To run the `check` target:
|
||||
|
||||
$ make check
|
||||
|
||||
If you want to run the full suite of integration tests, see "Running the integration
|
||||
tests" below.
|
||||
|
||||
## Running examples
|
||||
|
||||
To run the examples you first need to start the dev server:
|
||||
|
||||
$ make serve
|
||||
|
||||
Then, just point your browser <http://localhost:3000/build/examples> in your browser. For example <http://localhost:3000/build/examples/side-by-side.html>.
|
||||
|
||||
Run examples against the `ol.js` standalone build:
|
||||
|
||||
The examples can also be run against the `ol.js` standalone build, just like
|
||||
the examples [hosted](http://openlayers.org/en/master/examples/) on GitHub.
|
||||
Start by executing the `host-examples` build target:
|
||||
|
||||
$ make host-examples
|
||||
|
||||
After running `host-examples` you can now open the examples index page in the browser: <http://localhost:3000/build/hosted/master/examples/>. (This assumes that you still have the dev server running.)
|
||||
|
||||
Append `?mode=raw` to make the example work in full debug mode. In raw mode the OpenLayers and Closure Library scripts are loaded individually by the Closure Library's `base.js` script (which the example page loads and executes before any other script).
|
||||
|
||||
## Running tests
|
||||
|
||||
To run the tests in a browser start the dev server (`make serve`) and open <http://localhost:3000/test/index.html> in the browser.
|
||||
|
||||
To run the tests on the console (headless testing with PhantomJS) use the `test` target:
|
||||
|
||||
$ make test
|
||||
|
||||
See also the test-specific [README](../master/test/README.md).
|
||||
|
||||
## Running the integration tests
|
||||
|
||||
When you submit a pull request the [Travis continuous integration
|
||||
server](https://travis-ci.org/) will run a full suite of tests, including
|
||||
building all versions of the library and checking that all of the examples
|
||||
work. You will receive an email with the results, and the status will be
|
||||
displayed in the pull request.
|
||||
|
||||
To run the full suite of integration tests use the `ci` target:
|
||||
|
||||
$ make ci
|
||||
|
||||
Running the full suite of integration tests currently takes 5-10 minutes.
|
||||
|
||||
This makes sure that your commit won't break the build. It also runs JSDoc3 to
|
||||
make sure that there are no invalid API doc directives.
|
||||
|
||||
## Adding examples
|
||||
|
||||
Adding functionality often implies adding one or several examples. This
|
||||
section provides explanations related to adding examples.
|
||||
|
||||
The examples are located in the `examples` directory. Adding a new example
|
||||
implies creating two or three files in this directory, an `.html` file, a `.js`
|
||||
file, and, optionally, a `.css` file.
|
||||
|
||||
You can use `simple.js` and `simple.html` as templates for new examples.
|
||||
|
||||
### Use of the `goog` namespace in examples
|
||||
|
||||
Short story: the ol3 examples should not use the `goog` namespace, except
|
||||
for `goog.require`.
|
||||
|
||||
Longer story: we want that the ol3 examples work in multiple modes, with the
|
||||
standalone lib (which has implications of the symbols and properties we
|
||||
export), and compiled together with the ol3 library.
|
||||
|
||||
Compiling the examples together with the library makes it mandatory to declare dependencies with `goog.require` statements.
|
||||
@@ -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,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
33
Makefile
33
Makefile
@@ -19,7 +19,7 @@ BUILD_HOSTED := build/hosted/$(BRANCH)
|
||||
BUILD_HOSTED_EXAMPLES := $(addprefix $(BUILD_HOSTED)/,$(EXAMPLES))
|
||||
BUILD_HOSTED_EXAMPLES_JS := $(addprefix $(BUILD_HOSTED)/,$(EXAMPLES_JS))
|
||||
|
||||
UNPHANTOMABLE_EXAMPLES = examples/shaded-relief.html examples/raster.html examples/region-growing.html
|
||||
UNPHANTOMABLE_EXAMPLES = examples/shaded-relief.html examples/raster.html examples/region-growing.html examples/color-manipulation.html
|
||||
CHECK_EXAMPLE_TIMESTAMPS = $(patsubst examples/%.html,build/timestamps/check-%-timestamp,$(filter-out $(UNPHANTOMABLE_EXAMPLES),$(EXAMPLES_HTML)))
|
||||
|
||||
TASKS_JS := $(shell find tasks -name '*.js')
|
||||
@@ -93,8 +93,7 @@ compile-examples: build/compiled-examples/all.combined.js
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/timestamps/gjslint-timestamp
|
||||
rm -f build/timestamps/jshint-timestamp
|
||||
rm -f build/timestamps/eslint-timestamp
|
||||
rm -f build/timestamps/check-*-timestamp
|
||||
rm -f build/ol.css
|
||||
rm -f build/ol.js
|
||||
@@ -120,9 +119,8 @@ examples: $(BUILD_EXAMPLES)
|
||||
install: build/timestamps/node-modules-timestamp
|
||||
|
||||
.PHONY: lint
|
||||
lint: build/timestamps/gjslint-timestamp build/timestamps/jshint-timestamp \
|
||||
build/timestamps/check-requires-timestamp \
|
||||
build/timestamps/check-whitespace-timestamp
|
||||
lint: build/timestamps/eslint-timestamp \
|
||||
build/timestamps/check-requires-timestamp
|
||||
|
||||
.PHONY: npm-install
|
||||
npm-install: build/timestamps/node-modules-timestamp
|
||||
@@ -183,7 +181,7 @@ build/timestamps/check-%-timestamp: $(BUILD_HOSTED)/examples/%.html \
|
||||
$(BUILD_HOSTED)/build/ol.js \
|
||||
$(BUILD_HOSTED)/css/ol.css
|
||||
@mkdir -p $(@D)
|
||||
./node_modules/.bin/phantomjs --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) \
|
||||
@@ -193,13 +191,6 @@ build/timestamps/check-requires-timestamp: $(SRC_JS) $(EXAMPLES_JS) \
|
||||
@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 $@
|
||||
|
||||
build/compiled-examples/all.js: $(EXAMPLES_JS)
|
||||
@mkdir -p $(@D)
|
||||
@python bin/combine-examples.py $^ > $@
|
||||
@@ -231,13 +222,6 @@ build/timestamps/jsdoc-$(BRANCH)-timestamp: config/jsdoc/api/index.md \
|
||||
./node_modules/.bin/jsdoc config/jsdoc/api/index.md -c config/jsdoc/api/conf.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 $@
|
||||
|
||||
$(BUILD_HOSTED_EXAMPLES_JS): $(BUILD_HOSTED)/examples/%.js: build/examples/%.js
|
||||
@mkdir -p $(@D)
|
||||
@python bin/split-example.py $< $(@D)
|
||||
@@ -271,13 +255,12 @@ $(BUILD_HOSTED)/build/ol-deps.js: host-libraries
|
||||
--root_with_prefix "$(BUILD_HOSTED)/closure-library/third_party ../../third_party" \
|
||||
--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) \
|
||||
examples/resources/common.js \
|
||||
build/timestamps/node-modules-timestamp
|
||||
@mkdir -p $(@D)
|
||||
@echo "Running jshint..."
|
||||
@./node_modules/.bin/jshint --verbose $?
|
||||
@echo "Running eslint..."
|
||||
@./node_modules/.bin/eslint $?
|
||||
@touch $@
|
||||
|
||||
build/timestamps/node-modules-timestamp: package.json
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
[](http://travis-ci.org/#!/openlayers/ol3)
|
||||
[](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.
|
||||
|
||||
|
||||
@@ -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,7 +1,138 @@
|
||||
## Upgrade notes
|
||||
|
||||
### 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
|
||||
|
||||
#### `ol.Map#forEachFeatureAtPixel` changes
|
||||
|
||||
The optional `layerFilter` function is now also called for unmanaged layers. To get the same behaviour as before, wrap your layer filter code in an if block like this:
|
||||
```js
|
||||
function layerFilter(layer) {
|
||||
if (map.getLayers().getArray().indexOf(layer) !== -1) {
|
||||
// existing layer filter code
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### v3.11.0
|
||||
|
||||
#### `ol.format.KML` changes
|
||||
|
||||
KML icons are scaled 50% so that the rendering better matches Google Earth rendering.
|
||||
|
||||
If a KML placemark has a name and is a point, an `ol.style.Text` is created with the name displayed to the right of the icon (if there is an icon).
|
||||
This can be controlled with the showPointNames option which defaults to true.
|
||||
|
||||
To disable rendering of the point names for placemarks, use the option:
|
||||
new ol.format.KML({ showPointNames: false });
|
||||
|
||||
|
||||
#### `ol.interaction.DragBox` and `ol.interaction.DragZoom` changes
|
||||
|
||||
Styling is no longer done with `ol.Style`, but with pure CSS. The `style` constructor option is no longer required, and no longer available. Instead, there is a `className` option for the CSS selector. The default for `ol.interaction.DragBox` is `ol-dragbox`, and `ol.interaction.DragZoom` uses `ol-dragzoom`. If you previously had
|
||||
```js
|
||||
new ol.interaction.DragZoom({
|
||||
style: new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: 'red',
|
||||
width: 3
|
||||
}),
|
||||
fill: new ol.style.Fill({
|
||||
color: [255, 255, 255, 0.4]
|
||||
})
|
||||
})
|
||||
});
|
||||
```
|
||||
you'll now just need
|
||||
```js
|
||||
new ol.interaction.DragZoom();
|
||||
```
|
||||
but with additional css:
|
||||
```css
|
||||
.ol-dragzoom {
|
||||
border-color: red;
|
||||
border-width: 3px;
|
||||
background-color: rgba(255,255,255,0.4);
|
||||
}
|
||||
```
|
||||
|
||||
#### Removal of `ol.source.TileVector`
|
||||
|
||||
With the introduction of true vector tile support, `ol.source.TileVector` becomes obsolete. Change your code to use `ol.layer.VectorTile` and `ol.source.VectorTile` instead of `ol.layer.Vector` and `ol.source.TileVector`.
|
||||
|
||||
#### `ol.Map#forEachFeatureAtPixel` changes for unmanaged layers
|
||||
|
||||
`ol.Map#forEachFeatureAtPixel` will still be called for unmanaged layers, but the 2nd argument to the callback function will be `null` instead of a reference to the unmanaged layer. This brings back the behavior of the abandoned `ol.FeatureOverlay` that was replaced by unmanaged layers.
|
||||
|
||||
If you are affected by this change, please change your unmanaged layer to a regular layer by using e.g. `ol.Map#addLayer` instead of `ol.layer.Layer#setMap`.
|
||||
|
||||
### v3.10.0
|
||||
|
||||
#### `ol.layer.Layer` changes
|
||||
|
||||
136
changelog/v3.11.0.md
Normal file
136
changelog/v3.11.0.md
Normal file
@@ -0,0 +1,136 @@
|
||||
# v3.11.0
|
||||
|
||||
## Summary
|
||||
|
||||
The v3.11.0 release includes features and fixes from 73 pull requests since the v3.10.1 release. New features and improvements include:
|
||||
|
||||
* Support for raster reprojection - load raster sources in one projection and view them in another.
|
||||
* Support for Mapbox Vector Tiles!
|
||||
* Improved KML support, GeoJSON & TopoJSON fixes, and much more. See below for the full list.
|
||||
|
||||
## Upgrade notes
|
||||
|
||||
#### `ol.format.KML` changes
|
||||
|
||||
KML icons are scaled 50% so that the rendering better matches Google Earth rendering.
|
||||
|
||||
If a KML placemark has a name and is a point, an `ol.style.Text` is created with the name displayed to the right of the icon (if there is an icon).
|
||||
This can be controlled with the showPointNames option which defaults to true.
|
||||
|
||||
To disable rendering of the point names for placemarks, use the option:
|
||||
new ol.format.KML({ showPointNames: false });
|
||||
|
||||
#### `ol.interaction.DragBox` and `ol.interaction.DragZoom` changes
|
||||
|
||||
Styling is no longer done with `ol.Style`, but with pure CSS. The `style` constructor option is no longer required, and no longer available. Instead, there is a `className` option for the CSS selector. The default for `ol.interaction.DragBox` is `ol-dragbox`, and `ol.interaction.DragZoom` uses `ol-dragzoom`. If you previously had
|
||||
```js
|
||||
new ol.interaction.DragZoom({
|
||||
style: new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: 'red',
|
||||
width: 3
|
||||
}),
|
||||
fill: new ol.style.Fill({
|
||||
color: [255, 255, 255, 0.4]
|
||||
})
|
||||
})
|
||||
});
|
||||
```
|
||||
you'll now just need
|
||||
```js
|
||||
new ol.interaction.DragZoom();
|
||||
```
|
||||
but with additional css:
|
||||
```css
|
||||
.ol-dragzoom {
|
||||
border-color: red;
|
||||
border-width: 3px;
|
||||
background-color: rgba(255,255,255,0.4);
|
||||
}
|
||||
```
|
||||
|
||||
#### Removal of `ol.source.TileVector`
|
||||
|
||||
With the introduction of true vector tile support, `ol.source.TileVector` becomes obsolete. Change your code to use `ol.layer.VectorTile` and `ol.source.VectorTile` instead of `ol.layer.Vector` and `ol.source.TileVector`.
|
||||
|
||||
#### `ol.Map#forEachFeatureAtPixel` changes for unmanaged layers
|
||||
|
||||
`ol.Map#forEachFeatureAtPixel` will still be called for unmanaged layers, but the 2nd argument to the callback function will be `null` instead of a reference to the unmanaged layer. This brings back the behavior of the abandoned `ol.FeatureOverlay` that was replaced by unmanaged layers.
|
||||
|
||||
If you are affected by this change, please change your unmanaged layer to a regular layer by using e.g. `ol.Map#addLayer` instead of `ol.layer.Layer#setMap`.
|
||||
|
||||
## Full list of changes
|
||||
|
||||
* [#4394](https://github.com/openlayers/ol3/pull/4394) - Allow ol.Object property update without notification. ([@DavidHequet](https://github.com/DavidHequet))
|
||||
* [#4395](https://github.com/openlayers/ol3/pull/4395) - Flag ol.style.Text setOffsetX and Y as @api. ([@adube](https://github.com/adube))
|
||||
* [#4393](https://github.com/openlayers/ol3/pull/4393) - Faster vector tiles ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4392](https://github.com/openlayers/ol3/pull/4392) - Update clean-css to version 3.4.7 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4391](https://github.com/openlayers/ol3/pull/4391) - Pass null as forEachFeatureAtPixel layer arg for unmanaged layers ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4390](https://github.com/openlayers/ol3/pull/4390) - Fix usage of mocha-phantomjs-core after update ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4387](https://github.com/openlayers/ol3/pull/4387) - Add default argument to getRendererFromQueryString ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4376](https://github.com/openlayers/ol3/pull/4376) - Make KML format ignore image styles that aren't icons ([@elemoine](https://github.com/elemoine))
|
||||
* [#4385](https://github.com/openlayers/ol3/pull/4385) - Don't transform the scale specified by the user ([@oterral](https://github.com/oterral))
|
||||
* [#4388](https://github.com/openlayers/ol3/pull/4388) - Quick-fix running tests with PhantomJS ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4378](https://github.com/openlayers/ol3/pull/4378) - Add a writeStyles option to KML format ([@elemoine](https://github.com/elemoine))
|
||||
* [#4375](https://github.com/openlayers/ol3/pull/4375) - Fixed documentation typo (ol.source.ImageWMS) ([@simonseyock](https://github.com/simonseyock))
|
||||
* [#4371](https://github.com/openlayers/ol3/pull/4371) - Fix typo in closure compilation tutorial ([@dtreiter](https://github.com/dtreiter))
|
||||
* [#4370](https://github.com/openlayers/ol3/pull/4370) - Improve ol.interaction.Select#getLayer documentation. ([@jonataswalker](https://github.com/jonataswalker))
|
||||
* [#4365](https://github.com/openlayers/ol3/pull/4365) - Update fs-extra to version 0.26.2 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4366](https://github.com/openlayers/ol3/pull/4366) - Update resemblejs to version 2.0.1 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4368](https://github.com/openlayers/ol3/pull/4368) - Append KML placemark text style to existing styles ([@marcjansen](https://github.com/marcjansen))
|
||||
* [#4361](https://github.com/openlayers/ol3/pull/4361) - Make GPX format not fail on unsupported geometries ([@elemoine](https://github.com/elemoine))
|
||||
* [#4360](https://github.com/openlayers/ol3/pull/4360) - Update getExtent return value jsdoc tag ([@fredj](https://github.com/fredj))
|
||||
* [#4359](https://github.com/openlayers/ol3/pull/4359) - Update closure-util to version 1.9.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4357](https://github.com/openlayers/ol3/pull/4357) - Update all dependencies. ([@openlayers](https://github.com/openlayers))
|
||||
* [#4356](https://github.com/openlayers/ol3/pull/4356) - Update Metalsmith and layouts plugin. ([@tschaub](https://github.com/tschaub))
|
||||
* [#4355](https://github.com/openlayers/ol3/pull/4355) - Update PhantomJS. ([@tschaub](https://github.com/tschaub))
|
||||
* [#4353](https://github.com/openlayers/ol3/pull/4353) - Resolve path to jsdoc-fork. ([@tschaub](https://github.com/tschaub))
|
||||
* [#3627](https://github.com/openlayers/ol3/pull/3627) - Make package.json compatible for npm frontend use. ([@ThomasG77](https://github.com/ThomasG77))
|
||||
* [#4163](https://github.com/openlayers/ol3/pull/4163) - Fixes for building with Node 4.x. ([@tschaub](https://github.com/tschaub))
|
||||
* [#4347](https://github.com/openlayers/ol3/pull/4347) - Use require.resolve() to find jsdoc. ([@tschaub](https://github.com/tschaub))
|
||||
* [#4291](https://github.com/openlayers/ol3/pull/4291) - Add 'Move a feature along a line' example. ([@jonataswalker](https://github.com/jonataswalker))
|
||||
* [#4344](https://github.com/openlayers/ol3/pull/4344) - Allow different resolutions in x and y direction for ol.source.ImageStatic ([@bartvde](https://github.com/bartvde))
|
||||
* [#4339](https://github.com/openlayers/ol3/pull/4339) - Make sure drawImage width and height are not too big ([@bartvde](https://github.com/bartvde))
|
||||
* [#4334](https://github.com/openlayers/ol3/pull/4334) - Check view extent within image extent ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4332](https://github.com/openlayers/ol3/pull/4332) - Fix write out GeoJSON features with id equal to 0 ([@fredj](https://github.com/fredj))
|
||||
* [#4331](https://github.com/openlayers/ol3/pull/4331) - Allow TopoJSON features with id equal to 0 ([@fredj](https://github.com/fredj))
|
||||
* [#4330](https://github.com/openlayers/ol3/pull/4330) - ol.format.TopoJSON is read only, update the jsdoc ([@openlayers](https://github.com/openlayers))
|
||||
* [#4327](https://github.com/openlayers/ol3/pull/4327) - Allow GeoJSON features with id equal to 0 ([@fredj](https://github.com/fredj))
|
||||
* [#4219](https://github.com/openlayers/ol3/pull/4219) - Support tiled vector data and Mapbox vector tiles ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4322](https://github.com/openlayers/ol3/pull/4322) - Add wrapX override support for ol.source.Cluster ([@FRizZL](https://github.com/FRizZL))
|
||||
* [#4316](https://github.com/openlayers/ol3/pull/4316) - Render name labels if the geometry is a point in KML format (@tamarmot) ([@marcjansen](https://github.com/marcjansen))
|
||||
* [#4313](https://github.com/openlayers/ol3/pull/4313) - Align logos nicely with attribution text ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4297](https://github.com/openlayers/ol3/pull/4297) - Create standalone versions of ol.ext packages ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4302](https://github.com/openlayers/ol3/pull/4302) - scale icons by 0.5 so they are not huge ([@tamarmot](https://github.com/tamarmot))
|
||||
* [#4301](https://github.com/openlayers/ol3/pull/4301) - Remove jshint -W069 tags in source code ([@fredj](https://github.com/fredj))
|
||||
* [#4273](https://github.com/openlayers/ol3/pull/4273) - Expand docs on ol.source url prop. ([@Barryrowe](https://github.com/Barryrowe))
|
||||
* [#4293](https://github.com/openlayers/ol3/pull/4293) - Refine the pull request process ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4289](https://github.com/openlayers/ol3/pull/4289) - Restrict maxZoom of the static-image example ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4275](https://github.com/openlayers/ol3/pull/4275) - Fix ol.events.condition.mouseOnly parameter type ([@fredj](https://github.com/fredj))
|
||||
* [#4248](https://github.com/openlayers/ol3/pull/4248) - Use Math.cosh of ES6/2015 if available ([@marcjansen](https://github.com/marcjansen))
|
||||
* [#4286](https://github.com/openlayers/ol3/pull/4286) - Add a color manipulation example. ([@tschaub](https://github.com/tschaub))
|
||||
* [#4122](https://github.com/openlayers/ol3/pull/4122) - Raster reprojection ([@klokantech](https://github.com/klokantech))
|
||||
* [#4283](https://github.com/openlayers/ol3/pull/4283) - Flag ol.tilegrid.TileGrid getTileCoordExtent as @api ([@adube](https://github.com/adube))
|
||||
* [#4280](https://github.com/openlayers/ol3/pull/4280) - Use overlay container instead of viewport for ol.render.Box ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4278](https://github.com/openlayers/ol3/pull/4278) - Use DOM instead of map canvas for ol.render.Box ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4277](https://github.com/openlayers/ol3/pull/4277) - Improve the box select example ([@fredj](https://github.com/fredj))
|
||||
* [#4276](https://github.com/openlayers/ol3/pull/4276) - Better ol.events.condition.platformModifierKeyOnly documentation ([@fredj](https://github.com/fredj))
|
||||
* [#4102](https://github.com/openlayers/ol3/pull/4102) - Export ol.Observable#dispatchEvent function ([@fredj](https://github.com/fredj))
|
||||
* [#4261](https://github.com/openlayers/ol3/pull/4261) - ol.events.condition.mouseOnly may be wrong ([@fredj](https://github.com/fredj))
|
||||
* [#4269](https://github.com/openlayers/ol3/pull/4269) - Fix Zoom control duration option - allow `0` as value ([@adube](https://github.com/adube))
|
||||
* [#4268](https://github.com/openlayers/ol3/pull/4268) - Add method for retrieving ol.Overlay by id ([@jonataswalker](https://github.com/jonataswalker))
|
||||
* [#4257](https://github.com/openlayers/ol3/pull/4257) - Remove unused ol.math-methods ([@marcjansen](https://github.com/marcjansen))
|
||||
* [#4270](https://github.com/openlayers/ol3/pull/4270) - Fix Keyboard zoom interation options ([@adube](https://github.com/adube))
|
||||
* [#4272](https://github.com/openlayers/ol3/pull/4272) - Allow the DragZoom interaction created in defaults to use zoomDuration option. ([@adube](https://github.com/adube))
|
||||
* [#4271](https://github.com/openlayers/ol3/pull/4271) - Fix DragZoom interaction duration, allow `0` value ([@adube](https://github.com/adube))
|
||||
* [#4267](https://github.com/openlayers/ol3/pull/4267) - Example usability improvements ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4263](https://github.com/openlayers/ol3/pull/4263) - Add back CSSProperties.prototype.touchAction extern ([@fredj](https://github.com/fredj))
|
||||
* [#4259](https://github.com/openlayers/ol3/pull/4259) - Remove use of toDegrees/toRadians util functions ([@marcjansen](https://github.com/marcjansen))
|
||||
* [#4258](https://github.com/openlayers/ol3/pull/4258) - Remove usage of goog.dom.TagName enum ([@marcjansen](https://github.com/marcjansen))
|
||||
* [#4255](https://github.com/openlayers/ol3/pull/4255) - Fix zoom slider width for retina displays ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4249](https://github.com/openlayers/ol3/pull/4249) - Make whole example box clickable ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4045](https://github.com/openlayers/ol3/pull/4045) - Add parser for dimension property from WMTS Capabilities.xml ([@Jenselme](https://github.com/Jenselme))
|
||||
* [#4161](https://github.com/openlayers/ol3/pull/4161) - Add `translatestart`, `translateend` and `translating` events to `ol.interaction.Translate` ([@jonataswalker](https://github.com/jonataswalker))
|
||||
* [#4186](https://github.com/openlayers/ol3/pull/4186) - Do not export ol.webgl.Context ([@elemoine](https://github.com/elemoine))
|
||||
* [#4239](https://github.com/openlayers/ol3/pull/4239) - Changing highlighted to highlight ([@austinkeeley](https://github.com/austinkeeley))
|
||||
* [#3727](https://github.com/openlayers/ol3/pull/3727) - Added getOverviewMap getter method in overviewmapcontrol.js ([@bogdanvaduva](https://github.com/bogdanvaduva))
|
||||
11
changelog/v3.11.1.md
Normal file
11
changelog/v3.11.1.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v3.11.1
|
||||
|
||||
## Summary
|
||||
|
||||
The v3.11.1 release is a patch release that addresses a few regressions in the v3.11.0 release. See the [v3.11.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.11.0) for details on upgrading from v3.10.
|
||||
|
||||
## Fixes
|
||||
|
||||
* [#4413](https://github.com/openlayers/ol3/pull/4413) - Revert "Merge pull request #4339 from bartvde/issue-4337" ([@bartvde](https://github.com/bartvde))
|
||||
* [#4412](https://github.com/openlayers/ol3/pull/4412) - Revert "Merge pull request #4344 from bartvde/issue-2844" ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4408](https://github.com/openlayers/ol3/pull/4408) - Use ratio when calculating ImageWMS width and height ([@ahocevar](https://github.com/ahocevar))
|
||||
11
changelog/v3.11.2.md
Normal file
11
changelog/v3.11.2.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v3.11.2
|
||||
|
||||
## Summary
|
||||
|
||||
The v3.11.2 release is a patch release that addresses a few regressions in the v3.11.1 release. See the [v3.11.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.11.0) for details on upgrading from v3.10.
|
||||
|
||||
## Fixes
|
||||
|
||||
* [#4450](https://github.com/openlayers/ol3/pull/4450) - Fix select interaction regression caused by #4391 ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4448](https://github.com/openlayers/ol3/pull/4448) - Check ol.source.UrlTile#urls property for null value ([@fredj](https://github.com/fredj))
|
||||
* [#4439](https://github.com/openlayers/ol3/pull/4439) - Allow '' for crossOrigin (as Anonymous alias) ([@ahocevar](https://github.com/ahocevar))
|
||||
96
changelog/v3.12.0.md
Normal file
96
changelog/v3.12.0.md
Normal file
@@ -0,0 +1,96 @@
|
||||
# v3.12.0
|
||||
|
||||
## Summary
|
||||
|
||||
The v3.12.0 release includes features and fixes from 71 pull requests since the v3.11.2 release. New features and improvements include:
|
||||
|
||||
* Tile coordinate wrapping for raster reprojection.
|
||||
* Support for multi-line labels.
|
||||
* Allow rendering geometries to an arbitrary canvas (useful for vector legends).
|
||||
|
||||
## Upgrade notes
|
||||
|
||||
#### `ol.Map#forEachFeatureAtPixel` changes
|
||||
|
||||
The optional `layerFilter` function is now also called for unmanaged layers. To get the same behaviour as before, wrap your layer filter code in an if block like this:
|
||||
```js
|
||||
function layerFilter(layer) {
|
||||
if (map.getLayers().getArray().indexOf(layer) !== -1) {
|
||||
// existing layer filter code
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Full list of changes
|
||||
|
||||
* [#4559](https://github.com/openlayers/ol3/pull/4559) - Fix up failing KML test in Firefox ([@bartvde](https://github.com/bartvde))
|
||||
* [#4561](https://github.com/openlayers/ol3/pull/4561) - Exclude feature loader MVT test from IE9 ([@bartvde](https://github.com/bartvde))
|
||||
* [#4552](https://github.com/openlayers/ol3/pull/4552) - Make sure compiled code calls ol.VectorTile#setProjection ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4551](https://github.com/openlayers/ol3/pull/4551) - Handle tile coordinate wrapping when reprojecting raster tiles ([@klokantech](https://github.com/klokantech))
|
||||
* [#4544](https://github.com/openlayers/ol3/pull/4544) - Update vector-tile to version 1.2.0 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4537](https://github.com/openlayers/ol3/pull/4537) - Allow specifying non default DPI on ol.source.TileArcGISRest ([@bartvde](https://github.com/bartvde))
|
||||
* [#4548](https://github.com/openlayers/ol3/pull/4548) - Improve vector tile related docs ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4549](https://github.com/openlayers/ol3/pull/4549) - Update vector label example ([@tsauerwein](https://github.com/tsauerwein))
|
||||
* [#4512](https://github.com/openlayers/ol3/pull/4512) - Support for multi-line labels (improved) ([@flightaware](https://github.com/flightaware))
|
||||
* [#4546](https://github.com/openlayers/ol3/pull/4546) - Update coveralls to version 2.11.6 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4539](https://github.com/openlayers/ol3/pull/4539) - Ignore index.html in example list ([@fredj](https://github.com/fredj))
|
||||
* [#4536](https://github.com/openlayers/ol3/pull/4536) - Register the change callback when the tile is enqueued ([@fredj](https://github.com/fredj))
|
||||
* [#4528](https://github.com/openlayers/ol3/pull/4528) - Remove redundant code from ol.featureloader.tile ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4535](https://github.com/openlayers/ol3/pull/4535) - Do not use an array for a single style ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4532](https://github.com/openlayers/ol3/pull/4532) - Mark olx.source.WMTSOptions#dimensions as not null ([@fredj](https://github.com/fredj))
|
||||
* [#4530](https://github.com/openlayers/ol3/pull/4530) - Remove use of goog.isNull ([@fredj](https://github.com/fredj))
|
||||
* [#4529](https://github.com/openlayers/ol3/pull/4529) - Update coding style rules ([@fredj](https://github.com/fredj))
|
||||
* [#4518](https://github.com/openlayers/ol3/pull/4518) - Add support for OSM vector tiles ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4524](https://github.com/openlayers/ol3/pull/4524) - Add example for rendering custom point symbols ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4523](https://github.com/openlayers/ol3/pull/4523) - Allow rendering geometries to an arbitrary canvas ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4525](https://github.com/openlayers/ol3/pull/4525) - Make render tests work on more devices ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4515](https://github.com/openlayers/ol3/pull/4515) - Accept HTMLCanvasElement for an icon's img ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4521](https://github.com/openlayers/ol3/pull/4521) - Fix imagestyle docs ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4508](https://github.com/openlayers/ol3/pull/4508) - Remove unused files ([@fredj](https://github.com/fredj))
|
||||
* [#4487](https://github.com/openlayers/ol3/pull/4487) - Remove fallback css color ([@fredj](https://github.com/fredj))
|
||||
* [#4502](https://github.com/openlayers/ol3/pull/4502) - Improve ol.source.WMTS.optionsFromCapabilities jsdoc layout ([@fredj](https://github.com/fredj))
|
||||
* [#4511](https://github.com/openlayers/ol3/pull/4511) - Minor code cleanup ([@fredj](https://github.com/fredj))
|
||||
* [#4510](https://github.com/openlayers/ol3/pull/4510) - Adding a check just in case the projection is not defined/supported ([@GeoCat](https://github.com/GeoCat))
|
||||
* [#4505](https://github.com/openlayers/ol3/pull/4505) - Remove use of goog.object.getKeys ([@fredj](https://github.com/fredj))
|
||||
* [#4472](https://github.com/openlayers/ol3/pull/4472) - Do not ignore layer filter for unmanaged layers ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4476](https://github.com/openlayers/ol3/pull/4476) - Remove use of goog.functions.constant ([@fredj](https://github.com/fredj))
|
||||
* [#4484](https://github.com/openlayers/ol3/pull/4484) - Remove use of goog.dom.createDom ([@fredj](https://github.com/fredj))
|
||||
* [#4486](https://github.com/openlayers/ol3/pull/4486) - Remove note about DragZoom and vector support ([@fredj](https://github.com/fredj))
|
||||
* [#4483](https://github.com/openlayers/ol3/pull/4483) - Remove use of goog.object.containsKey ([@fredj](https://github.com/fredj))
|
||||
* [#4475](https://github.com/openlayers/ol3/pull/4475) - Fix up failing tests in Internet Explorer ([@bartvde](https://github.com/bartvde))
|
||||
* [#4485](https://github.com/openlayers/ol3/pull/4485) - Use appendChild instead of goog.dom.append ([@fredj](https://github.com/fredj))
|
||||
* [#4481](https://github.com/openlayers/ol3/pull/4481) - Remove blur workaround in ol.control.Attribution ([@fredj](https://github.com/fredj))
|
||||
* [#4479](https://github.com/openlayers/ol3/pull/4479) - Export ol.interaction.Interaction#getMap function ([@fredj](https://github.com/fredj))
|
||||
* [#4478](https://github.com/openlayers/ol3/pull/4478) - Fix olx.control.FullScreenOptions#label apidoc ([@fredj](https://github.com/fredj))
|
||||
* [#4477](https://github.com/openlayers/ol3/pull/4477) - Replace goog.nullFunction with ol.nullFunction ([@fredj](https://github.com/fredj))
|
||||
* [#4474](https://github.com/openlayers/ol3/pull/4474) - Remove use of goog.dom.createElement and goog.dom.createTextNode ([@fredj](https://github.com/fredj))
|
||||
* [#4469](https://github.com/openlayers/ol3/pull/4469) - Upgrade to JSTS 0.17.0 in example ([@bjornharrtell](https://github.com/bjornharrtell))
|
||||
* [#4465](https://github.com/openlayers/ol3/pull/4465) - Update handlebars to version 4.0.5 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4464](https://github.com/openlayers/ol3/pull/4464) - Merge in changes from the 3.11.2 release. ([@openlayers](https://github.com/openlayers))
|
||||
* [#4463](https://github.com/openlayers/ol3/pull/4463) - Remove use of goog.array.sort ([@fredj](https://github.com/fredj))
|
||||
* [#4450](https://github.com/openlayers/ol3/pull/4450) - Fix select interaction regression caused by #4391 ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4458](https://github.com/openlayers/ol3/pull/4458) - Remove extra space in type annotation ([@fredj](https://github.com/fredj))
|
||||
* [#4420](https://github.com/openlayers/ol3/pull/4420) - Remove Bootstrap and jQuery from example snippets. ([@openlayers](https://github.com/openlayers))
|
||||
* [#4442](https://github.com/openlayers/ol3/pull/4442) - Use jsdoc@3.4.0. ([@tschaub](https://github.com/tschaub))
|
||||
* [#4449](https://github.com/openlayers/ol3/pull/4449) - Change the label of the full screen button to be more intuitive ([@bartvde](https://github.com/bartvde))
|
||||
* [#4448](https://github.com/openlayers/ol3/pull/4448) - Check ol.source.UrlTile#urls property for null value ([@fredj](https://github.com/fredj))
|
||||
* [#4440](https://github.com/openlayers/ol3/pull/4440) - Raster reprojection tutorial ([@klokantech](https://github.com/klokantech))
|
||||
* [#4439](https://github.com/openlayers/ol3/pull/4439) - Allow '' for crossOrigin (as Anonymous alias) ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4429](https://github.com/openlayers/ol3/pull/4429) - Dispatch a change event only if the value changes ([@fredj](https://github.com/fredj))
|
||||
* [#4435](https://github.com/openlayers/ol3/pull/4435) - Remove unnecessary cast ([@fredj](https://github.com/fredj))
|
||||
* [#4434](https://github.com/openlayers/ol3/pull/4434) - Remove unused local variables ([@fredj](https://github.com/fredj))
|
||||
* [#4433](https://github.com/openlayers/ol3/pull/4433) - Remove unused local variables ([@fredj](https://github.com/fredj))
|
||||
* [#4140](https://github.com/openlayers/ol3/pull/4140) - Add flight animation example ([@tsauerwein](https://github.com/tsauerwein))
|
||||
* [#4428](https://github.com/openlayers/ol3/pull/4428) - Add imageSize regression test for ol.source.ImageWMS ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4426](https://github.com/openlayers/ol3/pull/4426) - Improve ol.source.StaticImage ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4425](https://github.com/openlayers/ol3/pull/4425) - Test number property with !== undefined ([@fredj](https://github.com/fredj))
|
||||
* [#4423](https://github.com/openlayers/ol3/pull/4423) - Update mocha to version 2.3.4 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4416](https://github.com/openlayers/ol3/pull/4416) - Update clean-css to version 3.4.8 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4415](https://github.com/openlayers/ol3/pull/4415) - Scale StaticImage image to imageExtent ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4414](https://github.com/openlayers/ol3/pull/4414) - Remove ol.ImageUrlFunction ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#4389](https://github.com/openlayers/ol3/pull/4389) - Smooth transitions on parameter changes ([@elemoine](https://github.com/elemoine))
|
||||
* [#4410](https://github.com/openlayers/ol3/pull/4410) - Merge in changes from the 3.11.1 release. ([@openlayers](https://github.com/openlayers))
|
||||
* [#4401](https://github.com/openlayers/ol3/pull/4401) - Allow style function to return a style. ([@tschaub](https://github.com/tschaub))
|
||||
* [#4404](https://github.com/openlayers/ol3/pull/4404) - Set correctly the opt_this parameter when writing a KML document ([@oterral](https://github.com/oterral))
|
||||
* [#4397](https://github.com/openlayers/ol3/pull/4397) - Update glob to version 6.0.1 🚀 ([@openlayers](https://github.com/openlayers))
|
||||
* [#4362](https://github.com/openlayers/ol3/pull/4362) - Rotate control now takes optional resetNorth function. ([@tamarmot](https://github.com/tamarmot))
|
||||
11
changelog/v3.12.1.md
Normal file
11
changelog/v3.12.1.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v3.12.1
|
||||
|
||||
## Summary
|
||||
|
||||
The v3.12.1 release is a patch release that addresses a few regressions in the v3.12.0 release. See the [v3.12.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.12.0) for details on upgrading from v3.11.
|
||||
|
||||
## Fixes
|
||||
|
||||
* [#4578](https://github.com/openlayers/ol3/pull/4578) - Fix apidoc landing page markup ([@ahocevar](https://github.com/ahocevar))
|
||||
* [#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))
|
||||
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))
|
||||
@@ -24,7 +24,6 @@
|
||||
"externs/topojson.js"
|
||||
],
|
||||
"define": [
|
||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||
"goog.json.USE_NATIVE_JSON=true",
|
||||
"goog.DEBUG=false"
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
"externs/example.js",
|
||||
"externs/fastclick.js",
|
||||
"externs/geojson.js",
|
||||
"externs/jspdf.js",
|
||||
"externs/jquery-1.9.js",
|
||||
"externs/proj4js.js",
|
||||
"externs/tilejson.js",
|
||||
"externs/topojson.js"
|
||||
],
|
||||
"define": [
|
||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||
"goog.json.USE_NATIVE_JSON=true",
|
||||
"goog.DEBUG=false"
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<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/bootstrap/3.3.5/css/bootstrap.min.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="./resources/layout.css" type="text/css">
|
||||
{{{ extraHead }}}
|
||||
{{{ extraHead.local }}}
|
||||
{{{ css.tag }}}
|
||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame"></script>
|
||||
<script src="./resources/zeroclipboard/ZeroClipboard.min.js"></script>
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
@@ -19,19 +20,28 @@
|
||||
<header class="navbar" role="navigation">
|
||||
<div class="container" id="navbar-inner-container">
|
||||
<a class="navbar-brand" href="./"><img src="./resources/logo-70x70.png"> OpenLayers 3 Examples</a>
|
||||
<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>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
{{{ contents }}}
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h4 id="title">{{ title }}</h4>
|
||||
{{{ contents }}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<p id="shortdesc">{{ shortdesc }}</p>
|
||||
<div id="docs">{{ md docs }}</div>
|
||||
<div id="tags">{{ tags }}</div>
|
||||
<div id="api-links">Related API documentation: {{{ js.apiHtml }}}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,47 +51,33 @@
|
||||
<a id="copy-button"><i class="fa fa-clipboard"></i> Copy</a>
|
||||
<a id="jsfiddle-button"><i class="fa fa-jsfiddle"></i> Edit</a>
|
||||
</div>
|
||||
<form method="POST" id="jsfiddle-form" target="_blank" action="http://jsfiddle.net/api/post/jquery/1.11.0/">
|
||||
<form method="POST" id="jsfiddle-form" target="_blank" action="http://jsfiddle.net/api/post/library/pure/">
|
||||
<textarea class="hidden" name="js">{{ js.source }}</textarea>
|
||||
<textarea class="hidden" name="css">{{ css.source }}</textarea>
|
||||
<textarea class="hidden" name="html">{{ contents }}</textarea>
|
||||
<input type="hidden" name="wrap" value="l">
|
||||
<input type="hidden" name="resources" value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css,https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js,http://openlayers.org/en/v{{ olVersion }}/css/ol.css,http://openlayers.org/en/v{{ olVersion }}/build/ol.js">
|
||||
<input type="hidden" name="resources" value="http://openlayers.org/en/v{{ olVersion }}/css/ol.css,http://openlayers.org/en/v{{ olVersion }}/build/ol.js{{ extraResources }}">
|
||||
</form>
|
||||
<pre><code id="example-source" class="language-markup"><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="http://openlayers.org/en/v{{ olVersion }}/css/ol.css" type="text/css">
|
||||
<script src="http://openlayers.org/en/v{{ olVersion }}/build/ol.js"></script>
|
||||
{{ extraHead }}
|
||||
{{#if css.source}}
|
||||
<style>
|
||||
{{ css.source }}
|
||||
</style>
|
||||
{{/if}}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
|
||||
{{ contents }}
|
||||
</div>
|
||||
<script>
|
||||
{{ js.source }}
|
||||
</script>
|
||||
</body>
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
<link rel="stylesheet" href="http://openlayers.org/en/v{{ olVersion }}/css/ol.css" type="text/css">
|
||||
<script src="http://openlayers.org/en/v{{ olVersion }}/build/ol.js"></script>{{#if extraHead.remote}}
|
||||
{{ indent extraHead.remote spaces=4 }}{{/if}}{{#if css.source}}
|
||||
<style>
|
||||
{{ indent css.source spaces=6 }} </style>{{/if}}
|
||||
</head>
|
||||
<body>
|
||||
{{ indent contents spaces=4 }} <script>
|
||||
{{ indent js.source spaces=6 }} </script>
|
||||
</body>
|
||||
</html></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
||||
<script src="./resources/common.js"></script>
|
||||
<script src="./resources/prism/prism.min.js"></script>
|
||||
{{{ js.tag }}}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -16,6 +16,4 @@ To enable this, examples have the following, not needed in application code:
|
||||
|
||||
* html files load `resources/common.js` and some scripts use `common.getRendererFromQueryString()` to set the map renderer; application code would not need these
|
||||
|
||||
* in addition, examples use Twitter Bootstrap and jQuery; this is of course not a requirement - you may use whichever presentation/helper libraries you wish
|
||||
|
||||
At the bottom of each example generated in the `build/examples` folder, a modified version of its source code is shown. That modified version can be run standalone and is usually used as starting point for users to extend examples into their own application.
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
<td><p>Layers are lightweight containers that get their data from [sources](ol.source.html).</p>
|
||||
[ol.layer.Tile](ol.layer.Tile.html)<br>
|
||||
[ol.layer.Image](ol.layer.Image.html)<br>
|
||||
[ol.layer.Vector](ol.layer.Vector.html)</td>
|
||||
[ol.layer.Vector](ol.layer.Vector.html)<br>
|
||||
[ol.layer.VectorTile](ol.layer.VectorTile.html)</td>
|
||||
</tr><tr>
|
||||
<th>Controls</th><th>Interactions</th><th>Sources and formats</th>
|
||||
</tr><tr>
|
||||
@@ -27,6 +28,7 @@ Interactions for [vector features](ol.Feature.html)
|
||||
<td>[Tile sources](ol.source.Tile.html) for [ol.layer.Tile](ol.layer.Tile.html)
|
||||
<br>[Image sources](ol.source.Image.html) for [ol.layer.Image](ol.layer.Image.html)
|
||||
<br>[Vector sources](ol.source.Vector.html) for [ol.layer.Vector](ol.layer.Vector.html)
|
||||
<br>[Vector tile sources](ol.source.VectorTile.html) for [ol.layer.VectorTile](ol.layer.VectorTile.html)
|
||||
<br>[Formats](ol.format.Feature.html) for reading/writing vector data
|
||||
<br>[ol.format.WMSCapabilities](ol.format.WMSCapabilities.html)</td></tr>
|
||||
<tr><th>Projections</th><th>Observable objects</th><th>Other components</th></tr>
|
||||
|
||||
@@ -16,7 +16,7 @@ exports.defineTags = function(dictionary) {
|
||||
doclet.stability = level;
|
||||
} else {
|
||||
var errorText = util.format('Invalid stability level (%s) in %s line %s', tag.text, doclet.meta.filename, doclet.meta.lineno);
|
||||
require('jsdoc/util/error').handle( new Error(errorText) );
|
||||
require('jsdoc/lib/jsdoc/util/error').handle( new Error(errorText) );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/*global env: true */
|
||||
var template = require('jsdoc/template'),
|
||||
fs = require('jsdoc/fs'),
|
||||
path = require('jsdoc/path'),
|
||||
var template = require('jsdoc/lib/jsdoc/template'),
|
||||
fs = require('jsdoc/lib/jsdoc/fs'),
|
||||
path = require('jsdoc/lib/jsdoc/path'),
|
||||
taffy = require('taffydb').taffy,
|
||||
handle = require('jsdoc/util/error').handle,
|
||||
helper = require('jsdoc/util/templateHelper'),
|
||||
handle = require('jsdoc/lib/jsdoc/util/error').handle,
|
||||
helper = require('jsdoc/lib/jsdoc/util/templateHelper'),
|
||||
_ = require('underscore'),
|
||||
htmlsafe = helper.htmlsafe,
|
||||
linkto = helper.linkto,
|
||||
@@ -29,9 +29,9 @@ function getAncestorLinks(doclet) {
|
||||
|
||||
function hashToLink(doclet, hash) {
|
||||
if ( !/^(#.+)/.test(hash) ) { return hash; }
|
||||
|
||||
|
||||
var url = helper.createLink(doclet);
|
||||
|
||||
|
||||
url = url.replace(/(#.+|$)/, hash);
|
||||
return '<a href="' + url + '">' + hash + '</a>';
|
||||
}
|
||||
@@ -59,15 +59,15 @@ function needsSignature(doclet) {
|
||||
|
||||
function addSignatureParams(f) {
|
||||
var params = helper.getSignatureParams(f, 'optional');
|
||||
|
||||
|
||||
f.signature = (f.signature || '') + '('+params.join(', ')+')';
|
||||
}
|
||||
|
||||
function addSignatureReturns(f) {
|
||||
var returnTypes = helper.getSignatureReturns(f);
|
||||
|
||||
|
||||
f.signature = '<span class="signature">'+(f.signature || '') + '</span>';
|
||||
|
||||
|
||||
if (returnTypes.length) {
|
||||
f.signature += '<span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">'+(returnTypes.length ? '{'+returnTypes.join('|')+'}' : '')+'</span>';
|
||||
}
|
||||
@@ -75,7 +75,7 @@ function addSignatureReturns(f) {
|
||||
|
||||
function addSignatureTypes(f) {
|
||||
var types = helper.getSignatureTypes(f);
|
||||
|
||||
|
||||
f.signature = (f.signature || '') + '<span class="type-signature">'+(types.length? ' :'+types.join('|') : '')+' </span>';
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ function getPathFromDoclet(doclet) {
|
||||
|
||||
return filepath;
|
||||
}
|
||||
|
||||
|
||||
function generate(title, docs, filename, resolveLinks) {
|
||||
resolveLinks = resolveLinks === false ? false : true;
|
||||
|
||||
@@ -115,14 +115,14 @@ function generate(title, docs, filename, resolveLinks) {
|
||||
title: title,
|
||||
docs: docs
|
||||
};
|
||||
|
||||
|
||||
var outpath = path.join(outdir, filename),
|
||||
html = view.render('container.tmpl', docData);
|
||||
|
||||
|
||||
if (resolveLinks) {
|
||||
html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
|
||||
}
|
||||
|
||||
|
||||
fs.writeFileSync(outpath, html, 'utf8');
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ function generateSourceFiles(sourceFiles) {
|
||||
* exports only that class or function), then attach the classes or functions to the `module`
|
||||
* property of the appropriate module doclets. The name of each class or function is also updated
|
||||
* for display purposes. This function mutates the original arrays.
|
||||
*
|
||||
*
|
||||
* @private
|
||||
* @param {Array.<module:jsdoc/doclet.Doclet>} doclets - The array of classes and functions to
|
||||
* check.
|
||||
@@ -268,7 +268,7 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
|
||||
var templatePath = opts.template;
|
||||
view = new template.Template(templatePath + '/tmpl');
|
||||
|
||||
|
||||
// claim some special filenames in advance, so the All-Powerful Overseer of Filename Uniqueness
|
||||
// doesn't try to hand them out later
|
||||
var indexUrl = helper.getUniqueFilename('index');
|
||||
@@ -291,16 +291,16 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
var sourceFilePaths = [];
|
||||
data().each(function(doclet) {
|
||||
doclet.attribs = '';
|
||||
|
||||
|
||||
if (doclet.examples) {
|
||||
doclet.examples = doclet.examples.map(function(example) {
|
||||
var caption, code;
|
||||
|
||||
|
||||
if (example.match(/^\s*<caption>([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i)) {
|
||||
caption = RegExp.$1;
|
||||
code = RegExp.$3;
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
caption: caption || '',
|
||||
code: code || example
|
||||
@@ -326,7 +326,7 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
sourceFilePaths.push(resolvedSourcePath);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// update outdir if necessary, then create outdir
|
||||
var packageInfo = ( find({kind: 'package'}) || [] ) [0];
|
||||
if (packageInfo && packageInfo.name) {
|
||||
@@ -350,8 +350,8 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
var staticFileScanner;
|
||||
if (conf['default'].staticFiles) {
|
||||
staticFilePaths = conf['default'].staticFiles.paths || [];
|
||||
staticFileFilter = new (require('jsdoc/src/filter')).Filter(conf['default'].staticFiles);
|
||||
staticFileScanner = new (require('jsdoc/src/scanner')).Scanner();
|
||||
staticFileFilter = new (require('jsdoc/lib/jsdoc/src/filter')).Filter(conf['default'].staticFiles);
|
||||
staticFileScanner = new (require('jsdoc/lib/jsdoc/src/scanner')).Scanner();
|
||||
|
||||
staticFilePaths.forEach(function(filePath) {
|
||||
var extraStaticFiles = staticFileScanner.scan([filePath], 10, staticFileFilter);
|
||||
@@ -365,7 +365,7 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (sourceFilePaths.length) {
|
||||
sourceFiles = shortenPaths( sourceFiles, path.commonPrefix(sourceFilePaths) );
|
||||
}
|
||||
@@ -383,7 +383,7 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
data().each(function(doclet) {
|
||||
var url = helper.longnameToUrl[doclet.longname];
|
||||
|
||||
@@ -393,13 +393,13 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
else {
|
||||
doclet.id = doclet.name;
|
||||
}
|
||||
|
||||
|
||||
if ( needsSignature(doclet) ) {
|
||||
addSignatureParams(doclet);
|
||||
addSignatureReturns(doclet);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// do this after the urls have all been generated
|
||||
data().each(function(doclet) {
|
||||
doclet.ancestors = getAncestorLinks(doclet);
|
||||
@@ -407,13 +407,13 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
if (doclet.kind === 'member') {
|
||||
addSignatureTypes(doclet);
|
||||
}
|
||||
|
||||
|
||||
if (doclet.kind === 'constant') {
|
||||
addSignatureTypes(doclet);
|
||||
doclet.kind = 'member';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var members = helper.getMembers(data);
|
||||
members.tutorials = tutorials.children;
|
||||
|
||||
@@ -437,7 +437,7 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
}
|
||||
|
||||
if (members.globals.length) { generate('Global', [{kind: 'globalobj'}], globalUrl); }
|
||||
|
||||
|
||||
// index page displays information from package.json and lists files
|
||||
var files = find({kind: 'file'}),
|
||||
packages = find({kind: 'package'});
|
||||
@@ -454,14 +454,14 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
var namespaces = taffy(members.namespaces);
|
||||
var mixins = taffy(members.mixins);
|
||||
var externals = taffy(members.externals);
|
||||
|
||||
|
||||
for (var longname in helper.longnameToUrl) {
|
||||
if ( hasOwnProp.call(helper.longnameToUrl, longname) ) {
|
||||
var myClasses = helper.find(classes, {longname: longname});
|
||||
if (myClasses.length) {
|
||||
generate('Class: ' + myClasses[0].name, myClasses, helper.longnameToUrl[longname]);
|
||||
}
|
||||
|
||||
|
||||
var myModules = helper.find(modules, {longname: longname});
|
||||
if (myModules.length) {
|
||||
generate('Module: ' + myModules[0].name, myModules, helper.longnameToUrl[longname]);
|
||||
@@ -471,7 +471,7 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
if (myNamespaces.length) {
|
||||
generate('Namespace: ' + myNamespaces[0].name, myNamespaces, helper.longnameToUrl[longname]);
|
||||
}
|
||||
|
||||
|
||||
var myMixins = helper.find(mixins, {longname: longname});
|
||||
if (myMixins.length) {
|
||||
generate('Mixin: ' + myMixins[0].name, myMixins, helper.longnameToUrl[longname]);
|
||||
@@ -492,16 +492,16 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
content: tutorial.parse(),
|
||||
children: tutorial.children
|
||||
};
|
||||
|
||||
|
||||
var tutorialPath = path.join(outdir, filename),
|
||||
html = view.render('tutorial.tmpl', tutorialData);
|
||||
|
||||
|
||||
// yes, you can use {@link} in tutorials too!
|
||||
html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
|
||||
|
||||
|
||||
fs.writeFileSync(tutorialPath, html, 'utf8');
|
||||
}
|
||||
|
||||
|
||||
// tutorials can have only one parent so there is no risk for loops
|
||||
function saveChildren(node) {
|
||||
node.children.forEach(function(child) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -11,6 +11,7 @@ var path = require('path');
|
||||
* Publish hook for the JSDoc template. Writes to JSON stdout.
|
||||
* @param {function} data The root of the Taffy DB containing doclet records.
|
||||
* @param {Object} opts Options.
|
||||
* @return {Promise} A promise that resolves when writing is complete.
|
||||
*/
|
||||
exports.publish = function(data, opts) {
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
"externs/topojson.js"
|
||||
],
|
||||
"define": [
|
||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||
"goog.json.USE_NATIVE_JSON=true",
|
||||
"goog.DEBUG=false"
|
||||
@@ -24,9 +23,14 @@
|
||||
],
|
||||
"jscomp_off": [
|
||||
"useOfGoogBase",
|
||||
"unnecessaryCasts",
|
||||
"lintChecks"
|
||||
],
|
||||
"hide_warnings_for": [
|
||||
"node_modules/closure-util"
|
||||
],
|
||||
"jscomp_warning": [
|
||||
"unnecessaryCasts"
|
||||
],
|
||||
"extra_annotation_name": [
|
||||
"api", "observable"
|
||||
],
|
||||
|
||||
29
css/ol.css
29
css/ol.css
@@ -1,3 +1,8 @@
|
||||
.ol-box {
|
||||
box-sizing: border-box;
|
||||
border-radius: 2px;
|
||||
border: 2px solid blue;
|
||||
}
|
||||
|
||||
.ol-mouse-position {
|
||||
top: 8px;
|
||||
@@ -6,7 +11,6 @@
|
||||
}
|
||||
|
||||
.ol-scale-line {
|
||||
background: #95b9e6;
|
||||
background: rgba(0,60,136,0.3);
|
||||
border-radius: 4px;
|
||||
bottom: 8px;
|
||||
@@ -15,9 +19,9 @@
|
||||
position: absolute;
|
||||
}
|
||||
.ol-scale-line-inner {
|
||||
border: 1px solid #eeeeee;
|
||||
border: 1px solid #eee;
|
||||
border-top: none;
|
||||
color: #eeeeee;
|
||||
color: #eee;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
margin: 1px;
|
||||
@@ -42,7 +46,6 @@
|
||||
|
||||
.ol-control {
|
||||
position: absolute;
|
||||
background-color: #eee;
|
||||
background-color: rgba(255,255,255,0.4);
|
||||
border-radius: 4px;
|
||||
padding: 2px;
|
||||
@@ -90,7 +93,6 @@
|
||||
height: 1.375em;
|
||||
width: 1.375em;
|
||||
line-height: .4em;
|
||||
background-color: #7b98bc;
|
||||
background-color: rgba(0,60,136,0.5);
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
@@ -117,7 +119,6 @@
|
||||
.ol-control button:hover,
|
||||
.ol-control button:focus {
|
||||
text-decoration: none;
|
||||
background-color: #4c6079;
|
||||
background-color: rgba(0,60,136,0.7);
|
||||
}
|
||||
.ol-zoom .ol-zoom-in {
|
||||
@@ -154,6 +155,7 @@
|
||||
.ol-attribution img {
|
||||
max-height: 2em;
|
||||
max-width: inherit;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ol-attribution ul, .ol-attribution button {
|
||||
display: inline-block;
|
||||
@@ -192,26 +194,15 @@
|
||||
.ol-zoomslider {
|
||||
top: 4.5em;
|
||||
left: .5em;
|
||||
width: 24px;
|
||||
height: 200px;
|
||||
}
|
||||
.ol-zoomslider-thumb {
|
||||
position: absolute;
|
||||
background: #7b98bc;
|
||||
background: rgba(0,60,136,0.5);
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
.ol-zoomslider button {
|
||||
position: relative;
|
||||
height: 10px;
|
||||
width: 22px;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
.ol-touch .ol-zoomslider {
|
||||
top: 5.5em;
|
||||
width: 2.052em;
|
||||
}
|
||||
.ol-touch .ol-zoomslider-thumb {
|
||||
width: 1.8em;
|
||||
}
|
||||
|
||||
.ol-overviewmap {
|
||||
|
||||
@@ -167,7 +167,6 @@ The minimum config file looks like this:
|
||||
"node_modules/openlayers/externs/topojson.js"
|
||||
],
|
||||
"define": [
|
||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||
"goog.json.USE_NATIVE_JSON=true",
|
||||
"goog.DEBUG=false",
|
||||
@@ -223,7 +222,6 @@ Here is a version of `config.json` with more compilation checks enabled:
|
||||
"node_modules/openlayers/externs/topojson.js"
|
||||
],
|
||||
"define": [
|
||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||
"goog.json.USE_NATIVE_JSON=true",
|
||||
"goog.DEBUG=false",
|
||||
@@ -312,7 +310,7 @@ directory:
|
||||
```
|
||||
|
||||
Note that the page includes a `script` tag referencing the `app.js` file,
|
||||
which is the file resuted from the compilation.
|
||||
which is the file resulting from the compilation.
|
||||
|
||||
You are done!
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ Creating a custom build requires writing a build configuration file. The format
|
||||
"externs/topojson.js"
|
||||
],
|
||||
"define": [
|
||||
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
|
||||
"goog.dom.ASSUME_STANDARDS_MODE=true",
|
||||
"goog.json.USE_NATIVE_JSON=true",
|
||||
"goog.DEBUG=false"
|
||||
|
||||
@@ -10,3 +10,4 @@ layout: doc.hbs
|
||||
* [Create Custom Builds](custom-builds.html)
|
||||
* [Bundle Application and OpenLayers using Browserify](browserify.html)
|
||||
* [Compile Application and OpenLayers together](closure.html)
|
||||
* [Raster Reprojection](raster-reprojection.html)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
BIN
doc/tutorials/raster-reprojection-resources/how-it-works.jpg
Normal file
BIN
doc/tutorials/raster-reprojection-resources/how-it-works.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
132
doc/tutorials/raster-reprojection.md
Normal file
132
doc/tutorials/raster-reprojection.md
Normal file
@@ -0,0 +1,132 @@
|
||||
---
|
||||
title: Raster Reprojection
|
||||
layout: doc.hbs
|
||||
---
|
||||
|
||||
# Raster Reprojection
|
||||
|
||||
OpenLayers 3 has an ability to display raster data from WMS, WMTS, static images and many other sources in a different coordinate system than delivered from the server.
|
||||
Transformation of the map projections of the image happens directly in a web browser.
|
||||
The view in any Proj4js supported coordinate reference system is possible and previously incompatible layers can now be combined and overlaid.
|
||||
|
||||
# Usage
|
||||
The API usage is very simple. Just specify proper projection (using [EPSG](http://epsg.io) code) on `ol.View`:
|
||||
``` javascript
|
||||
var map = new ol.Map({
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
projection: 'EPSG:3857', //HERE IS THE VIEW PROJECTION
|
||||
center: [0, 0],
|
||||
zoom: 2
|
||||
}),
|
||||
layers: [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileWMS({
|
||||
projection: 'EPSG:4326', //HERE IS THE DATA SOURCE PROJECTION
|
||||
url: 'http://demo.boundlessgeo.com/geoserver/wms',
|
||||
params: {
|
||||
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR'
|
||||
}
|
||||
})
|
||||
})
|
||||
]
|
||||
});
|
||||
```
|
||||
If a source (based on `ol.source.TileImage` or `ol.source.Image`) has a projection different from the current `ol.View`’s projection then the reprojection happens automatically under the hood.
|
||||
|
||||
### Examples
|
||||
- [Raster reprojection demo](http://openlayers.org/en/master/examples/reprojection.html)
|
||||
- [OpenStreetMap to WGS84 reprojection](http://openlayers.org/en/master/examples/reprojection-wgs84.html)
|
||||
- [Reprojection with EPSG.io database search](http://openlayers.org/en/master/examples/reprojection-by-code.html)
|
||||
- [Image reprojection](http://openlayers.org/en/master/examples/reprojection-image.html)
|
||||
|
||||
### Custom projection
|
||||
The easiest way to use a custom projection is to add the [Proj4js](http://proj4js.org/) library to your project and then define the projection using a proj4 definition string.
|
||||
Following example shows definition of a [British National Grid](http://epsg.io/27700):
|
||||
|
||||
``` html
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.12/proj4.js"></script>
|
||||
```
|
||||
|
||||
``` javascript
|
||||
proj4.defs('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' +
|
||||
'+x_0=400000 +y_0=-100000 +ellps=airy ' +
|
||||
'+towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 ' +
|
||||
'+units=m +no_defs');
|
||||
var proj27700 = ol.proj.get('EPSG:27700');
|
||||
proj27700.setExtent([0, 0, 700000, 1300000]);
|
||||
```
|
||||
|
||||
### Change of the view projection
|
||||
To switch the projection used to display the map you have to set a new `ol.View` with selected projection on the `ol.Map`:
|
||||
``` javascript
|
||||
map.setView(new ol.View({
|
||||
projection: 'EPSG:27700',
|
||||
center: [400000, 650000],
|
||||
zoom: 4
|
||||
}));
|
||||
```
|
||||
|
||||
## TileGrid and Extents
|
||||
When reprojection is needed, new tiles (in the target projection) are under the hood created from the original source tiles.
|
||||
The TileGrid of the reprojected tiles is by default internally constructed using `ol.tilegrid.getForProjection(projection)`.
|
||||
The projection should have extent defined (see above) for this to work properly.
|
||||
|
||||
Alternatively, a custom target TileGrid can be constructed manually and set on the source instance using `ol.source.TileImage#setTileGridForProjection(projection, tilegrid)`.
|
||||
This TileGrid will then be used when reprojecting to the specified projection instead of creating the default one.
|
||||
In certain cases, this can be used to optimize performance (by tweaking tile sizes) or visual quality (by specifying resolutions).
|
||||
|
||||
# How it works
|
||||
|
||||
The reprojection process is based on triangles -- the target raster is divided into a limited number of triangles with vertices transformed using `ol.proj` capabilities ([proj4js](http://proj4js.org/) is usually utilized to define custom transformations).
|
||||
The reprojection of pixels inside the triangle is approximated with an affine transformation (with rendering hardware-accelerated by the canvas 2d context):
|
||||
|
||||
<img src="raster-reprojection-resources/how-it-works.jpg" alt="How it works" width="600" />
|
||||
|
||||
This way we can support a wide range of projections from proj4js (or even custom transformation functions) on almost any hardware (with canvas 2d support) with a relatively small number of actual transformation calculations.
|
||||
|
||||
The precision of the reprojection is then limited by the number of triangles.
|
||||
|
||||
The reprojection process preserves transparency on the raster data supplied from the source (png or gif) and the gaps and no-data pixels generated by reprojection are automatically transparent.
|
||||
|
||||
###Dynamic triangulation
|
||||
|
||||
The above image above shows a noticeable error (especially on the edges) when the original image (left; EPSG:27700) is transformed with only a limited number of triangles (right; EPSG:3857).
|
||||
The error can be minimized by increasing the number of triangles used.
|
||||
|
||||
Since some transformations require a more detail triangulation network, the dynamic triangulation process automatically measures reprojection error and iteratively subdivides to meet a specific error threshold:
|
||||
|
||||
<img src="raster-reprojection-resources/iterative-triangulation.png" alt="Iterative triangulation" width="600" />
|
||||
|
||||
For debugging, rendering of the reprojection edges can be enabled by `ol.source.TileImage#setRenderReprojectionEdges(true)`.
|
||||
|
||||
# Advanced
|
||||
|
||||
### Disabling reprojection
|
||||
In case you are creating a custom build of OpenLayers and do not need the reprojection code, you can reduce the build size by setting `ol.ENABLE_RASTER_REPROJECTION` to `false`, which completely disables the reprojection support.
|
||||
See [Custom builds](custom-builds.html#defines) tutorial on how to do this.
|
||||
|
||||
### Triangulation precision threshold
|
||||
The default [triangulation error threshold](#dynamic-triangulation) in pixels is given by `ol.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD` (0.5 pixel).
|
||||
In case a different threshold needs to be defined for different sources, the `reprojectionErrorThreshold` option can be passed when constructing the tile image source.
|
||||
|
||||
###Limiting visibility of reprojected map by extent
|
||||
|
||||
The reprojection algorithm uses inverse transformation (from *view projection* to *data projection*).
|
||||
For certain coordinate systems this can result in a "double occurrence" of the source data on a map.
|
||||
For example, when reprojecting a map of Switzerland from EPSG:21781 to EPSG:3857, it is displayed twice: once at the proper place in Europe, but also in the Pacific Ocean near New Zealand, on the opposite side of the globe.
|
||||
|
||||
<img src="raster-reprojection-resources/double-occurrence.jpg" alt="Double occurrence of a reprojected map" width="600" />
|
||||
|
||||
Although this is mathematically correct behavior of the inverse transformation, visibility of the layer on multiple places is not expected by users.
|
||||
A possible general solution would be to calculate the forward transformation for every vertex as well - but this would significantly decrease performance (especially for computationally expensive transformations).
|
||||
|
||||
Therefore a recommended workaround is to define a proper visibility extent on the `ol.layer.Tile` in the view projection.
|
||||
Setting such a limit is demonstrated in the [reprojection demo example](http://openlayers.org/en/master/examples/reprojection.html).
|
||||
|
||||
### Resolution calculation
|
||||
When determining source tiles to load, the ideal source resolution needs to be calculated.
|
||||
The `ol.reproj.calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution)` function calculates the ideal value in order to achieve pixel mapping as close as possible to 1:1 during reprojection, which is then used to select proper zoom level from the source.
|
||||
|
||||
It is, however, generally not practical to use the same source zoom level for the whole target zoom level -- different projections can have significantly different resolutions in different parts of the world (e.g. polar regions in EPSG:3857 vs EPSG:4326) and enforcing a single resolution for the whole zoom level would result in some tiles being scaled up/down, possibly requiring a huge number of source tiles to be loaded.
|
||||
Therefore, the resolution mapping is calculated separately for each reprojected tile (in the middle of the tile extent).
|
||||
17
examples/.eslintrc
Normal file
17
examples/.eslintrc
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"globals": {
|
||||
"FastClick": false,
|
||||
"$": 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;
|
||||
padding: 0.3em;
|
||||
}
|
||||
#map:focus {
|
||||
outline: #4A74A8 solid 0.15em;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Accessibility example
|
||||
layout: example.html
|
||||
title: Accessible Map
|
||||
shortdesc: Example of an accessible map.
|
||||
docs: >
|
||||
This page's `map` element has its `tabindex` attribute set to `"0"`, that makes it focusable. To focus the map element you can either navigate to it using the "tab" key or use the skip link. When the `map` element is focused the + and - keys can be used to zoom in and out and the arrow keys can be used to pan.
|
||||
@@ -10,11 +10,7 @@ docs: >
|
||||
|
||||
tags: "accessibility, tabindex"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<a class="skiplink" href="#map">Go to map</a>
|
||||
<div id="map" class="map" tabindex="0"></div>
|
||||
<button id="zoom-out">Zoom out</button>
|
||||
<button id="zoom-in">Zoom in</button>
|
||||
</div>
|
||||
</div>
|
||||
<a class="skiplink" href="#map">Go to map</a>
|
||||
<div id="map" class="map" tabindex="0"></div>
|
||||
<button id="zoom-out">Zoom out</button>
|
||||
<button id="zoom-in">Zoom in</button>
|
||||
|
||||
@@ -1,27 +1,19 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Animation example
|
||||
layout: example.html
|
||||
title: View Animation
|
||||
shortdesc: Demonstrates animated pan, zoom, and rotation.
|
||||
docs: >
|
||||
This example shows how to use the beforeRender function on the Map to run one
|
||||
or more animations.
|
||||
tags: "animation"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<button id="rotate-left" title="Rotate clockwise">↻</button>
|
||||
<button id="rotate-right" title="Rotate counterclockwise">↺</button>
|
||||
<button id="rotate-around-rome">Rotate around Rome</button>
|
||||
<button id="pan-to-london">Pan to London</button>
|
||||
<button id="elastic-to-moscow">Elastic to Moscow</button>
|
||||
<button id="bounce-to-istanbul">Bounce to Istanbul</button>
|
||||
<button id="spin-to-rome">Spin to Rome</button>
|
||||
<button id="fly-to-bern">Fly to Bern</button>
|
||||
<button id="spiral-to-madrid">Spiral to Madrid</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<button id="rotate-left" title="Rotate clockwise">↻</button>
|
||||
<button id="rotate-right" title="Rotate counterclockwise">↺</button>
|
||||
<button id="rotate-around-rome">Rotate around Rome</button>
|
||||
<button id="pan-to-london">Pan to London</button>
|
||||
<button id="elastic-to-moscow">Elastic to Moscow</button>
|
||||
<button id="bounce-to-istanbul">Bounce to Istanbul</button>
|
||||
<button id="spin-to-rome">Spin to Rome</button>
|
||||
<button id="fly-to-bern">Fly to Bern</button>
|
||||
<button id="spiral-to-madrid">Spiral to Madrid</button>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Tiled ArcGIS MapServer example
|
||||
layout: example.html
|
||||
title: Tiled ArcGIS MapServer
|
||||
shortdesc: Example of a tiled ArcGIS layer.
|
||||
docs: >
|
||||
This example shows how to use an ArcGIS REST MapService as tiles.
|
||||
@@ -9,8 +9,4 @@ docs: >
|
||||
<code>ol.source.XYZ</code> instead.
|
||||
tags: arcgis, tile, tilelayer"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Attributions example
|
||||
layout: example.html
|
||||
title: Attributions
|
||||
shortdesc: Example of a attributions visibily change on map resize, to collapse them on small maps.
|
||||
docs: >
|
||||
When the map gets too small because of a resize, the attribution will be collapsed.
|
||||
@@ -8,8 +8,4 @@ docs: >
|
||||
of the map gets smaller than 600 pixels.
|
||||
tags: "attributions, openstreetmap"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -14,7 +14,7 @@ var map = new ol.Map({
|
||||
source: new ol.source.OSM()
|
||||
})
|
||||
],
|
||||
controls: ol.control.defaults({ attribution: false }).extend([attribution]),
|
||||
controls: ol.control.defaults({attribution: false}).extend([attribution]),
|
||||
renderer: common.getRendererFromQueryString(),
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Bing Maps example
|
||||
layout: example.html
|
||||
title: Bing Maps
|
||||
shortdesc: Example of a Bing Maps layer.
|
||||
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>
|
||||
tags: "bing, bing-maps"
|
||||
cloak:
|
||||
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://bingmapsportal.com/ here
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
<select id="layer-select">
|
||||
<option value="Aerial">Aerial</option>
|
||||
<option value="AerialWithLabels" selected>Aerial with labels</option>
|
||||
<option value="Road">Road</option>
|
||||
<option value="collinsBart">Collins Bart</option>
|
||||
<option value="ordnanceSurvey">Ordnance Survey</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<select id="layer-select">
|
||||
<option value="Aerial">Aerial</option>
|
||||
<option value="AerialWithLabels" selected>Aerial with labels</option>
|
||||
<option value="Road">Road</option>
|
||||
<option value="collinsBart">Collins Bart</option>
|
||||
<option value="ordnanceSurvey">Ordnance Survey</option>
|
||||
</select>
|
||||
|
||||
@@ -18,7 +18,7 @@ for (i = 0, ii = styles.length; i < ii; ++i) {
|
||||
visible: false,
|
||||
preload: Infinity,
|
||||
source: new ol.source.BingMaps({
|
||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3',
|
||||
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF',
|
||||
imagerySet: styles[i]
|
||||
// use maxZoom 19 to see stretched tiles instead of the BingMaps
|
||||
// "no photos at this zoom level" tiles
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Blend modes example
|
||||
layout: example.html
|
||||
title: Blend Modes
|
||||
shortdesc: Shows how to change the canvas compositing / blending mode in post- and precompose eventhandlers.
|
||||
docs: >
|
||||
<p>This example shows how to change the canvas compositing / blending mode in
|
||||
@@ -20,57 +20,49 @@ docs: >
|
||||
checkboxes.</p>
|
||||
tags: "blendmode, blend-mode, blend mode, blendingmode, blending-mode, blending mode, composition, compositing, canvas, vector"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<form class="form-horizontal">
|
||||
<label>
|
||||
<select id="blend-mode" class="form-control">
|
||||
<option value="source-over">source-over (default)</option>
|
||||
<option>source-in</option>
|
||||
<option>source-out</option>
|
||||
<option>source-atop</option>
|
||||
<option>destination-over</option>
|
||||
<option>destination-in</option>
|
||||
<option>destination-out</option>
|
||||
<option>destination-atop</option>
|
||||
<option>lighter</option>
|
||||
<option>copy</option>
|
||||
<option>xor</option>
|
||||
<option>multiply</option>
|
||||
<option>screen</option>
|
||||
<option>overlay</option>
|
||||
<option>darken</option>
|
||||
<option>lighten</option>
|
||||
<option>color-dodge</option>
|
||||
<option>color-burn</option>
|
||||
<option>hard-light</option>
|
||||
<option>soft-light</option>
|
||||
<option selected>difference</option>
|
||||
<option>exclusion</option>
|
||||
<option>hue</option>
|
||||
<option>saturation</option>
|
||||
<option>color</option>
|
||||
<option>luminosity</option>
|
||||
</select>
|
||||
Canvas compositing / blending mode
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" id="affect-red" checked>
|
||||
Red circle affected
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" id="affect-green" checked>
|
||||
Green circle affected
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" id="affect-blue" checked>
|
||||
Blue circle affected
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<form class="form-horizontal">
|
||||
<label>
|
||||
<select id="blend-mode" class="form-control">
|
||||
<option value="source-over">source-over (default)</option>
|
||||
<option>source-in</option>
|
||||
<option>source-out</option>
|
||||
<option>source-atop</option>
|
||||
<option>destination-over</option>
|
||||
<option>destination-in</option>
|
||||
<option>destination-out</option>
|
||||
<option>destination-atop</option>
|
||||
<option>lighter</option>
|
||||
<option>copy</option>
|
||||
<option>xor</option>
|
||||
<option>multiply</option>
|
||||
<option>screen</option>
|
||||
<option>overlay</option>
|
||||
<option>darken</option>
|
||||
<option>lighten</option>
|
||||
<option>color-dodge</option>
|
||||
<option>color-burn</option>
|
||||
<option>hard-light</option>
|
||||
<option>soft-light</option>
|
||||
<option selected>difference</option>
|
||||
<option>exclusion</option>
|
||||
<option>hue</option>
|
||||
<option>saturation</option>
|
||||
<option>color</option>
|
||||
<option>luminosity</option>
|
||||
</select>
|
||||
Canvas compositing / blending mode
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" id="affect-red" checked>
|
||||
Red circle affected
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" id="affect-green" checked>
|
||||
Green circle affected
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" id="affect-blue" checked>
|
||||
Blue circle affected
|
||||
</label>
|
||||
</form>
|
||||
|
||||
@@ -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
|
||||
* 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
|
||||
select.addEventListener('change', function() {
|
||||
map.render();
|
||||
|
||||
4
examples/box-selection.css
Normal file
4
examples/box-selection.css
Normal file
@@ -0,0 +1,4 @@
|
||||
.ol-dragbox {
|
||||
background-color: rgba(255,255,255,0.4);
|
||||
border-color: rgba(100,150,0,1);
|
||||
}
|
||||
@@ -1,20 +1,12 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Box selection example
|
||||
layout: example.html
|
||||
title: Box Selection
|
||||
shortdesc: Using a DragBox interaction to select features.
|
||||
docs: >
|
||||
<p>This example shows how to use a <code>DragBox</code> interaction to select features. Selected features are added
|
||||
to the feature overlay of a select interaction (<code>ol.interaction.Select</code>) for highlighting.</p>
|
||||
<p>Use <code>SHIFT+drag</code> to draw boxes.</p>
|
||||
<p>Use <code>Ctrl+Drag</code> (<code>Command+Drag</code> on Mac) to draw boxes.</p>
|
||||
tags: "DragBox, feature, selection, box"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
<div class="span4 offset4 pull-right">
|
||||
<div id="info" class="alert alert-success">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<div id="info">No countries selected</div>
|
||||
|
||||
@@ -8,8 +8,6 @@ goog.require('ol.layer.Tile');
|
||||
goog.require('ol.layer.Vector');
|
||||
goog.require('ol.source.OSM');
|
||||
goog.require('ol.source.Vector');
|
||||
goog.require('ol.style.Stroke');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
|
||||
var vectorSource = new ol.source.Vector({
|
||||
@@ -43,19 +41,14 @@ var selectedFeatures = select.getFeatures();
|
||||
|
||||
// a DragBox interaction used to select features by drawing boxes
|
||||
var dragBox = new ol.interaction.DragBox({
|
||||
condition: ol.events.condition.shiftKeyOnly,
|
||||
style: new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: [0, 0, 255, 1]
|
||||
})
|
||||
})
|
||||
condition: ol.events.condition.platformModifierKeyOnly
|
||||
});
|
||||
|
||||
map.addInteraction(dragBox);
|
||||
|
||||
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
|
||||
// selected features, and their names are displayed in the "info"
|
||||
// div
|
||||
@@ -71,7 +64,7 @@ dragBox.on('boxend', function(e) {
|
||||
});
|
||||
|
||||
// clear selection when drawing a new box and when clicking on the map
|
||||
dragBox.on('boxstart', function(e) {
|
||||
dragBox.on('boxstart', function() {
|
||||
selectedFeatures.clear();
|
||||
infoBox.innerHTML = ' ';
|
||||
});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
.tooltip-inner {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Custom tooltips example
|
||||
layout: example.html
|
||||
title: Custom Tooltips
|
||||
shortdesc: This example shows how to customize the buttons tooltips with Bootstrap.
|
||||
docs: >
|
||||
This example shows how to customize the buttons tooltips with <a href="http://getbootstrap.com/javascript/#tooltips">Bootstrap</a>.
|
||||
tags: "custom, tooltip"
|
||||
resources:
|
||||
- https://code.jquery.com/jquery-1.11.2.min.js
|
||||
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css
|
||||
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Canvas tiles example
|
||||
layout: example.html
|
||||
title: Canvas Tiles
|
||||
shortdesc: Renders tiles with coordinates for debugging.
|
||||
docs: >
|
||||
The black grid tiles are generated on the client with an HTML5 canvas. The
|
||||
displayed tile coordinates are OpenLayers tile coordinates. These increase
|
||||
from bottom to top, but standard XYZ tiling scheme coordinates increase from
|
||||
top to bottom. To calculate the `y` for a standard XYZ tile coordinate, use
|
||||
`-y - 1`.
|
||||
`-y - 1`.
|
||||
tags: "layers, openstreetmap, canvas"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Advanced View Positioning example
|
||||
layout: example.html
|
||||
title: Advanced View Positioning
|
||||
shortdesc: This example demonstrates how a map's view can be adjusted so a geometry or coordinate is positioned at a specific pixel location.
|
||||
docs: >
|
||||
This example demonstrates how a map's view can be
|
||||
@@ -10,25 +10,19 @@ docs: >
|
||||
is used to fit a geometry in the view with the same padding. The
|
||||
view's <code>centerOn</code> method is used to position a coordinate (Lausanne)
|
||||
at a specific pixel location (the center of the black box).
|
||||
<p>Use <code>Alt</code>+<code>Shift</code>+drag to rotate the map.</p>
|
||||
<p>Use <code>Alt+Shift+Drag</code> to rotate the map.</p>
|
||||
tags: "center, rotation, openstreetmap"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12 mapcontainer">
|
||||
<div id="map" class="map"></div>
|
||||
<div class="padding-top"></div>
|
||||
<div class="padding-left"></div>
|
||||
<div class="padding-right"></div>
|
||||
<div class="padding-bottom"></div>
|
||||
<div class="center"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<button id="zoomtoswitzerlandbest">Zoom to Switzerland</button> (best fit),<br/>
|
||||
<button id="zoomtoswitzerlandconstrained">Zoom to Switzerland</button> (respect resolution constraint).<br/>
|
||||
<button id="zoomtoswitzerlandnearest">Zoom to Switzerland</button> (nearest),<br/>
|
||||
<button id="zoomtolausanne">Zoom to Lausanne</button> (with min resolution),<br/>
|
||||
<button id="centerlausanne">Center on Lausanne</button>
|
||||
</div>
|
||||
<div class="mapcontainer">
|
||||
<div id="map" class="map"></div>
|
||||
<div class="padding-top"></div>
|
||||
<div class="padding-left"></div>
|
||||
<div class="padding-right"></div>
|
||||
<div class="padding-bottom"></div>
|
||||
<div class="center"></div>
|
||||
</div>
|
||||
<button id="zoomtoswitzerlandbest">Zoom to Switzerland</button> (best fit),<br/>
|
||||
<button id="zoomtoswitzerlandconstrained">Zoom to Switzerland</button> (respect resolution constraint).<br/>
|
||||
<button id="zoomtoswitzerlandnearest">Zoom to Switzerland</button> (nearest),<br/>
|
||||
<button id="zoomtolausanne">Zoom to Lausanne</button> (with min resolution),<br/>
|
||||
<button id="centerlausanne">Center on Lausanne</button>
|
||||
|
||||
@@ -65,14 +65,7 @@ zoomtoswitzerlandbest.addEventListener('click', function() {
|
||||
var feature = source.getFeatures()[0];
|
||||
var polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
||||
var size = /** @type {ol.Size} */ (map.getSize());
|
||||
view.fit(
|
||||
polygon,
|
||||
size,
|
||||
{
|
||||
padding: [170, 50, 30, 150],
|
||||
constrainResolution: false
|
||||
}
|
||||
);
|
||||
view.fit(polygon, size, {padding: [170, 50, 30, 150], constrainResolution: false});
|
||||
}, false);
|
||||
|
||||
var zoomtoswitzerlandconstrained =
|
||||
@@ -81,13 +74,7 @@ zoomtoswitzerlandconstrained.addEventListener('click', function() {
|
||||
var feature = source.getFeatures()[0];
|
||||
var polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
||||
var size = /** @type {ol.Size} */ (map.getSize());
|
||||
view.fit(
|
||||
polygon,
|
||||
size,
|
||||
{
|
||||
padding: [170, 50, 30, 150]
|
||||
}
|
||||
);
|
||||
view.fit(polygon, size, {padding: [170, 50, 30, 150]});
|
||||
}, false);
|
||||
|
||||
var zoomtoswitzerlandnearest =
|
||||
@@ -96,14 +83,7 @@ zoomtoswitzerlandnearest.addEventListener('click', function() {
|
||||
var feature = source.getFeatures()[0];
|
||||
var polygon = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
||||
var size = /** @type {ol.Size} */ (map.getSize());
|
||||
view.fit(
|
||||
polygon,
|
||||
size,
|
||||
{
|
||||
padding: [170, 50, 30, 150],
|
||||
nearest: true
|
||||
}
|
||||
);
|
||||
view.fit(polygon, size, {padding: [170, 50, 30, 150], nearest: true});
|
||||
}, false);
|
||||
|
||||
var zoomtolausanne = document.getElementById('zoomtolausanne');
|
||||
@@ -111,14 +91,7 @@ zoomtolausanne.addEventListener('click', function() {
|
||||
var feature = source.getFeatures()[1];
|
||||
var point = /** @type {ol.geom.SimpleGeometry} */ (feature.getGeometry());
|
||||
var size = /** @type {ol.Size} */ (map.getSize());
|
||||
view.fit(
|
||||
point,
|
||||
size,
|
||||
{
|
||||
padding: [170, 50, 30, 150],
|
||||
minResolution: 50
|
||||
}
|
||||
);
|
||||
view.fit(point, size, {padding: [170, 50, 30, 150], minResolution: 50});
|
||||
}, false);
|
||||
|
||||
var centerlausanne = document.getElementById('centerlausanne');
|
||||
@@ -126,9 +99,5 @@ centerlausanne.addEventListener('click', function() {
|
||||
var feature = source.getFeatures()[1];
|
||||
var point = /** @type {ol.geom.Point} */ (feature.getGeometry());
|
||||
var size = /** @type {ol.Size} */ (map.getSize());
|
||||
view.centerOn(
|
||||
point.getCoordinates(),
|
||||
size,
|
||||
[570, 500]
|
||||
);
|
||||
view.centerOn(point.getCoordinates(), size, [570, 500]);
|
||||
}, false);
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Clustering example
|
||||
layout: example.html
|
||||
title: Clustered Features
|
||||
shortdesc: Example of using <code>ol.source.Cluster</code>.
|
||||
docs: >
|
||||
This example shows how to do clustering on point features.
|
||||
tags: "cluster, vector"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -34,11 +34,11 @@ var clusterSource = new ol.source.Cluster({
|
||||
var styleCache = {};
|
||||
var clusters = new ol.layer.Vector({
|
||||
source: clusterSource,
|
||||
style: function(feature, resolution) {
|
||||
style: function(feature) {
|
||||
var size = feature.get('features').length;
|
||||
var style = styleCache[size];
|
||||
if (!style) {
|
||||
style = [new ol.style.Style({
|
||||
style = new ol.style.Style({
|
||||
image: new ol.style.Circle({
|
||||
radius: 10,
|
||||
stroke: new ol.style.Stroke({
|
||||
@@ -54,7 +54,7 @@ var clusters = new ol.layer.Vector({
|
||||
color: '#fff'
|
||||
})
|
||||
})
|
||||
})];
|
||||
});
|
||||
styleCache[size] = style;
|
||||
}
|
||||
return style;
|
||||
@@ -65,10 +65,6 @@ var raster = new ol.layer.Tile({
|
||||
source: new ol.source.MapQuest({layer: 'sat'})
|
||||
});
|
||||
|
||||
var raw = new ol.layer.Vector({
|
||||
source: source
|
||||
});
|
||||
|
||||
var map = new ol.Map({
|
||||
layers: [raster, clusters],
|
||||
renderer: 'canvas',
|
||||
|
||||
5
examples/color-manipulation.css
Normal file
5
examples/color-manipulation.css
Normal file
@@ -0,0 +1,5 @@
|
||||
table.controls td {
|
||||
text-align: center;
|
||||
padding: 2px 5px;
|
||||
min-width: 60px;
|
||||
}
|
||||
26
examples/color-manipulation.html
Normal file
26
examples/color-manipulation.html
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
layout: example.html
|
||||
title: Color Manipulation
|
||||
shortdesc: Demonstrates color manipulation with a raster source.
|
||||
docs: >
|
||||
A raster source allows arbitrary manipulation of pixel values. In this example, RGB values on the input tile source are adjusted in a pixel-wise operation before being rendered with a second raster source. The raster operation takes pixels in in RGB space, converts them to HCL color space, adjusts the values based on the controls above, and then converts them back to RGB space for rendering.
|
||||
tags: "color, hue, lightness, chroma"
|
||||
---
|
||||
<div id="map" class="map"></div>
|
||||
<table class="controls">
|
||||
<tr>
|
||||
<td>hue</td>
|
||||
<td><span id="hueOut"></span>°</td>
|
||||
<td><input id="hue" type="range" min="-180" max="180" value="0"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>chroma</td>
|
||||
<td><span id="chromaOut"></span> %</td>
|
||||
<td><input id="chroma" type="range" min="0" max="100" value="100"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>lightness</td>
|
||||
<td><span id="lightnessOut"></span> %</td>
|
||||
<td><input id="lightness" type="range" min="0" max="100" value="100"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
174
examples/color-manipulation.js
Normal file
174
examples/color-manipulation.js
Normal file
@@ -0,0 +1,174 @@
|
||||
// NOCOMPILE
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.View');
|
||||
goog.require('ol.layer.Image');
|
||||
goog.require('ol.source.Raster');
|
||||
goog.require('ol.source.Stamen');
|
||||
|
||||
|
||||
/**
|
||||
* Color manipulation functions below are adapted from
|
||||
* https://github.com/d3/d3-color.
|
||||
*/
|
||||
var Xn = 0.950470;
|
||||
var Yn = 1;
|
||||
var Zn = 1.088830;
|
||||
var t0 = 4 / 29;
|
||||
var t1 = 6 / 29;
|
||||
var t2 = 3 * t1 * t1;
|
||||
var t3 = t1 * t1 * t1;
|
||||
var twoPi = 2 * Math.PI;
|
||||
|
||||
|
||||
/**
|
||||
* Convert an RGB pixel into an HCL pixel.
|
||||
* @param {ol.raster.Pixel} pixel A pixel in RGB space.
|
||||
* @return {ol.raster.Pixel} A pixel in HCL space.
|
||||
*/
|
||||
function rgb2hcl(pixel) {
|
||||
var red = rgb2xyz(pixel[0]);
|
||||
var green = rgb2xyz(pixel[1]);
|
||||
var blue = rgb2xyz(pixel[2]);
|
||||
|
||||
var x = xyz2lab(
|
||||
(0.4124564 * red + 0.3575761 * green + 0.1804375 * blue) / Xn);
|
||||
var y = xyz2lab(
|
||||
(0.2126729 * red + 0.7151522 * green + 0.0721750 * blue) / Yn);
|
||||
var z = xyz2lab(
|
||||
(0.0193339 * red + 0.1191920 * green + 0.9503041 * blue) / Zn);
|
||||
|
||||
var l = 116 * y - 16;
|
||||
var a = 500 * (x - y);
|
||||
var b = 200 * (y - z);
|
||||
|
||||
var c = Math.sqrt(a * a + b * b);
|
||||
var h = Math.atan2(b, a);
|
||||
if (h < 0) {
|
||||
h += twoPi;
|
||||
}
|
||||
|
||||
pixel[0] = h;
|
||||
pixel[1] = c;
|
||||
pixel[2] = l;
|
||||
|
||||
return pixel;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert an HCL pixel into an RGB pixel.
|
||||
* @param {ol.raster.Pixel} pixel A pixel in HCL space.
|
||||
* @return {ol.raster.Pixel} A pixel in RGB space.
|
||||
*/
|
||||
function hcl2rgb(pixel) {
|
||||
var h = pixel[0];
|
||||
var c = pixel[1];
|
||||
var l = pixel[2];
|
||||
|
||||
var a = Math.cos(h) * c;
|
||||
var b = Math.sin(h) * c;
|
||||
|
||||
var y = (l + 16) / 116;
|
||||
var x = isNaN(a) ? y : y + a / 500;
|
||||
var z = isNaN(b) ? y : y - b / 200;
|
||||
|
||||
y = Yn * lab2xyz(y);
|
||||
x = Xn * lab2xyz(x);
|
||||
z = Zn * lab2xyz(z);
|
||||
|
||||
pixel[0] = xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z);
|
||||
pixel[1] = xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z);
|
||||
pixel[2] = xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z);
|
||||
|
||||
return pixel;
|
||||
}
|
||||
|
||||
function xyz2lab(t) {
|
||||
return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
|
||||
}
|
||||
|
||||
function lab2xyz(t) {
|
||||
return t > t1 ? t * t * t : t2 * (t - t0);
|
||||
}
|
||||
|
||||
function rgb2xyz(x) {
|
||||
return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
||||
}
|
||||
|
||||
function xyz2rgb(x) {
|
||||
return 255 * (x <= 0.0031308 ?
|
||||
12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
|
||||
}
|
||||
|
||||
var raster = new ol.source.Raster({
|
||||
sources: [new ol.source.Stamen({
|
||||
layer: 'watercolor'
|
||||
})],
|
||||
operation: function(pixels, data) {
|
||||
var hcl = rgb2hcl(pixels[0]);
|
||||
|
||||
var h = hcl[0] + Math.PI * data.hue / 180;
|
||||
if (h < 0) {
|
||||
h += twoPi;
|
||||
} else if (h > twoPi) {
|
||||
h -= twoPi;
|
||||
}
|
||||
hcl[0] = h;
|
||||
|
||||
hcl[1] *= (data.chroma / 100);
|
||||
hcl[2] *= (data.lightness / 100);
|
||||
|
||||
return hcl2rgb(hcl);
|
||||
},
|
||||
lib: {
|
||||
rgb2hcl: rgb2hcl,
|
||||
hcl2rgb: hcl2rgb,
|
||||
rgb2xyz: rgb2xyz,
|
||||
lab2xyz: lab2xyz,
|
||||
xyz2lab: xyz2lab,
|
||||
xyz2rgb: xyz2rgb,
|
||||
Xn: Xn,
|
||||
Yn: Yn,
|
||||
Zn: Zn,
|
||||
t0: t0,
|
||||
t1: t1,
|
||||
t2: t2,
|
||||
t3: t3,
|
||||
twoPi: twoPi
|
||||
}
|
||||
});
|
||||
|
||||
var controls = {};
|
||||
|
||||
raster.on('beforeoperations', function(event) {
|
||||
var data = event.data;
|
||||
for (var id in controls) {
|
||||
data[id] = Number(controls[id].value);
|
||||
}
|
||||
});
|
||||
|
||||
var map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.Image({
|
||||
source: raster
|
||||
})
|
||||
],
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
center: [0, 2500000],
|
||||
zoom: 2,
|
||||
maxZoom: 18
|
||||
})
|
||||
});
|
||||
|
||||
var controlIds = ['hue', 'chroma', 'lightness'];
|
||||
controlIds.forEach(function(id) {
|
||||
var control = document.getElementById(id);
|
||||
var output = document.getElementById(id + 'Out');
|
||||
control.addEventListener('input', function() {
|
||||
output.innerText = control.value;
|
||||
raster.changed();
|
||||
});
|
||||
output.innerText = control.value;
|
||||
controls[id] = control;
|
||||
});
|
||||
@@ -1,13 +1,9 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Custom control example
|
||||
layout: example.html
|
||||
title: Custom Controls
|
||||
shortdesc: Shows how to create custom controls.
|
||||
docs: >
|
||||
This example creates a "rotate to north" button.
|
||||
tags: "custom, control"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -19,7 +19,6 @@ var app = window.app;
|
||||
//
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.control.Control}
|
||||
@@ -33,7 +32,7 @@ app.RotateNorthControl = function(opt_options) {
|
||||
button.innerHTML = 'N';
|
||||
|
||||
var this_ = this;
|
||||
var handleRotateNorth = function(e) {
|
||||
var handleRotateNorth = function() {
|
||||
this_.getMap().getView().setRotation(0);
|
||||
};
|
||||
|
||||
@@ -75,7 +74,7 @@ var map = new ol.Map({
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
zoom: 2,
|
||||
zoom: 3,
|
||||
rotation: 1
|
||||
})
|
||||
});
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Custom interaction example
|
||||
layout: example.html
|
||||
title: Custom Interactions
|
||||
shortdesc: Example of a custom interaction.
|
||||
docs: >
|
||||
This example demonstrates creating a custom interaction by subclassing `ol.interaction.Pointer`.
|
||||
Note that the built in interaction `ol.interaction.Translate` might be a better option for moving features.
|
||||
tags: "drag, feature, vector, editing, custom, interaction"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -19,9 +19,7 @@ goog.require('ol.style.Style');
|
||||
/**
|
||||
* Define a namespace for the application.
|
||||
*/
|
||||
window.app = {};
|
||||
var app = window.app;
|
||||
|
||||
var app = {};
|
||||
|
||||
|
||||
/**
|
||||
@@ -73,7 +71,7 @@ app.Drag.prototype.handleDownEvent = function(evt) {
|
||||
var map = evt.map;
|
||||
|
||||
var feature = map.forEachFeatureAtPixel(evt.pixel,
|
||||
function(feature, layer) {
|
||||
function(feature) {
|
||||
return feature;
|
||||
});
|
||||
|
||||
@@ -90,13 +88,6 @@ app.Drag.prototype.handleDownEvent = function(evt) {
|
||||
* @param {ol.MapBrowserEvent} evt Map browser event.
|
||||
*/
|
||||
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 deltaY = evt.coordinate[1] - this.coordinate_[1];
|
||||
|
||||
@@ -116,7 +107,7 @@ app.Drag.prototype.handleMoveEvent = function(evt) {
|
||||
if (this.cursor_) {
|
||||
var map = evt.map;
|
||||
var feature = map.forEachFeatureAtPixel(evt.pixel,
|
||||
function(feature, layer) {
|
||||
function(feature) {
|
||||
return feature;
|
||||
});
|
||||
var element = evt.map.getTargetElement();
|
||||
@@ -134,10 +125,9 @@ app.Drag.prototype.handleMoveEvent = function(evt) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.MapBrowserEvent} evt Map browser event.
|
||||
* @return {boolean} `false` to stop the drag sequence.
|
||||
*/
|
||||
app.Drag.prototype.handleUpEvent = function(evt) {
|
||||
app.Drag.prototype.handleUpEvent = function() {
|
||||
this.coordinate_ = null;
|
||||
this.feature_ = null;
|
||||
return false;
|
||||
@@ -159,7 +149,7 @@ var map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp'
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json'
|
||||
})
|
||||
}),
|
||||
new ol.layer.Vector({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
template: example.html
|
||||
title: d3 integration example
|
||||
layout: example.html
|
||||
title: d3 Integration
|
||||
shortdesc: Example of using ol3 and d3 together.
|
||||
docs: >
|
||||
<p>The example loads TopoJSON geometries and uses d3 (<code>d3.geo.path</code>) to render these geometries to a canvas element that is then used as the image of an ol3 image layer.</p>
|
||||
@@ -9,8 +9,4 @@ resources:
|
||||
- http://d3js.org/d3.v3.min.js
|
||||
- http://d3js.org/topojson.v1.min.js
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
3
examples/d3.js
vendored
3
examples/d3.js
vendored
@@ -1,5 +1,4 @@
|
||||
// NOCOMPILE
|
||||
// this example uses d3 for which we don't have an externs file.
|
||||
goog.require('ol');
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.View');
|
||||
@@ -40,7 +39,7 @@ d3.json('data/topojson/us.json', function(error, us) {
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {ol.Size} size Size.
|
||||
* @param {ol.proj.Projection} projection Projection.
|
||||
* @return {HTMLCanvasElement}
|
||||
* @return {HTMLCanvasElement} A canvas element.
|
||||
*/
|
||||
var canvasFunction = function(extent, resolution, pixelRatio,
|
||||
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 |
1
examples/data/openflights/flights.json
Normal file
1
examples/data/openflights/flights.json
Normal file
File diff suppressed because one or more lines are too long
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>
|
||||
@@ -1,23 +1,19 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Device-Orientation example
|
||||
layout: example.html
|
||||
title: Device Orientation
|
||||
shortdesc: Listen to DeviceOrientation events.
|
||||
docs: >
|
||||
This example shows how to track changes in device orientation.
|
||||
tags: "orientation, openstreetmap"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
<div class="span12">
|
||||
<h4 id="title">Device orientation example</h4>
|
||||
<label class="checkbox" for="track">
|
||||
<input id="track" type="checkbox"/>track changes
|
||||
</label>
|
||||
<p>α : <code id="alpha"></code></p>
|
||||
<p>β : <code id="beta"></code></p>
|
||||
<p>γ : <code id="gamma"></code></p>
|
||||
<p>heading : <code id="heading"></code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<label>
|
||||
track changes
|
||||
<input id="track" type="checkbox"/>
|
||||
</label>
|
||||
<p>
|
||||
α : <code id="alpha"></code>
|
||||
β : <code id="beta"></code>
|
||||
γ : <code id="gamma"></code>
|
||||
heading : <code id="heading"></code>
|
||||
</p>
|
||||
|
||||
@@ -39,7 +39,7 @@ el('track').addEventListener('change', function() {
|
||||
deviceOrientation.setTracking(this.checked);
|
||||
});
|
||||
|
||||
deviceOrientation.on('change', function(event) {
|
||||
deviceOrientation.on('change', function() {
|
||||
el('alpha').innerText = deviceOrientation.getAlpha() + ' [rad]';
|
||||
el('beta').innerText = deviceOrientation.getBeta() + ' [rad]';
|
||||
el('gamma').innerText = deviceOrientation.getGamma() + ' [rad]';
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Drag-and-Drop image vector example
|
||||
shortdesc: 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.
|
||||
layout: example.html
|
||||
title: Drag-and-Drop Image Vector
|
||||
shortdesc: Example of using the drag-and-drop interaction with a ol.source.ImageVector.
|
||||
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"
|
||||
cloak:
|
||||
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://bingmapsportal.com/ here
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
<div class="span4 offset4 pull-right">
|
||||
<div id="info" class="alert alert-success">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<div id="info"> </div>
|
||||
|
||||
@@ -19,7 +19,7 @@ goog.require('ol.style.Style');
|
||||
|
||||
|
||||
var defaultStyle = {
|
||||
'Point': [new ol.style.Style({
|
||||
'Point': new ol.style.Style({
|
||||
image: new ol.style.Circle({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(255,255,0,0.5)'
|
||||
@@ -30,14 +30,14 @@ var defaultStyle = {
|
||||
width: 1
|
||||
})
|
||||
})
|
||||
})],
|
||||
'LineString': [new ol.style.Style({
|
||||
}),
|
||||
'LineString': new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: '#f00',
|
||||
width: 3
|
||||
})
|
||||
})],
|
||||
'Polygon': [new ol.style.Style({
|
||||
}),
|
||||
'Polygon': new ol.style.Style({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(0,255,255,0.5)'
|
||||
}),
|
||||
@@ -45,8 +45,8 @@ var defaultStyle = {
|
||||
color: '#0ff',
|
||||
width: 1
|
||||
})
|
||||
})],
|
||||
'MultiPoint': [new ol.style.Style({
|
||||
}),
|
||||
'MultiPoint': new ol.style.Style({
|
||||
image: new ol.style.Circle({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(255,0,255,0.5)'
|
||||
@@ -57,14 +57,14 @@ var defaultStyle = {
|
||||
width: 1
|
||||
})
|
||||
})
|
||||
})],
|
||||
'MultiLineString': [new ol.style.Style({
|
||||
}),
|
||||
'MultiLineString': new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: '#0f0',
|
||||
width: 3
|
||||
})
|
||||
})],
|
||||
'MultiPolygon': [new ol.style.Style({
|
||||
}),
|
||||
'MultiPolygon': new ol.style.Style({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(0,0,255,0.5)'
|
||||
}),
|
||||
@@ -72,7 +72,7 @@ var defaultStyle = {
|
||||
color: '#00f',
|
||||
width: 1
|
||||
})
|
||||
})]
|
||||
})
|
||||
};
|
||||
|
||||
var styleFunction = function(feature, resolution) {
|
||||
@@ -100,7 +100,7 @@ var map = new ol.Map({
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.BingMaps({
|
||||
imagerySet: 'Aerial',
|
||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3'
|
||||
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF'
|
||||
})
|
||||
})
|
||||
],
|
||||
@@ -128,7 +128,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
|
||||
|
||||
var displayFeatureInfo = function(pixel) {
|
||||
var features = [];
|
||||
map.forEachFeatureAtPixel(pixel, function(feature, layer) {
|
||||
map.forEachFeatureAtPixel(pixel, function(feature) {
|
||||
features.push(feature);
|
||||
});
|
||||
if (features.length > 0) {
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Drag-and-Drop example
|
||||
shortdesc: 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.
|
||||
layout: example.html
|
||||
title: Drag-and-Drop
|
||||
shortdesc: Example of using the drag-and-drop interaction.
|
||||
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"
|
||||
cloak:
|
||||
AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF: Your Bing Maps Key from http://bingmapsportal.com/ here
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
<div class="span4 offset4 pull-right">
|
||||
<div id="info" class="alert alert-success">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<div id="info"> </div>
|
||||
|
||||
@@ -18,7 +18,7 @@ goog.require('ol.style.Style');
|
||||
|
||||
|
||||
var defaultStyle = {
|
||||
'Point': [new ol.style.Style({
|
||||
'Point': new ol.style.Style({
|
||||
image: new ol.style.Circle({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(255,255,0,0.5)'
|
||||
@@ -29,14 +29,14 @@ var defaultStyle = {
|
||||
width: 1
|
||||
})
|
||||
})
|
||||
})],
|
||||
'LineString': [new ol.style.Style({
|
||||
}),
|
||||
'LineString': new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: '#f00',
|
||||
width: 3
|
||||
})
|
||||
})],
|
||||
'Polygon': [new ol.style.Style({
|
||||
}),
|
||||
'Polygon': new ol.style.Style({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(0,255,255,0.5)'
|
||||
}),
|
||||
@@ -44,8 +44,8 @@ var defaultStyle = {
|
||||
color: '#0ff',
|
||||
width: 1
|
||||
})
|
||||
})],
|
||||
'MultiPoint': [new ol.style.Style({
|
||||
}),
|
||||
'MultiPoint': new ol.style.Style({
|
||||
image: new ol.style.Circle({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(255,0,255,0.5)'
|
||||
@@ -56,14 +56,14 @@ var defaultStyle = {
|
||||
width: 1
|
||||
})
|
||||
})
|
||||
})],
|
||||
'MultiLineString': [new ol.style.Style({
|
||||
}),
|
||||
'MultiLineString': new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: '#0f0',
|
||||
width: 3
|
||||
})
|
||||
})],
|
||||
'MultiPolygon': [new ol.style.Style({
|
||||
}),
|
||||
'MultiPolygon': new ol.style.Style({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(0,0,255,0.5)'
|
||||
}),
|
||||
@@ -71,7 +71,7 @@ var defaultStyle = {
|
||||
color: '#00f',
|
||||
width: 1
|
||||
})
|
||||
})]
|
||||
})
|
||||
};
|
||||
|
||||
var styleFunction = function(feature, resolution) {
|
||||
@@ -99,7 +99,7 @@ var map = new ol.Map({
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.BingMaps({
|
||||
imagerySet: 'Aerial',
|
||||
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3'
|
||||
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF'
|
||||
})
|
||||
})
|
||||
],
|
||||
@@ -124,7 +124,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
|
||||
|
||||
var displayFeatureInfo = function(pixel) {
|
||||
var features = [];
|
||||
map.forEachFeatureAtPixel(pixel, function(feature, layer) {
|
||||
map.forEachFeatureAtPixel(pixel, function(feature) {
|
||||
features.push(feature);
|
||||
});
|
||||
if (features.length > 0) {
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Drag rotate and zoom example
|
||||
layout: example.html
|
||||
title: Drag, Rotate, and Zoom
|
||||
shortdesc: A single interaction to drag, rotate, and zoom.
|
||||
docs: >
|
||||
<p><code>Shift</code> + Drag to rotate and zoom the map around its center.</p>
|
||||
<p><code>Shift+Drag</code> to rotate and zoom the map around its center.</p>
|
||||
tags: "drag, rotate, zoom, interaction"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Draw and modify features example
|
||||
layout: example.html
|
||||
title: Draw and Modify Features
|
||||
shortdesc: Example of using the ol.interaction.Draw interaction together with the ol.interaction.Modify interaction.
|
||||
docs: >
|
||||
Example of using the ol.interaction.Draw interaction together with the ol.interaction.Modify interaction.
|
||||
tags: "draw, edit, modify, vector, featureoverlay"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
<form class="form-inline">
|
||||
<label>Geometry type </label>
|
||||
<select id="type">
|
||||
<option value="Point">Point</option>
|
||||
<option value="LineString">LineString</option>
|
||||
<option value="Polygon">Polygon</option>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<form class="form-inline">
|
||||
<label>Geometry type </label>
|
||||
<select id="type">
|
||||
<option value="Point">Point</option>
|
||||
<option value="LineString">LineString</option>
|
||||
<option value="Polygon">Polygon</option>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
@@ -60,6 +60,8 @@ var modify = new ol.interaction.Modify({
|
||||
map.addInteraction(modify);
|
||||
|
||||
var draw; // global so we can remove it later
|
||||
var typeSelect = document.getElementById('type');
|
||||
|
||||
function addInteraction() {
|
||||
draw = new ol.interaction.Draw({
|
||||
features: features,
|
||||
@@ -68,14 +70,11 @@ function addInteraction() {
|
||||
map.addInteraction(draw);
|
||||
}
|
||||
|
||||
var typeSelect = document.getElementById('type');
|
||||
|
||||
|
||||
/**
|
||||
* Let user change the geometry type.
|
||||
* @param {Event} e Change event.
|
||||
* Handle change event.
|
||||
*/
|
||||
typeSelect.onchange = function(e) {
|
||||
typeSelect.onchange = function() {
|
||||
map.removeInteraction(draw);
|
||||
addInteraction();
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Draw features example
|
||||
layout: example.html
|
||||
title: Draw Features
|
||||
shortdesc: Example of using the ol.interaction.Draw interaction.
|
||||
docs: >
|
||||
Example of using the Draw interaction. Select a geometry type from the
|
||||
@@ -12,20 +12,16 @@ docs: >
|
||||
points and creates a rectangular box.
|
||||
tags: "draw, edit, freehand, vector"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
<form class="form-inline">
|
||||
<label>Geometry type </label>
|
||||
<select id="type">
|
||||
<option value="None">None</option>
|
||||
<option value="Point">Point</option>
|
||||
<option value="LineString">LineString</option>
|
||||
<option value="Polygon">Polygon</option>
|
||||
<option value="Circle">Circle</option>
|
||||
<option value="Square">Square</option>
|
||||
<option value="Box">Box</option>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<form class="form-inline">
|
||||
<label>Geometry type </label>
|
||||
<select id="type">
|
||||
<option value="Point">Point</option>
|
||||
<option value="LineString">LineString</option>
|
||||
<option value="Polygon">Polygon</option>
|
||||
<option value="Circle">Circle</option>
|
||||
<option value="Square">Square</option>
|
||||
<option value="Box">Box</option>
|
||||
<option value="None">None</option>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
@@ -83,10 +83,9 @@ function addInteraction() {
|
||||
|
||||
|
||||
/**
|
||||
* Let user change the geometry type.
|
||||
* @param {Event} e Change event.
|
||||
* Handle change event.
|
||||
*/
|
||||
typeSelect.onchange = function(e) {
|
||||
typeSelect.onchange = function() {
|
||||
map.removeInteraction(draw);
|
||||
addInteraction();
|
||||
};
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Dynamic data example
|
||||
layout: example.html
|
||||
title: Dynamic Data
|
||||
shortdesc: Example of dynamic data.
|
||||
docs: >
|
||||
Example of dynamic data.
|
||||
tags: "dynamic-data"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
template: example.html
|
||||
layout: example.html
|
||||
title: Earthquake Clusters
|
||||
shortdesc: Demonstrates the use of style geometries to render source features of a cluster.
|
||||
docs: >
|
||||
@@ -9,8 +9,4 @@ docs: >
|
||||
<p>To achieve this, we make heavy use of style functions and <code>ol.style.Style#geometry</code>.</p>
|
||||
tags: "KML, vector, style, geometry, cluster"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -56,7 +56,7 @@ function createEarthquakeStyle(feature) {
|
||||
});
|
||||
}
|
||||
|
||||
var maxFeatureCount;
|
||||
var maxFeatureCount, vector;
|
||||
function calculateClusterInfo(resolution) {
|
||||
maxFeatureCount = 0;
|
||||
var features = vector.getSource().getFeatures();
|
||||
@@ -65,7 +65,8 @@ function calculateClusterInfo(resolution) {
|
||||
feature = features[i];
|
||||
var originalFeatures = feature.get('features');
|
||||
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());
|
||||
}
|
||||
maxFeatureCount = Math.max(maxFeatureCount, jj);
|
||||
@@ -84,7 +85,7 @@ function styleFunction(feature, resolution) {
|
||||
var style;
|
||||
var size = feature.get('features').length;
|
||||
if (size > 1) {
|
||||
style = [new ol.style.Style({
|
||||
style = new ol.style.Style({
|
||||
image: new ol.style.Circle({
|
||||
radius: feature.get('radius'),
|
||||
fill: new ol.style.Fill({
|
||||
@@ -96,15 +97,15 @@ function styleFunction(feature, resolution) {
|
||||
fill: textFill,
|
||||
stroke: textStroke
|
||||
})
|
||||
})];
|
||||
});
|
||||
} else {
|
||||
var originalFeature = feature.get('features')[0];
|
||||
style = [createEarthquakeStyle(originalFeature)];
|
||||
style = createEarthquakeStyle(originalFeature);
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
function selectStyleFunction(feature, resolution) {
|
||||
function selectStyleFunction(feature) {
|
||||
var styles = [new ol.style.Style({
|
||||
image: new ol.style.Circle({
|
||||
radius: feature.get('radius'),
|
||||
@@ -120,7 +121,7 @@ function selectStyleFunction(feature, resolution) {
|
||||
return styles;
|
||||
}
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
vector = new ol.layer.Vector({
|
||||
source: new ol.source.Cluster({
|
||||
distance: 40,
|
||||
source: new ol.source.Vector({
|
||||
|
||||
9
examples/earthquake-custom-symbol.html
Normal file
9
examples/earthquake-custom-symbol.html
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: example.html
|
||||
title: Earthquakes with custom symbols
|
||||
shortdesc: Demonstrates the use of `ol.render.toCanvas` to create custom icon symbols.
|
||||
docs: >
|
||||
This example parses a KML file and renders the features as a vector layer. The layer is given a <code>style</code> that renders earthquake locations with a custom lightning symbol and a size relative to their magnitude.
|
||||
tags: "KML, vector, style, canvas, symbol"
|
||||
---
|
||||
<div id="map" class="map"></div>
|
||||
71
examples/earthquake-custom-symbol.js
Normal file
71
examples/earthquake-custom-symbol.js
Normal file
@@ -0,0 +1,71 @@
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.View');
|
||||
goog.require('ol.format.KML');
|
||||
goog.require('ol.geom.Polygon');
|
||||
goog.require('ol.layer.Tile');
|
||||
goog.require('ol.layer.Vector');
|
||||
goog.require('ol.render');
|
||||
goog.require('ol.source.Stamen');
|
||||
goog.require('ol.source.Vector');
|
||||
goog.require('ol.style.Fill');
|
||||
goog.require('ol.style.Icon');
|
||||
goog.require('ol.style.Stroke');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
|
||||
var styleCache = {};
|
||||
var styleFunction = function(feature) {
|
||||
// 2012_Earthquakes_Mag5.kml stores the magnitude of each earthquake in a
|
||||
// standards-violating <magnitude> tag in each Placemark. We extract it from
|
||||
// the Placemark's name instead.
|
||||
var name = feature.get('name');
|
||||
var magnitude = parseFloat(name.substr(2));
|
||||
var size = parseInt(10 + 40 * (magnitude - 5), 10);
|
||||
var style = styleCache[size];
|
||||
if (!style) {
|
||||
var canvas =
|
||||
/** @type {HTMLCanvasElement} */ (document.createElement('canvas'));
|
||||
var render = ol.render.toContext(
|
||||
/** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d')),
|
||||
{size: [size + 2, size + 2], pixelRatio: size / 10});
|
||||
render.setFillStrokeStyle(
|
||||
new ol.style.Fill({color: 'rgba(255, 153, 0, 0.4)'}),
|
||||
new ol.style.Stroke({color: 'rgba(255, 204, 0, 0.2)', width: 1}));
|
||||
render.drawPolygonGeometry(new ol.geom.Polygon(
|
||||
[[[0, 0], [4, 2], [6, 0], [10, 5], [6, 3], [4, 5], [0, 0]]]));
|
||||
style = new ol.style.Style({
|
||||
image: new ol.style.Icon({
|
||||
img: canvas,
|
||||
imgSize: [canvas.width, canvas.height],
|
||||
rotation: 1.2
|
||||
})
|
||||
});
|
||||
styleCache[size] = style;
|
||||
}
|
||||
return style;
|
||||
};
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.Vector({
|
||||
url: 'data/kml/2012_Earthquakes_Mag5.kml',
|
||||
format: new ol.format.KML({
|
||||
extractStyles: false
|
||||
})
|
||||
}),
|
||||
style: styleFunction
|
||||
});
|
||||
|
||||
var raster = new ol.layer.Tile({
|
||||
source: new ol.source.Stamen({
|
||||
layer: 'toner'
|
||||
})
|
||||
});
|
||||
|
||||
var map = new ol.Map({
|
||||
layers: [raster, vector],
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
zoom: 2
|
||||
})
|
||||
});
|
||||
@@ -1,13 +1,9 @@
|
||||
---
|
||||
template: example.html
|
||||
title: EPSG:4326 example
|
||||
layout: example.html
|
||||
title: EPSG:4326
|
||||
shortdesc: Example of a map in EPSG:4326.
|
||||
docs: >
|
||||
This example shows how to create a map in EPSG:4326.
|
||||
tags: "epsg4326"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Export map example
|
||||
layout: example.html
|
||||
title: Map Export
|
||||
shortdesc: Example of exporting a map as a PNG image.
|
||||
docs: >
|
||||
Example of exporting a map as a PNG image.
|
||||
tags: "export, png, openstreetmap"
|
||||
---
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
<div id="no-download" class="alert alert-danger" style="display: none">
|
||||
This example requires a browser that supports the
|
||||
<a href="http://caniuse.com/#feat=download">link download</a> attribute.
|
||||
</div>
|
||||
<a id="export-png" class="btn btn-default" download="map.png"><i class="fa fa-download"></i> Export PNG</a>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
<div id="no-download" class="alert alert-danger" style="display: none">
|
||||
This example requires a browser that supports the
|
||||
<a href="http://caniuse.com/#feat=download">link download</a> attribute.
|
||||
</div>
|
||||
<a id="export-png" class="btn btn-default" download="map.png"><i class="fa fa-download"></i> Download PNG</a>
|
||||
|
||||
@@ -34,7 +34,7 @@ var map = new ol.Map({
|
||||
var exportPNGElement = document.getElementById('export-png');
|
||||
|
||||
if ('download' in exportPNGElement) {
|
||||
exportPNGElement.addEventListener('click', function(e) {
|
||||
exportPNGElement.addEventListener('click', function() {
|
||||
map.once('postcompose', function(event) {
|
||||
var canvas = event.context.canvas;
|
||||
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>
|
||||
109
examples/export-pdf.js
Normal file
109
examples/export-pdf.js
Normal file
@@ -0,0 +1,109 @@
|
||||
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);
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
template: example.html
|
||||
title: Feature animation example
|
||||
layout: example.html
|
||||
title: Custom Animation
|
||||
shortdesc: Demonstrates how to animate features.
|
||||
docs: >
|
||||
This example shows how to use <b>postcompose</b> and <b>vectorContext</b> to
|
||||
@@ -8,8 +8,4 @@ docs: >
|
||||
is added to the layer.
|
||||
tags: "animation, vector, feature, flash"
|
||||
---
|
||||
<div class="row">
|
||||
<div class="span8">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -83,7 +83,7 @@ function flash(feature) {
|
||||
return;
|
||||
}
|
||||
// tell OL3 to continue postcompose animation
|
||||
frameState.animate = true;
|
||||
map.render();
|
||||
}
|
||||
listenerKey = map.on('postcompose', animate);
|
||||
}
|
||||
|
||||
16
examples/feature-move-animation.html
Normal file
16
examples/feature-move-animation.html
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
layout: example.html
|
||||
title: Marker Animation
|
||||
shortdesc: Demonstrates how to move a feature along a line.
|
||||
docs: >
|
||||
This example shows how to use <b>postcompose</b> and <b>vectorContext</b> to
|
||||
animate a (marker) feature along a line. In this example an encoded polyline
|
||||
is being used.
|
||||
tags: "animation, feature, postcompose, polyline"
|
||||
---
|
||||
<div id="map" class="map"></div>
|
||||
<label for="speed">
|
||||
speed:
|
||||
<input id="speed" type="range" min="10" max="999" step="10" value="60">
|
||||
</label>
|
||||
<button id="start-animation">Start Animation</button>
|
||||
206
examples/feature-move-animation.js
Normal file
206
examples/feature-move-animation.js
Normal file
@@ -0,0 +1,206 @@
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.View');
|
||||
goog.require('ol.format.Polyline');
|
||||
goog.require('ol.geom.Point');
|
||||
goog.require('ol.layer.Tile');
|
||||
goog.require('ol.layer.Vector');
|
||||
goog.require('ol.source.BingMaps');
|
||||
goog.require('ol.source.Vector');
|
||||
goog.require('ol.style.Circle');
|
||||
goog.require('ol.style.Fill');
|
||||
goog.require('ol.style.Icon');
|
||||
goog.require('ol.style.Stroke');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
// This long string is placed here due to jsFiddle limitations.
|
||||
// It is usually loaded with AJAX.
|
||||
var polyline = [
|
||||
'hldhx@lnau`BCG_EaC??cFjAwDjF??uBlKMd@}@z@??aC^yk@z_@se@b[wFdE??wFfE}N',
|
||||
'fIoGxB_I\\gG}@eHoCyTmPqGaBaHOoD\\??yVrGotA|N??o[N_STiwAtEmHGeHcAkiA}^',
|
||||
'aMyBiHOkFNoI`CcVvM??gG^gF_@iJwC??eCcA]OoL}DwFyCaCgCcCwDcGwHsSoX??wI_E',
|
||||
'kUFmq@hBiOqBgTwS??iYse@gYq\\cp@ce@{vA}s@csJqaE}{@iRaqE{lBeRoIwd@_T{]_',
|
||||
'Ngn@{PmhEwaA{SeF_u@kQuyAw]wQeEgtAsZ}LiCarAkVwI}D??_}RcjEinPspDwSqCgs@',
|
||||
'sPua@_OkXaMeT_Nwk@ob@gV}TiYs[uTwXoNmT{Uyb@wNg]{Nqa@oDgNeJu_@_G}YsFw]k',
|
||||
'DuZyDmm@i_@uyIJe~@jCg|@nGiv@zUi_BfNqaAvIow@dEed@dCcf@r@qz@Egs@{Acu@mC',
|
||||
'um@yIey@gGig@cK_m@aSku@qRil@we@{mAeTej@}Tkz@cLgr@aHko@qOmcEaJw~C{w@ka',
|
||||
'i@qBchBq@kmBS{kDnBscBnFu_Dbc@_~QHeU`IuyDrC_}@bByp@fCyoA?qMbD}{AIkeAgB',
|
||||
'k_A_A{UsDke@gFej@qH{o@qGgb@qH{`@mMgm@uQus@kL{_@yOmd@ymBgwE}x@ouBwtA__',
|
||||
'DuhEgaKuWct@gp@cnBii@mlBa_@}|Asj@qrCg^eaC}L{dAaJ_aAiOyjByH{nAuYu`GsAw',
|
||||
'Xyn@ywMyOyqD{_@cfIcDe}@y@aeBJmwA`CkiAbFkhBlTgdDdPyiB`W}xDnSa}DbJyhCrX',
|
||||
'itAhT}x@bE}Z_@qW_Kwv@qKaaAiBgXvIm}A~JovAxCqW~WanB`XewBbK{_A`K}fBvAmi@',
|
||||
'xBycBeCauBoF}}@qJioAww@gjHaPopA_NurAyJku@uGmi@cDs[eRaiBkQstAsQkcByNma',
|
||||
'CsK_uBcJgbEw@gkB_@ypEqDoqSm@eZcDwjBoGw`BoMegBaU_`Ce_@_uBqb@ytBwkFqiT_',
|
||||
'fAqfEwe@mfCka@_eC_UmlB}MmaBeWkkDeHwqAoX}~DcBsZmLcxBqOwqE_DkyAuJmrJ\\o',
|
||||
'~CfIewG|YibQxBssB?es@qGciA}RorAoVajA_nAodD{[y`AgPqp@mKwr@ms@umEaW{dAm',
|
||||
'b@umAw|@ojBwzDaaJsmBwbEgdCsrFqhAihDquAi`Fux@}_Dui@_eB_u@guCuyAuiHukA_',
|
||||
'lKszAu|OmaA{wKm}@clHs_A_rEahCssKo\\sgBsSglAqk@yvDcS_wAyTwpBmPc|BwZknF',
|
||||
'oFscB_GsaDiZmyMyLgtHgQonHqT{hKaPg}Dqq@m~Hym@c`EuiBudIabB{hF{pWifx@snA',
|
||||
'w`GkFyVqf@y~BkoAi}Lel@wtc@}`@oaXi_C}pZsi@eqGsSuqJ|Lqeb@e]kgPcaAu}SkDw',
|
||||
'zGhn@gjYh\\qlNZovJieBqja@ed@siO{[ol\\kCmjMe\\isHorCmec@uLebB}EqiBaCg}',
|
||||
'@m@qwHrT_vFps@kkI`uAszIrpHuzYxx@e{Crw@kpDhN{wBtQarDy@knFgP_yCu\\wyCwy',
|
||||
'A{kHo~@omEoYmoDaEcPiuAosDagD}rO{{AsyEihCayFilLaiUqm@_bAumFo}DgqA_uByi',
|
||||
'@swC~AkzDlhA}xEvcBa}Cxk@ql@`rAo|@~bBq{@``Bye@djDww@z_C_cAtn@ye@nfC_eC',
|
||||
'|gGahH~s@w}@``Fi~FpnAooC|u@wlEaEedRlYkrPvKerBfYs}Arg@m}AtrCkzElw@gjBb',
|
||||
'h@woBhR{gCwGkgCc[wtCuOapAcFoh@uBy[yBgr@c@iq@o@wvEv@sp@`FajBfCaq@fIipA',
|
||||
'dy@ewJlUc`ExGuaBdEmbBpBssArAuqBBg}@s@g{AkB{bBif@_bYmC}r@kDgm@sPq_BuJ_',
|
||||
's@{X_{AsK_d@eM{d@wVgx@oWcu@??aDmOkNia@wFoSmDyMyCkPiBePwAob@XcQ|@oNdCo',
|
||||
'SfFwXhEmOnLi\\lbAulB`X_d@|k@au@bc@oc@bqC}{BhwDgcD`l@ed@??bL{G|a@eTje@',
|
||||
'oS~]cLr~Bgh@|b@}Jv}EieAlv@sPluD{z@nzA_]`|KchCtd@sPvb@wSb{@ko@f`RooQ~e',
|
||||
'[upZbuIolI|gFafFzu@iq@nMmJ|OeJn^{Qjh@yQhc@uJ~j@iGdd@kAp~BkBxO{@|QsAfY',
|
||||
'gEtYiGd]}Jpd@wRhVoNzNeK`j@ce@vgK}cJnSoSzQkVvUm^rSgc@`Uql@xIq\\vIgg@~k',
|
||||
'Dyq[nIir@jNoq@xNwc@fYik@tk@su@neB}uBhqEesFjoGeyHtCoD|D}Ed|@ctAbIuOzqB',
|
||||
'_}D~NgY`\\um@v[gm@v{Cw`G`w@o{AdjAwzBh{C}`Gpp@ypAxn@}mAfz@{bBbNia@??jI',
|
||||
'ab@`CuOlC}YnAcV`@_^m@aeB}@yk@YuTuBg^uCkZiGk\\yGeY}Lu_@oOsZiTe[uWi[sl@',
|
||||
'mo@soAauAsrBgzBqgAglAyd@ig@asAcyAklA}qAwHkGi{@s~@goAmsAyDeEirB_{B}IsJ',
|
||||
'uEeFymAssAkdAmhAyTcVkFeEoKiH}l@kp@wg@sj@ku@ey@uh@kj@}EsFmG}Jk^_r@_f@m',
|
||||
'~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL'
|
||||
].join('');
|
||||
|
||||
var route = /** @type {ol.geom.LineString} */ (new ol.format.Polyline({
|
||||
factor: 1e6
|
||||
}).readGeometry(polyline, {
|
||||
dataProjection: 'EPSG:4326',
|
||||
featureProjection: 'EPSG:3857'
|
||||
}));
|
||||
|
||||
var routeCoords = route.getCoordinates();
|
||||
var routeLength = routeCoords.length;
|
||||
|
||||
var routeFeature = new ol.Feature({
|
||||
type: 'route',
|
||||
geometry: route
|
||||
});
|
||||
var geoMarker = new ol.Feature({
|
||||
type: 'geoMarker',
|
||||
geometry: new ol.geom.Point(routeCoords[0])
|
||||
});
|
||||
var startMarker = new ol.Feature({
|
||||
type: 'icon',
|
||||
geometry: new ol.geom.Point(routeCoords[0])
|
||||
});
|
||||
var endMarker = new ol.Feature({
|
||||
type: 'icon',
|
||||
geometry: new ol.geom.Point(routeCoords[routeLength - 1])
|
||||
});
|
||||
|
||||
var styles = {
|
||||
'route': new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
width: 6, color: [237, 212, 0, 0.8]
|
||||
})
|
||||
}),
|
||||
'icon': new ol.style.Style({
|
||||
image: new ol.style.Icon({
|
||||
anchor: [0.5, 1],
|
||||
src: 'data/icon.png'
|
||||
})
|
||||
}),
|
||||
'geoMarker': new ol.style.Style({
|
||||
image: new ol.style.Circle({
|
||||
radius: 7,
|
||||
snapToPixel: false,
|
||||
fill: new ol.style.Fill({color: 'black'}),
|
||||
stroke: new ol.style.Stroke({
|
||||
color: 'white', width: 2
|
||||
})
|
||||
})
|
||||
})
|
||||
};
|
||||
|
||||
var animating = false;
|
||||
var speed, now;
|
||||
var speedInput = document.getElementById('speed');
|
||||
var startButton = document.getElementById('start-animation');
|
||||
|
||||
var vectorLayer = new ol.layer.Vector({
|
||||
source: new ol.source.Vector({
|
||||
features: [routeFeature, geoMarker, startMarker, endMarker]
|
||||
}),
|
||||
style: function(feature) {
|
||||
// hide geoMarker if animation is active
|
||||
if (animating && feature.get('type') === 'geoMarker') {
|
||||
return null;
|
||||
}
|
||||
return styles[feature.get('type')];
|
||||
}
|
||||
});
|
||||
|
||||
var center = [-5639523.95, -3501274.52];
|
||||
var map = new ol.Map({
|
||||
target: document.getElementById('map'),
|
||||
loadTilesWhileAnimating: true,
|
||||
view: new ol.View({
|
||||
center: center,
|
||||
zoom: 10,
|
||||
minZoom: 2,
|
||||
maxZoom: 19
|
||||
}),
|
||||
layers: [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.BingMaps({
|
||||
imagerySet: 'AerialWithLabels',
|
||||
key: 'AkGbxXx6tDWf1swIhPJyoAVp06H0s0gDTYslNWWHZ6RoPqMpB9ld5FY1WutX8UoF'
|
||||
})
|
||||
}),
|
||||
vectorLayer
|
||||
]
|
||||
});
|
||||
|
||||
var moveFeature = function(event) {
|
||||
var vectorContext = event.vectorContext;
|
||||
var frameState = event.frameState;
|
||||
|
||||
if (animating) {
|
||||
var elapsedTime = frameState.time - now;
|
||||
// here the trick to increase speed is to jump some indexes
|
||||
// on lineString coordinates
|
||||
var index = Math.round(speed * elapsedTime / 1000);
|
||||
|
||||
if (index >= routeLength) {
|
||||
stopAnimation(true);
|
||||
return;
|
||||
}
|
||||
|
||||
var currentPoint = new ol.geom.Point(routeCoords[index]);
|
||||
var feature = new ol.Feature(currentPoint);
|
||||
vectorContext.drawFeature(feature, styles.geoMarker);
|
||||
}
|
||||
// tell OL3 to continue the postcompose animation
|
||||
map.render();
|
||||
};
|
||||
|
||||
function startAnimation() {
|
||||
if (animating) {
|
||||
stopAnimation(false);
|
||||
} else {
|
||||
animating = true;
|
||||
now = new Date().getTime();
|
||||
speed = speedInput.value;
|
||||
startButton.textContent = 'Cancel Animation';
|
||||
// hide geoMarker
|
||||
geoMarker.setStyle(null);
|
||||
// just in case you pan somewhere else
|
||||
map.getView().setCenter(center);
|
||||
map.on('postcompose', moveFeature);
|
||||
map.render();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} ended end of animation.
|
||||
*/
|
||||
function stopAnimation(ended) {
|
||||
animating = false;
|
||||
startButton.textContent = 'Start Animation';
|
||||
|
||||
// if animation cancelled set the marker at the beginning
|
||||
var coord = ended ? routeCoords[routeLength - 1] : routeCoords[0];
|
||||
/** @type {ol.geom.Point} */ (geoMarker.getGeometry())
|
||||
.setCoordinates(coord);
|
||||
//remove listener
|
||||
map.un('postcompose', moveFeature);
|
||||
}
|
||||
|
||||
startButton.addEventListener('click', startAnimation, false);
|
||||
17
examples/flight-animation.html
Normal file
17
examples/flight-animation.html
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
layout: example.html
|
||||
title: Flight Animation
|
||||
shortdesc: Demonstrates how to animate flights with ´postcompose´.
|
||||
docs: >
|
||||
This example shows how to use <b>postcompose</b> and <b>vectorContext</b> to
|
||||
animate flights. A great circle arc between two airports is calculated using
|
||||
<a href="https://github.com/springmeyer/arc.js">arc.js</a> and then the flight
|
||||
paths are animated with <b>postcompose</b>. The flight data is provided by
|
||||
<a href="http://openflights.org/data.html">OpenFlights</a> (a simplified data
|
||||
set from the <a href="https://www.mapbox.com/mapbox.js/example/v1.0.0/animating-flight-paths/">
|
||||
Mapbox.js documentation</a> is used).
|
||||
tags: "animation, vector, feature, flights, arc"
|
||||
resources:
|
||||
- https://api.mapbox.com/mapbox.js/plugins/arc.js/v0.1.0/arc.js
|
||||
---
|
||||
<div id="map" class="map"></div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user