Compare commits
431 Commits
release-1.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b9f8b0e90 | ||
|
|
130e527702 | ||
|
|
f9fdb04f8c | ||
|
|
e295aee763 | ||
|
|
760e1ca014 | ||
|
|
c0fc945824 | ||
|
|
24381c2f37 | ||
|
|
cea09f7fdb | ||
|
|
25b539d8bb | ||
|
|
c76dc1c211 | ||
|
|
c5afbacc93 | ||
|
|
a210e16479 | ||
|
|
9cf595df01 | ||
|
|
7ce7f2484b | ||
|
|
6793507a34 | ||
|
|
c8e7d93f95 | ||
|
|
84a677f910 | ||
|
|
9d0c94d915 | ||
|
|
4a65590d3e | ||
|
|
720c8507f7 | ||
|
|
28bff61128 | ||
|
|
8305808bee | ||
|
|
83f26a9336 | ||
|
|
e1878d3f65 | ||
|
|
244e9543cd | ||
|
|
b157687eb2 | ||
|
|
cab72e3299 | ||
|
|
861335f356 | ||
|
|
899101ef0b | ||
|
|
31692f51fe | ||
|
|
e906982443 | ||
|
|
9b355b76dc | ||
|
|
00e354511e | ||
|
|
74f5b814eb | ||
|
|
6fd2302450 | ||
|
|
dd3dcef4ed | ||
|
|
e8bd5086df | ||
|
|
e1a1b94582 | ||
|
|
4b0d947f3e | ||
|
|
51c86b7b3c | ||
|
|
ae704e5158 | ||
|
|
33499f59e9 | ||
|
|
7a1ae31fc4 | ||
|
|
d1ac37984e | ||
|
|
a2ded73387 | ||
|
|
ef00010111 | ||
|
|
0c1caaf717 | ||
|
|
8be2cfbc71 | ||
|
|
ecdb77fa9c | ||
|
|
954d0b351a | ||
|
|
57161a94be | ||
|
|
693eab5cc9 | ||
|
|
d486e1964b | ||
|
|
b9c6293b2c | ||
|
|
f582775d11 | ||
|
|
a8891101d6 | ||
|
|
b6200568d4 | ||
|
|
84d4e70fa5 | ||
|
|
e9331479dc | ||
|
|
7ed62ba639 | ||
|
|
9233d5446d | ||
|
|
104e509eb9 | ||
|
|
282d9d6047 | ||
|
|
2871b2c38c | ||
|
|
87c30e9e4e | ||
|
|
c687fcaa1b | ||
|
|
dad6bc4c0e | ||
|
|
7df337279e | ||
|
|
db107fe884 | ||
|
|
2ee5996d54 | ||
|
|
d567b523c4 | ||
|
|
c932a87d3f | ||
|
|
e955fcc6da | ||
|
|
2f2dcf2f09 | ||
|
|
e76f87e0df | ||
|
|
5c4a35b840 | ||
|
|
7bf1112c81 | ||
|
|
1d31d524d0 | ||
|
|
ef83f182ca | ||
|
|
31df492761 | ||
|
|
748234606e | ||
|
|
65f9ae8eac | ||
|
|
584bbd59a1 | ||
|
|
d7b1483089 | ||
|
|
0f9a02bf61 | ||
|
|
4f3641606b | ||
|
|
bd25727b27 | ||
|
|
f98ac685d1 | ||
|
|
7da2079736 | ||
|
|
c2355d207c | ||
|
|
2e3ff459b2 | ||
|
|
5a68e0ffe0 | ||
|
|
c5223b4579 | ||
|
|
0637223342 | ||
|
|
f5ee80907c | ||
|
|
f24f01a1cc | ||
|
|
15d3d9fc21 | ||
|
|
d828dd8f81 | ||
|
|
6735fb0b2a | ||
|
|
1393fb43f8 | ||
|
|
2376bfe291 | ||
|
|
07751a7206 | ||
|
|
6e14190463 | ||
|
|
7e312bf596 | ||
|
|
208957ade6 | ||
|
|
c7cb7744e7 | ||
|
|
f3c12c729d | ||
|
|
3f19fdd490 | ||
|
|
1baadf57ac | ||
|
|
f904f2ed15 | ||
|
|
930055ac19 | ||
|
|
44b695666f | ||
|
|
f56824a778 | ||
|
|
8255997bc7 | ||
|
|
cbd921f643 | ||
|
|
ae02671983 | ||
|
|
cbde344ad0 | ||
|
|
4b7b1cb700 | ||
|
|
d11ddfbb87 | ||
|
|
3faa7460ff | ||
|
|
8ab6715f83 | ||
|
|
dccfe5c4aa | ||
|
|
512465037b | ||
|
|
634eb0afc8 | ||
|
|
4d59db6648 | ||
|
|
dd07041019 | ||
|
|
9984c776de | ||
|
|
846a11a004 | ||
|
|
c1b8c8dd60 | ||
|
|
841fdcbfb3 | ||
|
|
2597f97165 | ||
|
|
b6a8ead478 | ||
|
|
b63427037f | ||
|
|
2a496c840c | ||
|
|
0f9065cd11 | ||
|
|
96c56e9d84 | ||
|
|
0a04ee3d1b | ||
|
|
1454e3df90 | ||
|
|
8f33a633aa | ||
|
|
3b134deace | ||
|
|
b6d91edda4 | ||
|
|
1726680b10 | ||
|
|
45bea9f9f4 | ||
|
|
16a0ecf41a | ||
|
|
a6af08b092 | ||
|
|
76f38a5a36 | ||
|
|
375d968278 | ||
|
|
ef4c2b07e5 | ||
|
|
94e823defc | ||
|
|
d2f4337828 | ||
|
|
02e8c1ba00 | ||
|
|
a2002868f1 | ||
|
|
2d35451a2e | ||
|
|
206e97ad0d | ||
|
|
0b41ad2cef | ||
|
|
c7e43b67f3 | ||
|
|
bf41b45532 | ||
|
|
b3ab32950d | ||
|
|
d76e18ac65 | ||
|
|
1b26e9cb69 | ||
|
|
b2ab65df12 | ||
|
|
6efaf328e5 | ||
|
|
e3df606001 | ||
|
|
a6edeb64b5 | ||
|
|
3f5c2a8fb9 | ||
|
|
088dd71754 | ||
|
|
fb3ff32919 | ||
|
|
7a3f9b8444 | ||
|
|
2991ae3191 | ||
|
|
5d64ebdf94 | ||
|
|
bc6b2e690d | ||
|
|
3d13e1f60d | ||
|
|
960a70ec07 | ||
|
|
3b929fd7a2 | ||
|
|
b3c10c0892 | ||
|
|
8e5acd019a | ||
|
|
f3d6fb8718 | ||
|
|
b262f2fb71 | ||
|
|
3a9d4e8852 | ||
|
|
f339e3a93d | ||
|
|
f65ea55fa3 | ||
|
|
0332bd09ec | ||
|
|
bc780edcec | ||
|
|
c0e06dae19 | ||
|
|
69876208f4 | ||
|
|
31af99c64d | ||
|
|
0ba7961df4 | ||
|
|
51ac2b4acf | ||
|
|
f2a3cf9348 | ||
|
|
864e54b8e7 | ||
|
|
9ebdfabd30 | ||
|
|
7cbb36a5ea | ||
|
|
f3a072b151 | ||
|
|
138d22af3f | ||
|
|
e60734747d | ||
|
|
adc561b38f | ||
|
|
236b39138d | ||
|
|
29aec75256 | ||
|
|
94072f8dfe | ||
|
|
620cebb79c | ||
|
|
443f28dee8 | ||
|
|
0343f5a35e | ||
|
|
6d330f1f05 | ||
|
|
a559e87775 | ||
|
|
6c22690d8b | ||
|
|
88e1b772b9 | ||
|
|
a171ae13b6 | ||
|
|
3962b0a814 | ||
|
|
5216e5b042 | ||
|
|
ce69912782 | ||
|
|
317c15a5ce | ||
|
|
63396d27d0 | ||
|
|
d079f0bbca | ||
|
|
04a2e9472d | ||
|
|
65da9e491e | ||
|
|
d221e33ba6 | ||
|
|
d87312cb49 | ||
|
|
975377fb89 | ||
|
|
5eb1fdfaca | ||
|
|
2afe7dbab4 | ||
|
|
162f0a408b | ||
|
|
b5fb825788 | ||
|
|
b063447471 | ||
|
|
82d335df03 | ||
|
|
96c3720aab | ||
|
|
02efb5c213 | ||
|
|
4f208e2207 | ||
|
|
3351e2ceb1 | ||
|
|
339026faf6 | ||
|
|
16b0f1b3ef | ||
|
|
e75ece7909 | ||
|
|
9783a64c64 | ||
|
|
b6e937e877 | ||
|
|
9a5f6c8d33 | ||
|
|
ca8993dd68 | ||
|
|
2e67a6aedf | ||
|
|
2def6f6327 | ||
|
|
96d0f62c59 | ||
|
|
5855e1cb1f | ||
|
|
f71f3d0cfb | ||
|
|
3f07472d5d | ||
|
|
abeb2ce686 | ||
|
|
4709d697b7 | ||
|
|
e08ab3371c | ||
|
|
a046bb2b31 | ||
|
|
c0e82d966f | ||
|
|
ab98af7635 | ||
|
|
0a1529e00a | ||
|
|
788ee7fee2 | ||
|
|
1a71ac6199 | ||
|
|
692d0f6113 | ||
|
|
f873f81545 | ||
|
|
3c4d324f12 | ||
|
|
17426fcfc4 | ||
|
|
7651590f7d | ||
|
|
e91d0546ee | ||
|
|
fc41d9dac1 | ||
|
|
f9034ac9a2 | ||
|
|
fa090a0826 | ||
|
|
7994088a7a | ||
|
|
0bcf214ddc | ||
|
|
fca63a4ffe | ||
|
|
500cc01778 | ||
|
|
63b8cd6210 | ||
|
|
54f37fe30a | ||
|
|
d15d941d68 | ||
|
|
3776a5d729 | ||
|
|
629e62b82b | ||
|
|
460446f558 | ||
|
|
f013e9c2e5 | ||
|
|
e645fb03ac | ||
|
|
35aebd03fd | ||
|
|
e5dbb97ef2 | ||
|
|
eb6c2a6346 | ||
|
|
a3aa327d2f | ||
|
|
bd9ee403f2 | ||
|
|
1e5e8d1490 | ||
|
|
9eb4f1967e | ||
|
|
68e58ab679 | ||
|
|
488b41a50b | ||
|
|
ec33ac4a84 | ||
|
|
a52b1fc8f1 | ||
|
|
e0e5dd544b | ||
|
|
63e0242ca9 | ||
|
|
fe6ede2c87 | ||
|
|
ba157b6645 | ||
|
|
d747bc1d83 | ||
|
|
1fa74c7c68 | ||
|
|
a6870c66b0 | ||
|
|
3030c421b5 | ||
|
|
5a5c0f349d | ||
|
|
37e47ad612 | ||
|
|
3d59c93b9d | ||
|
|
70df45d160 | ||
|
|
3a018dbb45 | ||
|
|
03272cc894 | ||
|
|
6f17fbf54a | ||
|
|
b0d9a997c1 | ||
|
|
8e2448413e | ||
|
|
5769205acb | ||
|
|
b84b3763a6 | ||
|
|
83fe2a828a | ||
|
|
f8e38a7b4d | ||
|
|
e9d7ff12b4 | ||
|
|
517282baa4 | ||
|
|
2897834520 | ||
|
|
10d55bd72a | ||
|
|
3b1545eadc | ||
|
|
d4587b06c0 | ||
|
|
a6d4a42058 | ||
|
|
9b263461c0 | ||
|
|
0144ee66ab | ||
|
|
19adc2b155 | ||
|
|
304b61f8f8 | ||
|
|
aa30c9cae4 | ||
|
|
6b8bde0ff4 | ||
|
|
c13f7f5d4d | ||
|
|
3d52b3e4c5 | ||
|
|
774db5dbca | ||
|
|
7f5ea40aca | ||
|
|
7b80623c5c | ||
|
|
986eaaf7a4 | ||
|
|
90933052aa | ||
|
|
8c6972bb06 | ||
|
|
43e1788f6f | ||
|
|
24503103b3 | ||
|
|
f14a6049c1 | ||
|
|
353c7b810d | ||
|
|
b848e824d7 | ||
|
|
5debdb69ec | ||
|
|
4182cc1955 | ||
|
|
dfbbd74d00 | ||
|
|
96a32e8fb0 | ||
|
|
23c2ea1c04 | ||
|
|
63e0b37c67 | ||
|
|
199ad05b5c | ||
|
|
9cb9f6200c | ||
|
|
f528178e53 | ||
|
|
9149468971 | ||
|
|
718d84d6d2 | ||
|
|
4ba3a290b8 | ||
|
|
076632122b | ||
|
|
91f17f20ff | ||
|
|
56472f15a0 | ||
|
|
83eb0e1b34 | ||
|
|
585ec9e192 | ||
|
|
abac8a5d44 | ||
|
|
7d6f4dea78 | ||
|
|
7671f43bb1 | ||
|
|
e59c5e08f3 | ||
|
|
10cbef9274 | ||
|
|
994e00ad20 | ||
|
|
5544bbf134 | ||
|
|
1301102b1a | ||
|
|
9746ac23fe | ||
|
|
2bea4fed77 | ||
|
|
397b4cc7ba | ||
|
|
65ae34d4e7 | ||
|
|
74b3e153f8 | ||
|
|
98302beddd | ||
|
|
af5e930c0a | ||
|
|
e34d5e2e96 | ||
|
|
c776967e66 | ||
|
|
16d9da1268 | ||
|
|
70af5bbb7f | ||
|
|
50c00d35d9 | ||
|
|
32acc4ad3a | ||
|
|
7f6ffe8164 | ||
|
|
15a47c6513 | ||
|
|
9f0a77aa92 | ||
|
|
72e44d6638 | ||
|
|
0389b8cfb5 | ||
|
|
2117aa0539 | ||
|
|
c958f9f88a | ||
|
|
7313838f1f | ||
|
|
44fee8a018 | ||
|
|
b064dce7f5 | ||
|
|
2e79e399b2 | ||
|
|
aaa0555b7a | ||
|
|
a02c0ea8b7 | ||
|
|
5524399a3e | ||
|
|
afeb15b3e7 | ||
|
|
4fe8729895 | ||
|
|
a6f999970a | ||
|
|
d2270377ef | ||
|
|
5fda900240 | ||
|
|
43a2f03b2b | ||
|
|
b789fe22fd | ||
|
|
d2d3eb075f | ||
|
|
dcb0f24f50 | ||
|
|
69c599b881 | ||
|
|
e7b45c4731 | ||
|
|
9ea5b2aa31 | ||
|
|
38324e7295 | ||
|
|
0763e08c12 | ||
|
|
843abf10bb | ||
|
|
162d05cb25 | ||
|
|
239a1cefa9 | ||
|
|
f51e970ab1 | ||
|
|
7d810b47d1 | ||
|
|
1cf12e8d34 | ||
|
|
563d91c4fd | ||
|
|
9b53d22a31 | ||
|
|
ff0e83d0a0 | ||
|
|
63bd624827 | ||
|
|
102820ad77 | ||
|
|
c20390c864 | ||
|
|
6abc62718c | ||
|
|
f62eb0f687 | ||
|
|
f4342723e4 | ||
|
|
fbbf1b317a | ||
|
|
c92cd6d88a | ||
|
|
ef65e851b9 | ||
|
|
067bbb5d75 | ||
|
|
d7bb634cce | ||
|
|
35a73b2942 | ||
|
|
05025e97d0 | ||
|
|
3546cad5a1 | ||
|
|
a3e5944e4e | ||
|
|
1912d4355c | ||
|
|
c43a44dc75 | ||
|
|
83e1317b38 | ||
|
|
e3e192f869 | ||
|
|
e0c564c0e3 | ||
|
|
bd166b5ac1 | ||
|
|
809f1da955 | ||
|
|
891fdf7a38 | ||
|
|
50babaeb34 | ||
|
|
8e0793b191 | ||
|
|
7584d12ae5 | ||
|
|
2dc364f417 |
128
art/layer-switcher-maximize.svg
Normal file
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="18.000000px"
|
||||
height="18.000000px"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.43"
|
||||
sodipodi:docbase="/home/sderle/projects/openlayers/layerswitcher/art"
|
||||
sodipodi:docname="layer-switcher-maximize.svg"
|
||||
inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png"
|
||||
inkscape:export-xdpi="90.000000"
|
||||
inkscape:export-ydpi="90.000000">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="16"
|
||||
inkscape:cx="9"
|
||||
inkscape:cy="9"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer4"
|
||||
inkscape:window-width="1226"
|
||||
inkscape:window-height="800"
|
||||
inkscape:window-x="42"
|
||||
inkscape:window-y="25" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="background"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<g
|
||||
id="g2110"
|
||||
transform="matrix(-7.849624e-17,1,-1,-7.849624e-17,18,0)">
|
||||
<path
|
||||
transform="matrix(0,-1.00316,1.00316,0,-2.844e-2,18.02844)"
|
||||
d="M 17.971654 9 A 8.9716539 8.9716539 0 1 1 0.028346062,9 A 8.9716539 8.9716539 0 1 1 17.971654 9 z"
|
||||
sodipodi:ry="8.9716539"
|
||||
sodipodi:rx="8.9716539"
|
||||
sodipodi:cy="9"
|
||||
sodipodi:cx="9"
|
||||
id="path2059"
|
||||
style="fill:#00008b;fill-opacity:1;stroke:none;stroke-width:39.98414612;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
sodipodi:type="arc" />
|
||||
<rect
|
||||
transform="matrix(0,-1,1,0,0,0)"
|
||||
y="4.3599998e-06"
|
||||
x="-9.0000048"
|
||||
height="18"
|
||||
width="9"
|
||||
id="rect2061"
|
||||
style="fill:#00008b;fill-opacity:1;stroke:none;stroke-width:39.98414612;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="zoom"
|
||||
style="display:inline">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline;font-family:Helvetica"
|
||||
x="1.5214844"
|
||||
y="-3.2949219"
|
||||
id="text2114"
|
||||
sodipodi:linespacing="125%"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan2118"
|
||||
x="1.5214844"
|
||||
y="-3.2949219">+</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="overlay"
|
||||
style="display:none">
|
||||
<path
|
||||
style="font-size:12.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana"
|
||||
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
|
||||
id="text2082"
|
||||
sodipodi:nodetypes="csccsssscccssscccssssccscc" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="pan triangle"
|
||||
style="display:none">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
|
||||
id="path2107"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="6.8031497"
|
||||
sodipodi:cy="5.1874018"
|
||||
sodipodi:r1="5.0880113"
|
||||
sodipodi:r2="2.5440056"
|
||||
sodipodi:arg1="1.0471976"
|
||||
sodipodi:arg2="2.0943951"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0.0000000"
|
||||
inkscape:randomized="0.0000000"
|
||||
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
|
||||
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
142
art/layer-switcher-minimize.svg
Normal file
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:export-ydpi="90.000000"
|
||||
inkscape:export-xdpi="90.000000"
|
||||
inkscape:export-filename="/home/sderle/projects/openlayers/layerswitcher/img/layer-switcher-minimize.png"
|
||||
sodipodi:docname="layer-switcher-minimize.svg"
|
||||
sodipodi:docbase="/home/sderle/projects/openlayers/layerswitcher/art"
|
||||
inkscape:version="0.43"
|
||||
sodipodi:version="0.32"
|
||||
id="svg2"
|
||||
height="18.000000px"
|
||||
width="18.000000px">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
inkscape:window-y="26"
|
||||
inkscape:window-x="42"
|
||||
inkscape:window-height="800"
|
||||
inkscape:window-width="1226"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="px"
|
||||
inkscape:cy="9.3025513"
|
||||
inkscape:cx="9"
|
||||
inkscape:zoom="16"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
style="display:inline"
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="background">
|
||||
<rect
|
||||
style="fill:#00008b;fill-opacity:0;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
id="rect2061"
|
||||
width="18.014498"
|
||||
height="18.000000"
|
||||
x="-18.014502"
|
||||
y="4.3599998e-06"
|
||||
transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-filename="/home/sderle/projects/openlayers/layerswitcher/art/layer-switcher-minimize.png" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:label="graticule"
|
||||
id="layer5"
|
||||
inkscape:groupmode="layer">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline;font-family:Helvetica"
|
||||
x="5.2802601"
|
||||
y="-3.8032362"
|
||||
id="text1432"
|
||||
sodipodi:linespacing="125%"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1434"
|
||||
x="5.2802601"
|
||||
y="-3.8032362">-</tspan></text>
|
||||
<rect
|
||||
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99699599px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="rect1438"
|
||||
width="13.003004"
|
||||
height="13.002999"
|
||||
x="2.498498"
|
||||
y="2.4984975" />
|
||||
</g>
|
||||
<g
|
||||
style="display:none"
|
||||
inkscape:label="zoom"
|
||||
id="layer4"
|
||||
inkscape:groupmode="layer">
|
||||
<text
|
||||
transform="scale(1.000000,-1.000000)"
|
||||
sodipodi:linespacing="125.00000%"
|
||||
id="text2114"
|
||||
y="-3.4077148"
|
||||
x="3.7485352"
|
||||
style="font-size:18.000000;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica;text-anchor:start;writing-mode:lr-tb"
|
||||
xml:space="preserve"><tspan
|
||||
y="-3.4077148"
|
||||
x="3.7485352"
|
||||
id="tspan2118"
|
||||
sodipodi:role="line">−</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
style="display:none"
|
||||
inkscape:label="overlay"
|
||||
id="layer2"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
sodipodi:nodetypes="csccsssscccssscccssssccscc"
|
||||
id="text2082"
|
||||
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
|
||||
style="font-size:12.000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana;text-anchor:start;writing-mode:lr-tb" />
|
||||
</g>
|
||||
<g
|
||||
style="display:none"
|
||||
inkscape:label="pan triangle"
|
||||
id="layer3"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)"
|
||||
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
|
||||
inkscape:randomized="0.0000000"
|
||||
inkscape:rounded="0.0000000"
|
||||
inkscape:flatsided="false"
|
||||
sodipodi:arg2="2.0943951"
|
||||
sodipodi:arg1="1.0471976"
|
||||
sodipodi:r2="2.5440056"
|
||||
sodipodi:r1="5.0880113"
|
||||
sodipodi:cy="5.1874018"
|
||||
sodipodi:cx="6.8031497"
|
||||
sodipodi:sides="3"
|
||||
id="path2107"
|
||||
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
sodipodi:type="star" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.6 KiB |
@@ -1,36 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||
<g i:extraneous="self">
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||
<line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||
<rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/>
|
||||
<line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||
|
||||
<rect x="5.252" y="11.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.1621 12.1086)" fill="#FFBF00" width="20" height="5"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="8.376" y1="15.783" x2="10.717" y2="18.766"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="11.946" y1="13.043" x2="14.288" y2="16.027"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="15.342" y1="10.437" x2="17.684" y2="13.42"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="18.69" y1="7.869" x2="21.03" y2="10.852"/>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||
<g i:extraneous="self">
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||
<line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||
<rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/>
|
||||
<line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||
|
||||
<rect x="5.252" y="11.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.1621 12.1086)" fill="#FFBF00" width="20" height="5"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="8.376" y1="15.783" x2="10.717" y2="18.766"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="11.946" y1="13.043" x2="14.288" y2="16.027"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="15.342" y1="10.437" x2="17.684" y2="13.42"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="18.69" y1="7.869" x2="21.03" y2="10.852"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -1,36 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||
<g i:extraneous="self">
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||
<rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||
<line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||
<line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||
|
||||
<rect x="4.252" y="12.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.9776 11.7065)" fill="#FFBF00" width="20" height="5"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="7.376" y1="16.783" x2="9.717" y2="19.766"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="10.946" y1="14.043" x2="13.288" y2="17.027"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="14.342" y1="11.437" x2="16.684" y2="14.42"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="17.69" y1="8.869" x2="20.03" y2="11.852"/>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||
<g i:extraneous="self">
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||
<rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||
<line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||
<line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||
|
||||
<rect x="4.252" y="12.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.9776 11.7065)" fill="#FFBF00" width="20" height="5"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="7.376" y1="16.783" x2="9.717" y2="19.766"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="10.946" y1="14.043" x2="13.288" y2="17.027"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="14.342" y1="11.437" x2="16.684" y2="14.42"/>
|
||||
<line fill="#FFBF00" stroke="#000000" x1="17.69" y1="8.869" x2="20.03" y2="11.852"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -1,44 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||
<g i:extraneous="self">
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||
<line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||
<rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/>
|
||||
<line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||
<path fill="#FFFFFF" stroke="#000000" d="M9.458,22.458c-0.473-0.168-1.02-1.269-1.363-1.695
|
||||
c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648
|
||||
c1.036-0.767,2.095-0.162,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421
|
||||
c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709
|
||||
c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042
|
||||
c-0.222-0.209-0.148-0.508-0.155-0.782c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45
|
||||
c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248
|
||||
c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.067,0.168,1.558
|
||||
c-0.146-0.269-0.113-0.749-0.127-1.057c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324
|
||||
c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91
|
||||
c-0.13,0.459-0.293,1.222-0.239,1.638c0-0.902,0.334-1.697,0.334-2.588c0-0.678-0.272-2.099,0.581-2.334
|
||||
c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.882c-0.318,2.154-0.845,4.227-2.096,6.072
|
||||
c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604
|
||||
c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||
<g i:extraneous="self">
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||
<line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||
<rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/>
|
||||
<line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||
<path fill="#FFFFFF" stroke="#000000" d="M9.458,22.458c-0.473-0.168-1.02-1.269-1.363-1.695
|
||||
c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648
|
||||
c1.036-0.767,2.095-0.162,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421
|
||||
c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709
|
||||
c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042
|
||||
c-0.222-0.209-0.148-0.508-0.155-0.782c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45
|
||||
c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248
|
||||
c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.067,0.168,1.558
|
||||
c-0.146-0.269-0.113-0.749-0.127-1.057c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324
|
||||
c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91
|
||||
c-0.13,0.459-0.293,1.222-0.239,1.638c0-0.902,0.334-1.697,0.334-2.588c0-0.678-0.272-2.099,0.581-2.334
|
||||
c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.882c-0.318,2.154-0.845,4.227-2.096,6.072
|
||||
c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604
|
||||
c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -1,44 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||
<g i:extraneous="self">
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||
<rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||
<line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||
<line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||
<path fill="#FFFFFF" stroke="#000000" d="M8.458,23.458c-0.473-0.168-1.02-1.269-1.363-1.695
|
||||
c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648
|
||||
c1.036-0.767,2.095-0.161,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421
|
||||
c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709
|
||||
c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042
|
||||
c-0.222-0.21-0.148-0.509-0.155-0.783c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45
|
||||
c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248
|
||||
c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.068,0.168,1.558
|
||||
c-0.146-0.27-0.113-0.75-0.127-1.058c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324
|
||||
c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91
|
||||
c-0.13,0.459-0.293,1.222-0.239,1.639c0-0.902,0.334-1.697,0.334-2.589c0-0.678-0.272-2.099,0.581-2.334
|
||||
c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.883c-0.318,2.153-0.845,4.227-2.096,6.071
|
||||
c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604
|
||||
c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||
<g i:extraneous="self">
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||
<rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/>
|
||||
<line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||
<line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||
<line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||
<path fill="#FFFFFF" stroke="#000000" d="M8.458,23.458c-0.473-0.168-1.02-1.269-1.363-1.695
|
||||
c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648
|
||||
c1.036-0.767,2.095-0.161,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421
|
||||
c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709
|
||||
c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042
|
||||
c-0.222-0.21-0.148-0.509-0.155-0.783c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45
|
||||
c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248
|
||||
c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.068,0.168,1.558
|
||||
c-0.146-0.27-0.113-0.75-0.127-1.058c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324
|
||||
c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91
|
||||
c-0.13,0.459-0.293,1.222-0.239,1.639c0-0.902,0.334-1.697,0.334-2.589c0-0.678-0.272-2.099,0.581-2.334
|
||||
c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.883c-0.318,2.153-0.845,4.227-2.096,6.071
|
||||
c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604
|
||||
c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.3 KiB |
39
build/docs.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm ../doc/reference.html
|
||||
CLASSES="Map Layer Layer.HTTPRequest Layer.Grid Layer.WMS Layer.KaMap Layer.EventPane Layer.Google Layer.VirtualEarth Layer.Markers Layer.Text Layer.GeoRSS Layer.Boxes Icon Marker Marker.Box Tile Tile.Image Tile.WFS Control Control.LayerSwitcher Control.MouseDefaults Control.MouseToolbar Control.PanZoom Control.PanZoomBar Control.Permalink Control.Scale LonLat Size Pixel Bounds Util"
|
||||
echo "<html>
|
||||
<head>
|
||||
<title>OpenLayers Class Reference Documentation</title>
|
||||
<style type='text/css'>
|
||||
.type { background-color: #ddd }
|
||||
td { border: black solid 1px; padding: 3px; }
|
||||
table { border-collapse: collapse; margin: 5px 10px; }
|
||||
.classref { margin-left: 20px; }
|
||||
div.index { float:left; width: 300px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>" >> ../doc/reference.html
|
||||
|
||||
for i in $CLASSES; do
|
||||
echo "<div class='index'><a href='#OpenLayers.$i'>OpenLayers.$i</a></div>" >> ../doc/reference.html
|
||||
done
|
||||
|
||||
echo "<br style='clear:both' />" >> ../doc/reference.html
|
||||
|
||||
for i in $CLASSES; do
|
||||
cat ../doc/$i.txt | \
|
||||
perl -pe 's!^(.*?) -- (.*?) -- (.*?)$! <tr><td>$1</td><td>$2</td><td>$3</td></tr>!g;
|
||||
s!^( \* )?(.*?) -- (.*?)$! <tr><td>$2</td><td>$3</td></tr>!g;
|
||||
s!^ \* (.*)$! </table>\n\n<h3>$1</h3>\n <table>!;
|
||||
s!{OpenLayers.(.*?)\|(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">\2</a>!g;
|
||||
s!{OpenLayers.(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">OpenLayers.$1</a>!;
|
||||
s!{([A-Za-z]+?)\|(.+?)}!<span class="type" title="$1">\2<\/span>!g;
|
||||
s!{([A-Za-z]+?)}!<span class="type" title="$1">$1<\/span>!g;
|
||||
s!^\* (.*)$!</table>\n<h2>$1</h2>\n<table>!;
|
||||
s!^OpenLayers\.(.*)$!<h1><a name="OpenLayers.$1">OpenLayers.$1</a></h1><div class="classref">!' \
|
||||
>> ../doc/reference.html
|
||||
echo '</table></div>' >> ../doc/reference.html
|
||||
done
|
||||
echo " </body>
|
||||
</html>" >> ../doc/reference.html
|
||||
@@ -7,9 +7,5 @@ OpenLayers.js
|
||||
[last]
|
||||
|
||||
[exclude]
|
||||
OpenLayers/Layer/KaMap.js
|
||||
OpenLayers/Layer/Google.js
|
||||
OpenLayers/Layer/Yahoo.js
|
||||
OpenLayers/Layer/VirtualEarth.js
|
||||
OpenLayers/Layer/WMS/Untiled.js
|
||||
OpenLayers/Control/KeyboardDefaults.js
|
||||
|
||||
9
doc/Ajax.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
OpenLayers contains a number of helper functions for working with AJAX.
|
||||
|
||||
* Methods
|
||||
OpenLayers.loadURL({String|uri}, {String|params}, {Object|caller}, {function|onComplete}, {function|onFailure}) -- none -- This function sends an XMLHTTPRequest to a remote site, specified by URI, with the params string given as the params argument. Caller is bound as 'this' to the function specified by either onComplete or onFailure.
|
||||
OpenLayers.parseXMLString({String|text}) -- {AJAXResponse} -- Accepts a block of text, and creates a DOM response document from the text.
|
||||
|
||||
* Parameters
|
||||
OpenLayers.ProxyHost -- When initiating an AJAX request, any URL that is absolute is prefixed with OpenLayers.ProxyHost. The ProxyHost is designed to accept a URL and return the content, in an effort to work around cross-browser security restrictions. This defaults to null, but if you wish to access content from another domain that Javascript would restrict access to, you must set this to be the URL which will accept a URL encoded version of the passed URL and return the content at that URL. An example is available as proxy.txt in the examples/ directory.
|
||||
|
||||
21
doc/Bounds.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
OpenLayers.Bounds
|
||||
|
||||
This class represents a bounding box. Data stores as left, bottom, right, top floats.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Bounds(left, bottom, right, top) -- Create new Bounds.
|
||||
|
||||
* Methods
|
||||
clone() -- {OpenLayers.Bounds} -- Return copy of the current bounds.
|
||||
toString() -- {String} -- Return bounds as string.
|
||||
toBBOX() -- {String} -- Return bounds as simple string, usable for WMS.
|
||||
getWidth() -- {float} -- Return width of bounds.
|
||||
getHeight() -- {float} -- Return height of bounds.
|
||||
getSize() -- {OpenLayers.Size} -- Return size of bounds.
|
||||
getCenterPixel() -- {OpenLayers.Pixel} -- Return center of bounds as pixel.
|
||||
getCenterLonLat() -- {OpenLayers.LonLat} -- Return center of bounds as LonLat.
|
||||
equals({OpenLayers.Bounds|bounds}) -- {Boolean} -- whether or not the bounds are equivilant.
|
||||
add({float|x}, {float|y}) -- {OpenLayers.Bounds} -- Shift bounds by x and y.
|
||||
contains({float|x}, {float|y}, {Boolean|inclusive}) -- {Boolean} -- Return Whether or not the passed-in coordinates are within this bounds
|
||||
containsBounds({OpenLayers.Bounds|bounds}, {Boolean|partial}, {Boolean|inclusive}) -- {Boolean} -- Returns whether or not the passed-in OpenLayers.Bounds object is contained within this bounds. partial indicates whether bounds must be contained or only overlap. Inclusive determines whether border is included.
|
||||
determineQuadrant({OpenLayers.LonLat|lonlat}) -- {String} -- Determine which quadrant the LonLat is in. Returns combination of "b" or "t" and "l" or "r".
|
||||
14
doc/Control.LayerSwitcher.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
OpenLayers.Control.LayerSwitcher
|
||||
|
||||
This control will by default display a small image in the upper right corner of the map. When clicked, this image expands into a control which allows one to select between multiple types of layers, seperated into two types: Base Layers and Overlays. Only one base layer can be selected at a time, and is enforced by a radio button control being used. Multiple overlays can be selected at once, and a checkbox control is visible for this functionality.
|
||||
* Constructor
|
||||
OpenLayers.Control.LayerSwitcher({Object|options}?) -- Creates a new control.
|
||||
|
||||
* Methods
|
||||
maximizeControl() -- none -- Expand the layer switcher control.
|
||||
minimizeControl() -- none -- Close the layer switcher control.
|
||||
|
||||
* Parameters
|
||||
position -- (inherited from {OpenLayers.Control}) {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area.
|
||||
activeColor -- The color to use for the background of the layer switcher div.
|
||||
|
||||
19
doc/Control.MouseDefaults.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
OpenLayers.Control.MouseDefaults
|
||||
|
||||
Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseDefaults, replacing the functions whose behavior you wish to change.
|
||||
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Control() -- Creates a new control. No options available.
|
||||
|
||||
* Methods
|
||||
defaultClick -- none -- This event takes place when a click event occurs on the map.
|
||||
defaultDblClick -- none -- This event re-centers the map on the clicked location.
|
||||
defaultMouseDown -- none -- This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead.
|
||||
defaultMouseMove -- none -- If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor.
|
||||
defaultMouseUp -- none -- This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled.
|
||||
defaultMouseOut -- none -- This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped.
|
||||
defaultWheelUp -- none -- Zooms in one level. Called by onWheelEvent
|
||||
defaultWheelDown -- none -- Zooms out one level. Called by onWheelEvent.
|
||||
onWheelEvent -- none -- catches the map wheel event, and handles it, zooming appropriately.
|
||||
|
||||
15
doc/Control.MouseToolbar.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
OpenLayers.Control.MouseToolbar
|
||||
|
||||
Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseToolbar, replacing the functions whose behavior you wish to change. Additionally, a toolbar of images can be clicked to start events, as well as using the keyboard shortcuts. Note that if you wish to use the MouseToolbar, you *must* add a 'controls' option to the map constructor, otherwise you will have both MouseDefaults and MouseToolbar on the map, which will not work.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Control.MouseToolbar({OpenLayers.Pixel|position}, {String|direction}) -- Creates a new control. The direction of the control can be either "vertical" or "horizontal". The default is vertical.
|
||||
|
||||
* Methods
|
||||
defaultClick -- none -- This event takes place when a click event occurs on the map.
|
||||
defaultDblClick -- none -- This event re-centers the map on the clicked location.
|
||||
defaultMouseDown -- none -- This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead.
|
||||
defaultMouseMove -- none -- If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor.
|
||||
defaultMouseUp -- none -- This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled.
|
||||
defaultMouseOut -- none -- This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped.
|
||||
|
||||
9
doc/Control.PanZoom.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
OpenLayers.Control.PanZoom
|
||||
|
||||
Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and one button which zooms to the max extent of the map.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Control.PanZoom({Object|options}) -- Creates a new panzoom control.
|
||||
|
||||
* Parameters
|
||||
slideFactor -- Number of pixels by which to slide the map when a pan arrow is clicked.
|
||||
6
doc/Control.PanZoomBar.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
OpenLayers.Control.PanZoom
|
||||
|
||||
Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and a bar on which a slider can be moved to zoom in or out by multiple stops at once.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Control.PanZoomBar() -- Creates a new panzoombar control.
|
||||
6
doc/Control.Permalink.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
OpenLayers.Control.Permalink
|
||||
|
||||
A small control which updates a "Permalink" to the map every time the viewport changes. This allows users to copy a link to a specfic map view. By default, it places itself in the lower right corner of the map. This control must be added to the map after a baselayer has been set.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Control.Scale({DOMElement|element}?, {String|base}) -- Creates a new permalink control. The DOMElement is used, if passed, as the element on which the 'href' is set. If you prefer to put this link on an element outside of the map, set this element to an anchor element to have its href updated when the map moves. If you wish to make the link go to some other URL (for example, an editing interface rather than the current URL), the 'base' property can be used, to which the ?lat=&lon=&zoom= will be appended after the map has moved.
|
||||
6
doc/Control.Scale.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
OpenLayers.Control.Scale
|
||||
|
||||
A small control which displays an informative scale value, a la "1:50K" , by defualt in the lower right of the map viewport.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Control.Scale({DOMElement|element}?) -- Creates a new scale control. The DOMElement is used, if passed, to put the scale inside -- this allows you to have the scale displayed in some location outside the map.
|
||||
9
doc/Control.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
OpenLayers.Control
|
||||
|
||||
Base class from which controls are derived. Controls are elements of the map used to control things like zoom, layer status, or to provide information to the user about the status of the map, such as scale or copyright information.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Control({Object|options}?) -- Creates a new control. The options here are used to control parameters of the control. The base control defines only "position", which is designed to be an {OpenLayers.Pixel} which is the top-left of the location of the control relative to the map div.
|
||||
|
||||
* Parameters
|
||||
position -- {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area.
|
||||
9
doc/Icon.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
OpenLayers.Icon
|
||||
|
||||
Icon is used as the visual representation of a Marker. Creating such a representation requres up to three parts: An Icon URL, a size, and an offset. The icon URL is a pointer to an image to use as an icon. The size is the size of the image, as an {OpenLayers.Size} object, and the offset is the position of the top left corner of the image in pixels, relative to the latitude and longitude of the Marker.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Icon({String|url}, {OpenLayers.Size|size}, {OpenLayers.Pixel|offset}) -- creates a new icon.
|
||||
|
||||
* Methods
|
||||
clone() -- {OpenLayers.Icon} -- Create an exact copy of the icon.
|
||||
7
doc/Layer.Boxes.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
OpenLayers.Layer.Boxes
|
||||
|
||||
A subclass of the markers layer, this layer draws boxes using div elements
|
||||
instead of icons using images.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.Boxes(name, options) -- Same as OpenLayers.Layer.Markers.
|
||||
6
doc/Layer.EventPane.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
OpenLayers.Layer.EventPane
|
||||
|
||||
Designed to act as a super-class for layers which need OpenLayers to intercept click events. Google Maps and Microsoft Virtual Earth both use this functionality, in order to allow for actions like the rubber-band-zoom/zoombox functionality. This Layer is not designed to be used on its own, but instead to act as an intermediary between the user and layers which have their own click handlers.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.EventPane(name, options) -- Only designed to be used by subclasses.
|
||||
12
doc/Layer.GeoRSS.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
OpenLayers.Layer.GeoRSS
|
||||
|
||||
GeoRSS layer. Pass a name and location of a GeoRSS file on the web, and a marker will be added to the map for each item in the GeoRSS feed. Uses OpenLayers.loadURL to load the XML, parses the data, and adds markers to the map. The GeoRSS layer supports 1.0 and 2.0 in IE and Firefox, and supports 2.0 in Safari. (Ticket #111 explains the reason for this difference.)
|
||||
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.GeoRSS(name, url) -- Name and location of GeoRSS XML file.
|
||||
|
||||
* Methods
|
||||
parseData(ajaxResponse) -- none -- Callback for the loadURL call. This function parses the XML for the GeoRSS feed, creating markers for the data and adding a popup to each marker. It populates an array of features as 'this.features'.
|
||||
markerClick(Event) -- none -- Action to perform when a marker is clicked.
|
||||
clearFeatures() -- none -- Removes all features and markers from the map.
|
||||
16
doc/Layer.Google.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
OpenLayers.Layer.Google
|
||||
|
||||
The Google Layer in OpenLayers allows you to include Google Maps functionality in your OpenLayers maps. In order to use the Google Layer, you must first obtain an API key for Google Maps, and include the Google Maps API script in your page. Once you have done this,
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.Google(name, options?) -- Constructor for Google layer. Accepts name and options.
|
||||
|
||||
* Methods
|
||||
getOLLonLatFromGLatLng(GLonLat) -- {OpenLayers.LonLat} -- Convert from GLatLon to OpenLayers LonLat
|
||||
getGLatLngFromOLLonLat({OpenLayers.LonLat|lonlat}) -- GLatLon -- Convert From OpenLayers LonLat to GLatLon
|
||||
getOLPixelFromGPoint(GPoint) -- {OpenLayers.Pixel} -- Convert from GPoint to OpenLayers.Pixel
|
||||
getGPointFromOLPixel({OpenLayers.Pixel|pixel}) -- GPoint -- Create GPoint from OpenLayers Pixel.
|
||||
|
||||
* Parameters
|
||||
type -- one of G_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, used to choose the type of map to display.
|
||||
|
||||
31
doc/Layer.Grid.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
OpenLayers.Layer.Grid
|
||||
|
||||
The Grid layer is the base layer for almost all image layers. This is a subclass of HTTPRequest.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.Grid(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
|
||||
|
||||
* Methods
|
||||
getGridBounds() -- {OpenLayers.Bounds} -- return geographic extent of the grid of tiles.
|
||||
_initTiles() -- none -- Used to initialize the tile grid, creating image elements as neccesary and filling them with the correct images.
|
||||
spiralTileLoad() -- none -- Called from _initTiles. Rotates through the grid filling in the images for the grid.
|
||||
clone() -- {OpenLayers.Layer.Grid} -- create a clone of the layer. Subclassed from {OpenLayers.Layer}.
|
||||
setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map. This is also where the tileSize is retrieved from the map. Subclassed from {OpenLayers.Layer}.
|
||||
moveTo({OpenLayers.Bounds|bounds}, {Boolean|zoomChanged}) -- none -- Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location. Subclassed from {OpenLayers.Layer}.
|
||||
getResolution() -- {float} -- Return the current resolution of the map, in units/pixel. Subclassed from {OpenLayers.Layer}.
|
||||
getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport. Subclassed from {OpenLayers.Layer}.
|
||||
getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds. Subclassed from {OpenLayers.Layer}.
|
||||
getLonLatFromViewPortPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the layer. Subclassed from {OpenLayers.Layer}.
|
||||
getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels. Subclassed from {OpenLayers.Layer}.
|
||||
|
||||
* Parameters
|
||||
buffer -- Default 2. Number of tiles around the central map area which OpenLayers will preload so that dragging goes more smoothly.
|
||||
* Subclassed from OpenLayers.Layer
|
||||
isBaseLayer -- This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false.
|
||||
projection -- SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
maxExtent -- an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
maxResolution -- The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
maxZoomLevel -- The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
minScale -- The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
maxScale -- The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
units -- The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
11
doc/Layer.HTTPRequest.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
OpenLayers.Layer.HTTPRequest
|
||||
|
||||
Sublass of Layer used for services which require initiating multiple HTTPRequests.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.HTTPRequest(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
|
||||
|
||||
* Methods
|
||||
initResolutions() -- none -- Based on the current minScale/maxScale/maxResolution/maxZoomLevels/scales/resolutions parameters, initializes an array of 'zoom levels' as this.resolutions, which are then used as an index into when zooming.
|
||||
getFullRequestString(newParams) -- {String} -- Returns the full request string for a combination of the defaults on this layer and the parameters passed via newParams.
|
||||
|
||||
7
doc/Layer.KaMap.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
OpenLayers.Layer.KaMap
|
||||
|
||||
ka-Map is a Mapserver wrapper which performs caching and works around many of the deficiencies with tiling when using Mapserver as a WMS client.
|
||||
|
||||
* Construtor
|
||||
OpenLayers.Layer.KaMap(name, url, params, options) -- URL is the url of the tile.php for KaMap.
|
||||
|
||||
13
doc/Layer.Markers.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
OpenLayers.Layer.Markers
|
||||
|
||||
The base class for all vector drawing, The OpenLayers.Layer.Markers layer is the primary way to get annotations into your map.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.Markers(name, options) -- Name and options for layer.
|
||||
|
||||
* Methods
|
||||
addMarker({OpenLayers.Marker|Marker}) -- none -- Adds a marker to the layer, sets the map object on the marker, and calls drawMarker on the marker.
|
||||
removeMarker({OpenLayers.Marker|Marker}) -- none -- Remove the marker from the layer and map.
|
||||
clearMarkers() -- none -- Remove all markers from the layer with removeMarker.
|
||||
redraw() -- none -- Redraw all markers. Used so that markers can change their position when a base layer changes.
|
||||
drawMarker -- none -- Call marker.draw(px), which passes the Pixel of the latitude/longitude in the map viewport to the marker. adds the marker to the div, and marks the marker as drawn.
|
||||
10
doc/Layer.Text.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
OpenLayers.Layer.Text
|
||||
|
||||
Subclass of Markers layer which retrieves CSV file from the web, and parses content to create markers and popups.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.Text(name, options) -- Pass in name, and set location: 'URL of CSV file' in the options hash.
|
||||
|
||||
* Methods
|
||||
parseData(ajaxRequest) -- none -- Parses returned CSV file.
|
||||
|
||||
14
doc/Layer.VirtualEarth.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
OpenLayers.Layer.VirtualEarth
|
||||
|
||||
The Virtual Earth Layer in OpenLayers allows you to include Virtual Earth Maps in your OpenLayers maps. In order to use the Virtual Earth Layer, you must first include the Virtual Earth API script in your page. Once you have done this, simply add the layer to your map.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.VirtualEarth(name) -- Constructor for Virtual Earth layer. Accepts name.
|
||||
|
||||
* Methods
|
||||
getOLLonLatFromVELatLng(VELatLon) -- {OpenLayers.LonLat} -- Convert from VELatLon to OpenLayers LonLat
|
||||
getVELatLngFromOLLonLat({OpenLayers.LonLat|lonlat}) -- VELatLon -- Convert From OpenLayers LonLat to VELatLon
|
||||
getOLPixelFromVEPoint(Msn.VE.Pixel) -- {OpenLayers.Pixel} -- Convert from VEPoint to OpenLayers.Pixel
|
||||
getGPointFromOLPixel({OpenLayers.Pixel|pixel}) -- Msn.VE.Pixel -- Create Msvn.VE.Pixel from OpenLayers Pixel.
|
||||
|
||||
|
||||
15
doc/Layer.WMS.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
OpenLayers.Layer.WMS
|
||||
|
||||
The WMS layer allows one to connect to a WMS server to obtain images. Params are available as a hash on the layer object, however, all keys are upper-cased automatically for maximum compatibility with WMS servers, so a parameter which is set as 'layers' will be uppercased to LAYERS. Where 'layer' is your Javscript variable for the layer, layer.params.LAYERS is the value of the layers param as set by the constructor.
|
||||
|
||||
If you wish to change params, you should use mergeNewParams, rather than accessing the parameters directly.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer.WMS(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
|
||||
|
||||
* Methods
|
||||
getURL({OpenLayers.Bounds|bounds}) -- {String} -- Returns a WMS URL for the given bounds based on the properties of the layer.
|
||||
All other methods are inherited from {OpenLayers.Layer.Grid}
|
||||
|
||||
* Options
|
||||
isBaseLayer -- WMS layers default to being base layers unless one of their parameters is 'transparent':'true'.
|
||||
38
doc/Layer.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
OpenLayers.Layer
|
||||
|
||||
Layers are the most important and central aspect of OpenLayers. They are the
|
||||
core functionality for the software: Everything that ends up on the map comes
|
||||
from a layer. The base layer class is designed to be subclassed by any number
|
||||
of different layers.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Layer(name, options) -- All layers have a name as their first param. This name is used to display the layer in the LayerSwitcher, and for other purposes. The options parameter is used to replace any parameters of the Layer which need to be different.
|
||||
|
||||
* Methods
|
||||
clone() -- {OpenLayers.Layer} -- create a clone of the layer.
|
||||
setName({String|name}) -- none -- Set the name of the layer to something different.
|
||||
moveTo({OpenLayers.Bounds|bounds}, {Boolean|zoomChanged}) -- none -- Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location.
|
||||
reproject() -- none -- Subclassed by vector layers to redraw vectors when base layer changes.
|
||||
setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map.
|
||||
getVisibility() -- {Boolean} -- Return true or false based on visibility of the layer.
|
||||
setVisibility({Boolean|visible}) -- none -- Set the layer visibility, and trigger the appropriate events.
|
||||
getResolution() -- {float} -- Return the current resolution of the map, in units/pixel.
|
||||
getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport.
|
||||
getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds.
|
||||
getLonLatFromViewPortPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the laye
|
||||
getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels
|
||||
|
||||
* Parameters
|
||||
isBaseLayer -- This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false.
|
||||
projection -- SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
maxExtent -- an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
maxResolution -- The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
maxZoomLevel -- The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
minScale -- The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
maxScale -- The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
units -- The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
13
doc/LonLat.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
OpenLayers.LonLat
|
||||
|
||||
This class represents a geographic coordinate pair, either projected or unprojected.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.LonLat({float|lon}, {float|lat}) -- Create LonLat.
|
||||
|
||||
* Methods
|
||||
toString() -- {String} -- Converts to human readable string.
|
||||
toShortString() -- {String} -- Converts to short human readable string.
|
||||
clone() -- {OpenLayers.Size} -- Returns a copy of the pixel.
|
||||
equals({OpenLayers.LonLat|ll}) -- {Boolean} -- Compares two LonLats.
|
||||
add({int|lon}, {int|lat}) -- {OpenLayers.LonLat} -- add x and y to the current coordinates.
|
||||
75
doc/Map.txt
Normal file
@@ -0,0 +1,75 @@
|
||||
OpenLayers.Map
|
||||
|
||||
Instantiate class {OpenLayers.Map} in order to create a map. This is the central class in the API. Everything else is auxiliary.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Map(container, opts?) -- Creates a new map inside of the given HTML container, which is typically a DIV element. The opts variable is an object with various options, as described in the options section below.
|
||||
|
||||
* Methods
|
||||
* Layer Management
|
||||
addLayer({OpenLayers.Layer|layer}) -- none -- adds a layer to the list currently set for the map.
|
||||
addLayers([ {OpenLayers.Layer|layer}, {OpenLayers.Layer|layer} ]) -- none -- Adds multiple layers to a map.
|
||||
removeLayer({OpenLayers.Layer|layer}) -- none -- Remove a layer from the map.
|
||||
setBaseLayer({OpenLayers.Layer|layer}) -- none -- Sets a new base layer for the map. The provided layer should have already been added to the map. Changing the base layer causes all other base layers to be turned off, and all overlays to reproject themselves.
|
||||
|
||||
* Control Management
|
||||
addControl({OpenLayers.Control|control}) -- none -- Adds a control to the map.
|
||||
|
||||
* Popup Management
|
||||
addPopup({OpenLayers.Popup|popup}, {Boolean|exclusive}) -- none -- adds a popup to the map. If exclusive is set to true, then all other popups are closed first.
|
||||
removePopup({OpenLayers.Popup|popup}) -- none -- removes an existing popup from the map.
|
||||
|
||||
* Center management
|
||||
setCenter({OpenLayers.LonLat|lonlat}, {int|zoom}) -- none -- Set the center point of the map. This then moves all the layers to the new center location as well, using each layer's 'moveTo' function. The 'zoom' is an integer from 0 to maxZoomLevel.
|
||||
pan({Integer|dx}, {Integer|dy}) -- none -- Allows user to pan by a value of screen pixels
|
||||
|
||||
* Zoom Management
|
||||
zoomTo({int|zoom}) -- none -- zoom to the given zoom level.
|
||||
zoomIn() -- none -- zoom in one level.
|
||||
zoomOut() -- none -- zoom out one level.
|
||||
zoomToExtent({OpenLayers.Bounds|bounds}) -- none -- Set the map such that the bounds fits within the current viewport area.
|
||||
zoomToMaxExtent() -- none -- Zoom such that the entire bounds of the map is contained in the viewport.
|
||||
zoomToScale({float}) -- none -- Zoom as close to the given scale as possible. Scale can be given as a ratio (1/24000) or as the denominator of the scale value (24000). zoomToScale will find the zoom level which most closely fits the requested scale and set that as the current zoom level.
|
||||
|
||||
* Current Map Information
|
||||
getLonLatFromPixel({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns OpenLayers.LonLat corresponding to the given OpenLayers.Pixel, translated into lon/lat by the current base layer
|
||||
getPixelFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns OpenLayers.Pixel corresponding to the given OpenLayers.LonLat, translated by the current base layer
|
||||
getCenter() -- {OpenLayers.LonLat} -- Returns a LonLat for the current center of the map
|
||||
getZoom() -- {Integer} -- Returns the current zoom level as an integer
|
||||
getExtent() -- {OpenLayers.Bounds} -- Returns a Bounds object which represents the geographic bounds of the current viewPort.
|
||||
getSize() -- {OpenLayers.Pixel} -- Returns the pixel size of the current map window.
|
||||
getTileSize() -- {OpenLayers.Size} -- Returns tile size currently set for map.
|
||||
getResolution() -- {float} -- Returns the current resolution (units/pixel) of the map
|
||||
getZoomForExtent({OpenLayers.Bounds|bounds}) -- Zoom level in which the given bounds will fit -- zooming to this level and setting the center of the map in the center of the bounds will always fit the given bounds in the map.
|
||||
|
||||
* Default Map Information
|
||||
getMaxResolution() -- {float} -- returns The Map's Maximum Resolution, the units/pixel at zoom level 0. The default is 1.40625, to match the approximate MaxResolution used by the commercial providers.
|
||||
getMaxExtent() -- {OpenLayers.Bounds} -- Return the max extent of the current base layer as defined on the layer. The default maxExtent for OpenLayers is -180,-90,180,90
|
||||
getMaxZoomLevel() -- {int} -- Returns the maximum zoom level that can be reached in the map for the current base layer
|
||||
getMinZoomLevel() -- {int} -- Returns the minimum zoom level that can be reached in the map for the current base layer
|
||||
|
||||
* Events
|
||||
addlayer -- a layer is added to the map
|
||||
removelayer -- a layer is removed from the map
|
||||
changelayer -- a layer has some property of it, typically visibility, changed.
|
||||
changebaselayer -- the current base layer changes
|
||||
movestart -- start of a movement in the map
|
||||
zoomend -- end of a zoom action
|
||||
mouseover -- map is moused over
|
||||
mouseout -- map is no longer mousedout
|
||||
mousemove -- mouse moves inside map
|
||||
dragstart -- drag action starts
|
||||
dragend -- drag action ends
|
||||
|
||||
* Options:
|
||||
* controls -- an array of control objects to be added to the map. The default is [new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.PanZoom()]
|
||||
* projection -- used by WMS layers, should be an SRS identifier.
|
||||
* maxZoomLevel -- The number of zoom levels to use in the map.
|
||||
* maxExtent -- {OpenLayers.Bounds} to be used as the maximum extent of a map. The center of the map can not leave the maxExtent of the map when dragging.
|
||||
* maxResolution -- The units/pixel measurement at zoom level 0. Default is 1.40625
|
||||
* resolutions -- An array of resolutions to be used as an index when zooming. Overrides maxZoomLevel and maxResolution if present.
|
||||
* minScale -- The smallest scale value. minScale is preferred over maxResolution, if present.
|
||||
* maxScale -- The maximum scale the map should include. Overrides maxZoomLevel if present.
|
||||
* units -- The units of the map. Defaults to degrees. Neccesary when using scale in any way.
|
||||
* scales -- An array of scale values. Overrides maxResolution, maxZoomLevel, resolutions, and min/max scale if present.
|
||||
|
||||
10
doc/Marker.Box.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
OpenLayers.Marker.Box
|
||||
|
||||
A different kind of Marker, designed to be added to a Boxes layer instead of a Markers layer.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Marker.Box({OpenLayers.Bounds|bounds}, borderColor, borderWidth) -- Set up a box. Defaults are red, with a width of 2.
|
||||
|
||||
* Methods
|
||||
setBorder(color, width) -- sets properties of border color and width.
|
||||
|
||||
15
doc/Marker.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
OpenLayers.Marker
|
||||
|
||||
Instantiate class {OpenLayers.Marker} in order to create a marker.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Marker({OpenLayers.LonLat|lonlat}, {OpenLayers.Icon|icon}? ) -- Creates a new marker object. This object must be added to a Marker layer and will then be displayed. The icon can be left null -- if this is the case, then the default OpenLayers icon will be used.
|
||||
|
||||
* Methods
|
||||
onScreen() -- {boolean} -- Returns whether or not the marker is currently visible on screen.
|
||||
inflate({float}) -- none -- Changes the size of the Icon by a factor of the passed float.
|
||||
display({string}) -- none -- Sets the style.display property of the Icon.
|
||||
|
||||
* Events
|
||||
Standard browser events are available.
|
||||
|
||||
13
doc/Pixel.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
OpenLayers.Pixel
|
||||
|
||||
This class represents a screen coordinate in x and y coordinates.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Pixel({float|x}, {float|y}) -- Create Pixel.
|
||||
|
||||
* Methods
|
||||
toString() -- {String} -- Converts to human readable string.
|
||||
clone() -- {OpenLayers.Pixel} -- Returns a copy of the pixel.
|
||||
equals({OpenLayers.Pixel|px}) -- {Boolean} -- Tests for equivilance.
|
||||
add({int|x}, {int|y}) -- {OpenLayers.Pixel} -- add x and y to the current coordinates.
|
||||
offset({OpenLayers.Pixel|pixel}) -- {OpenLayers.Pixel} -- Add pixels together.
|
||||
11
doc/Size.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
OpenLayers.Size
|
||||
|
||||
This class represents a width/height pair.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Size({float|h}, {float|w}) -- Create Size.
|
||||
|
||||
* Methods
|
||||
toString() -- {String} -- Converts to human readable string.
|
||||
clone() -- {OpenLayers.Size} -- Returns a copy of the pixel.
|
||||
add({int|x}, {int|y}) -- {OpenLayers.Size} -- add x and y to the current coordinates.
|
||||
7
doc/Tile.Image.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
OpenLayers.Tile.Image
|
||||
|
||||
The image tile is designed to hold images for all types of layers, from WMS to KaMap to WorldWind.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Tile.Image({OpenLayers.Layer|layer}, {OpenLayers.Pixel|position}, {OpenLayers.Bounds|bounds}, {String|url}, {OpenLayers.Size|size}) -- Create a new tile, with properties passed.
|
||||
|
||||
6
doc/Tile.WFS.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
OpenLayers.Tile.WFS
|
||||
|
||||
The WFS tile allows you to load any number of WFS URLs into a single tile.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Tile.WFS({OpenLayers.Layer|layer}, {OpenLayers.Pixel|position}, {OpenLayers.Bounds|bounds}, {String|urls}, {OpenLayers.Size|size}) -- Create a new tile, with properties passed. The major difference between this tile and other tiles is what it does with results: The WFS tile is designed to parse XML responses, and create features for each item in the response.
|
||||
10
doc/Tile.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
OpenLayers.Tile
|
||||
|
||||
This is a class designed to designate a single tile, however
|
||||
it is explicitly designed to do relatively little. Tiles store information
|
||||
about themselves -- such as the URL that they are related to, and their
|
||||
size - but do not add themselves to the layer div automatically, for
|
||||
example.
|
||||
|
||||
* Constructor
|
||||
OpenLayers.Tile({OpenLayers.Layer|layer}, {OpenLayers.Pixel|position}, {OpenLayers.Bounds|bounds}, {String|url}, {OpenLayers.Size|size}) -- Create a new tile, with properties passed.
|
||||
7
doc/Util.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
OpenLayers.Util
|
||||
|
||||
Utility class. Stores a bunch of methods and settings that don't fit anywhere else.
|
||||
|
||||
* Options
|
||||
|
||||
OpenLayers.Util.onImageLoadErrorColor -- A string to set img.style.backgroundColor to if the onerror event fires for the image (useful for 500 errors from WMS, for example).
|
||||
@@ -6,5 +6,10 @@ Philip Lindsay
|
||||
John Frank
|
||||
Schuyler Erle
|
||||
|
||||
Patch contributors
|
||||
------------------
|
||||
Corey Puffault
|
||||
Tim Schaub
|
||||
|
||||
OpenLayers is graciously supported by MetaCarta, Inc.
|
||||
<http://www.metacarta.com>.
|
||||
|
||||
79
examples/baseLayers.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
background-color: blue;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
|
||||
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>
|
||||
<!-- Localhost key -->
|
||||
<!-- <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'></script>-->
|
||||
<script src='http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js'></script>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var lon = 5;
|
||||
var lat = 40;
|
||||
var zoom = 5;
|
||||
var map, markers;
|
||||
var barcelona = new OpenLayers.LonLat(2.13134765625,
|
||||
41.37062534198901);
|
||||
var madrid = new OpenLayers.LonLat(-3.6968994140625,
|
||||
40.428314208984375);
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map( $('map') );
|
||||
|
||||
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0",
|
||||
{layers: 'basic'} );
|
||||
var google = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP });
|
||||
var ve = new OpenLayers.Layer.VirtualEarth( "VE");
|
||||
|
||||
|
||||
map.addLayers([wms, google, ve]);
|
||||
|
||||
markers = new OpenLayers.Layer.Markers("markers");
|
||||
map.addLayer(markers);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
|
||||
map.addControl( new OpenLayers.Control.LayerSwitcher() );
|
||||
|
||||
}
|
||||
|
||||
function add() {
|
||||
var url = 'http://boston.openguides.org/markers/AQUA.png';
|
||||
var sz = new OpenLayers.Size(10, 17);
|
||||
var calculateOffset = function(size) {
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h);
|
||||
};
|
||||
var icon = new OpenLayers.Icon(url, sz, null, calculateOffset);
|
||||
marker = new OpenLayers.Marker(barcelona, icon);
|
||||
markers.addMarker(marker);
|
||||
|
||||
marker = new OpenLayers.Marker(madrid, icon.clone());
|
||||
markers.addMarker(marker);
|
||||
|
||||
}
|
||||
|
||||
function remove() {
|
||||
markers.removeMarker(marker);
|
||||
}
|
||||
|
||||
// -->
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers With WMS, Google, VE Example</h1>
|
||||
<div id="map"></div>
|
||||
<div style="background-color:green" onclick="add()"> click to add a marker to the map</div>
|
||||
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>
|
||||
</body>
|
||||
</html>
|
||||
49
examples/boxes.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
box_extents = [
|
||||
[-10, 50, 5, 60],
|
||||
[-75, 41, -71, 44],
|
||||
[-122.6, 37.6, -122.3, 37.9],
|
||||
[10, 10, 20, 20]
|
||||
];
|
||||
|
||||
function init(){
|
||||
var map = new OpenLayers.Map('map');
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
|
||||
var boxes = new OpenLayers.Layer.Boxes( "Boxes" );
|
||||
|
||||
for (var i = 0; i < box_extents.length; i++) {
|
||||
ext = box_extents[i];
|
||||
bounds = new OpenLayers.Bounds(ext[0], ext[1], ext[2], ext[3]);
|
||||
box = new OpenLayers.Marker.Box(bounds);
|
||||
box.events.register("click", box, function (e) {
|
||||
this.setBorder("yellow");
|
||||
});
|
||||
boxes.addMarker(box);
|
||||
}
|
||||
|
||||
map.addLayers([ol_wms, boxes]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToMaxExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
613
examples/canvas.html
Normal file
@@ -0,0 +1,613 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var map, canvas;
|
||||
var click;
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map');
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
|
||||
var g = new OpenLayers.Layer.Google("Google");
|
||||
canvas = new OpenLayers.Layer.Canvas("Canvas Layer");
|
||||
map.addLayers([ol_wms, g,canvas]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToMaxExtent();
|
||||
canvas.drawLine(new OpenLayers.LonLat(-71,42), new OpenLayers.LonLat(0,0));
|
||||
canvas.setStrokeColor("red");
|
||||
canvas.setStrokeWidth(5);
|
||||
canvas.setAlpha(.5);
|
||||
map.events.register("click", map, function(e) {
|
||||
if (click) {
|
||||
canvas.drawLine(click, this.getLonLatFromPixel(e.xy));
|
||||
click = null;
|
||||
$('status').innerHTML = "";
|
||||
}
|
||||
else {
|
||||
click = this.getLonLatFromPixel(e.xy);
|
||||
$('status').innerHTML = "Point 1 stored: "+click+". <a href='#' onclick='click=null;return false'>Reset</a>";
|
||||
}
|
||||
});
|
||||
}
|
||||
function drawIt() {
|
||||
canvas.drawLine(
|
||||
new OpenLayers.LonLat(parseFloat($('lon1').value), parseFloat($('lat1').value)),
|
||||
new OpenLayers.LonLat(parseFloat($('lon2').value), parseFloat($('lat2').value))
|
||||
);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<div style="float:right">
|
||||
<br />
|
||||
Start Lon: <input type="text" id="lon1" />
|
||||
Start Lat: <input type="text" id="lat1" /><br />
|
||||
End Lon: <input type="text" id="lon2" />
|
||||
End Lat: <input type="text" id="lat2" /><br />
|
||||
<input type="submit" value="Add line" onclick="drawIt()" />
|
||||
<div id="status"></div>
|
||||
<center>
|
||||
<table border="1" cellpadding="0" cellspacing="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td bgcolor="#000000">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#000000');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#000033">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#000033');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#000066">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#000066');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#000099">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#000099');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#0000cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#0000CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#0000ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#0000FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#330000">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#330000');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#330033">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#330033');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#330066">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#330066');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#330099">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#330099');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#3300cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#3300CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#3300ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#3300FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#660000">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#660000');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#660033">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#660033');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#660066">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#660066');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#660099">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#660099');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#6600cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#6600CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#6600ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#6600FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#990000">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#990000');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#990033">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#990033');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#990066">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#990066');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#990099">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#990099');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#9900cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#9900CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#9900ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#9900FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc0000">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC0000');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc0033">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC0033');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc0066">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC0066');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc0099">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC0099');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc00cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC00CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc00ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC00FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff0000">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF0000');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff0033">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF0033');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff0066">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF0066');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff0099">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF0099');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff00cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF00CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff00ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF00FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#003300">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#003300');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#003333">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#003333');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#003366">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#003366');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#003399">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#003399');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#0033cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#0033CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#0033ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#0033FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#333300">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#333300');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#333333">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#333333');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#333366">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#333366');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#333399">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#333399');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#3333cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#3333CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#3333ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#3333FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#663300">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#663300');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#663333">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#663333');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#663366">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#663366');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#663399">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#663399');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#6633cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#6633CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#6633ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#6633FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#993300">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#993300');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#993333">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#993333');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#993366">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#993366');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#993399">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#993399');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#9933cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#9933CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#9933ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#9933FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc3300">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC3300');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc3333">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC3333');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc33cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC33CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc33ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC33FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff3300">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF3300');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff3333">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF3333');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff3366">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF3366');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff3399">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF3399');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff33cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF33CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff33ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF33FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#006600">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#006600');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#006633">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#006633');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#006666">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#006666');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#006699">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#006699');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#0066cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#0066CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#336699">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#336699');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#3366cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#3366CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#3366ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#3366FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#666600">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#666600');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#666633">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#666633');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#666666">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#666666');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#666699">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#666699');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#6666cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#6666CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#6666ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#6666FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#996600">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#996600');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#996633">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#996633');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#9966ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#9966FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc6600">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC6600');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc6633">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC6633');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc6666">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC6666');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc6699">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC6699');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc66cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC66CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#cc66ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#CC66FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff6600">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF6600');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#ff6633">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#FF6633');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#009900">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#009900');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#009933">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#009933');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#009966">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#009966');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#009999">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#009999');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#0099cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#0099CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#0099ff">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#0099FF');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#339900">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#339900');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#339933">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#339933');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#339966">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#339966');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#339999">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#339999');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td bgcolor="#3399cc">
|
||||
<font size="-3">
|
||||
<a href="#" onclick="canvas.setStrokeColor('#3399CC');return false"> </a>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -27,7 +27,8 @@
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms, cie_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToMaxExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToMaxExtent();
|
||||
map.events.register("click", map, function(e) {
|
||||
var lonlat = map.getLonLatFromViewPortPx(e.xy);
|
||||
alert("You clicked near " + lonlat.lat + " N, " +
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -34,13 +34,16 @@
|
||||
map.addControl(new OpenLayers.Control.PanZoomBar());
|
||||
map.addControl(new OpenLayers.Control.MouseToolbar());
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.Permalink());
|
||||
map.addControl(new OpenLayers.Control.Permalink($('permalink')));
|
||||
if (!map.getCenter()) map.zoomToMaxExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<a style="float:right" href="" id="permalink">Permalink</a>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
17
examples/doubleSetCenter.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width:100%; height:100%" id="map"></div>
|
||||
<script defer="defer" type="text/javascript">
|
||||
var map = new OpenLayers.Map('map');
|
||||
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(wms);
|
||||
map.setCenter(new OpenLayers.LonLat(100,10));
|
||||
map.setCenter(new OpenLayers.LonLat(1,1));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -14,7 +14,7 @@
|
||||
var map = new OpenLayers.Map('map');
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
|
||||
|
||||
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
|
||||
"http://wms.jpl.nasa.gov/wms.cgi",
|
||||
@@ -26,12 +26,10 @@
|
||||
"prov_bound,fedlimit,rail,road,popplace",
|
||||
transparent: "true", format: "image/png" });
|
||||
|
||||
jpl_wms.setVisibility(false);
|
||||
dm_wms.setVisibility(false);
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms, dm_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToMaxExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -27,10 +27,11 @@
|
||||
|
||||
function init(){
|
||||
// these should be object methods or something
|
||||
map = new OpenLayers.Map( $('map'), {maxExtent: new OpenLayers.Bounds(33861, 717605, 330846, 1019656), maxResolution: 296985/1024, projection:"EPSG:2805" } );
|
||||
map = new OpenLayers.Map( $('map') );
|
||||
var basemap = new OpenLayers.Layer.WMS( "Boston",
|
||||
"http://boston.freemap.in/cgi-bin/mapserv?",
|
||||
{map: '/www/freemap.in/boston/map/mass.map', layers: 'border,water,roads', format: 'png'} );
|
||||
{map: '/www/freemap.in/boston/map/gmaps.map', layers: 'border,water,roads', format: 'png', 'transparent': 'off'},
|
||||
{maxExtent: new OpenLayers.Bounds(33861, 717605, 330846, 1019656), maxResolution: 296985/1024, projection:"EPSG:2805" } );
|
||||
var rapid = new OpenLayers.Layer.WMS( "Rapid Transit",
|
||||
"http://boston.freemap.in/cgi-bin/mapserv?",
|
||||
{map: '/www/freemap.in/boston/map/mass.map', layers: 'rapid_transit', format: 'png', transparent:'true'} );
|
||||
|
||||
43
examples/georss.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 400px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var map, layer;
|
||||
|
||||
OpenLayers.ProxyHost = "/proxy/?url=";
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map', {maxResolution:'auto'});
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
}
|
||||
function addUrl() {
|
||||
var value = $('url').value;
|
||||
var parts = value.split("/");
|
||||
var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value);
|
||||
map.addLayer(newl);
|
||||
$("url").value = "";
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>GeoRSS in OpenLayers</h1>
|
||||
<p style="font-size:.9em;">This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are currently supported. <a href="http://trac.openlayers.org/wiki/HowToDownload">Get the code!</a></p>
|
||||
<form onsubmit="return false;">
|
||||
GeoRSS URL: <input type="text" id="url" size="50" /><input type="submit" onclick="addUrl(); return false;" value="Load Feed" onsubmit="addUrl(); return false;" />
|
||||
</form>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
378
examples/georss.xml
Normal file
@@ -0,0 +1,378 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="/css/rss.css" ?>
|
||||
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://purl.org/rss/1.0/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:georss="http://www.georss.org/georss">
|
||||
<docs>This is an RSS file. Copy the URL into your aggregator of choice. If you don't know what this means and want to learn more, please see: <span>http://platial.typepad.com/news/2006/04/really_simple_t.html</span> for more info.</docs><channel rdf:about="http://platial.com">
|
||||
<link>http://platial.com</link>
|
||||
<title>Crschmidt's Places At Platial</title>
|
||||
<description></description>
|
||||
<items>
|
||||
<rdf:Seq>
|
||||
<rdf:li resource="http://platial.com/place/90306"/>
|
||||
<rdf:li resource="http://platial.com/place/67230"/>
|
||||
<rdf:li resource="http://platial.com/place/65645"/>
|
||||
<rdf:li resource="http://platial.com/place/62200"/>
|
||||
<rdf:li resource="http://platial.com/place/28232"/>
|
||||
<rdf:li resource="http://platial.com/place/43666"/>
|
||||
<rdf:li resource="http://platial.com/place/28394"/>
|
||||
<rdf:li resource="http://platial.com/place/28251"/>
|
||||
<rdf:li resource="http://platial.com/place/28392"/>
|
||||
<rdf:li resource="http://platial.com/place/28391"/>
|
||||
<rdf:li resource="http://platial.com/place/28231"/>
|
||||
<rdf:li resource="http://platial.com/place/28393"/>
|
||||
<rdf:li resource="http://platial.com/place/31685"/>
|
||||
<rdf:li resource="http://platial.com/place/28596"/>
|
||||
<rdf:li resource="http://platial.com/place/28595"/>
|
||||
<rdf:li resource="http://platial.com/place/28594"/>
|
||||
<rdf:li resource="http://platial.com/place/28593"/>
|
||||
<rdf:li resource="http://platial.com/place/28592"/>
|
||||
<rdf:li resource="http://platial.com/place/28591"/>
|
||||
<rdf:li resource="http://platial.com/place/28590"/>
|
||||
<rdf:li resource="http://platial.com/place/28589"/>
|
||||
<rdf:li resource="http://platial.com/place/28588"/>
|
||||
<rdf:li resource="http://platial.com/place/28587"/>
|
||||
<rdf:li resource="http://platial.com/place/28586"/>
|
||||
<rdf:li resource="http://platial.com/place/28585"/>
|
||||
<rdf:li resource="http://platial.com/place/28584"/>
|
||||
<rdf:li resource="http://platial.com/place/28583"/>
|
||||
<rdf:li resource="http://platial.com/place/28582"/>
|
||||
<rdf:li resource="http://platial.com/place/28581"/>
|
||||
<rdf:li resource="http://platial.com/place/28580"/>
|
||||
<rdf:li resource="http://platial.com/place/28579"/>
|
||||
<rdf:li resource="http://platial.com/place/28578"/>
|
||||
<rdf:li resource="http://platial.com/place/28577"/>
|
||||
<rdf:li resource="http://platial.com/place/28576"/>
|
||||
<rdf:li resource="http://platial.com/place/28575"/>
|
||||
<rdf:li resource="http://platial.com/place/28574"/>
|
||||
<rdf:li resource="http://platial.com/place/28573"/>
|
||||
<rdf:li resource="http://platial.com/place/28572"/>
|
||||
<rdf:li resource="http://platial.com/place/28571"/>
|
||||
<rdf:li resource="http://platial.com/place/28570"/>
|
||||
</rdf:Seq>
|
||||
</items>
|
||||
</channel>
|
||||
<item rdf:about="http://platial.com/place/90306">
|
||||
<link>http://platial.com/place/90306</link>
|
||||
<title>Knitting Room</title>
|
||||
<description><![CDATA[This little shop is jammed full. Yarn, yarn everywhere. They make the most of every possible nook and cranny. I like this place also because they have a lot of different kinds of knitting needles in all different sizes. Also, the people who work here are younger and hipper than in the other stores I go to. I reccomend buying supplies here and then knitting your way through a good documentary at the Capitol Theater across the street.<br/>Address: 2 lake St, Arlington, MA <br/>Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats<br /><br /><a href="http://platial.com/place/90306">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/90306">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>42.405696 -71.142197</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-06-08T17:35:01.942452+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/67230">
|
||||
<link>http://platial.com/place/67230</link>
|
||||
<title>Knitting Room</title>
|
||||
<description><![CDATA[This little shop is jammed full. Yarn, yarn everywhere. They make the most of every possible nook and cranny. I like this place also because they have a lot of different kinds of knitting needles in all different sizes. Also, the people who work here are younger and hipper than in the other stores I go to. I reccomend buying supplies here and then knitting your way through a good documentary at the Capitol Theater across the street.<br/>Address: 2 lake St, Arlington, MA <br/>Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats<br /><br /><a href="http://platial.com/place/67230">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/67230">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>42.405524 -71.142273</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-04-24T11:35:26.733857+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/65645">
|
||||
<link>http://platial.com/place/65645</link>
|
||||
<title>â ¢¢â¢Â£ËøÅ</title>
|
||||
<description><![CDATA[ijeª£âµËËî<br/>Address: 151 Erie St., Cambridge, MA<br/>Tags: platial graffiti<br /><br /><a href="http://platial.com/place/65645">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/65645">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>42.352455 -71.110210</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-04-20T08:56:12.696224+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/62200">
|
||||
<link>http://platial.com/place/62200</link>
|
||||
<title>Allen Hall</title>
|
||||
<description><![CDATA[My dorm at UIUC.<br/>Address: 1301 W Gregory Dr, Urbana, IL<br/>Tags: dorm, uiuc, college<br/><a href="http://platial.com/place/62200"><img src="http://platial.comhttp://static.flickr.com/4/8576450_0d59cc2531_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/62200">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/62200">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>40.104172 -88.220623</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-04-14T08:01:01.872873+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28232">
|
||||
<link>http://platial.com/place/28232</link>
|
||||
<title>Bagby Hot Springs, OR</title>
|
||||
<description><![CDATA[Hot spring, temperature: 136 degress F, 58 degress C. However, the area around the springs are not exactly well looked upon by people who know the place.
|
||||
|
||||
<br/>Tags: 20s, rosalie, romance, childhood, hike, camping, soak, relax, beautiful, hot springs, bathhouse, favorite, popular, crowded, organized, honeymoon tub, plumbing made from hollowed out trees, hot springs, mt hood, notorious car break in spot, rash, bacteria<br /><br /><a href="http://platial.com/place/28232">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28232">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.936000 -122.173000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:10:18.553063+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/43666">
|
||||
<link>http://platial.com/place/43666</link>
|
||||
<title>Shooting Location for "The Field of Dreams" Film</title>
|
||||
<description><![CDATA[1989's Field of Dreams was a Best Picture Academy Award nominee, and the baseball field in the cornfield still stands today, and has become quite a tourist destination. Games are occasionally played at the field, re-enacting professional baseball at the turn of the 20th Century.<br/>Address: Dyersville, Iowa<br/>Tags: iowa, baseball, movie locations, field of dreams, kevin costner, costner, dyersville, kinsella, james earl jones, chicago black sox, shoeless joe, joe jackson, famous farms, film, movie, cinema, shooting location<br /><br /><a href="http://platial.com/place/43666">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/43666">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>42.481213 -91.111679</georss:point>
|
||||
<dc:creator>echinodermata</dc:creator>
|
||||
<dc:date>2006-03-23T11:40:17.654061+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28394">
|
||||
<link>http://platial.com/place/28394</link>
|
||||
<title>Moffetts (Bonneville) Hot Springs, WA</title>
|
||||
<description><![CDATA[Hot spring, temperature: 97 degress F, 36 degress C<br/>Tags: soak, hot springs, relax, nature<br /><br /><a href="http://platial.com/place/28394">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28394">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>45.658000 -121.962000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:16:27.329816+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28251">
|
||||
<link>http://platial.com/place/28251</link>
|
||||
<title>Austin Hot Springs, OR</title>
|
||||
<description><![CDATA[Hot spring, temperature: 186 degress F, 86 degress C<br/>Tags: soak, hot springs, relax, nature, popular, crowded<br /><br /><a href="http://platial.com/place/28251">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28251">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>45.021000 -122.009000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:11:04.489886+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28392">
|
||||
<link>http://platial.com/place/28392</link>
|
||||
<title>Rock Creek Hot Springs, WA</title>
|
||||
<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br/>Tags: soak, hot springs, relax, nature<br /><br /><a href="http://platial.com/place/28392">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28392">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>45.723000 -121.927000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:16:22.636855+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28391">
|
||||
<link>http://platial.com/place/28391</link>
|
||||
<title>St. Martins (Wind River) Hot Springs, WA</title>
|
||||
<description><![CDATA[Hot spring, temperature: 120 degress F, 49 degress C<br/>Tags: hot springs, soak, relax, nature, wonderful<br /><br /><a href="http://platial.com/place/28391">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28391">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>45.728000 -121.800000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:16:20.383244+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28231">
|
||||
<link>http://platial.com/place/28231</link>
|
||||
<title>Breitenbush Hot Springs, OR</title>
|
||||
<description><![CDATA[Hot spring, temperature: 198 degress F, 92 degress C<br/>Tags: hot springs, resort, relax, nature, beautiful, http:www.breitenbush.com, soaking<br /><br /><a href="http://platial.com/place/28231">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28231">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.782000 -121.975000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:10:16.529195+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28393">
|
||||
<link>http://platial.com/place/28393</link>
|
||||
<title>Collins Hot Springs, WA</title>
|
||||
<description><![CDATA[Hot spring, temperature: 122 degress F, 50 degress C<br/>Tags: portland, nice, hot springs, soak<br /><br /><a href="http://platial.com/place/28393">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28393">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>45.701000 -121.728000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:16:24.648745+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/31685">
|
||||
<link>http://platial.com/place/31685</link>
|
||||
<title>Darwin's Ltd.</title>
|
||||
<description><![CDATA[Nice little coffee shop/cafe, free Wifi, close enough to walk from Harvard Square.<br/>Address: 148 Mount Auburn St, Cambridge, MA<br/>Tags: coffee, beer, sandwiches, freewifi<br/><a href="http://platial.com/place/31685"><img src="http://platial.comhttp://static.flickr.com/38/84885937_74fd3d1025_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/31685">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/31685">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>42.373974 -71.125053</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-10T09:24:08.152985+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28596">
|
||||
<link>http://platial.com/place/28596</link>
|
||||
<title>Huckleberry Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: Boiling degress F, Boiling degress C<br /><br /><a href="http://platial.com/place/28596">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28596">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.115000 -110.684000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:32.283094+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28595">
|
||||
<link>http://platial.com/place/28595</link>
|
||||
<title>South Entrance Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 156 degress F, 69 degress C<br/><a href="http://platial.com/place/28595"><img src="http://platial.comhttp://static.flickr.com/52/130989872_f1457f68b5_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/28595">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28595">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.142000 -110.656000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:30.279497+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28594">
|
||||
<link>http://platial.com/place/28594</link>
|
||||
<title>Crawfish Creek Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 136 degress F, 58 degress C<br/><a href="http://platial.com/place/28594"><img src="http://platial.comhttp://static.flickr.com/52/128312256_d6a879924c_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/28594">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28594">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.157000 -110.699000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:28.280271+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28593">
|
||||
<link>http://platial.com/place/28593</link>
|
||||
<title>Crawfish Creek Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 138 degress F, 59 degress C<br /><br /><a href="http://platial.com/place/28593">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28593">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.165000 -110.723000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:20.364077+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28592">
|
||||
<link>http://platial.com/place/28592</link>
|
||||
<title>Snake Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 136 degress F, 58 degress C<br /><br /><a href="http://platial.com/place/28592">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28592">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.169000 -110.583000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:12.234974+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28591">
|
||||
<link>http://platial.com/place/28591</link>
|
||||
<title>Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 142 degress F, 61 degress C<br /><br /><a href="http://platial.com/place/28591">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28591">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.187000 -110.726000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:10.027857+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28590">
|
||||
<link>http://platial.com/place/28590</link>
|
||||
<title>Hot Springs on Upper Snake River, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 167 degress F, 75 degress C<br /><br /><a href="http://platial.com/place/28590">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28590">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.204000 -110.486000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:07.79658+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28589">
|
||||
<link>http://platial.com/place/28589</link>
|
||||
<title>Hot Springs on lewis Lake, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 154 degress F, 68 degress C<br /><br /><a href="http://platial.com/place/28589">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28589">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.276000 -110.636000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:05.683418+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28588">
|
||||
<link>http://platial.com/place/28588</link>
|
||||
<title>Rustic Geyser, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 199 degress F, 93 degress C<br /><br /><a href="http://platial.com/place/28588">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28588">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.282000 -110.506000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:03.66329+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28587">
|
||||
<link>http://platial.com/place/28587</link>
|
||||
<title>Bechler River Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 194 degress F, 90 degress C<br /><br /><a href="http://platial.com/place/28587">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28587">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.285000 -110.900000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:24:01.611442+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28586">
|
||||
<link>http://platial.com/place/28586</link>
|
||||
<title>Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: Boiling degress F, 201 degress C<br /><br /><a href="http://platial.com/place/28586">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28586">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.290000 -110.504000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:59.658699+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28585">
|
||||
<link>http://platial.com/place/28585</link>
|
||||
<title>Heart Lake Geyser Basin, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: Middle Group degress F, 174 degress C<br /><br /><a href="http://platial.com/place/28585">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28585">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.299000 -110.517000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:57.181801+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28584">
|
||||
<link>http://platial.com/place/28584</link>
|
||||
<title>Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: Boiling degress F, 201 degress C<br /><br /><a href="http://platial.com/place/28584">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28584">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.307000 -110.526000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:55.240485+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28583">
|
||||
<link>http://platial.com/place/28583</link>
|
||||
<title>Hot Springs on lewis Lake, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 199 degress F, 93 degress C<br /><br /><a href="http://platial.com/place/28583">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28583">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.309000 -110.654000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:53.22295+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28582">
|
||||
<link>http://platial.com/place/28582</link>
|
||||
<title>Shoshone Geyser Basin, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 203 degress F, 95 degress C<br /><br /><a href="http://platial.com/place/28582">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28582">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.354000 -110.800000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:51.179049+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28581">
|
||||
<link>http://platial.com/place/28581</link>
|
||||
<title>Hot Springs on Continental Divide, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 189 degress F, 87 degress C<br /><br /><a href="http://platial.com/place/28581">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28581">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.401000 -110.936000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:49.077176+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28580">
|
||||
<link>http://platial.com/place/28580</link>
|
||||
<title>Hot Springs on Upper Firehole River, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br /><br /><a href="http://platial.com/place/28580">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28580">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.404000 -110.824000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:47.054664+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28579">
|
||||
<link>http://platial.com/place/28579</link>
|
||||
<title>Summit Lake Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 162 degress F, 72 degress C<br /><br /><a href="http://platial.com/place/28579">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28579">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.410000 -110.953000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:45.039394+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28578">
|
||||
<link>http://platial.com/place/28578</link>
|
||||
<title>Lone Star Geyser Basin, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: Footbridge degress F, 183 degress C<br /><br /><a href="http://platial.com/place/28578">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28578">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.414000 -110.817000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:42.938808+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28577">
|
||||
<link>http://platial.com/place/28577</link>
|
||||
<title>West. Thumb Geyser Basin, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 203 degress F, 95 degress C<br /><br /><a href="http://platial.com/place/28577">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28577">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.417000 -110.570000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:40.90238+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28576">
|
||||
<link>http://platial.com/place/28576</link>
|
||||
<title>Lone Star Geyser, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 199 degress F, 93 degress C<br /><br /><a href="http://platial.com/place/28576">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28576">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.418000 -110.805000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:38.844625+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28575">
|
||||
<link>http://platial.com/place/28575</link>
|
||||
<title>Smoke Jumper Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 198 degress F, 92 degress C<br /><br /><a href="http://platial.com/place/28575">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28575">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.421000 -110.952000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:36.818513+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28574">
|
||||
<link>http://platial.com/place/28574</link>
|
||||
<title>West. Thumb Geyser Basin, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 196 degress F, 91 degress C<br /><br /><a href="http://platial.com/place/28574">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28574">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.422000 -110.574000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:34.767729+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28573">
|
||||
<link>http://platial.com/place/28573</link>
|
||||
<title>Potts Hot Spring Basin, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 203 degress F, 95 degress C<br /><br /><a href="http://platial.com/place/28573">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28573">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.433000 -110.581000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:32.749915+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28572">
|
||||
<link>http://platial.com/place/28572</link>
|
||||
<title>Hot Springs, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br /><br /><a href="http://platial.com/place/28572">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28572">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.433000 -110.813000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:30.829745+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28571">
|
||||
<link>http://platial.com/place/28571</link>
|
||||
<title>Hot Springs on Continental Divide, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br /><br /><a href="http://platial.com/place/28571">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28571">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.438000 -110.977000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:28.730401+00:00</dc:date>
|
||||
</item>
|
||||
<item rdf:about="http://platial.com/place/28570">
|
||||
<link>http://platial.com/place/28570</link>
|
||||
<title>SouthEastern Group, WY</title>
|
||||
<description><![CDATA[Hot spring, temperature: 198 degress F, 92 degress C<br /><br /><a href="http://platial.com/place/28570">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28570">Grab this on Platial</a> ]]></description>
|
||||
<georss:point>44.459000 -110.817000</georss:point>
|
||||
<dc:creator>crschmidt</dc:creator>
|
||||
<dc:date>2006-01-03T23:23:26.706763+00:00</dc:date>
|
||||
</item>
|
||||
</rdf:RDF>
|
||||
@@ -3,12 +3,17 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 100%;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
|
||||
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>
|
||||
<!-- Localhost key -->
|
||||
<!-- <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'></script>-->
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
@@ -18,21 +23,52 @@
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map( $('map') );
|
||||
gmap = new OpenLayers.Layer.Google( "Google" );
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
|
||||
map = new OpenLayers.Map( $('map') ,
|
||||
{ controls: [new OpenLayers.Control.MouseDefaults()] });
|
||||
|
||||
var normal = new OpenLayers.Layer.Google( "Google", // );
|
||||
{ minZoomLevel: 3, maxZoomLevel: 8 });
|
||||
var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP });
|
||||
var hybrid = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP });
|
||||
|
||||
|
||||
map.addLayers([satellite, normal, hybrid]);
|
||||
|
||||
markers = new OpenLayers.Layer.Markers("markers");
|
||||
map.addLayer(markers);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
|
||||
map.addLayer(layer);
|
||||
map.addLayer(gmap);
|
||||
map.addControl( new OpenLayers.Control.LayerSwitcher() );
|
||||
map.addControl( new OpenLayers.Control.PanZoomBar() );
|
||||
|
||||
}
|
||||
// -->
|
||||
|
||||
function add() {
|
||||
|
||||
var url = 'http://boston.openguides.org/markers/AQUA.png';
|
||||
var sz = new OpenLayers.Size(10, 17);
|
||||
var calculateOffset = function(size) {
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h);
|
||||
};
|
||||
var icon = new OpenLayers.Icon(url, sz, null, calculateOffset);
|
||||
var barcelona = new OpenLayers.LonLat(2.13134765625,
|
||||
41.37062534198901);
|
||||
marker = new OpenLayers.Marker(barcelona, icon);
|
||||
markers.addMarker(marker);
|
||||
}
|
||||
|
||||
function remove() {
|
||||
markers.removeMarker(marker);
|
||||
}
|
||||
|
||||
// -->
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<h1>OpenLayers With Google Layer Example</h1>
|
||||
<div id="map"></div>
|
||||
<div style="background-color:green" onclick="add()"> click to add a marker to the map</div>
|
||||
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -11,17 +11,23 @@
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function init(){
|
||||
var map = new OpenLayers.Map('map', {'maxResolution': 1.40625/4});
|
||||
var map = new OpenLayers.Map('map');
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
var ka_wms = new OpenLayers.Layer.KaMap( "KaMap",
|
||||
"http://www.h2guide.com/my-ka-map/h2tile.php?" , { map: 'h2guide', g: 'background' }, new OpenLayers.LonLat(0,0));
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "World Map",
|
||||
"http://labs.metacarta.com/wms/vmap0?",
|
||||
{layers: 'basic'} );
|
||||
|
||||
var jpl_wms = new OpenLayers.Layer.KaMap( "Satellite",
|
||||
"http://www.openlayers.org/world/index.php", {g: "satellite", map: "world"});
|
||||
var dm_wms = new OpenLayers.Layer.WMS( "Canada",
|
||||
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
|
||||
{layers: "bathymetry,land_fn,park,drain_fn,drainage," +
|
||||
"prov_bound,fedlimit,rail,road,popplace",
|
||||
transparent: "true", format: "image/png" });
|
||||
|
||||
map.addLayers([ol_wms, ka_wms]);
|
||||
map.addLayers([ol_wms, jpl_wms, dm_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToMaxExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
508
examples/kamap.txt
Normal file
@@ -0,0 +1,508 @@
|
||||
<?php
|
||||
/*
|
||||
|
||||
This is a PHP file to be used as a backend for a ka-Map layer. It requires
|
||||
PHP with Mapscript and libgd modules installed. The top of the file
|
||||
is a configuration section: please edit the variables in this configuration
|
||||
section to meet your needs, then rename this file to tile.php or something
|
||||
similar and put it in a web accessible directory. More information
|
||||
on the OpenLayers ka-Map layer is available from:
|
||||
|
||||
http://trac.openlayers.org/wiki/OpenLayers.Layer.KaMap
|
||||
|
||||
*/
|
||||
/**********************************************************************
|
||||
*
|
||||
* $Id: tile.php,v 1.33 2006/02/07 03:19:55 pspencer Exp $
|
||||
*
|
||||
* purpose: a simple phpmapscript-based tile renderer that implements
|
||||
* rudimentary caching for reasonable efficiency. Note the
|
||||
* cache never shrinks in this version so your disk could
|
||||
* easily fill up!
|
||||
*
|
||||
* author: Paul Spencer (pspencer@dmsolutions.ca)
|
||||
*
|
||||
* modifications by Daniel Morissette (dmorissette@dmsolutions.ca)
|
||||
*
|
||||
* Modified by Christopher Schmidt for OpenLayers redistribution.
|
||||
*
|
||||
**********************************************************************
|
||||
*
|
||||
* Copyright (c) 2005, DM Solutions Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* basic system configuration
|
||||
*
|
||||
* kaMap! uses PHP/MapScript and the PHP GD extension to
|
||||
* render tiles, and uses PHP/MapScript to generate initialization parameters
|
||||
* a legend, and a keymap from the selected map file.
|
||||
*
|
||||
* Make sure to set the correct module names for your PHP extensions.
|
||||
*
|
||||
* WINDOWS USERS: you will likely need to use php_gd2.dll instead of php_gd.dll
|
||||
*/
|
||||
$szPHPMapScriptModule = 'php_mapscript.'.PHP_SHLIB_SUFFIX;
|
||||
$szPHPGDModule = 'php_gd.'.PHP_SHLIB_SUFFIX;
|
||||
|
||||
/******************************************************************************
|
||||
* tile generation parameters
|
||||
*
|
||||
* kaMap! generates tiles to load in the client application by first rendering
|
||||
* larger areas from the map file and then slicing them up into smaller tiles.
|
||||
* This approach reduces the overhead of loading PHP/MapScript and PHP GD and
|
||||
* drawing the map file. These larger areas are referred to as metaTiles in
|
||||
* the code. You can set the size of both the small tiles and the metaTiles
|
||||
* here. A reasonable size for the small tiles seems to be 200 pixels square.
|
||||
* Smaller tiles seem to cause problems in client browsers by causing too many
|
||||
* images to be created and thus slowing performance of live dragging. Larger
|
||||
* tiles take longer to download to the client and are inefficient.
|
||||
*
|
||||
* The number of smaller tiles that form a metaTile can also be configured.
|
||||
* This parameter allows tuning of the tile generator to ensure optimal
|
||||
* performance and for label placement. MapServer will produce labels only
|
||||
* within a rendered area. If the area is too small then features may be
|
||||
* labelled multiple times. If the area is too large, it may exceed MapServer,s
|
||||
* maximum map size (by default 2000x2000) or be too resource-intensive on the
|
||||
* server, ultimately reducing performance.
|
||||
*/
|
||||
$tileWidth = 256;
|
||||
$tileHeight = 256;
|
||||
$metaWidth = 5;
|
||||
$metaHeight = 5;
|
||||
/* $metaBuffer = Buffer size in pixels to add around metatiles to avoid
|
||||
* rendering issues along the edge of the map image
|
||||
*/
|
||||
$metaBuffer = 10;
|
||||
|
||||
/******************************************************************************
|
||||
* in-image debugging information - tile location, outlines etc.
|
||||
* to use this, you need to remove images from your cache first. This also
|
||||
* affects the meta tiles - if debug is on, they are not deleted.
|
||||
*/
|
||||
$bDebug = false;
|
||||
|
||||
/******************************************************************************
|
||||
* aszMapFiles - an array of map files available to the application. How this
|
||||
* is used is determined by the application. Each map file is entered into
|
||||
* this array as a key->value pair.
|
||||
*
|
||||
* The key is the name to be used by the tile caching system to store cached
|
||||
* tiles within the base cache directory. This key should be a single word
|
||||
* that uniquely identifies the map.
|
||||
*
|
||||
* The value associated with each key is an array of three values. The first
|
||||
* value is a human-readable name to be presented to the user (should the
|
||||
* application choose to do so) and the second value is the path to the map
|
||||
* file. It is assumed that the map file is fully configured for use with
|
||||
* MapServer/MapScript as no error checking or setting of values is done. The
|
||||
* third value is an array of scale values for zooming.
|
||||
*/
|
||||
|
||||
$aszMapFiles = array(
|
||||
"world" => array( "World", "/path/to/your/mapfile",
|
||||
array( 10000 ), # in openlayers, the scale array doesn't matter.
|
||||
"PNG24")
|
||||
|
||||
/* Add more elements to this array to offer multiple mapfiles */
|
||||
|
||||
);
|
||||
|
||||
/******************************************************************************
|
||||
* figure out which map file to use and set up the necessary variables for
|
||||
* the rest of the code to use. This does need to be done on every page load
|
||||
* unfortunately.
|
||||
*
|
||||
* szMap should be set to the default map file to use but can change if
|
||||
* this script is called with map=<mapname>.
|
||||
*/
|
||||
$szMap = 'world';
|
||||
|
||||
/******************************************************************************
|
||||
* kaMap! caching
|
||||
*
|
||||
* this is the directory within which kaMap! will create its tile cache. The
|
||||
* directory does NOT have to be web-accessible, but it must be writable by the
|
||||
* web-server-user and allow creation of both directories AND files.
|
||||
*
|
||||
* the tile caching system will create a separate subdirectory within the base
|
||||
* cache directory for each map file. Within the cache directory for each map
|
||||
* file, directories will be created for each group of layers. Within the group
|
||||
* directories, directories will be created at each of the configured scales
|
||||
* for the application (see mapfile configuration above.)
|
||||
*/
|
||||
$szBaseCacheDir = "/var/cache/kamap/";
|
||||
|
||||
/***** END OF CONFIGURABLE STUFF - unless you know what you are doing *****/
|
||||
/***** *****/
|
||||
/***** *****/
|
||||
/***** *****/
|
||||
/***** END OF CONFIGURABLE STUFF - unless you know what you are doing *****/
|
||||
|
||||
if (isset($_REQUEST['map']) && isset($aszMapFiles[$_REQUEST['map']]))
|
||||
{
|
||||
$szMap = $_REQUEST['map'];
|
||||
}
|
||||
|
||||
$szMapCacheDir = $szBaseCacheDir.$szMap."/";
|
||||
$szMapName = $aszMapFiles[$szMap][0];
|
||||
$szMapFile = $aszMapFiles[$szMap][1];
|
||||
$anScales = $aszMapFiles[$szMap][2];
|
||||
setOutputFormat($aszMapFiles[$szMap][3]);
|
||||
/******************************************************************************
|
||||
* output format of the map and resulting tiles
|
||||
*
|
||||
* The output format used with MapServer can greatly affect appearance and
|
||||
* performance. It is recommended to use an 8 bit format such as PNG
|
||||
*
|
||||
* NOTE: the tile caching code in tile.php is not configurable here. It
|
||||
* currently assumes that it is outputting 8bit PNG files. If you change to
|
||||
* PNG24 here then you will need to update tile.php to use the gd function
|
||||
* imagecreatetruecolor. If you change the output format to jpeg then
|
||||
* you would need to change imagepng() to imagejpeg(). A nice enhancement
|
||||
* would be to make that fully configurable from here.
|
||||
*/
|
||||
function setOutputFormat($szFormat)
|
||||
{
|
||||
switch($szFormat) {
|
||||
case "PNG24":
|
||||
$GLOBALS['szMapImageFormat'] = 'PNG24'; //mapscript format name
|
||||
$GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; // appropriate GD function
|
||||
$GLOBALS['szImageExtension'] = '.png'; //file extension
|
||||
$GLOBALS['szImageCreateFunction'] = "imagecreatetruecolor"; //or imagecreatetruecolor if PNG24 ...
|
||||
$GLOBALS['szImageOutputFunction'] = "imagepng"; //or imagegif, imagejpeg ...
|
||||
$GLOBALS['szImageHeader'] = 'image/png'; //the content-type of the image
|
||||
break;
|
||||
case "GIF":
|
||||
$GLOBALS['szMapImageFormat'] = 'GIF'; //mapscript format name
|
||||
$GLOBALS['szMapImageCreateFunction'] = "imagecreatefromgif"; // appropriate GD function
|
||||
$GLOBALS['szImageExtension'] = '.gif'; //file extension
|
||||
$GLOBALS['szImageCreateFunction'] = "imagecreate"; //or imagecreatetruecolor if PNG24 ...
|
||||
$GLOBALS['szImageOutputFunction'] = "imagegif"; //or imagegif, imagejpeg ...
|
||||
$GLOBALS['szImageHeader'] = 'image/gif'; //the content-type of the image
|
||||
break;
|
||||
case "JPEG":
|
||||
$GLOBALS['szMapImageFormat'] = 'JPEG'; //mapscript format name
|
||||
$GLOBALS['szMapImageCreateFunction'] = "imagecreatefromjpeg"; // appropriate GD function
|
||||
$GLOBALS['szImageExtension'] = '.jpg'; //file extension
|
||||
$GLOBALS['szImageCreateFunction'] = "imagecreatetruecolor"; //or imagecreatetruecolor if PNG24 ...
|
||||
$GLOBALS['szImageOutputFunction'] = "imagejpeg"; //or imagegif, imagejpeg ...
|
||||
$GLOBALS['szImageHeader'] = 'image/jpeg'; //the content-type of the image
|
||||
break;
|
||||
case "PNG":
|
||||
$GLOBALS['szMapImageFormat'] = 'PNG'; //mapscript format name
|
||||
$GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; // appropriate GD function
|
||||
$GLOBALS['szImageExtension'] = '.png'; //file extension
|
||||
$GLOBALS['szImageCreateFunction'] = "imagecreate"; //or imagecreatetruecolor if PNG24 ...
|
||||
$GLOBALS['szImageOutputFunction'] = "imagepng"; //or imagegif, imagejpeg ...
|
||||
$GLOBALS['szImageHeader'] = 'image/png'; //the content-type of the image
|
||||
break;
|
||||
case "DITHERED":
|
||||
case "PNG8":
|
||||
$GLOBALS['szMapImageFormat'] = 'dithered';
|
||||
$GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng";
|
||||
$GLOBALS['szImageExtension'] = '.png';
|
||||
$GLOBALS['szImageCreateFunction'] = "imagecreate";
|
||||
$GLOBALS['szImageOutputFunction'] = "imagepng";
|
||||
$GLOBALS['szImageHeader'] = 'image/png';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* create all directories in a directory tree - found on the php web site
|
||||
* under the mkdir function ...
|
||||
*/
|
||||
function makeDirs($strPath, $mode = 0775)
|
||||
{
|
||||
return is_dir($strPath) or ( makeDirs(dirname($strPath), $mode) and mkdir($strPath, $mode) );
|
||||
}
|
||||
|
||||
/**
|
||||
* This function replaces all special characters in the given string.
|
||||
*
|
||||
* @param szString string - The string to convert.
|
||||
*
|
||||
* @return string converted
|
||||
*/
|
||||
function normalizeString($szString)
|
||||
{
|
||||
// Normalize string by replacing all special characters
|
||||
// e.g. "http://my.host.com/cgi-bin/mywms?"
|
||||
// becomes "http___my_host_com_cgi_bin_mywms_"
|
||||
return preg_replace("/(\W)/", "_", $szString);
|
||||
}
|
||||
|
||||
/* bug 1253 - root permissions required to delete cached files */
|
||||
$orig_umask = umask(0);
|
||||
|
||||
/* create the main cache directory if necessary */
|
||||
if (!@is_dir($szMapCacheDir))
|
||||
makeDirs($szMapCacheDir);
|
||||
|
||||
/* get the various request parameters
|
||||
* also need to make sure inputs are clean, especially those used to
|
||||
* build paths and filenames
|
||||
*/
|
||||
/*
|
||||
* the tile renderer accepts several parameters and returns a tile image from
|
||||
* the cache, creating the tile only if necessary.
|
||||
*
|
||||
* all requests include the pixel location of the request at a certain scale
|
||||
* and this script figures out the geographic location of the tile from the
|
||||
* scale assuming that 0,0 in pixels is 0,0 in geographic units
|
||||
*
|
||||
* Request parameters are:
|
||||
*
|
||||
* map: the name of the map to use. This is handled by config.php.
|
||||
*
|
||||
* t: top pixel position
|
||||
* l: left pixel position
|
||||
* s: scale
|
||||
* g: (optional) comma-delimited list of group names to draw
|
||||
* layers: (optional) comma-delimited list of layers to draw
|
||||
* force: optional. If set, force redraw of the meta tile. This was added to
|
||||
* help with invalid images sometimes being generated.
|
||||
* tileid: (optional) can be used instead of t+l to specify the tile coord.,
|
||||
* useful in regenerating the cache
|
||||
*/
|
||||
|
||||
$top = isset( $_REQUEST['t'] ) ? intval($_REQUEST['t']) : 0;
|
||||
$left = isset( $_REQUEST['l'] ) ? intval($_REQUEST['l']) : 0;
|
||||
$scale = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : $anScales[0];
|
||||
$bForce = isset($_REQUEST['force'])? true : false;
|
||||
$groups = isset( $_REQUEST['g'] ) ? $_REQUEST['g'] : "";
|
||||
$layers = isset( $_REQUEST['layers'] ) ? $_REQUEST['layers'] : "";
|
||||
|
||||
// dynamic imageformat ----------------------------------------------
|
||||
//use the function in config.php to set the output format
|
||||
if (isset($_REQUEST['i']))
|
||||
setOutputFormat( $_REQUEST['i'] );
|
||||
//----------------------------------------------------------------
|
||||
|
||||
/* tileid=t#####l#### can be used instead of t+l parameters. Useful in
|
||||
* regenerating the cache for instance.
|
||||
*/
|
||||
if (isset( $_REQUEST['tileid']) &&
|
||||
preg_match("/t(-?\d+)l(-?\d+)/", $_REQUEST['tileid'], $aMatch) )
|
||||
{
|
||||
$top = intval($aMatch[1]);
|
||||
$left = intval($aMatch[2]);
|
||||
}
|
||||
|
||||
/* Calculate the metatile's top-left corner coordinates.
|
||||
* Include the $metaBuffer around the metatile to account for various
|
||||
* rendering issues happening around the edge of a map
|
||||
*/
|
||||
$metaLeft = floor( ($left)/($tileWidth*$metaWidth) ) * $tileWidth * $metaWidth;
|
||||
$metaTop = floor( ($top)/($tileHeight*$metaHeight) ) * $tileHeight *$metaHeight;
|
||||
$szMetaTileId = "t".$metaTop."l".$metaLeft;
|
||||
$metaLeft -= $metaBuffer;
|
||||
$metaTop -= $metaBuffer;
|
||||
|
||||
/* caching is done by scale value, then groups and layers and finally metatile
|
||||
* and tile id. Create a new directory if necessary
|
||||
*/
|
||||
$szGroupDir = $groups != "" ? normalizeString($groups) : "def";
|
||||
$szLayerDir = $layers != "" ? normalizeString($layers) : "def";
|
||||
|
||||
$szCacheDir = $szMapCacheDir."/".$scale."/".$szGroupDir."/".$szLayerDir."/".$szMetaTileId;
|
||||
if (!@is_dir($szCacheDir))
|
||||
makeDirs($szCacheDir);
|
||||
|
||||
/* resolve cache hit - clear the os stat cache if necessary */
|
||||
$szTileId = "t".$top."l".$left;
|
||||
$szCacheFile = $szCacheDir."/".$szTileId.$szImageExtension;
|
||||
clearstatcache();
|
||||
|
||||
$szMetaDir = $szCacheDir."/meta";
|
||||
if (!@is_Dir($szMetaDir))
|
||||
makeDirs($szMetaDir);
|
||||
|
||||
/* simple locking in case there are several requests for the same meta
|
||||
tile at the same time - only draw it once to help with performance */
|
||||
$szLockFile = $szMetaDir."/lock_".$metaTop."_".$metaLeft;
|
||||
$fpLockFile = fopen($szLockFile, "a+");
|
||||
clearstatcache();
|
||||
if (!file_exists($szCacheFile) || $bForce)
|
||||
{
|
||||
flock($fpLockFile, LOCK_EX);
|
||||
fwrite($fpLockFile, ".");
|
||||
|
||||
//check once more to see if the cache file was created while waiting for
|
||||
//the lock
|
||||
clearstatcache();
|
||||
if (!file_exists($szCacheFile) || $bForce)
|
||||
{
|
||||
if (!extension_loaded('MapScript'))
|
||||
{
|
||||
dl( $szPHPMapScriptModule );
|
||||
}
|
||||
if (!extension_loaded('gd'))
|
||||
{
|
||||
dl( $szPHPGDModule);
|
||||
}
|
||||
|
||||
if (!@is_Dir($szMetaDir))
|
||||
makeDirs($szMetaDir);
|
||||
|
||||
$oMap = ms_newMapObj($szMapFile);
|
||||
|
||||
/* Metatile width/height include 2x the metaBuffer value */
|
||||
$oMap->set('width', $tileWidth * $metaWidth + 2*$metaBuffer);
|
||||
$oMap->set('height', $tileHeight * $metaHeight + 2*$metaBuffer);
|
||||
|
||||
/* Tell MapServer to not render labels inside the metaBuffer area
|
||||
* (new in 4.6)
|
||||
* TODO: Until MapServer bugs 1353/1355 are resolved, we need to
|
||||
* pass a negative value for "labelcache_map_edge_buffer"
|
||||
*/
|
||||
$oMap->setMetadata("labelcache_map_edge_buffer", -$metaBuffer);
|
||||
|
||||
$inchesPerUnit = array(1, 12, 63360.0, 39.3701, 39370.1, 4374754);
|
||||
$geoWidth = $scale/($oMap->resolution*$inchesPerUnit[$oMap->units]);
|
||||
$geoHeight = $scale/($oMap->resolution*$inchesPerUnit[$oMap->units]);
|
||||
|
||||
/* draw the metatile */
|
||||
$minx = $metaLeft * $geoWidth;
|
||||
$maxx = $minx + $geoWidth * $oMap->width;
|
||||
$maxy = -1 * $metaTop * $geoHeight;
|
||||
$miny = $maxy - $geoHeight * $oMap->height;
|
||||
|
||||
$nLayers = $oMap->numlayers;
|
||||
$oMap->setExtent($minx,$miny,$maxx,$maxy);
|
||||
$oMap->selectOutputFormat( $szMapImageFormat );
|
||||
$aszLayers = array();
|
||||
if ($groups || $layers)
|
||||
{
|
||||
/* Draw only specified layers instead of default from mapfile*/
|
||||
if ($layers)
|
||||
{
|
||||
$aszLayers = explode(",", $layers);
|
||||
}
|
||||
|
||||
if ($groups)
|
||||
{
|
||||
$aszGroups = explode(",", $groups);
|
||||
}
|
||||
|
||||
for($i=0;$i<$nLayers;$i++)
|
||||
{
|
||||
$oLayer = $oMap->getLayer($i);
|
||||
if (($aszGroups && in_array($oLayer->group,$aszGroups)) ||
|
||||
($aszLayers && in_array($oLayer->name,$aszLayers)) ||
|
||||
($aszGroups && $oLayer->group == '' &&
|
||||
in_array( "__base__", $aszGroups)))
|
||||
{
|
||||
$oLayer->set("status", MS_ON );
|
||||
}
|
||||
else
|
||||
{
|
||||
$oLayer->set("status", MS_OFF );
|
||||
}
|
||||
}
|
||||
//need transparency if groups or layers are used
|
||||
$oMap->outputformat->set("transparent", MS_ON );
|
||||
}
|
||||
else
|
||||
{
|
||||
$oMap->outputformat->set("transparent", MS_OFF );
|
||||
}
|
||||
|
||||
|
||||
$szMetaImg = $szMetaDir."/t".$metaTop."l".$metaLeft.$szImageExtension;
|
||||
$oImg = $oMap->draw();
|
||||
$oImg->saveImage($szMetaImg);
|
||||
$oImg->free();
|
||||
eval("\$oGDImg = ".$szMapImageCreateFunction."('".$szMetaImg."');");
|
||||
if ($bDebug)
|
||||
{
|
||||
$blue = imagecolorallocate($oGDImg, 0, 0, 255);
|
||||
imagerectangle($oGDImg, 0, 0, $tileWidth * $metaWidth - 1, $tileHeight * $metaHeight - 1, $blue );
|
||||
}
|
||||
for($i=0;$i<$metaWidth;$i++)
|
||||
{
|
||||
for ($j=0;$j<$metaHeight;$j++)
|
||||
{
|
||||
eval("\$oTile = ".$szImageCreateFunction."( ".$tileWidth.",".$tileHeight." );");
|
||||
// Allocate BG color for the tile (in case the metatile has transparent BG)
|
||||
$nTransparent = imagecolorallocate($oTile, $oMap->imagecolor->red, $oMap->imagecolor->green, $oMap->imagecolor->blue);
|
||||
//if ($oMap->outputformat->transparent == MS_ON)
|
||||
//{
|
||||
imagecolortransparent( $oTile,$nTransparent);
|
||||
//}
|
||||
$tileTop = $j*$tileHeight + $metaBuffer;
|
||||
$tileLeft = $i*$tileWidth + $metaBuffer;
|
||||
imagecopy( $oTile, $oGDImg, 0, 0, $tileLeft, $tileTop, $tileWidth, $tileHeight );
|
||||
/* debugging stuff */
|
||||
if ($bDebug)
|
||||
{
|
||||
$black = imagecolorallocate($oTile, 1, 1, 1);
|
||||
$green = imagecolorallocate($oTile, 0, 128, 0 );
|
||||
$red = imagecolorallocate($oTile, 255, 0, 0);
|
||||
imagerectangle( $oTile, 1, 1, $tileWidth-2, $tileHeight-2, $green );
|
||||
imageline( $oTile, 0, $tileHeight/2, $tileWidth-1, $tileHeight/2, $red);
|
||||
imageline( $oTile, $tileWidth/2, 0, $tileWidth/2, $tileHeight-1, $red);
|
||||
imagestring ( $oTile, 3, 10, 10, ($metaLeft+$tileLeft)." x ".($metaTop+$tileTop), $black );
|
||||
imagestring ( $oTile, 3, 10, 30, ($minx+$i*$geoWidth)." x ".($maxy - $j*$geoHeight), $black );
|
||||
}
|
||||
$szTileImg = $szCacheDir."/t".($metaTop+$tileTop)."l".($metaLeft+$tileLeft).$szImageExtension;
|
||||
eval("$szImageOutputFunction( \$oTile, '".$szTileImg."' );");
|
||||
imagedestroy($oTile);
|
||||
$oTile = null;
|
||||
}
|
||||
}
|
||||
if ($oGDImg != null)
|
||||
{
|
||||
imagedestroy($oGDImg);
|
||||
$oGDImg = null;
|
||||
}
|
||||
if (!$bDebug)
|
||||
{
|
||||
unlink( $szMetaImg );
|
||||
}
|
||||
}
|
||||
//release the exclusive lock
|
||||
flock($fpLockFile, LOCK_UN );
|
||||
}
|
||||
|
||||
//acquire shared lock for reading to prevent a problem that could occur
|
||||
//if a tile exists but is only partially generated.
|
||||
flock($fpLockFile, LOCK_SH);
|
||||
|
||||
$h = fopen($szCacheFile, "r");
|
||||
header("Content-Type: ".$szImageHeader);
|
||||
header("Content-Length: " . filesize($szCacheFile));
|
||||
header("Expires: " . date( "D, d M Y H:i:s GMT", time() + 31536000 ));
|
||||
header("Cache-Control: max-age=31536000, must-revalidate" );
|
||||
fpassthru($h);
|
||||
fclose($h);
|
||||
|
||||
//release lock
|
||||
fclose($fpLockFile);
|
||||
|
||||
/* bug 1253 - root permissions required to delete cached files */
|
||||
umask($orig_umask);
|
||||
|
||||
exit;
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -25,14 +25,15 @@
|
||||
|
||||
size = new OpenLayers.Size(50,50);
|
||||
calculateOffset = function(size) {
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h);
|
||||
};
|
||||
icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',size,null, calculateOffset);
|
||||
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(-180,90),
|
||||
icon));
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h); };
|
||||
icon = new OpenLayers.Icon(
|
||||
'http://boston.openguides.org/markers/AQUA.png',
|
||||
size, null, calculateOffset);
|
||||
markers.addMarker(
|
||||
new OpenLayers.Marker(new OpenLayers.LonLat(-180,90), icon));
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToMaxExtent();
|
||||
}
|
||||
|
||||
function resize() {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -14,25 +14,27 @@
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
OpenLayers.ProxyHost="/proxy/?url=";
|
||||
map = new OpenLayers.Map('map');
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
|
||||
map.addLayer(layer);
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
var markers = new OpenLayers.Layer.Markers( "Markers" );
|
||||
map.addLayer(markers);
|
||||
var newl = new OpenLayers.Layer.Text( "text", "./textfile.txt" );
|
||||
var newl = new OpenLayers.Layer.Text( "text", { location:"./textfile.txt"} );
|
||||
map.addLayer(newl);
|
||||
var size = new OpenLayers.Size(10,17);
|
||||
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
|
||||
var icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',size,offset);
|
||||
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,0),icon));
|
||||
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,45),icon));
|
||||
marker = new OpenLayers.Marker(new OpenLayers.LonLat(90,10),icon);
|
||||
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,45),icon.clone()));
|
||||
marker = new OpenLayers.Marker(new OpenLayers.LonLat(90,10),icon.clone());
|
||||
marker.events.register('mousedown', marker, function(evt) { alert(this.icon.url); Event.stop(evt); });
|
||||
markers.addMarker(marker);
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToMaxExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -14,17 +14,18 @@
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
OpenLayers.ProxyHost="/proxy/?url=";
|
||||
map = new OpenLayers.Map('map');
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
|
||||
map.addLayer(layer);
|
||||
|
||||
var newl = new OpenLayers.Layer.Text( "text", "./textfile.txt" );
|
||||
var newl = new OpenLayers.Layer.Text( "text", {location: "./textfile.txt"} );
|
||||
map.addLayer(newl);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToMaxExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var map, layer, popup;
|
||||
|
||||
var marker, markers;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map');
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
|
||||
|
||||
map.addLayer(
|
||||
new OpenLayers.Layer.WMS("NASA Mosaic",
|
||||
"http://wms.jpl.nasa.gov/wms.cgi",
|
||||
{"EXCEPTIONS" : "application/vnd.ogc.se_inimage",
|
||||
"format" : "image/jpeg",
|
||||
layers:"modis,global_mosaic"}
|
||||
));
|
||||
|
||||
map.addLayer(layer);
|
||||
|
||||
markers = new OpenLayers.Layer.Markers( "Markers" );
|
||||
map.addLayer(markers);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
}
|
||||
|
||||
function changer() {
|
||||
var lon = map.getLonLatFromLayerPx(new OpenLayers.Pixel(0,0)).lon;
|
||||
var lat = map.getLonLatFromLayerPx(new OpenLayers.Pixel(0,0)).lat;
|
||||
var slon = map.getLonLatFromViewPortPx(new OpenLayers.Pixel(0,0)).lon;
|
||||
var slat = map.getLonLatFromViewPortPx(new OpenLayers.Pixel(0,0)).lat;
|
||||
alert("lon=" + lon + " lat=" + lat
|
||||
+ "slon=" + slon + " slat=" + slat);
|
||||
}
|
||||
|
||||
function add() {
|
||||
var icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',new OpenLayers.Size(10,17));
|
||||
marker = new OpenLayers.Marker(new OpenLayers.LonLat(0,00), icon);
|
||||
markers.addMarker(marker);
|
||||
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
popup.destroy();
|
||||
}
|
||||
|
||||
function remove() {
|
||||
map.removePopup(popup);
|
||||
}
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<div id="map"></div>
|
||||
<div style="background-color:purple" onclick="add()"> click to add popup to map</div>
|
||||
<div style="background-color:blue" onclick="changer()"> click to get lon/lat for pixel point(0,0)</div>
|
||||
<div style="background-color:red" onclick="destroy()"> click to destroy the popup</div>
|
||||
<div style="background-color:green" onclick="remove()"> click to remove the popup from map</div>
|
||||
</body>
|
||||
</html>
|
||||
58
examples/mm.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script type="text/javascript" src="http://clients.multimap.com/API/maps/1.1/metacarta_04"></script>
|
||||
|
||||
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var lon = 5;
|
||||
var lat = 40;
|
||||
var zoom = 5;
|
||||
var map, mmlayer, layer;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map( $('map') ,
|
||||
{controls:[new OpenLayers.Control.MouseDefaults()]});
|
||||
|
||||
mmlayer = new OpenLayers.Layer.MultiMap( "MultiMap");
|
||||
map.addLayer(mmlayer);
|
||||
|
||||
markers = new OpenLayers.Layer.Markers("markers");
|
||||
map.addLayer(markers);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
|
||||
map.addControl( new OpenLayers.Control.LayerSwitcher() );
|
||||
map.addControl( new OpenLayers.Control.PanZoomBar() );
|
||||
}
|
||||
|
||||
function add() {
|
||||
|
||||
marker = new OpenLayers.Marker(new OpenLayers.LonLat(2, 41));
|
||||
markers.addMarker(marker);
|
||||
}
|
||||
|
||||
function remove() {
|
||||
markers.removeMarker(marker);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers MultiMap Example</h1>
|
||||
<div id="map"></div>
|
||||
<div style="background-color:green" onclick="add()"> click to add the marker to the map</div>
|
||||
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,45 +11,25 @@
|
||||
-->
|
||||
<head>
|
||||
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
|
||||
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>
|
||||
<!-- Localhost key -->
|
||||
<!--<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'></script>-->
|
||||
<script src="http://openlayers.org/dev/lib/OpenLayers.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
// From:
|
||||
// <http://www.oreilly.com/catalog/jscript3/chapter/ch13.html#JSCRIPT-CH-WINDOWS-EX-LOC>
|
||||
/*
|
||||
* This function parses comma-separated name=value argument pairs from
|
||||
* the query string of the URL. It stores the name=value pairs in
|
||||
* properties of an object and returns that object.
|
||||
*/
|
||||
// +pjl changed to split on ampersand, not comma.
|
||||
|
||||
function getArgs() {
|
||||
var args = new Object();
|
||||
var query = location.search.substring(1); // Get query string.
|
||||
var pairs = query.split("&"); // Break at ampersand. //+pjl
|
||||
|
||||
for(var i = 0; i < pairs.length; i++) {
|
||||
var pos = pairs[i].indexOf('='); // Look for "name=value".
|
||||
if (pos == -1) continue; // If not found, skip.
|
||||
var argname = pairs[i].substring(0,pos); // Extract the name.
|
||||
var value = pairs[i].substring(pos+1); // Extract the value.
|
||||
args[argname] = unescape(value); // Store as a property.
|
||||
}
|
||||
return args; // Return the object.
|
||||
}
|
||||
|
||||
|
||||
function runMVS() {
|
||||
OpenLayers.ProxyHost = '/proxy/?url=';
|
||||
if (document.location.protocol != "file:") {
|
||||
theArgs = getArgs();
|
||||
theArgs = OpenLayers.Util.getArgs();
|
||||
} else {
|
||||
theArgs = {};
|
||||
theArgs.center = "0,0";
|
||||
theArgs.zoom = "0";
|
||||
theArgs.data = "textfile.txt";
|
||||
theArgs.controls = ['panzoom','mouse'];
|
||||
theArgs.layers = ['openlayers', 'nasa'];
|
||||
theArgs.controls = 'panzoom,mouse';
|
||||
theArgs.layers = 'openlayers';
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +41,7 @@ function runMVS() {
|
||||
var DEFAULT_LON = 0;
|
||||
var DEFAULT_ZOOM_LEVEL = 0;
|
||||
var DEFAULT_CONTROLS = ['panzoom','mouse'];
|
||||
var DEFAULT_LAYERS = ['openlayers', 'nasa'];
|
||||
var DEFAULT_LAYERS = ['openlayers'];
|
||||
|
||||
var IDX_LAT = 0;
|
||||
var IDX_LON = 1;
|
||||
@@ -77,16 +57,14 @@ function runMVS() {
|
||||
safeArgs.controls = theArgs.controls ?
|
||||
theArgs.controls.split(",") : DEFAULT_CONTROLS;
|
||||
|
||||
safeArgs.controls = theArgs.controls ?
|
||||
theArgs.controls.split(",") : DEFAULT_CONTROLS;
|
||||
|
||||
safeArgs.layers = theArgs.layers ?
|
||||
theArgs.layers.split(",") : DEFAULT_LAYERS;
|
||||
|
||||
safeArgs.data = theArgs.data; // TODO: Make this "safe".
|
||||
|
||||
safeArgs.marker = theArgs.marker; // TODO: Make this "safe".
|
||||
|
||||
// -----
|
||||
var theMVS = new OpenLayers.Map($('map'), {controls: []});
|
||||
var theMVS = new OpenLayers.Map($('map'), {controls: [], maxResolution: 'auto'});
|
||||
for(var i = 0; i < safeArgs.controls.length; i++) {
|
||||
switch(safeArgs.controls[i]) {
|
||||
case 'panzoombar':
|
||||
@@ -121,12 +99,22 @@ function runMVS() {
|
||||
layers:"modis,global_mosaic"}
|
||||
));
|
||||
break;
|
||||
case 'gmaps':
|
||||
theMVS.addLayer(
|
||||
new OpenLayers.Layer.Google( "Google" , {type: G_HYBRID_MAP })
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
theMVS.setCenter(new OpenLayers.LonLat(safeArgs.centerLon, safeArgs.centerLat), safeArgs.zoom);
|
||||
|
||||
if (safeArgs.marker) {
|
||||
var m = new OpenLayers.Layer.Markers("Marker");
|
||||
m.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(safeArgs.centerLon, safeArgs.centerLat)));
|
||||
theMVS.addLayer(m);
|
||||
}
|
||||
if (safeArgs.data) {
|
||||
theMVS.addLayer(new OpenLayers.Layer.Text("Data", safeArgs.data));
|
||||
theMVS.addLayer(new OpenLayers.Layer.Text("Data", {location: safeArgs.data}));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -11,11 +11,11 @@
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function init(){
|
||||
var map = new OpenLayers.Map('map');
|
||||
var map = new OpenLayers.Map('map', {maxResolution: 'auto'});
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
|
||||
ol_wms.isBaseLayer = true;
|
||||
map.addLayers([ol_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
|
||||
36
examples/openstreetmap.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var zoom = 5;
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map( $('map') );
|
||||
layer = new OpenLayers.Layer.WMS( "OpenStreetMap WMS",
|
||||
"http://tile.openstreetmap.org/ruby/wmsmod.rbx?" );
|
||||
layer.setTileSize(new OpenLayers.Size(256,128));
|
||||
map.addLayer(layer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(-0.02197265625,51.492919921875), 13);
|
||||
map.addControl( new OpenLayers.Control.LayerSwitcher() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -20,16 +20,11 @@
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS2",
|
||||
"http://octo.metacarta.com/cgi-bin/mapserv",
|
||||
{map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'} );
|
||||
|
||||
map.addLayer(layer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToMaxExtent();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function changer() {
|
||||
popup.setBackgroundColor("red");
|
||||
popup.setSize(new OpenLayers.Size(100,600));
|
||||
@@ -76,9 +71,9 @@
|
||||
function mousedown(evt) {
|
||||
if (popup == null) {
|
||||
popup = feature.createPopup();
|
||||
popup.setContentHTML("<a href='http://www.somethingconstructive.net' target='_blank'>click me</a>");
|
||||
popup.setBackgroundColor("yellow");
|
||||
popup.setOpacity(0.7);
|
||||
popup.events.register("mousedown", popup, onPopupMouseDown);
|
||||
markers.map.addPopup(popup);
|
||||
} else {
|
||||
markers.map.removePopup(popup);
|
||||
@@ -124,6 +119,6 @@
|
||||
<div style="background-color:red" onclick="remove()"> click to remove the popup from map</div>
|
||||
<div style="background-color:grey" onclick="removelayer()"> click to remove the markers layer</div>
|
||||
<div style="background-color:orange" onclick="alert(marker.onScreen())"> marker.onscreen()?</div>
|
||||
<div style="background-color:yellow" onclick="destroy()"> click to destroy the popup from map</div>
|
||||
<div style="background-color:yellow" onclick="destroy()"> click to destroy the popup from map</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
29
examples/setextent.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Setting a visual Extent</title>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Setting a Visual Extent</h1>
|
||||
<p>
|
||||
Because the ability to set the map to a given extent is limited by the
|
||||
current resolutions available, zoomToExtent will not always set the map to
|
||||
exactly the right extent. In order to visually annotate the actual extent,
|
||||
this example, will use the Boxes layer to visually describe the desired
|
||||
extent as well as setting the map extent.
|
||||
</p>
|
||||
<div style="width:100%; height:75%" id="map"></div>
|
||||
<script defer="defer" type="text/javascript">
|
||||
var map = new OpenLayers.Map('map');
|
||||
var bounds = new OpenLayers.Bounds(-45,-45, 0, 45);
|
||||
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(wms);
|
||||
map.zoomToExtent(bounds);
|
||||
var boxes = new OpenLayers.Layer.Boxes("boxes");
|
||||
var box = new OpenLayers.Marker.Box(bounds);
|
||||
boxes.addMarker(box);
|
||||
map.addLayer(boxes);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 700px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -11,15 +11,20 @@
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function init(){
|
||||
var map = new OpenLayers.Map('map', {'maxResolution': 1.2/4, controls:[]});
|
||||
var map = new OpenLayers.Map('map', {'maxResolution': 1.40625/4, controls:[]});
|
||||
|
||||
var ka_wms = new OpenLayers.Layer.KaMap( "KaMap", "http://maps.dmsolutions.ca/demo/us_streets/tile.php", {map:'tiger04', g:'__base__'}, new OpenLayers.LonLat(0,0));
|
||||
ka_wms.setTileSize(new OpenLayers.Size(300,300));
|
||||
map.addLayers([ka_wms]); // , ka_wms, kamap_wms]);
|
||||
var ka_wms = new OpenLayers.Layer.KaMap( "TIGER (KaMap)",
|
||||
"http://boston.freemap.in/tile.php" , { map: 'tiger', layers: 'TIGER' });
|
||||
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
|
||||
"http://wms.jpl.nasa.gov/wms.cgi",
|
||||
{layers: "modis,global_mosaic"});
|
||||
jpl_wms.setVisibility(false);
|
||||
ka_wms.isBaseLayer = false;
|
||||
map.addLayers([jpl_wms,ka_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.addControl(new OpenLayers.Control.MouseToolbar());
|
||||
map.addControl(new OpenLayers.Control.PanZoomBar());
|
||||
map.setCenter(new OpenLayers.LonLat(-70, 30), 2);
|
||||
map.setCenter(new OpenLayers.LonLat(-96, 35), 2);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
36
examples/urban.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function init(){
|
||||
var mapOptions = { maxResolution: 1.6, numZoomLevels: 21};
|
||||
var map = new OpenLayers.Map('map', mapOptions);
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
|
||||
var ww = new OpenLayers.Layer.WorldWind( "Urban",
|
||||
"http://worldwind25.arc.nasa.gov/tile/tile.aspx?", .8, 9,
|
||||
{T:"104"}, { tileSize: new OpenLayers.Size(512,512) });
|
||||
|
||||
|
||||
map.addLayers([ol_wms, ww]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(-71.4, 42.3), 6);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,36 +3,56 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 100%;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script src='http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js'></script>
|
||||
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var map, layer, velayer;
|
||||
|
||||
var lon = 5;
|
||||
var lat = 40;
|
||||
var zoom = 15;
|
||||
var map, velayer, layer;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map');
|
||||
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
|
||||
velayer = new OpenLayers.Layer.VirtualEarth( "VE");
|
||||
map = new OpenLayers.Map( $('map') ,
|
||||
{controls:[new OpenLayers.Control.MouseDefaults()]});
|
||||
|
||||
velayer = new OpenLayers.Layer.VirtualEarth( "VE",
|
||||
{ minZoomLevel: 4, maxZoomLevel: 6 });
|
||||
map.addLayer(velayer);
|
||||
|
||||
markers = new OpenLayers.Layer.Markers("markers");
|
||||
map.addLayer(markers);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(-5, 40), 4);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
|
||||
map.addControl( new OpenLayers.Control.LayerSwitcher() );
|
||||
map.addControl( new OpenLayers.Control.PanZoomBar() );
|
||||
}
|
||||
// -->
|
||||
|
||||
function add() {
|
||||
|
||||
marker = new OpenLayers.Marker(new OpenLayers.LonLat(2, 41));
|
||||
markers.addMarker(marker);
|
||||
}
|
||||
|
||||
function remove() {
|
||||
markers.removeMarker(marker);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<h1>OpenLayers VE Example</h1>
|
||||
<div id="map"></div>
|
||||
<div style="background-color:green" onclick="add()"> click to add the marker to the map</div>
|
||||
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -14,20 +14,19 @@
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
OpenLayers.ProxyHost = '/dev/examples/proxy.cgi?url=';
|
||||
OpenLayers.ProxyHost="/proxy/?url=";
|
||||
map = new OpenLayers.Map('map');
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
layer = new OpenLayers.Layer.WFS( "OpenLayers WFS",
|
||||
"http://labs.metacarta.com/search/WFS?",
|
||||
{q: 'dolphins', maxfeatures: 10} );
|
||||
|
||||
layer = new OpenLayers.Layer.WFS( "Owl Survey",
|
||||
"http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?",
|
||||
{typename: "OWLS", maxfeatures: 10},
|
||||
{ featureClass: OpenLayers.Feature.WFS});
|
||||
map.addLayer(layer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
35
examples/wms.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var lon = 5;
|
||||
var lat = 40;
|
||||
var zoom = 5;
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map( $('map') );
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
|
||||
map.addControl( new OpenLayers.Control.LayerSwitcher() );
|
||||
}
|
||||
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
42
examples/wmst.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 400px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var map,ia_wms;
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map');
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
|
||||
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
|
||||
"http://wms.jpl.nasa.gov/wms.cgi",
|
||||
{layers: "modis,global_mosaic"});
|
||||
|
||||
ia_wms = new OpenLayers.Layer.WMS("Nexrad","http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?",{layers:"nexrad-n0r-wmst",transparent:true,format:'image/png',time:document.getElementById('time').value});
|
||||
|
||||
jpl_wms.setVisibility(false);
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms, ia_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToMaxExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<p>WMS-T example: update the times, and the radar image will change. Uses Layer.changeParams. Thanks to David Bitner for the inspiration, the original code, and the kick in the butt!</p>
|
||||
<input type='text' id='time' value="2005-08-29T13:00:00Z" onChange='ia_wms.mergeNewParams({"time":this.value});' >
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
41
examples/worldwind.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function init(){
|
||||
var map = new OpenLayers.Map('map', {'maxResolution': .0703125*4});
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
|
||||
var ww = new OpenLayers.Layer.WorldWind( "Bathy",
|
||||
"http://worldwind25.arc.nasa.gov/tile/tile.aspx?", 36, 4,
|
||||
{T:"bmng.topo.bathy.200406"});
|
||||
ww.setTileSize(new OpenLayers.Size(512,512));
|
||||
var ww2 = new OpenLayers.Layer.WorldWind( "LANDSAT",
|
||||
"http://worldwind25.arc.nasa.gov/tile/tile.aspx", 2.25, 4,
|
||||
{T:"105"});
|
||||
ww2.setTileSize(new OpenLayers.Size(512,512));
|
||||
|
||||
|
||||
|
||||
map.addLayers([ol_wms, ww, ww2]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(-71.4, 42.3), 6);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
23
examples/xhtml.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>XHTML Example</title>
|
||||
<script src="../lib/OpenLayers.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body style="width:100%">
|
||||
<div style="width:100%; height:500px" id="map"></div>
|
||||
<script defer="defer" type="text/javascript">
|
||||
var map = new OpenLayers.Map('map');
|
||||
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(wms);
|
||||
map.zoomToMaxExtent();
|
||||
</script>
|
||||
<p>
|
||||
<a href="http://validator.w3.org/check/referer"><img
|
||||
src="http://www.w3.org/Icons/valid-xhtml10"
|
||||
alt="Valid XHTML 1.0!" height="31" width="88" /></a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,38 +1,39 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var map, layer, velayer;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map');
|
||||
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
|
||||
yahooLayer = new OpenLayers.Layer.Yahoo( "Yahoo");
|
||||
|
||||
map.addLayer(yahooLayer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(-5, 40), 4);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var map, layer, velayer;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map');
|
||||
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
|
||||
yahooLayer = new OpenLayers.Layer.Yahoo( "Yahoo");
|
||||
|
||||
map.addLayer(yahooLayer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(-5, 40), 4);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
54
examples/zoomLevels.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var lon = 50;
|
||||
var lat = 0;
|
||||
var zoom = 0;
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
|
||||
var options = {
|
||||
// resolutions: [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101],
|
||||
// scales: [50000000, 10000000],
|
||||
// maxResolution: 0.17578125,
|
||||
// minResolution: 0.0439453125,
|
||||
// maxScale: 10000000,
|
||||
// minScale: 50000000,
|
||||
minResolution: "auto",
|
||||
minExtent: new OpenLayers.Bounds(-1, -1, 1, 1),
|
||||
maxResolution: "auto",
|
||||
maxExtent: new OpenLayers.Bounds(-180, -90, 90, 180),
|
||||
// numZoomLevels: 5,
|
||||
controls: [new OpenLayers.Control.MouseDefaults()]
|
||||
};
|
||||
|
||||
map = new OpenLayers.Map( $('map') , options);
|
||||
|
||||
map.addControl(new OpenLayers.Control.PanZoomBar());
|
||||
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'});
|
||||
map.addLayer(layer);
|
||||
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
|
||||
}
|
||||
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
img/blank.gif
Normal file
|
After Width: | Height: | Size: 42 B |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
img/layer-switcher-maximize.png
Normal file
|
After Width: | Height: | Size: 451 B |
BIN
img/layer-switcher-minimize.png
Normal file
|
After Width: | Height: | Size: 249 B |
@@ -6,7 +6,11 @@
|
||||
///
|
||||
|
||||
OpenLayers = new Object();
|
||||
OpenLayers._scriptName = "lib/OpenLayers.js";
|
||||
|
||||
OpenLayers._scriptName = (
|
||||
typeof(_OPENLAYERS_SFL_) == "undefined" ? "lib/OpenLayers.js"
|
||||
: "OpenLayers.js" );
|
||||
|
||||
OpenLayers._getScriptLocation = function () {
|
||||
var scriptLocation = "";
|
||||
var SCRIPT_NAME = OpenLayers._scriptName;
|
||||
@@ -47,6 +51,7 @@ if (typeof(_OPENLAYERS_SFL_) == "undefined") {
|
||||
"Prototype.js",
|
||||
"Rico/Corner.js",
|
||||
"Rico/Color.js",
|
||||
"OpenLayers/BaseTypes.js",
|
||||
"OpenLayers/Util.js",
|
||||
"OpenLayers/Ajax.js",
|
||||
"OpenLayers/Events.js",
|
||||
@@ -54,22 +59,31 @@ if (typeof(_OPENLAYERS_SFL_) == "undefined") {
|
||||
"OpenLayers/Layer.js",
|
||||
"OpenLayers/Icon.js",
|
||||
"OpenLayers/Marker.js",
|
||||
"OpenLayers/Marker/Box.js",
|
||||
"OpenLayers/Popup.js",
|
||||
"OpenLayers/Tile.js",
|
||||
"OpenLayers/Feature.js",
|
||||
"OpenLayers/Feature/WFS.js",
|
||||
"OpenLayers/Tile/Image.js",
|
||||
"OpenLayers/Tile/WFS.js",
|
||||
// "OpenLayers/Layer/Google.js",
|
||||
// "OpenLayers/Layer/VirtualEarth.js",
|
||||
// "OpenLayers/Layer/Yahoo.js",
|
||||
"OpenLayers/Layer/EventPane.js",
|
||||
"OpenLayers/Layer/FixedZoomLevels.js",
|
||||
"OpenLayers/Layer/Google.js",
|
||||
"OpenLayers/Layer/VirtualEarth.js",
|
||||
"OpenLayers/Layer/Yahoo.js",
|
||||
"OpenLayers/Layer/HTTPRequest.js",
|
||||
"OpenLayers/Layer/Grid.js",
|
||||
"OpenLayers/Layer/KaMap.js",
|
||||
"OpenLayers/Layer/MultiMap.js",
|
||||
"OpenLayers/Layer/Markers.js",
|
||||
"OpenLayers/Layer/Text.js",
|
||||
"OpenLayers/Layer/WorldWind.js",
|
||||
"OpenLayers/Layer/WMS.js",
|
||||
"OpenLayers/Layer/WFS.js",
|
||||
"OpenLayers/Layer/WMS/Untiled.js",
|
||||
"OpenLayers/Layer/GeoRSS.js",
|
||||
"OpenLayers/Layer/Boxes.js",
|
||||
"OpenLayers/Layer/Canvas.js",
|
||||
"OpenLayers/Popup/Anchored.js",
|
||||
"OpenLayers/Popup/AnchoredBubble.js",
|
||||
"OpenLayers/Control.js",
|
||||
@@ -78,7 +92,10 @@ if (typeof(_OPENLAYERS_SFL_) == "undefined") {
|
||||
"OpenLayers/Control/KeyboardDefaults.js",
|
||||
"OpenLayers/Control/PanZoom.js",
|
||||
"OpenLayers/Control/PanZoomBar.js",
|
||||
"OpenLayers/Control/LayerSwitcher.js"
|
||||
"OpenLayers/Control/Permalink.js",
|
||||
"OpenLayers/Control/Scale.js",
|
||||
"OpenLayers/Control/LayerSwitcher.js",
|
||||
"OpenLayers/Control/LayerTabs.js"
|
||||
); // etc.
|
||||
|
||||
var allScriptTags = "";
|
||||
|
||||
@@ -1,113 +1,108 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
OpenLayers.ProxyHost = "/viewer/Crossbrowser/blindproxy.py?url=";
|
||||
//OpenLayers.ProxyHost = "examples/proxy.cgi?url=";
|
||||
|
||||
/**
|
||||
* Ajax reader for OpenLayers
|
||||
*
|
||||
*@uri url to do remote XML http get
|
||||
*@param 'get' format params (x=y&a=b...)
|
||||
*@who object to handle callbacks for this request
|
||||
*@complete the function to be called on success
|
||||
*@failure the function to be called on failure
|
||||
*
|
||||
* example usage from a caller:
|
||||
*
|
||||
* caps: function(request) {
|
||||
* -blah-
|
||||
* },
|
||||
*
|
||||
* OpenLayers.loadURL(url,params,this,caps);
|
||||
*
|
||||
* Notice the above example does not provide an error handler; a default empty
|
||||
* handler is provided which merely logs the error if a failure handler is not
|
||||
* supplied
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @param {} request
|
||||
*/
|
||||
OpenLayers.nullHandler = function(request) {
|
||||
alert("Unhandled request return " + request.statusText);
|
||||
};
|
||||
|
||||
/** Background load a document
|
||||
*
|
||||
* @param {String} uri URI of source doc
|
||||
* @param {String} params Params on get (doesnt seem to work)
|
||||
* @param {Object} caller object which gets callbacks
|
||||
* @param {Function} onComplete callback for success
|
||||
* @param {Function} onFailure callback for failure
|
||||
*
|
||||
* Both callbacks optional (though silly)
|
||||
*/
|
||||
OpenLayers.loadURL = function(uri, params, caller,
|
||||
onComplete, onFailure) {
|
||||
|
||||
if (OpenLayers.ProxyHost && uri.startsWith("http")) {
|
||||
uri = OpenLayers.ProxyHost + escape(uri);
|
||||
|
||||
if (!params) {
|
||||
params="";
|
||||
}
|
||||
params += "&cachehack=" + new Date().getTime();
|
||||
}
|
||||
|
||||
var success = (onComplete) ? onComplete.bind(caller)
|
||||
: OpenLayers.nullHandler;
|
||||
|
||||
var failure = (onFailure) ? onFailure.bind(caller)
|
||||
: OpenLayers.nullHandler;
|
||||
|
||||
// from prototype.js
|
||||
new Ajax.Request(uri,
|
||||
{ method: 'get',
|
||||
parameters: params,
|
||||
onComplete: success,
|
||||
onFailure: failure
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/** Parse XML into a doc structure
|
||||
* @param {String} text
|
||||
*
|
||||
* @returns Parsed Ajax Response ??
|
||||
* @type ?
|
||||
*/
|
||||
OpenLayers.parseXMLString = function(text) {
|
||||
|
||||
//MS sucks, if the server is bad it dies
|
||||
var index = text.indexOf('<');
|
||||
if (index > 0) {
|
||||
text = text.substring(index);
|
||||
}
|
||||
|
||||
var ajaxResponse = Try.these(
|
||||
function() {
|
||||
var xmldom = new ActiveXObject('Microsoft.XMLDOM');
|
||||
xmldom.loadXML(text);
|
||||
return xmldom;
|
||||
},
|
||||
function() {
|
||||
return new DOMParser().parseFromString(text, 'text/xml');
|
||||
},
|
||||
function() {
|
||||
var req = new XMLHttpRequest();
|
||||
req.open("GET", "data:" + "text/xml" +
|
||||
";charset=utf-8," + encodeURIComponent(text), false);
|
||||
if (req.overrideMimeType) {
|
||||
req.overrideMimeType("text/xml");
|
||||
}
|
||||
req.send(null);
|
||||
return req.responseXML;
|
||||
}
|
||||
);
|
||||
|
||||
return ajaxResponse;
|
||||
};
|
||||
|
||||
OpenLayers.ProxyHost = "";
|
||||
//OpenLayers.ProxyHost = "examples/proxy.cgi?url=";
|
||||
|
||||
/**
|
||||
* Ajax reader for OpenLayers
|
||||
*
|
||||
*@uri url to do remote XML http get
|
||||
*@param 'get' format params (x=y&a=b...)
|
||||
*@who object to handle callbacks for this request
|
||||
*@complete the function to be called on success
|
||||
*@failure the function to be called on failure
|
||||
*
|
||||
* example usage from a caller:
|
||||
*
|
||||
* caps: function(request) {
|
||||
* -blah-
|
||||
* },
|
||||
*
|
||||
* OpenLayers.loadURL(url,params,this,caps);
|
||||
*
|
||||
* Notice the above example does not provide an error handler; a default empty
|
||||
* handler is provided which merely logs the error if a failure handler is not
|
||||
* supplied
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @param {} request
|
||||
*/
|
||||
OpenLayers.nullHandler = function(request) {
|
||||
alert("Unhandled request return " + request.statusText);
|
||||
};
|
||||
|
||||
/** Background load a document
|
||||
*
|
||||
* @param {String} uri URI of source doc
|
||||
* @param {String} params Params on get (doesnt seem to work)
|
||||
* @param {Object} caller object which gets callbacks
|
||||
* @param {Function} onComplete callback for success
|
||||
* @param {Function} onFailure callback for failure
|
||||
*
|
||||
* Both callbacks optional (though silly)
|
||||
*/
|
||||
OpenLayers.loadURL = function(uri, params, caller,
|
||||
onComplete, onFailure) {
|
||||
|
||||
if (OpenLayers.ProxyHost && uri.startsWith("http")) {
|
||||
uri = OpenLayers.ProxyHost + escape(uri);
|
||||
}
|
||||
|
||||
var success = (onComplete) ? onComplete.bind(caller)
|
||||
: OpenLayers.nullHandler;
|
||||
|
||||
var failure = (onFailure) ? onFailure.bind(caller)
|
||||
: OpenLayers.nullHandler;
|
||||
|
||||
// from prototype.js
|
||||
new Ajax.Request(uri,
|
||||
{ method: 'get',
|
||||
parameters: params,
|
||||
onComplete: success,
|
||||
onFailure: failure
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/** Parse XML into a doc structure
|
||||
* @param {String} text
|
||||
*
|
||||
* @returns Parsed Ajax Response ??
|
||||
* @type ?
|
||||
*/
|
||||
OpenLayers.parseXMLString = function(text) {
|
||||
|
||||
//MS sucks, if the server is bad it dies
|
||||
var index = text.indexOf('<');
|
||||
if (index > 0) {
|
||||
text = text.substring(index);
|
||||
}
|
||||
|
||||
var ajaxResponse = Try.these(
|
||||
function() {
|
||||
var xmldom = new ActiveXObject('Microsoft.XMLDOM');
|
||||
xmldom.loadXML(text);
|
||||
return xmldom;
|
||||
},
|
||||
function() {
|
||||
return new DOMParser().parseFromString(text, 'text/xml');
|
||||
},
|
||||
function() {
|
||||
var req = new XMLHttpRequest();
|
||||
req.open("GET", "data:" + "text/xml" +
|
||||
";charset=utf-8," + encodeURIComponent(text), false);
|
||||
if (req.overrideMimeType) {
|
||||
req.overrideMimeType("text/xml");
|
||||
}
|
||||
req.send(null);
|
||||
return req.responseXML;
|
||||
}
|
||||
);
|
||||
|
||||
return ajaxResponse;
|
||||
};
|
||||
|
||||
708
lib/OpenLayers/BaseTypes.js
Normal file
@@ -0,0 +1,708 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
|
||||
/*********************
|
||||
* *
|
||||
* PIXEL *
|
||||
* *
|
||||
*********************/
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* This class represents a screen coordinate, in x and y coordinates
|
||||
*/
|
||||
OpenLayers.Pixel = Class.create();
|
||||
OpenLayers.Pixel.prototype = {
|
||||
|
||||
/** @type float */
|
||||
x: 0.0,
|
||||
|
||||
/** @type float */
|
||||
y: 0.0,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {float} x
|
||||
* @param {float} y
|
||||
*/
|
||||
initialize: function(x, y) {
|
||||
this.x = parseFloat(x);
|
||||
this.y = parseFloat(y);
|
||||
},
|
||||
|
||||
/**
|
||||
* @return string representation of Pixel. ex: "x=200.4,y=242.2"
|
||||
* @type str
|
||||
*/
|
||||
toString:function() {
|
||||
return ("x=" + this.x + ",y=" + this.y);
|
||||
},
|
||||
|
||||
/**
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
clone:function() {
|
||||
return new OpenLayers.Pixel(this.x, this.y);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*
|
||||
* @return whether or not the point passed in as parameter is equal to this
|
||||
* note that if px passed in is null, returns false
|
||||
* @type bool
|
||||
*/
|
||||
equals:function(px) {
|
||||
var equals = false;
|
||||
if (px != null) {
|
||||
equals = ((this.x == px.x && this.y == px.y) ||
|
||||
(isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y)));
|
||||
}
|
||||
return equals;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {int} x
|
||||
* @param {int} y
|
||||
*
|
||||
* @return a new Pixel with this pixel's x&y augmented by the
|
||||
* values passed in.
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
add:function(x, y) {
|
||||
return new OpenLayers.Pixel(this.x + x, this.y + y);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*
|
||||
* @return a new Pixel with this pixel's x&y augmented by the
|
||||
* x&y values of the pixel passed in.
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
offset:function(px) {
|
||||
return this.add(px.x, px.y);
|
||||
},
|
||||
|
||||
/** @final @type str */
|
||||
CLASS_NAME: "OpenLayers.Pixel"
|
||||
};
|
||||
|
||||
|
||||
/*********************
|
||||
* *
|
||||
* SIZE *
|
||||
* *
|
||||
*********************/
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* This class represents a width and height pair
|
||||
*/
|
||||
OpenLayers.Size = Class.create();
|
||||
OpenLayers.Size.prototype = {
|
||||
|
||||
/** @type float */
|
||||
w: 0.0,
|
||||
|
||||
/** @type float */
|
||||
h: 0.0,
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {float} w
|
||||
* @param {float} h
|
||||
*/
|
||||
initialize: function(w, h) {
|
||||
this.w = parseFloat(w);
|
||||
this.h = parseFloat(h);
|
||||
},
|
||||
|
||||
/**
|
||||
* @return String representation of OpenLayers.Size object.
|
||||
* (ex. <i>"w=55,h=66"</i>)
|
||||
* @type String
|
||||
*/
|
||||
toString:function() {
|
||||
return ("w=" + this.w + ",h=" + this.h);
|
||||
},
|
||||
|
||||
/**
|
||||
* @return New OpenLayers.Size object with the same w and h values
|
||||
* @type OpenLayers.Size
|
||||
*/
|
||||
clone:function() {
|
||||
return new OpenLayers.Size(this.w, this.h);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Size} sz
|
||||
* @returns Boolean value indicating whether the passed-in OpenLayers.Size
|
||||
* object has the same w and h components as this
|
||||
* note that if sz passed in is null, returns false
|
||||
*
|
||||
* @type bool
|
||||
*/
|
||||
equals:function(sz) {
|
||||
var equals = false;
|
||||
if (sz != null) {
|
||||
equals = ((this.w == sz.w && this.h == sz.h) ||
|
||||
(isNaN(this.w) && isNaN(this.h) && isNaN(sz.w) && isNaN(sz.h)));
|
||||
}
|
||||
return equals;
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Size"
|
||||
};
|
||||
|
||||
/*********************
|
||||
* *
|
||||
* LONLAT *
|
||||
* *
|
||||
*********************/
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* This class represents a longitude and latitude pair
|
||||
*/
|
||||
OpenLayers.LonLat = Class.create();
|
||||
OpenLayers.LonLat.prototype = {
|
||||
|
||||
/** @type float */
|
||||
lon: 0.0,
|
||||
|
||||
/** @type float */
|
||||
lat: 0.0,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {float} lon
|
||||
* @param {float} lat
|
||||
*/
|
||||
initialize: function(lon, lat) {
|
||||
this.lon = parseFloat(lon);
|
||||
this.lat = parseFloat(lat);
|
||||
},
|
||||
|
||||
/**
|
||||
* @return String representation of OpenLayers.LonLat object.
|
||||
* (ex. <i>"lon=5,lat=42"</i>)
|
||||
* @type String
|
||||
*/
|
||||
toString:function() {
|
||||
return ("lon=" + this.lon + ",lat=" + this.lat);
|
||||
},
|
||||
|
||||
/**
|
||||
* @return Shortened String representation of OpenLayers.LonLat object.
|
||||
* (ex. <i>"5, 42"</i>)
|
||||
* @type String
|
||||
*/
|
||||
toShortString:function() {
|
||||
return (this.lon + ", " + this.lat);
|
||||
},
|
||||
|
||||
/**
|
||||
* @return New OpenLayers.LonLat object with the same lon and lat values
|
||||
* @type OpenLayers.LonLat
|
||||
*/
|
||||
clone:function() {
|
||||
return new OpenLayers.LonLat(this.lon, this.lat);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {float} lon
|
||||
* @param {float} lat
|
||||
*
|
||||
* @return A new OpenLayers.LonLat object with the lon and lat passed-in
|
||||
* added to this's.
|
||||
* @type OpenLayers.LonLat
|
||||
*/
|
||||
add:function(lon, lat) {
|
||||
return new OpenLayers.LonLat(this.lon + lon, this.lat + lat);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.LonLat} ll
|
||||
* @returns Boolean value indicating whether the passed-in OpenLayers.LonLat
|
||||
* object has the same lon and lat components as this
|
||||
* note that if ll passed in is null, returns false
|
||||
*
|
||||
* @type bool
|
||||
*/
|
||||
equals:function(ll) {
|
||||
var equals = false;
|
||||
if (ll != null) {
|
||||
equals = ((this.lon == ll.lon && this.lat == ll.lat) ||
|
||||
(isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat)));
|
||||
}
|
||||
return equals;
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.LonLat"
|
||||
};
|
||||
|
||||
/** Alternative constructor that builds a new OpenLayers.LonLat from a
|
||||
* parameter string
|
||||
*
|
||||
* @constructor
|
||||
*
|
||||
* @param {String} str Comma-separated Lon,Lat coordinate string.
|
||||
* (ex. <i>"5,40"</i>)
|
||||
*
|
||||
* @returns New OpenLayers.LonLat object built from the passed-in String.
|
||||
* @type OpenLayers.LonLat
|
||||
*/
|
||||
OpenLayers.LonLat.fromString = function(str) {
|
||||
var pair = str.split(",");
|
||||
return new OpenLayers.LonLat(parseFloat(pair[0]),
|
||||
parseFloat(pair[1]));
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*********************
|
||||
* *
|
||||
* BOUNDS *
|
||||
* *
|
||||
*********************/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* This class represents a bounding box.
|
||||
* Data stored as left, bottom, right, top floats
|
||||
*/
|
||||
OpenLayers.Bounds = Class.create();
|
||||
OpenLayers.Bounds.prototype = {
|
||||
|
||||
/** @type float */
|
||||
left: 0.0,
|
||||
|
||||
/** @type float */
|
||||
bottom: 0.0,
|
||||
|
||||
/** @type float */
|
||||
right: 0.0,
|
||||
|
||||
/** @type float */
|
||||
top: 0.0,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {float} left
|
||||
* @param {float} bottom
|
||||
* @param {float} right
|
||||
* @param {float} top
|
||||
*
|
||||
*/
|
||||
initialize: function(left, bottom, right, top) {
|
||||
this.left = parseFloat(left);
|
||||
this.bottom = parseFloat(bottom);
|
||||
this.right = parseFloat(right);
|
||||
this.top = parseFloat(top);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns A fresh copy of the bounds
|
||||
* @type OpenLayers.Bounds
|
||||
*/
|
||||
clone:function() {
|
||||
return new OpenLayers.Bounds(this.left, this.bottom,
|
||||
this.right, this.top);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Bounds} bounds
|
||||
* @returns Boolean value indicating whether the passed-in OpenLayers.Bounds
|
||||
* object has the same left, right, top, bottom components as this
|
||||
* note that if bounds passed in is null, returns false
|
||||
*
|
||||
* @type bool
|
||||
*/
|
||||
equals:function(bounds) {
|
||||
var equals = false;
|
||||
if (bounds != null) {
|
||||
equals = ((this.left == bounds.left) &&
|
||||
(this.right == bounds.right) &&
|
||||
(this.top == bounds.top) &&
|
||||
(this.bottom == bounds.bottom));
|
||||
}
|
||||
return equals;
|
||||
},
|
||||
|
||||
/**
|
||||
* @return String representation of OpenLayers.Bounds object.
|
||||
* (ex.<i>"left-bottom=(5,42) right-top=(10,45)"</i>)
|
||||
* @type String
|
||||
*/
|
||||
toString:function(){
|
||||
return ( "left-bottom=(" + this.left + "," + this.bottom + ")"
|
||||
+ " right-top=(" + this.right + "," + this.top + ")" );
|
||||
},
|
||||
|
||||
/**
|
||||
* @return Simple String representation of OpenLayers.Bounds object.
|
||||
* (ex. <i>"5,42,10,45"</i>)
|
||||
* @type String
|
||||
*/
|
||||
toBBOX:function() {
|
||||
return (this.left + "," + this.bottom + ","
|
||||
+ this.right + "," + this.top);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns The width of the bounds
|
||||
* @type float
|
||||
*/
|
||||
getWidth:function() {
|
||||
return (this.right - this.left);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns The height of the bounds
|
||||
* @type float
|
||||
*/
|
||||
getHeight:function() {
|
||||
return (this.top - this.bottom);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns An OpenLayers.Size which represents the size of the box
|
||||
* @type OpenLayers.Size
|
||||
*/
|
||||
getSize:function() {
|
||||
return new OpenLayers.Size(this.getWidth(), this.getHeight());
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns An OpenLayers.Pixel which represents the center of the bounds
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
getCenterPixel:function() {
|
||||
return new OpenLayers.Pixel( (this.left + this.right) / 2,
|
||||
(this.bottom + this.top) / 2);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns An OpenLayers.LonLat which represents the center of the bounds
|
||||
* @type OpenLayers.LonLat
|
||||
*/
|
||||
getCenterLonLat:function() {
|
||||
return new OpenLayers.LonLat( (this.left + this.right) / 2,
|
||||
(this.bottom + this.top) / 2);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {float} x
|
||||
* @param {float} y
|
||||
*
|
||||
* @returns A new OpenLayers.Bounds whose coordinates are the same as this,
|
||||
* but shifted by the passed-in x and y values
|
||||
* @type OpenLayers.Bounds
|
||||
*/
|
||||
add:function(x, y){
|
||||
return new OpenLayers.Bounds(this.left + x, this.bottom + y,
|
||||
this.right + x, this.top + y);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {float} x
|
||||
* @param {float} y
|
||||
* @param {Boolean} inclusive Whether or not to include the border.
|
||||
* Default is true
|
||||
*
|
||||
* @return Whether or not the passed-in coordinates are within this bounds
|
||||
* @type Boolean
|
||||
*/
|
||||
contains:function(x, y, inclusive) {
|
||||
|
||||
//set default
|
||||
if (inclusive == null) {
|
||||
inclusive = true;
|
||||
}
|
||||
|
||||
var contains = false;
|
||||
if (inclusive) {
|
||||
contains = ((x >= this.left) && (x <= this.right) &&
|
||||
(y >= this.bottom) && (y <= this.top));
|
||||
} else {
|
||||
contains = ((x > this.left) && (x < this.right) &&
|
||||
(y > this.bottom) && (y < this.top));
|
||||
}
|
||||
return contains;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Bounds} bounds
|
||||
* @param {Boolean} partial If true, only part of passed-in
|
||||
* OpenLayers.Bounds needs be within this bounds.
|
||||
* If false, the entire passed-in bounds must be
|
||||
* within. Default is false
|
||||
* @param {Boolean} inclusive Whether or not to include the border.
|
||||
* Default is true
|
||||
*
|
||||
* @return Whether or not the passed-in OpenLayers.Bounds object is
|
||||
* contained within this bounds.
|
||||
* @type Boolean
|
||||
*/
|
||||
containsBounds:function(bounds, partial, inclusive) {
|
||||
|
||||
//set defaults
|
||||
if (partial == null) {
|
||||
partial = false;
|
||||
}
|
||||
if (inclusive == null) {
|
||||
inclusive = true;
|
||||
}
|
||||
|
||||
var inLeft;
|
||||
var inTop;
|
||||
var inRight;
|
||||
var inBottom;
|
||||
|
||||
if (inclusive) {
|
||||
inLeft = (bounds.left >= this.left) && (bounds.left <= this.right);
|
||||
inTop = (bounds.top >= this.bottom) && (bounds.top <= this.top);
|
||||
inRight= (bounds.right >= this.left) && (bounds.right <= this.right);
|
||||
inBottom = (bounds.bottom >= this.bottom) && (bounds.bottom <= this.top);
|
||||
} else {
|
||||
inLeft = (bounds.left > this.left) && (bounds.left < this.right);
|
||||
inTop = (bounds.top > this.bottom) && (bounds.top < this.top);
|
||||
inRight= (bounds.right > this.left) && (bounds.right < this.right);
|
||||
inBottom = (bounds.bottom > this.bottom) && (bounds.bottom < this.top);
|
||||
}
|
||||
|
||||
return (partial) ? (inTop || inBottom) && (inLeft || inRight )
|
||||
: (inTop && inLeft && inBottom && inRight);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.LonLat} lonlat
|
||||
*
|
||||
* @returns The quadrant ("br" "tr" "tl" "bl") of the bounds in which
|
||||
* the coordinate lies.
|
||||
* @type String
|
||||
*/
|
||||
determineQuadrant: function(lonlat) {
|
||||
|
||||
var quadrant = "";
|
||||
var center = this.getCenterLonLat();
|
||||
|
||||
quadrant += (lonlat.lat < center.lat) ? "b" : "t";
|
||||
quadrant += (lonlat.lon < center.lon) ? "l" : "r";
|
||||
|
||||
return quadrant;
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Bounds"
|
||||
};
|
||||
|
||||
/** Alternative constructor that builds a new OpenLayers.Bounds from a
|
||||
* parameter string
|
||||
*
|
||||
* @constructor
|
||||
*
|
||||
* @param {String} str Comma-separated bounds string. (ex. <i>"5,42,10,45"</i>)
|
||||
*
|
||||
* @returns New OpenLayers.Bounds object built from the passed-in String.
|
||||
* @type OpenLayers.Bounds
|
||||
*/
|
||||
OpenLayers.Bounds.fromString = function(str) {
|
||||
var bounds = str.split(",");
|
||||
return OpenLayers.Bounds.fromArray(bounds);
|
||||
};
|
||||
|
||||
/** Alternative constructor that builds a new OpenLayers.Bounds
|
||||
* from an array
|
||||
*
|
||||
* @constructor
|
||||
*
|
||||
* @param {Array} bbox Array of bounds values (ex. <i>[5,42,10,45]</i>)
|
||||
*
|
||||
* @returns New OpenLayers.Bounds object built from the passed-in Array.
|
||||
* @type OpenLayers.Bounds
|
||||
*/
|
||||
OpenLayers.Bounds.fromArray = function(bbox) {
|
||||
return new OpenLayers.Bounds(parseFloat(bbox[0]),
|
||||
parseFloat(bbox[1]),
|
||||
parseFloat(bbox[2]),
|
||||
parseFloat(bbox[3]));
|
||||
};
|
||||
|
||||
/** Alternative constructor that builds a new OpenLayers.Bounds
|
||||
* from an OpenLayers.Size
|
||||
*
|
||||
* @constructor
|
||||
*
|
||||
* @param {OpenLayers.Size} size
|
||||
*
|
||||
* @returns New OpenLayers.Bounds object built with top and left set to 0 and
|
||||
* bottom right taken from the passed-in OpenLayers.Size.
|
||||
* @type OpenLayers.Bounds
|
||||
*/
|
||||
OpenLayers.Bounds.fromSize = function(size) {
|
||||
return new OpenLayers.Bounds(0,
|
||||
size.h,
|
||||
size.w,
|
||||
0);
|
||||
};
|
||||
/**
|
||||
* @param {String} quadrant
|
||||
*
|
||||
* @returns The opposing quadrant ("br" "tr" "tl" "bl"). For Example, if
|
||||
* you pass in "bl" it returns "tr", if you pass in "br" it
|
||||
* returns "tl", etc.
|
||||
* @type String
|
||||
*/
|
||||
OpenLayers.Bounds.oppositeQuadrant = function(quadrant) {
|
||||
var opp = "";
|
||||
|
||||
opp += (quadrant.charAt(0) == 't') ? 'b' : 't';
|
||||
opp += (quadrant.charAt(1) == 'l') ? 'r' : 'l';
|
||||
|
||||
return opp;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************
|
||||
* *
|
||||
* STRING *
|
||||
* *
|
||||
*********************/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {String} sStart
|
||||
*
|
||||
* @returns Whether or not this string starts with the string passed in.
|
||||
* @type Boolean
|
||||
*/
|
||||
String.prototype.startsWith = function(sStart){
|
||||
return (this.substr(0,sStart.length) == sStart);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {String} str
|
||||
*
|
||||
* @returns Whether or not this string contains with the string passed in.
|
||||
* @type Boolean
|
||||
*/
|
||||
String.prototype.contains = function(str){
|
||||
return (this.indexOf(str) != -1);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns A trimmed version of the string - all leading and
|
||||
* trailing spaces removed
|
||||
* @type String
|
||||
*/
|
||||
String.prototype.trim = function() {
|
||||
|
||||
var b = 0;
|
||||
while(this.substr(b,1) == " ") {
|
||||
b++;
|
||||
}
|
||||
|
||||
var e = this.length - 1;
|
||||
while(this.substr(e,1) == " ") {
|
||||
e--;
|
||||
}
|
||||
|
||||
return this.substring(b, e+1);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************
|
||||
* *
|
||||
* ARRAY *
|
||||
* *
|
||||
*********************/
|
||||
|
||||
|
||||
|
||||
/** Remove an object from an array. Iterates through the array
|
||||
* to find the item, then removes it.
|
||||
*
|
||||
* @param {Object} item
|
||||
*
|
||||
* @returns A reference to the array
|
||||
* @type Array
|
||||
*/
|
||||
Array.prototype.remove = function(item) {
|
||||
for(var i=0; i < this.length; i++) {
|
||||
if(this[i] == item) {
|
||||
this.splice(i,1);
|
||||
//break;more than once??
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns A fresh copy of the array
|
||||
* @type Array
|
||||
*/
|
||||
Array.prototype.clone = function() {
|
||||
var clone = new Array();
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
clone[i] = this[i];
|
||||
}
|
||||
return clone;
|
||||
};
|
||||
|
||||
/**
|
||||
*/
|
||||
Array.prototype.clear = function() {
|
||||
this.length = 0;
|
||||
};
|
||||
|
||||
|
||||
/*********************
|
||||
* *
|
||||
* NUMBER *
|
||||
* *
|
||||
*********************/
|
||||
|
||||
|
||||
|
||||
/** NOTE: Works only with integer values does *not* work with floats!
|
||||
*
|
||||
* @param {int} sig
|
||||
*
|
||||
* @returns The number, rounded to the specified number of significant digits.
|
||||
* If null, 0, or negaive value passed in, returns 0
|
||||
* @type int
|
||||
*/
|
||||
Number.prototype.limitSigDigs = function(sig) {
|
||||
var number = (sig > 0) ? this.toString() : 0;
|
||||
if (sig < number.length) {
|
||||
var exp = number.length - sig;
|
||||
number = Math.round( this / Math.pow(10, exp)) * Math.pow(10, exp);
|
||||
}
|
||||
return parseInt(number);
|
||||
}
|
||||
@@ -1,12 +1,16 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
OpenLayers.Control = Class.create();
|
||||
OpenLayers.Control.prototype = {
|
||||
|
||||
/** @type String */
|
||||
id: null,
|
||||
|
||||
/** this gets set in the addControl() function in OpenLayers.Map
|
||||
* @type OpenLayers.Map */
|
||||
map: null,
|
||||
@@ -17,33 +21,59 @@ OpenLayers.Control.prototype = {
|
||||
/** @type OpenLayers.Pixel */
|
||||
position: null,
|
||||
|
||||
/** @type OpenLayers.Pixel */
|
||||
mouseDragStart: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
* @constructor
|
||||
*
|
||||
* @param {Object} options
|
||||
*/
|
||||
initialize: function (options) {
|
||||
Object.extend(this, options);
|
||||
|
||||
this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*
|
||||
* @returns A reference to the DIV DOMElement containing the control
|
||||
* @type DOMElement
|
||||
*/
|
||||
*
|
||||
*/
|
||||
destroy: function () {
|
||||
// eliminate circular references
|
||||
this.map = null;
|
||||
},
|
||||
|
||||
/** Set the map property for the control. This is done through an accessor
|
||||
* so that subclasses can override this and take special action once
|
||||
* they have their map variable set.
|
||||
*
|
||||
* @param {OpenLayers.Map} map
|
||||
*/
|
||||
setMap: function(map) {
|
||||
this.map = map;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*
|
||||
* @returns A reference to the DIV DOMElement containing the control
|
||||
* @type DOMElement
|
||||
*/
|
||||
draw: function (px) {
|
||||
if (this.div == null) {
|
||||
this.div = OpenLayers.Util.createDiv();
|
||||
this.div.id = this.id;
|
||||
}
|
||||
if (px != null) {
|
||||
this.position = px.copyOf();
|
||||
this.position = px.clone();
|
||||
}
|
||||
this.moveTo(this.position);
|
||||
return this.div;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*/
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*/
|
||||
moveTo: function (px) {
|
||||
if ((px != null) && (this.div != null)) {
|
||||
this.div.style.left = px.x + "px";
|
||||
@@ -51,13 +81,6 @@ OpenLayers.Control.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
*/
|
||||
destroy: function () {
|
||||
// eliminate circular references
|
||||
this.map = null;
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Control"
|
||||
};
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
// @require: OpenLayers/Control.js
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Control.js
|
||||
*/
|
||||
OpenLayers.Control.KeyboardDefaults = Class.create();
|
||||
OpenLayers.Control.KeyboardDefaults.prototype =
|
||||
@@ -33,31 +34,20 @@ OpenLayers.Control.KeyboardDefaults.prototype =
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultKeyDown: function (evt) {
|
||||
|
||||
var slide = this.map.getResolution() * this.slideFactor;
|
||||
var center = this.map.getCenter();
|
||||
|
||||
var newCenter = center.copyOf();
|
||||
|
||||
switch(evt.keyCode) {
|
||||
case Event.KEY_LEFT:
|
||||
newCenter = newCenter.add( -slide, 0);
|
||||
this.map.pan(-50, 0);
|
||||
break;
|
||||
case Event.KEY_RIGHT:
|
||||
newCenter = newCenter.add( slide, 0);
|
||||
this.map.pan(50, 0);
|
||||
break;
|
||||
case Event.KEY_UP:
|
||||
newCenter = newCenter.add( 0, slide);
|
||||
this.map.pan(0, -50);
|
||||
break;
|
||||
case Event.KEY_DOWN:
|
||||
newCenter = newCenter.add( 0, -slide);
|
||||
this.map.pan(0, 50);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!newCenter.equals(center)) {
|
||||
this.map.setCenter(newCenter);
|
||||
Event.stop(evt);
|
||||
}
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
|
||||
@@ -1,221 +1,422 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
// @require: OpenLayers/Control.js
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Control.js
|
||||
*/
|
||||
OpenLayers.Control.LayerSwitcher = Class.create();
|
||||
|
||||
/** color used in the UI to show a layer is active/displayed
|
||||
*
|
||||
* @final
|
||||
* @type String
|
||||
*/
|
||||
OpenLayers.Control.LayerSwitcher.ACTIVE_COLOR = "darkblue";
|
||||
|
||||
/** color used in the UI to show a layer is deactivated/hidden
|
||||
*
|
||||
* @final
|
||||
* @type String
|
||||
*/
|
||||
OpenLayers.Control.LayerSwitcher.NONACTIVE_COLOR = "lightblue";
|
||||
|
||||
|
||||
OpenLayers.Control.LayerSwitcher.prototype =
|
||||
Object.extend( new OpenLayers.Control(), {
|
||||
|
||||
/** @type String */
|
||||
activeColor: "",
|
||||
activeColor: "darkblue",
|
||||
|
||||
/** @type String */
|
||||
nonActiveColor: "",
|
||||
|
||||
/** @type String */
|
||||
mode: "checkbox",
|
||||
|
||||
// DOM Elements
|
||||
|
||||
/** @type DOMElement */
|
||||
layersDiv: null,
|
||||
|
||||
/** @type DOMElement */
|
||||
baseLayersDiv: null,
|
||||
|
||||
/** @type Array */
|
||||
baseLayerInputs: null,
|
||||
|
||||
|
||||
/** @type DOMElement */
|
||||
dataLbl: null,
|
||||
|
||||
/** @type DOMElement */
|
||||
dataLayersDiv: null,
|
||||
|
||||
/** @type Array */
|
||||
dataLayerInputs: null,
|
||||
|
||||
|
||||
/** @type DOMElement */
|
||||
minimizeDiv: null,
|
||||
|
||||
/** @type DOMElement */
|
||||
maximizeDiv: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
initialize: function(options) {
|
||||
this.activeColor = OpenLayers.Control.LayerSwitcher.ACTIVE_COLOR;
|
||||
this.nonActiveColor = OpenLayers.Control.LayerSwitcher.NONACTIVE_COLOR;
|
||||
this.backdrops = [];
|
||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Map} map
|
||||
*/
|
||||
setMap: function(map) {
|
||||
OpenLayers.Control.prototype.setMap.apply(this, arguments);
|
||||
|
||||
this.map.events.register("addlayer", this, this.redraw);
|
||||
this.map.events.register("changelayer", this, this.redraw);
|
||||
this.map.events.register("removelayer", this, this.redraw);
|
||||
this.map.events.register("changebaselayer", this, this.redraw);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns A reference to the DIV DOMElement containing the switcher tabs
|
||||
* @type DOMElement
|
||||
*/
|
||||
draw: function() {
|
||||
// initialize our internal div
|
||||
OpenLayers.Control.prototype.draw.apply(this);
|
||||
|
||||
// create layout divs
|
||||
this.loadContents();
|
||||
|
||||
// set mode to minimize
|
||||
this.minimizeControl();
|
||||
|
||||
// populate div with current info
|
||||
this.redraw();
|
||||
|
||||
return this.div;
|
||||
},
|
||||
|
||||
/** Goes through and takes the current state of the Map and rebuilds the
|
||||
* control to display that state. Groups base layers into a radio-button
|
||||
* group and lists each data layer with a checkbox.
|
||||
*
|
||||
* @returns A reference to the DIV DOMElement containing the control
|
||||
* @type DOMElement
|
||||
*/
|
||||
redraw: function() {
|
||||
|
||||
//clear out previous layers
|
||||
this.baseLayersDiv.innerHTML = "";
|
||||
this.baseLayerInputs = new Array();
|
||||
|
||||
this.dataLayersDiv.innerHTML = "";
|
||||
this.dataLayerInputs = new Array();
|
||||
|
||||
var containsOverlays = false;
|
||||
|
||||
for( var i = 0; i < this.map.layers.length; i++) {
|
||||
var layer = this.map.layers[i];
|
||||
var baseLayer = layer.isBaseLayer;
|
||||
|
||||
if (!baseLayer) {
|
||||
containsOverlays = true;
|
||||
}
|
||||
|
||||
// only check a baselayer if it is *the* baselayer, check data
|
||||
// layers if they are visible
|
||||
var checked = (baseLayer) ? (layer == this.map.baseLayer)
|
||||
: layer.getVisibility();
|
||||
|
||||
// create input element
|
||||
var inputElem = document.createElement("input");
|
||||
inputElem.id = "input_" + layer.name;
|
||||
inputElem.name = (baseLayer) ? "baseLayers" : layer.name;
|
||||
inputElem.type = (baseLayer) ? "radio" : "checkbox";
|
||||
inputElem.value = layer.name;
|
||||
inputElem.checked = checked;
|
||||
inputElem.defaultChecked = checked;
|
||||
inputElem.layer = layer;
|
||||
inputElem.control = this;
|
||||
Event.observe(inputElem, "mouseup",
|
||||
this.onInputClick.bindAsEventListener(inputElem));
|
||||
|
||||
// create span
|
||||
var labelSpan = document.createElement("span");
|
||||
labelSpan.innerHTML = layer.name;
|
||||
labelSpan.style.verticalAlign = (baseLayer) ? "bottom" : "baseline";
|
||||
Event.observe(labelSpan, "click",
|
||||
this.onInputClick.bindAsEventListener(inputElem));
|
||||
// create line break
|
||||
var br = document.createElement("br");
|
||||
|
||||
|
||||
var groupArray = (baseLayer) ? this.baseLayerInputs
|
||||
: this.dataLayerInputs;
|
||||
groupArray.push(inputElem);
|
||||
|
||||
|
||||
var groupDiv = (baseLayer) ? this.baseLayersDiv
|
||||
: this.dataLayersDiv;
|
||||
groupDiv.appendChild(inputElem);
|
||||
groupDiv.appendChild(labelSpan);
|
||||
groupDiv.appendChild(br);
|
||||
|
||||
}
|
||||
|
||||
// if no overlays, dont display the overlay label
|
||||
this.dataLbl.style.display = (containsOverlays) ? "" : "none";
|
||||
|
||||
return this.div;
|
||||
},
|
||||
|
||||
/** A label has been clicked, check or uncheck its corresponding input
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {Event} e
|
||||
*/
|
||||
|
||||
onInputClick: function(e) {
|
||||
if (this.type == "radio") {
|
||||
this.checked = true;
|
||||
this.layer.map.setBaseLayer(this.layer, true);
|
||||
this.layer.map.events.triggerEvent("changebaselayer");
|
||||
} else {
|
||||
this.checked = !this.checked;
|
||||
this.control.updateMap();
|
||||
}
|
||||
Event.stop(e);
|
||||
},
|
||||
|
||||
/** Need to update the map accordingly whenever user clicks in either of
|
||||
* the layers.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {Event} e
|
||||
*/
|
||||
onLayerClick: function(e) {
|
||||
this.updateMap();
|
||||
},
|
||||
|
||||
|
||||
/** Cycles through the loaded data and base layer input arrays and makes
|
||||
* the necessary calls to the Map object such that that the map's
|
||||
* visual state corresponds to what the user has selected in the control
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
updateMap: function() {
|
||||
|
||||
// set the newly selected base layer
|
||||
for(var i=0; i < this.baseLayerInputs.length; i++) {
|
||||
var input = this.baseLayerInputs[i];
|
||||
if (input.checked) {
|
||||
this.map.setBaseLayer(input.layer, false);
|
||||
}
|
||||
}
|
||||
|
||||
// set the correct visibilities for the overlays
|
||||
for(var i=0; i < this.dataLayerInputs.length; i++) {
|
||||
var input = this.dataLayerInputs[i];
|
||||
input.layer.setVisibility(input.checked, true);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/** Set up the labels and divs for the control
|
||||
*
|
||||
* @param {Event} e
|
||||
*/
|
||||
maximizeControl: function(e) {
|
||||
|
||||
//HACK HACK HACK - find a way to auto-size this layerswitcher
|
||||
this.div.style.width = "20em";
|
||||
this.div.style.height = "";
|
||||
|
||||
this.showControls(false);
|
||||
|
||||
if (e != null) {
|
||||
Event.stop(e);
|
||||
}
|
||||
},
|
||||
|
||||
/** Hide all the contents of the control, shrink the size,
|
||||
* add the maximize icon
|
||||
*
|
||||
* @param {Event} e
|
||||
*/
|
||||
minimizeControl: function(e) {
|
||||
|
||||
this.div.style.width = "0px";
|
||||
this.div.style.height = "0px";
|
||||
|
||||
this.showControls(true);
|
||||
|
||||
if (e != null) {
|
||||
Event.stop(e);
|
||||
}
|
||||
},
|
||||
|
||||
/** Hide/Show all LayerSwitcher controls depending on whether we are
|
||||
* minimized or not
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {Boolean} minimize
|
||||
*/
|
||||
showControls: function(minimize) {
|
||||
|
||||
this.maximizeDiv.style.display = minimize ? "" : "none";
|
||||
this.minimizeDiv.style.display = minimize ? "none" : "";
|
||||
|
||||
this.layersDiv.style.display = minimize ? "none" : "";
|
||||
},
|
||||
|
||||
/** Set up the labels and divs for the control
|
||||
*
|
||||
*/
|
||||
loadContents: function() {
|
||||
|
||||
//configure main div
|
||||
this.div.style.position = "absolute";
|
||||
this.div.style.top = "10px";
|
||||
this.div.style.right = "0px";
|
||||
this.div.style.left = "";
|
||||
this.div.style.fontFamily = "sans-serif";
|
||||
this.div.style.color = "white";
|
||||
this.div.style.fontWeight = "bold";
|
||||
this.div.style.marginTop = "3px";
|
||||
this.div.style.marginLeft = "3px";
|
||||
this.div.style.marginBottom = "3px";
|
||||
this.div.style.fontSize="smaller";
|
||||
this.div.style.width = "10em";
|
||||
|
||||
this.map.events.register("addlayer", this, this.redraw);
|
||||
this.map.events.register("removelayer", this, this.redraw);
|
||||
return this.redraw();
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns A reference to the DIV DOMElement containing the switcher tabs
|
||||
* @type DOMElement
|
||||
*/
|
||||
redraw: function() {
|
||||
|
||||
//clear out previous incarnation of LayerSwitcher tabs
|
||||
this.div.innerHTML = "";
|
||||
var visible = false;
|
||||
for( var i = 0; i < this.map.layers.length; i++) {
|
||||
if (visible && this.mode == "radio") {
|
||||
this.map.layers[i].setVisibility(false);
|
||||
} else {
|
||||
visible = this.map.layers[i].getVisibility();
|
||||
}
|
||||
this.addTab(this.map.layers[i]);
|
||||
}
|
||||
|
||||
return this.div;
|
||||
},
|
||||
this.div.style.fontSize = "smaller";
|
||||
this.div.style.color = "white";
|
||||
this.div.style.backgroundColor = "transparent";
|
||||
|
||||
/**
|
||||
* @param {event} evt
|
||||
*/
|
||||
singleClick: function(evt) {
|
||||
var div = Event.element(evt);
|
||||
Event.observe(this.div, "mouseup",
|
||||
this.mouseUp.bindAsEventListener(this));
|
||||
Event.observe(this.div, "click",
|
||||
this.ignoreEvent);
|
||||
Event.observe(this.div, "mousedown",
|
||||
this.mouseDown.bindAsEventListener(this));
|
||||
Event.observe(this.div, "dblclick", this.ignoreEvent);
|
||||
|
||||
// See comment about OL #57 fix below.
|
||||
// If the click occurred on the corner spans we need
|
||||
// to make sure we act on the actual label tab instead.
|
||||
div = div.labelElement || div;
|
||||
|
||||
var layer = div.layer;
|
||||
if (this.mode == "radio") {
|
||||
for(var i=0; i < this.backdrops.length; i++) {
|
||||
this.setTabActivation(this.backdrops[i], false);
|
||||
this.backdrops[i].layer.setVisibility(false);
|
||||
}
|
||||
this.setTabActivation(div, true);
|
||||
layer.setVisibility(true);
|
||||
} else {
|
||||
var visible = layer.getVisibility();
|
||||
|
||||
this.setTabActivation(div, !visible);
|
||||
layer.setVisibility(!visible);
|
||||
}
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {event} evt
|
||||
*/
|
||||
ignoreEvent: function(evt) {
|
||||
Event.stop(evt);
|
||||
return false;
|
||||
},
|
||||
// layers list div
|
||||
this.layersDiv = document.createElement("div");
|
||||
this.layersDiv.id = "layersDiv";
|
||||
this.layersDiv.style.paddingTop = "5px";
|
||||
this.layersDiv.style.paddingLeft = "10px";
|
||||
this.layersDiv.style.paddingBottom = "5px";
|
||||
this.layersDiv.style.paddingRight = "75px";
|
||||
this.layersDiv.style.backgroundColor = this.activeColor;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {OpenLayers.Layer} layer
|
||||
*/
|
||||
addTab: function(layer) {
|
||||
|
||||
// Outer DIV - for Rico Corners
|
||||
// had to set width/height to get transparency in IE to work.
|
||||
// thanks -- http://jszen.blogspot.com/2005/04/ie6-opacity-filter-caveat.html
|
||||
//
|
||||
var backdropLabelOuter = document.createElement('div');
|
||||
backdropLabelOuter.id = "LayerSwitcher_" + layer.name + "_Tab";
|
||||
backdropLabelOuter.style.marginTop = "4px";
|
||||
backdropLabelOuter.style.marginBottom = "4px";
|
||||
|
||||
// Inner Label - for Rico Corners
|
||||
//
|
||||
var backdropLabel = document.createElement('p');
|
||||
backdropLabel.innerHTML = layer.name;
|
||||
backdropLabel.style.marginTop = "0px";
|
||||
backdropLabel.style.marginBottom = "0px";
|
||||
backdropLabel.style.paddingLeft = "10px";
|
||||
backdropLabel.style.paddingRight = "10px";
|
||||
|
||||
// add reference to layer onto the div for use in event handlers
|
||||
backdropLabel.layer = layer;
|
||||
this.layersDiv.style.width = "100%";
|
||||
this.layersDiv.style.height = "100%";
|
||||
|
||||
// set event handlers
|
||||
this._setEventHandlers(backdropLabel);
|
||||
|
||||
// add label to div
|
||||
backdropLabelOuter.appendChild(backdropLabel);
|
||||
var baseLbl = document.createElement("div");
|
||||
baseLbl.innerHTML = "<u>Base Layer</u>";
|
||||
baseLbl.style.marginTop = "3px";
|
||||
baseLbl.style.marginLeft = "3px";
|
||||
baseLbl.style.marginBottom = "3px";
|
||||
this.layersDiv.appendChild(baseLbl);
|
||||
|
||||
this.backdrops.append(backdropLabel);
|
||||
|
||||
// add div to main LayerSwitcher Div
|
||||
this.div.appendChild(backdropLabelOuter);
|
||||
this.baseLayersDiv = document.createElement("div");
|
||||
this.baseLayersDiv.style.paddingLeft = "10px";
|
||||
/*Event.observe(this.baseLayersDiv, "click",
|
||||
this.onLayerClick.bindAsEventListener(this));
|
||||
*/
|
||||
this.layersDiv.appendChild(this.baseLayersDiv);
|
||||
|
||||
|
||||
Rico.Corner.round(backdropLabelOuter, {corners: "tl bl",
|
||||
this.dataLbl = document.createElement("div");
|
||||
this.dataLbl.innerHTML = "<u>Overlays</u>";
|
||||
this.dataLbl.style.marginTop = "3px";
|
||||
this.dataLbl.style.marginLeft = "3px";
|
||||
this.dataLbl.style.marginBottom = "3px";
|
||||
this.layersDiv.appendChild(this.dataLbl);
|
||||
|
||||
this.dataLayersDiv = document.createElement("div");
|
||||
this.dataLayersDiv.style.paddingLeft = "10px";
|
||||
/*Event.observe(this.dataLayersDiv, "click",
|
||||
this.onLayerClick.bindAsEventListener(this));
|
||||
*/
|
||||
this.layersDiv.appendChild(this.dataLayersDiv);
|
||||
|
||||
this.div.appendChild(this.layersDiv);
|
||||
|
||||
Rico.Corner.round(this.div, {corners: "tl bl",
|
||||
bgColor: "transparent",
|
||||
color: "white",
|
||||
color: this.activeColor,
|
||||
blend: false});
|
||||
|
||||
// extend the event handlers to operate on the
|
||||
// rounded corners as well. (Fixes OL #57.)
|
||||
var spanElements=backdropLabel.parentNode.getElementsByTagName("span");
|
||||
Rico.Corner.changeOpacity(this.layersDiv, 0.75);
|
||||
|
||||
var imgLocation = OpenLayers.Util.getImagesLocation();
|
||||
var sz = new OpenLayers.Size(18,18);
|
||||
|
||||
// maximize button div
|
||||
var img = imgLocation + 'layer-switcher-maximize.png';
|
||||
this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
|
||||
"OpenLayers_Control_MaximizeDiv",
|
||||
null,
|
||||
sz,
|
||||
img,
|
||||
"absolute");
|
||||
this.maximizeDiv.style.top = "5px";
|
||||
this.maximizeDiv.style.right = "0px";
|
||||
this.maximizeDiv.style.left = "";
|
||||
this.maximizeDiv.style.display = "none";
|
||||
Event.observe(this.maximizeDiv,
|
||||
"click",
|
||||
this.maximizeControl.bindAsEventListener(this));
|
||||
|
||||
for (var currIdx = 0; currIdx < spanElements.length; currIdx++) {
|
||||
this._setEventHandlers(spanElements[currIdx], backdropLabel);
|
||||
}
|
||||
this.div.appendChild(this.maximizeDiv);
|
||||
|
||||
this.setTabActivation(backdropLabel, layer.getVisibility());
|
||||
// minimize button div
|
||||
var img = imgLocation + 'layer-switcher-minimize.png';
|
||||
var sz = new OpenLayers.Size(18,18);
|
||||
this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv(
|
||||
"OpenLayers_Control_MinimizeDiv",
|
||||
null,
|
||||
sz,
|
||||
img,
|
||||
"absolute");
|
||||
this.minimizeDiv.style.top = "5px";
|
||||
this.minimizeDiv.style.right = "0px";
|
||||
this.minimizeDiv.style.left = "";
|
||||
this.minimizeDiv.style.display = "none";
|
||||
Event.observe(this.minimizeDiv,
|
||||
"click",
|
||||
this.minimizeControl.bindAsEventListener(this));
|
||||
|
||||
this.div.appendChild(this.minimizeDiv);
|
||||
},
|
||||
|
||||
/*
|
||||
@private
|
||||
|
||||
@param {DOMElement} div
|
||||
@param {Boolean} activate
|
||||
*/
|
||||
_setEventHandlers : function(element, labelDiv) {
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {Event} evt
|
||||
*/
|
||||
ignoreEvent: function(evt) {
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
// We only want to respond to a mousedown event.
|
||||
element.onclick = this.ignoreEvent.bindAsEventListener(this);
|
||||
element.ondblclick = this.ignoreEvent.bindAsEventListener(this);
|
||||
element.onmousedown = this.singleClick.bindAsEventListener(this);
|
||||
/** Register a local 'mouseDown' flag so that we'll know whether or not
|
||||
* to ignore a mouseUp event
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {Event} evt
|
||||
*/
|
||||
mouseDown: function(evt) {
|
||||
this.mouseDown = true;
|
||||
this.ignoreEvent(evt);
|
||||
},
|
||||
|
||||
// If we are operating on a corner span we need to store a
|
||||
// reference to the actual tab. (See comment about OL #57 fix above.)
|
||||
if (labelDiv) {
|
||||
element.labelElement = labelDiv;
|
||||
/** If the 'mouseDown' flag has been set, that means that the drag was
|
||||
* started from within the LayerSwitcher control, and thus we can
|
||||
* ignore the mouseup. Otherwise, let the Event continue.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {Event} evt
|
||||
*/
|
||||
mouseUp: function(evt) {
|
||||
if (this.mouseDown) {
|
||||
this.mouseDown = false;
|
||||
this.ignoreEvent(evt);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {DOMElement} div
|
||||
* @param {Boolean} activate
|
||||
*/
|
||||
setTabActivation:function(div, activate) {
|
||||
var color = (activate) ? this.activeColor : this.nonActiveColor;
|
||||
Rico.Corner.changeColor(div, color);
|
||||
},
|
||||
|
||||
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Control.LayerSwitcher"
|
||||
});
|
||||
|
||||
|
||||
226
lib/OpenLayers/Control/LayerTabs.js
Normal file
@@ -0,0 +1,226 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Control.js
|
||||
*/
|
||||
OpenLayers.Control.LayerTabs = Class.create();
|
||||
|
||||
/** color used in the UI to show a layer is active/displayed
|
||||
*
|
||||
* @final
|
||||
* @type String
|
||||
*/
|
||||
OpenLayers.Control.LayerTabs.ACTIVE_COLOR = "darkblue";
|
||||
|
||||
/** color used in the UI to show a layer is deactivated/hidden
|
||||
*
|
||||
* @final
|
||||
* @type String
|
||||
*/
|
||||
OpenLayers.Control.LayerTabs.NONACTIVE_COLOR = "lightblue";
|
||||
|
||||
|
||||
OpenLayers.Control.LayerTabs.prototype =
|
||||
Object.extend( new OpenLayers.Control(), {
|
||||
|
||||
/** @type String */
|
||||
activeColor: "",
|
||||
|
||||
/** @type String */
|
||||
nonActiveColor: "",
|
||||
|
||||
/** @type String */
|
||||
mode: "checkbox",
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
initialize: function(options) {
|
||||
this.activeColor = OpenLayers.Control.LayerTabs.ACTIVE_COLOR;
|
||||
this.nonActiveColor = OpenLayers.Control.LayerTabs.NONACTIVE_COLOR;
|
||||
this.backdrops = [];
|
||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns A reference to the DIV DOMElement containing the switcher tabs
|
||||
* @type DOMElement
|
||||
*/
|
||||
draw: function() {
|
||||
// initialize our internal div
|
||||
OpenLayers.Control.prototype.draw.apply(this);
|
||||
|
||||
this.div.style.position = "absolute";
|
||||
this.div.style.top = "10px";
|
||||
this.div.style.right = "0px";
|
||||
this.div.style.left = "";
|
||||
this.div.style.fontFamily = "sans-serif";
|
||||
this.div.style.color = "white";
|
||||
this.div.style.fontWeight = "bold";
|
||||
this.div.style.marginTop = "3px";
|
||||
this.div.style.marginLeft = "3px";
|
||||
this.div.style.marginBottom = "3px";
|
||||
this.div.style.fontSize="smaller";
|
||||
this.div.style.width = "10em";
|
||||
|
||||
this.map.events.register("addlayer", this, this.redraw);
|
||||
this.map.events.register("removelayer", this, this.redraw);
|
||||
return this.redraw();
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns A reference to the DIV DOMElement containing the switcher tabs
|
||||
* @type DOMElement
|
||||
*/
|
||||
redraw: function() {
|
||||
|
||||
//clear out previous incarnation of LayerTabs tabs
|
||||
this.div.innerHTML = "";
|
||||
var visible = false;
|
||||
for( var i = 0; i < this.map.layers.length; i++) {
|
||||
if (visible && this.mode == "radio") {
|
||||
this.map.layers[i].setVisibility(false);
|
||||
} else {
|
||||
visible = this.map.layers[i].getVisibility();
|
||||
}
|
||||
this.addTab(this.map.layers[i]);
|
||||
}
|
||||
|
||||
return this.div;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Event} evt
|
||||
*/
|
||||
singleClick: function(evt) {
|
||||
var div = Event.element(evt);
|
||||
|
||||
// See comment about OL #57 fix below.
|
||||
// If the click occurred on the corner spans we need
|
||||
// to make sure we act on the actual label tab instead.
|
||||
div = div.labelElement || div;
|
||||
|
||||
var layer = div.layer;
|
||||
if (this.mode == "radio") {
|
||||
for(var i=0; i < this.backdrops.length; i++) {
|
||||
this.setTabActivation(this.backdrops[i], false);
|
||||
this.backdrops[i].layer.setVisibility(false);
|
||||
}
|
||||
this.setTabActivation(div, true);
|
||||
layer.setVisibility(true);
|
||||
} else {
|
||||
var visible = layer.getVisibility();
|
||||
|
||||
this.setTabActivation(div, !visible);
|
||||
layer.setVisibility(!visible);
|
||||
}
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {Event} evt
|
||||
*/
|
||||
ignoreEvent: function(evt) {
|
||||
Event.stop(evt);
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {OpenLayers.Layer} layer
|
||||
*/
|
||||
addTab: function(layer) {
|
||||
|
||||
// Outer DIV - for Rico Corners
|
||||
//
|
||||
var backdropLabelOuter = document.createElement('div');
|
||||
backdropLabelOuter.id = "LayerTabs_" + layer.name + "_Tab";
|
||||
backdropLabelOuter.style.marginTop = "4px";
|
||||
backdropLabelOuter.style.marginBottom = "4px";
|
||||
|
||||
this._setEventHandlers(backdropLabelOuter);
|
||||
|
||||
// Inner Label - for Rico Corners
|
||||
//
|
||||
var backdropLabel = document.createElement('p');
|
||||
backdropLabel.innerHTML = layer.name;
|
||||
backdropLabel.style.marginTop = "0px";
|
||||
backdropLabel.style.marginBottom = "0px";
|
||||
backdropLabel.style.paddingLeft = "10px";
|
||||
backdropLabel.style.paddingRight = "10px";
|
||||
|
||||
// add reference to layer onto the div for use in event handlers
|
||||
backdropLabel.layer = layer;
|
||||
|
||||
// set event handlers
|
||||
this._setEventHandlers(backdropLabel);
|
||||
|
||||
// add label to div
|
||||
backdropLabelOuter.appendChild(backdropLabel);
|
||||
|
||||
this.backdrops.push(backdropLabel);
|
||||
|
||||
// add div to main LayerTabs Div
|
||||
this.div.appendChild(backdropLabelOuter);
|
||||
|
||||
Rico.Corner.round(backdropLabelOuter, {corners: "tl bl",
|
||||
bgColor: "transparent",
|
||||
color: "white",
|
||||
blend: false});
|
||||
|
||||
// extend the event handlers to operate on the
|
||||
// rounded corners as well. (Fixes OL #57.)
|
||||
var spanElements=backdropLabel.parentNode.getElementsByTagName("span");
|
||||
|
||||
for (var currIdx = 0; currIdx < spanElements.length; currIdx++) {
|
||||
this._setEventHandlers(spanElements[currIdx], backdropLabel);
|
||||
}
|
||||
|
||||
this.setTabActivation(backdropLabel, layer.getVisibility());
|
||||
},
|
||||
|
||||
/*
|
||||
@private
|
||||
|
||||
@param {DOMElement} div
|
||||
@param {Boolean} activate
|
||||
*/
|
||||
_setEventHandlers : function(element, labelDiv) {
|
||||
|
||||
// We only want to respond to a mousedown event.
|
||||
element.onclick = this.singleClick.bindAsEventListener(this);
|
||||
element.ondblclick = this.singleClick.bindAsEventListener(this);
|
||||
element.onmouseup = this.ignoreEvent.bindAsEventListener(this);
|
||||
element.onmousedown = this.ignoreEvent.bindAsEventListener(this);
|
||||
|
||||
// If we are operating on a corner span we need to store a
|
||||
// reference to the actual tab. (See comment about OL #57 fix above.)
|
||||
if (labelDiv) {
|
||||
element.labelElement = labelDiv;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @param {DOMElement} div
|
||||
* @param {Boolean} activate
|
||||
*/
|
||||
setTabActivation:function(div, activate) {
|
||||
var color = (activate) ? this.activeColor : this.nonActiveColor;
|
||||
Rico.Corner.changeColor(div, color);
|
||||
},
|
||||
|
||||
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Control.LayerTabs"
|
||||
});
|
||||
|
||||
@@ -1,17 +1,37 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
// @require: OpenLayers/Control.js
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Control.js
|
||||
*/
|
||||
OpenLayers.Control.MouseDefaults = Class.create();
|
||||
OpenLayers.Control.MouseDefaults.prototype =
|
||||
Object.extend( new OpenLayers.Control(), {
|
||||
|
||||
/** @type Boolean */
|
||||
performedDrag: false,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
initialize: function() {
|
||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
||||
|
||||
//register mousewheel events specifically on the window and document
|
||||
Event.observe(window, "DOMMouseScroll",
|
||||
this.onWheelEvent.bindAsEventListener(this));
|
||||
Event.observe(window, "mousewheel",
|
||||
this.onWheelEvent.bindAsEventListener(this));
|
||||
Event.observe(document, "mousewheel",
|
||||
this.onWheelEvent.bindAsEventListener(this));
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
draw: function() {
|
||||
this.map.events.register( "click", this, this.defaultClick );
|
||||
this.map.events.register( "dblclick", this, this.defaultDblClick );
|
||||
@@ -21,7 +41,13 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
this.map.events.register( "mouseout", this, this.defaultMouseOut );
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Event} evt
|
||||
*
|
||||
* @type Boolean
|
||||
*/
|
||||
defaultClick: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
var notAfterDrag = !this.performedDrag;
|
||||
this.performedDrag = false;
|
||||
return notAfterDrag;
|
||||
@@ -33,13 +59,16 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
defaultDblClick: function (evt) {
|
||||
var newCenter = this.map.getLonLatFromViewPortPx( evt.xy );
|
||||
this.map.setCenter(newCenter, this.map.zoom + 1);
|
||||
Event.stop(evt);
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultMouseDown: function (evt) {
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
this.performedDrag = false;
|
||||
if (evt.shiftKey) {
|
||||
this.map.div.style.cursor = "crosshair";
|
||||
@@ -52,6 +81,7 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
this.zoomBox.style.backgroundColor = "white";
|
||||
this.zoomBox.style.filter = "alpha(opacity=50)"; // IE
|
||||
this.zoomBox.style.opacity = "0.50";
|
||||
this.zoomBox.style.fontSize = "1px";
|
||||
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
||||
this.map.viewPortDiv.appendChild(this.zoomBox);
|
||||
}
|
||||
@@ -67,8 +97,8 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
if (this.zoomBox) {
|
||||
var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x);
|
||||
var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y);
|
||||
this.zoomBox.style.width = deltaX+"px";
|
||||
this.zoomBox.style.height = deltaY+"px";
|
||||
this.zoomBox.style.width = Math.max(1, deltaX) + "px";
|
||||
this.zoomBox.style.height = Math.max(1, deltaY) + "px";
|
||||
if (evt.xy.x < this.mouseDragStart.x) {
|
||||
this.zoomBox.style.left = evt.xy.x+"px";
|
||||
}
|
||||
@@ -83,7 +113,7 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
size.h / 2 + deltaY);
|
||||
var newCenter = this.map.getLonLatFromViewPortPx( newXY );
|
||||
this.map.setCenter(newCenter, null, true);
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
this.map.div.style.cursor = "move";
|
||||
}
|
||||
this.performedDrag = true;
|
||||
@@ -94,34 +124,127 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultMouseUp: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
if (this.zoomBox) {
|
||||
var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart );
|
||||
var end = this.map.getLonLatFromViewPortPx( evt.xy );
|
||||
var top = Math.max(start.lat, end.lat);
|
||||
var bottom = Math.min(start.lat, end.lat);
|
||||
var left = Math.min(start.lon, end.lon);
|
||||
var right = Math.max(start.lon, end.lon);
|
||||
var bounds = new OpenLayers.Bounds(left, bottom, right, top);
|
||||
var zoom = this.map.getZoomForExtent(bounds);
|
||||
this.map.setCenter(new OpenLayers.LonLat(
|
||||
(start.lon + end.lon) / 2,
|
||||
(start.lat + end.lat) / 2
|
||||
), zoom);
|
||||
this.map.viewPortDiv.removeChild(document.getElementById("zoomBox"));
|
||||
this.zoomBox = null;
|
||||
this.zoomBoxEnd(evt);
|
||||
} else {
|
||||
this.map.setCenter(this.map.center);
|
||||
if (this.performedDrag) {
|
||||
this.map.setCenter(this.map.center);
|
||||
}
|
||||
}
|
||||
document.onselectstart=null;
|
||||
this.mouseDragStart = null;
|
||||
this.map.div.style.cursor = "default";
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultMouseOut: function (evt) {
|
||||
if (this.mouseDragStart != null
|
||||
&& OpenLayers.Util.mouseLeft(evt, this.map.div)) {
|
||||
this.defaultMouseUp(evt);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/** User spun scroll wheel up
|
||||
*
|
||||
*/
|
||||
defaultWheelUp: function() {
|
||||
this.map.zoomIn();
|
||||
},
|
||||
|
||||
/** User spun scroll wheel down
|
||||
*
|
||||
*/
|
||||
defaultWheelDown: function() {
|
||||
this.map.zoomOut();
|
||||
},
|
||||
|
||||
/** Zoombox function.
|
||||
*
|
||||
*/
|
||||
zoomBoxEnd: function(evt) {
|
||||
if (this.mouseDragStart != null) {
|
||||
if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 ||
|
||||
Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) {
|
||||
var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart );
|
||||
var end = this.map.getLonLatFromViewPortPx( evt.xy );
|
||||
var top = Math.max(start.lat, end.lat);
|
||||
var bottom = Math.min(start.lat, end.lat);
|
||||
var left = Math.min(start.lon, end.lon);
|
||||
var right = Math.max(start.lon, end.lon);
|
||||
var bounds = new OpenLayers.Bounds(left, bottom, right, top);
|
||||
var zoom = this.map.getZoomForExtent(bounds);
|
||||
this.map.setCenter(new OpenLayers.LonLat(
|
||||
(start.lon + end.lon) / 2,
|
||||
(start.lat + end.lat) / 2
|
||||
), zoom);
|
||||
} else {
|
||||
var end = this.map.getLonLatFromViewPortPx( evt.xy );
|
||||
this.map.setCenter(new OpenLayers.LonLat(
|
||||
(end.lon),
|
||||
(end.lat)
|
||||
), this.map.getZoom() + 1);
|
||||
}
|
||||
this.map.viewPortDiv.removeChild(this.zoomBox);
|
||||
this.zoomBox = null;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Mouse ScrollWheel code thanks to http://adomas.org/javascript-mouse-wheel/
|
||||
*/
|
||||
|
||||
|
||||
/** Catch the wheel event and handle it xbrowserly
|
||||
*
|
||||
* @param {Event} e
|
||||
*/
|
||||
onWheelEvent: function(e){
|
||||
|
||||
// first determine whether or not the wheeling was inside the map
|
||||
var inMap = false;
|
||||
var elem = Event.element(e);
|
||||
while(elem != null) {
|
||||
if (this.map && elem == this.map.div) {
|
||||
inMap = true;
|
||||
break;
|
||||
}
|
||||
elem = elem.parentNode;
|
||||
}
|
||||
|
||||
if (inMap) {
|
||||
|
||||
var delta = 0;
|
||||
if (!e) {
|
||||
e = window.event;
|
||||
}
|
||||
if (e.wheelDelta) {
|
||||
delta = e.wheelDelta/120;
|
||||
if (window.opera) {
|
||||
delta = -delta;
|
||||
}
|
||||
} else if (e.detail) {
|
||||
delta = -e.detail / 3;
|
||||
}
|
||||
if (delta) {
|
||||
if (delta < 0) {
|
||||
this.defaultWheelDown();
|
||||
} else {
|
||||
this.defaultWheelUp();
|
||||
}
|
||||
}
|
||||
|
||||
//only wheel the map, not the window
|
||||
Event.stop(e);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Control.MouseDefaults"
|
||||
});
|
||||
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
// @require: OpenLayers/Control.js
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Control.js
|
||||
* @requires OpenLayers/Control/MouseDefaults.js
|
||||
*/
|
||||
OpenLayers.Control.MouseToolbar = Class.create();
|
||||
OpenLayers.Control.MouseToolbar.X = 6;
|
||||
OpenLayers.Control.MouseToolbar.Y = 300;
|
||||
OpenLayers.Control.MouseToolbar.prototype =
|
||||
Object.extend( new OpenLayers.Control(), {
|
||||
Object.extend( new OpenLayers.Control(),
|
||||
Object.extend( new OpenLayers.Control.MouseDefaults(), {
|
||||
|
||||
mode: null,
|
||||
|
||||
@@ -28,22 +35,16 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
},
|
||||
|
||||
draw: function() {
|
||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||
OpenLayers.Control.MouseDefaults.prototype.draw.apply(this, arguments);
|
||||
this.buttons = new Object();
|
||||
this.map.events.register( "dblclick", this, this.defaultDblClick );
|
||||
this.map.events.register( "mousedown", this, this.defaultMouseDown );
|
||||
this.map.events.register( "mouseup", this, this.defaultMouseUp );
|
||||
this.map.events.register( "mousemove", this, this.defaultMouseMove );
|
||||
this.map.events.register( "mouseout", this, this.defaultMouseOut );
|
||||
var sz = new OpenLayers.Size(28,28);
|
||||
var centered = this.position;
|
||||
this._addButton("zoombox", "drag-rectangle-off.png", "drag-rectangle-on.png", centered, sz, "Shift->Drag to zoom to area");
|
||||
centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0));
|
||||
this._addButton("pan", "panning-hand-off.png", "panning-hand-on.png", centered, sz, "Drag the map to pan.");
|
||||
centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0));
|
||||
this._addButton("measure", "measuring-stick-off.png", "measuring-stick-on.png", centered, sz, "Hold alt when clicking to show distance between selected points");
|
||||
this.switchModeTo("pan");
|
||||
this.map.events.register("zoomend", this, function() { this.switchModeTo("pan"); });
|
||||
return this.div;
|
||||
|
||||
},
|
||||
@@ -63,7 +64,8 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
|
||||
btn.events = new OpenLayers.Events(this, btn);
|
||||
btn.events.register("mousedown", this, this.buttonClick);
|
||||
btn.events.register("mouseup", this, this.stopAction);
|
||||
btn.events.register("mouseup", this, Event.stop);
|
||||
btn.events.register("click", this, Event.stop);
|
||||
btn.action = id;
|
||||
btn.title = title;
|
||||
btn.alt = title;
|
||||
@@ -74,12 +76,9 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
return btn;
|
||||
},
|
||||
|
||||
stopAction: function(evt) {
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
buttonClick: function(evt) {
|
||||
this.switchModeTo(evt.div.action);
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.switchModeTo(evt.element.action);
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
@@ -88,17 +87,24 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
*/
|
||||
defaultDblClick: function (evt) {
|
||||
this.switchModeTo("pan");
|
||||
this.performedDrag = false;
|
||||
var newCenter = this.map.getLonLatFromViewPortPx( evt.xy );
|
||||
this.map.setCenter(newCenter, this.map.zoom + 2);
|
||||
Event.stop(evt);
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultMouseDown: function (evt) {
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
this.performedDrag = false;
|
||||
this.startViaKeyboard = false;
|
||||
if (evt.shiftKey && this.mode !="zoombox") {
|
||||
this.switchModeTo("zoombox");
|
||||
this.startViaKeyboard = true;
|
||||
} else if (evt.altKey && this.mode !="measure") {
|
||||
this.switchModeTo("measure");
|
||||
} else if (!this.mode) {
|
||||
@@ -117,8 +123,10 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
this.zoomBox.style.backgroundColor = "white";
|
||||
this.zoomBox.style.filter = "alpha(opacity=50)"; // IE
|
||||
this.zoomBox.style.opacity = "0.50";
|
||||
this.zoomBox.style.fontSize = "1px";
|
||||
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
||||
this.map.viewPortDiv.appendChild(this.zoomBox);
|
||||
this.performedDrag = true;
|
||||
break;
|
||||
case "measure":
|
||||
var distance = "";
|
||||
@@ -139,6 +147,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
"absolute");
|
||||
this.measureBox.style.width="4px";
|
||||
this.measureBox.style.height="4px";
|
||||
this.measureBox.style.fontSize = "1px";
|
||||
this.measureBox.style.backgroundColor="red";
|
||||
this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
||||
this.map.layerContainerDiv.appendChild(this.measureBox);
|
||||
@@ -154,11 +163,11 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
this.measureBoxDistance.innerHTML = distance;
|
||||
this.measureBoxDistance.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
||||
this.map.layerContainerDiv.appendChild(this.measureBoxDistance);
|
||||
this.measureDivs.append(this.measureBoxDistance);
|
||||
this.measureDivs.push(this.measureBoxDistance);
|
||||
}
|
||||
this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
||||
this.map.layerContainerDiv.appendChild(this.measureBox);
|
||||
this.measureDivs.append(this.measureBox);
|
||||
this.measureDivs.push(this.measureBox);
|
||||
break;
|
||||
default:
|
||||
this.map.div.style.cursor = "move";
|
||||
@@ -170,8 +179,8 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
|
||||
switchModeTo: function(mode) {
|
||||
if (mode != this.mode) {
|
||||
if (this.mode) {
|
||||
this.buttons[this.mode].firstChild.src = this.buttons[this.mode].imgLocation;
|
||||
if (this.mode && this.buttons[this.mode]) {
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation);
|
||||
}
|
||||
if (this.mode == "measure" && mode != "measure") {
|
||||
for(var i = 0; i < this.measureDivs.length; i++) {
|
||||
@@ -183,7 +192,9 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
this.measureStart = null;
|
||||
}
|
||||
this.mode = mode;
|
||||
this.buttons[mode].firstChild.src = this.buttons[mode].activeImgLocation;
|
||||
if (this.buttons[mode]) {
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode], null, null, null, this.buttons[mode].activeImgLocation);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -200,8 +211,8 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
case "zoombox":
|
||||
var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x);
|
||||
var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y);
|
||||
this.zoomBox.style.width = deltaX+"px";
|
||||
this.zoomBox.style.height = deltaY+"px";
|
||||
this.zoomBox.style.width = Math.max(1, deltaX) + "px";
|
||||
this.zoomBox.style.height = Math.max(1, deltaY) + "px";
|
||||
if (evt.xy.x < this.mouseDragStart.x) {
|
||||
this.zoomBox.style.left = evt.xy.x+"px";
|
||||
}
|
||||
@@ -217,8 +228,9 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
size.h / 2 + deltaY);
|
||||
var newCenter = this.map.getLonLatFromViewPortPx( newXY );
|
||||
this.map.setCenter(newCenter, null, true);
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
}
|
||||
this.performedDrag = true;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -226,27 +238,16 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultMouseUp: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
switch (this.mode) {
|
||||
case "zoombox":
|
||||
var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart );
|
||||
var end = this.map.getLonLatFromViewPortPx( evt.xy );
|
||||
var top = Math.max(start.lat, end.lat);
|
||||
var bottom = Math.min(start.lat, end.lat);
|
||||
var left = Math.min(start.lon, end.lon);
|
||||
var right = Math.max(start.lon, end.lon);
|
||||
var bounds = new OpenLayers.Bounds(left, bottom, right, top);
|
||||
var zoom = this.map.getZoomForExtent(bounds);
|
||||
this.map.setCenter(new OpenLayers.LonLat(
|
||||
(start.lon + end.lon) / 2,
|
||||
(start.lat + end.lat) / 2
|
||||
), zoom);
|
||||
this.map.viewPortDiv.removeChild(document.getElementById("zoomBox"));
|
||||
this.zoomBox = null;
|
||||
this.leaveMode();
|
||||
this.zoomBoxEnd(evt);
|
||||
if (this.startViaKeyboard) this.leaveMode();
|
||||
break;
|
||||
case "pan":
|
||||
this.map.setCenter(this.map.center);
|
||||
|
||||
if (this.performedDrag) {
|
||||
this.map.setCenter(this.map.center);
|
||||
}
|
||||
}
|
||||
document.onselectstart = null;
|
||||
this.mouseDragStart = null;
|
||||
@@ -258,6 +259,12 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
&& OpenLayers.Util.mouseLeft(evt, this.map.div)) {
|
||||
this.defaultMouseUp(evt);
|
||||
}
|
||||
},
|
||||
defaultClick: function (evt) {
|
||||
if (this.performedDrag) {
|
||||
this.performedDrag = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
// @require: OpenLayers/Control.js
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* default zoom/pan controls
|
||||
* @requires OpenLayers/Control.js
|
||||
*/
|
||||
OpenLayers.Control.PanZoom = Class.create();
|
||||
OpenLayers.Control.PanZoom.X = 4;
|
||||
@@ -77,7 +76,6 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
*/
|
||||
_addButton:function(id, img, xy, sz) {
|
||||
var imgLocation = OpenLayers.Util.getImagesLocation() + img;
|
||||
// var btn = new ol.AlphaImage("_"+id, imgLocation, xy, sz);
|
||||
var btn = OpenLayers.Util.createAlphaImageDiv(
|
||||
"OpenLayers_Control_PanZoom_" + id,
|
||||
xy, sz, imgLocation, "absolute");
|
||||
@@ -98,7 +96,7 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {event} evt
|
||||
* @param {Event} evt
|
||||
*
|
||||
* @type Boolean
|
||||
*/
|
||||
@@ -108,27 +106,23 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {event} evt
|
||||
* @param {Event} evt
|
||||
*/
|
||||
buttonDown: function (evt) {
|
||||
|
||||
var slide = this.map.getResolution() * this.slideFactor;
|
||||
var center = this.map.getCenter();
|
||||
|
||||
var newCenter = center.copyOf();
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
|
||||
switch (this.action) {
|
||||
case "panup":
|
||||
newCenter = newCenter.add( 0, slide);
|
||||
this.map.pan(0, -50);
|
||||
break;
|
||||
case "pandown":
|
||||
newCenter = newCenter.add( 0, -slide);
|
||||
this.map.pan(0, 50);
|
||||
break;
|
||||
case "panleft":
|
||||
newCenter = newCenter.add( -slide, 0);
|
||||
this.map.pan(-50, 0);
|
||||
break;
|
||||
case "panright":
|
||||
newCenter = newCenter.add( slide, 0);
|
||||
this.map.pan(50, 0);
|
||||
break;
|
||||
case "zoomin":
|
||||
this.map.zoomIn();
|
||||
@@ -137,14 +131,10 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
this.map.zoomOut();
|
||||
break;
|
||||
case "zoomworld":
|
||||
this.map.zoomToFullExtent();
|
||||
this.map.zoomToMaxExtent();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!newCenter.equals(center)) {
|
||||
this.map.setCenter(newCenter);
|
||||
}
|
||||
|
||||
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
// @require: OpenLayers/Control/PanZoom.js
|
||||
|
||||
//
|
||||
// default zoom/pan controls
|
||||
//
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Control/PanZoom.js
|
||||
*/
|
||||
OpenLayers.Control.PanZoomBar = Class.create();
|
||||
OpenLayers.Control.PanZoomBar.X = 4;
|
||||
OpenLayers.Control.PanZoomBar.Y = 4;
|
||||
OpenLayers.Control.PanZoomBar.prototype =
|
||||
Object.extend( new OpenLayers.Control.PanZoom(), {
|
||||
|
||||
/** @type Array(...) */
|
||||
buttons: null,
|
||||
|
||||
@@ -26,13 +28,31 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
OpenLayers.Control.PanZoomBar.Y);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Map} map
|
||||
*/
|
||||
setMap: function(map) {
|
||||
OpenLayers.Control.PanZoom.prototype.setMap.apply(this, arguments);
|
||||
this.map.events.register("changebaselayer", this, this.redraw);
|
||||
},
|
||||
|
||||
/** clear the div and start over.
|
||||
*
|
||||
*/
|
||||
redraw: function() {
|
||||
if (this.div != null) {
|
||||
this.div.innerHTML = "";
|
||||
}
|
||||
this.draw();
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*/
|
||||
draw: function(px) {
|
||||
// initialize our internal div
|
||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||
px = this.position;
|
||||
px = this.position.clone();
|
||||
|
||||
// place the controls
|
||||
this.buttons = new Array();
|
||||
@@ -58,9 +78,9 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
var imgLocation = OpenLayers.Util.getImagesLocation();
|
||||
|
||||
var id = "OpenLayers_Control_PanZoomBar_Slider" + this.map.id;
|
||||
var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
|
||||
var slider = OpenLayers.Util.createAlphaImageDiv(id,
|
||||
centered.add(-1,
|
||||
(this.map.getZoomLevels())*this.zoomStopHeight),
|
||||
centered.add(-1, zoomsToEnd * this.zoomStopHeight),
|
||||
new OpenLayers.Size(20,9),
|
||||
imgLocation+"slider.png",
|
||||
"absolute");
|
||||
@@ -74,7 +94,7 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
this.sliderEvents.register("click", this, this.doubleClick);
|
||||
|
||||
sz = new OpenLayers.Size();
|
||||
sz.h = this.zoomStopHeight*(this.map.getZoomLevels()+1);
|
||||
sz.h = this.zoomStopHeight * this.map.getNumZoomLevels();
|
||||
sz.w = this.zoomStopWidth;
|
||||
var div = null
|
||||
|
||||
@@ -110,7 +130,7 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
this.map.events.register("zoomend", this, this.moveZoomBar);
|
||||
|
||||
centered = centered.add(0,
|
||||
this.zoomStopHeight*(this.map.getZoomLevels()+1));
|
||||
this.zoomStopHeight * this.map.getNumZoomLevels());
|
||||
return centered;
|
||||
},
|
||||
/*
|
||||
@@ -127,10 +147,11 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
* and sets the zoom level appropriately.
|
||||
*/
|
||||
divClick: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
var y = evt.xy.y;
|
||||
var top = Position.page(evt.object)[1];
|
||||
var levels = Math.floor((y - top)/this.zoomStopHeight);
|
||||
this.map.zoomTo(this.map.getZoomLevels() - levels);
|
||||
this.map.zoomTo((this.map.getNumZoomLevels() -1) - levels);
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
@@ -139,10 +160,11 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
* event listener for clicks on the slider
|
||||
*/
|
||||
zoomBarDown:function(evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.map.events.register("mousemove", this, this.passEventToSlider);
|
||||
this.map.events.register("mouseup", this, this.passEventToSlider);
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.zoomStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
this.zoomStart = evt.xy.clone();
|
||||
this.div.style.cursor = "move";
|
||||
Event.stop(evt);
|
||||
},
|
||||
@@ -162,9 +184,9 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
var newTop = parseInt(this.slider.style.top) - deltaY;
|
||||
this.slider.style.top = newTop+"px";
|
||||
}
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
Event.stop(evt);
|
||||
}
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
/*
|
||||
@@ -173,10 +195,11 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
* and switch to it.
|
||||
*/
|
||||
zoomBarUp:function(evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
if (this.zoomStart) {
|
||||
this.div.style.cursor="default";
|
||||
this.map.events.remove("mousemove");
|
||||
this.map.events.remove("mouseup");
|
||||
this.map.events.unregister("mouseup", this, this.passEventToSlider);
|
||||
this.map.events.unregister("mousemove", this, this.passEventToSlider);
|
||||
var deltaY = this.zoomStart.y - evt.xy.y
|
||||
this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight));
|
||||
this.moveZoomBar();
|
||||
@@ -190,8 +213,8 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
*/
|
||||
moveZoomBar:function() {
|
||||
var newTop =
|
||||
(this.map.getZoomLevels() - this.map.getZoom()) * this.zoomStopHeight
|
||||
+ this.startTop + 1;
|
||||
((this.map.getNumZoomLevels()-1) - this.map.getZoom()) *
|
||||
this.zoomStopHeight + this.startTop + 1;
|
||||
this.slider.style.top = newTop + "px";
|
||||
},
|
||||
|
||||
|
||||
77
lib/OpenLayers/Control/Permalink.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Control.js
|
||||
*/
|
||||
OpenLayers.Control.Permalink = Class.create();
|
||||
OpenLayers.Control.Permalink.prototype =
|
||||
Object.extend( new OpenLayers.Control(), {
|
||||
|
||||
/** @type DOMElement */
|
||||
element: null,
|
||||
|
||||
/** @type String */
|
||||
base: '',
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {DOMElement} element
|
||||
* @param {String} base
|
||||
*/
|
||||
initialize: function(element, base) {
|
||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
||||
this.element = element;
|
||||
if (base) this.base = base;
|
||||
},
|
||||
|
||||
/**
|
||||
* @type DOMElement
|
||||
*/
|
||||
draw: function() {
|
||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||
var args = OpenLayers.Util.getArgs();
|
||||
if (args.lat && args.lon) {
|
||||
this.map.setCenter(
|
||||
new OpenLayers.LonLat(parseFloat(args.lon), parseFloat(args.lat))
|
||||
);
|
||||
}
|
||||
if (args.zoom) {
|
||||
this.map.zoomTo(parseInt(args.zoom));
|
||||
}
|
||||
if (!this.element) {
|
||||
this.element = document.createElement("a");
|
||||
this.div.style.right = "3px";
|
||||
this.div.style.bottom = "3px";
|
||||
this.div.style.left = "";
|
||||
this.div.style.top = "";
|
||||
this.div.style.display = "block";
|
||||
this.div.style.position = "absolute";
|
||||
this.element.style.fontSize="smaller";
|
||||
this.element.innerHTML = "Permalink";
|
||||
this.element.href="";
|
||||
this.div.appendChild(this.element);
|
||||
}
|
||||
this.map.events.register( 'moveend', this, this.updateLink);
|
||||
return this.div;
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
updateLink: function() {
|
||||
var center = this.map.getCenter();
|
||||
var zoom = this.map.getZoom();
|
||||
var lat = Math.round(center.lat*100000)/100000;
|
||||
var lon = Math.round(center.lon*100000)/100000;
|
||||
this.element.href = this.base+"?lat="+lat+"&lon="+lon+"&zoom="+zoom;
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Control.Permalink"
|
||||
});
|
||||
|
||||
68
lib/OpenLayers/Control/Scale.js
Normal file
@@ -0,0 +1,68 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Control.js
|
||||
*/
|
||||
OpenLayers.Control.Scale = Class.create();
|
||||
OpenLayers.Control.Scale.prototype =
|
||||
Object.extend( new OpenLayers.Control(), {
|
||||
/** @type DOMElement */
|
||||
element: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {DOMElement} element
|
||||
* @param {String} base
|
||||
*/
|
||||
initialize: function(element) {
|
||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
||||
this.element = element;
|
||||
},
|
||||
|
||||
/**
|
||||
* @type DOMElement
|
||||
*/
|
||||
draw: function() {
|
||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||
if (!this.element) {
|
||||
this.element = document.createElement("div");
|
||||
this.div.style.right = "3px";
|
||||
this.div.style.bottom = "2em";
|
||||
this.div.style.left = "";
|
||||
this.div.style.top = "";
|
||||
this.div.style.display = "block";
|
||||
this.div.style.position = "absolute";
|
||||
this.element.style.fontSize="smaller";
|
||||
this.div.appendChild(this.element);
|
||||
}
|
||||
this.map.events.register( 'moveend', this, this.updateScale);
|
||||
this.updateScale();
|
||||
return this.div;
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
updateScale: function() {
|
||||
var scale = this.map.getScale();
|
||||
if (!scale) return;
|
||||
|
||||
if (scale >= 9500 && scale <= 950000) {
|
||||
scale = Math.round(scale / 1000) + "K";
|
||||
} else if (scale >= 950000) {
|
||||
scale = Math.round(scale / 1000000) + "M";
|
||||
} else {
|
||||
scale = Math.round(scale / 100) * 100;
|
||||
}
|
||||
this.element.innerHTML = "Scale = 1 : " + scale;
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Control.Scale"
|
||||
});
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
OpenLayers.Events = Class.create();
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
OpenLayers.Events = Class.create();
|
||||
OpenLayers.Events.prototype = {
|
||||
// Array: supported events
|
||||
|
||||
/** @final @type Array: supported events */
|
||||
BROWSER_EVENTS: [
|
||||
"mouseover", "mouseout",
|
||||
"mousedown", "mouseup", "mousemove",
|
||||
@@ -12,113 +16,201 @@ OpenLayers.Events.prototype = {
|
||||
"resize", "focus", "blur"
|
||||
],
|
||||
|
||||
// hash of Array(Function): events listener functions
|
||||
/** Hashtable of Array(Function): events listener functions
|
||||
* @type Object */
|
||||
listeners: null,
|
||||
|
||||
// Object: the code object issuing application events
|
||||
/** @type Object: the code object issuing application events */
|
||||
object: null,
|
||||
|
||||
// DOMElement: the DOM element receiving browser events
|
||||
div: null,
|
||||
/** @type DOMElement: the DOM element receiving browser events */
|
||||
element: null,
|
||||
|
||||
// Array: list of support application events
|
||||
/** @type Array: list of support application events */
|
||||
eventTypes: null,
|
||||
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Map} map
|
||||
* @param {DOMElement} div
|
||||
*/
|
||||
initialize: function (object, div, eventTypes) {
|
||||
this.listeners = {};
|
||||
* @constructor
|
||||
*
|
||||
* @param {OpenLayers.Map} object The js object to which this Events object
|
||||
* is being added
|
||||
* @param {DOMElement} element A dom element to respond to browser events
|
||||
* @param {Array} eventTypes Array of custom application events
|
||||
*/
|
||||
initialize: function (object, element, eventTypes) {
|
||||
this.object = object;
|
||||
this.div = div;
|
||||
this.element = element;
|
||||
this.eventTypes = eventTypes;
|
||||
if (eventTypes) {
|
||||
for (var i = 0; i < this.eventTypes.length; i++) {
|
||||
// create a listener list for every custom application event
|
||||
this.listeners[ this.eventTypes[i] ] = [];
|
||||
}
|
||||
}
|
||||
this.listeners = new Object();
|
||||
|
||||
// if eventTypes is specified, create a listeners list for each
|
||||
// custom application event.
|
||||
if (this.eventTypes != null)
|
||||
for (var i = 0; i < this.eventTypes.length; i++)
|
||||
this.listeners[ this.eventTypes[i] ] = new Array();
|
||||
|
||||
// if a dom element is specified, add a listeners list
|
||||
// for browser events on the element and register them
|
||||
if (this.element != null)
|
||||
this.attachToElement(element);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {HTMLDOMElement} element a DOM element to attach browser events to
|
||||
*/
|
||||
attachToElement: function (element) {
|
||||
for (var i = 0; i < this.BROWSER_EVENTS.length; i++) {
|
||||
var eventType = this.BROWSER_EVENTS[i];
|
||||
|
||||
// every browser event has a corresponding application event
|
||||
// (whether it's listened for or not).
|
||||
this.listeners[ eventType ] = [];
|
||||
if (this.listeners[eventType] == null)
|
||||
this.listeners[eventType] = new Array();
|
||||
|
||||
Event.observe(div, eventType,
|
||||
// use Prototype to register the event cross-browser
|
||||
Event.observe(element, eventType,
|
||||
this.handleBrowserEvent.bindAsEventListener(this));
|
||||
}
|
||||
// disable dragstart in IE so that mousedown/move/up works normally
|
||||
Event.observe(div, "dragstart", Event.stop);
|
||||
Event.observe(element, "dragstart", Event.stop);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {str} type
|
||||
* @param {Object} obj
|
||||
* @param {Function} func
|
||||
*/
|
||||
* @param {String} type Name of the event to register
|
||||
* @param {Object} obj The object to bind the context to for the callback#.
|
||||
* If no object is specified, default is the Events's
|
||||
* 'object' property.
|
||||
* @param {Function} func The callback function. If no callback is
|
||||
* specified, this function does nothing.
|
||||
*
|
||||
* #When the event is triggered, the 'func' function will be called, in the
|
||||
* context of 'obj'. Imagine we were to register an event, specifying an
|
||||
* OpenLayers.Bounds Object as 'obj'. When the event is triggered, the
|
||||
* context in the callback function will be our Bounds object. This means
|
||||
* that within our callback function, we can access the properties and
|
||||
* methods of the Bounds object through the "this" variable. So our
|
||||
* callback could execute something like:
|
||||
*
|
||||
* leftStr = "Left: " + this.left;
|
||||
*
|
||||
* or
|
||||
*
|
||||
* centerStr = "Center: " + this.getCenterLonLat();
|
||||
*
|
||||
*/
|
||||
register: function (type, obj, func) {
|
||||
if (func == null) {
|
||||
obj = this.object;
|
||||
func = obj;
|
||||
|
||||
if (func != null) {
|
||||
if (obj == null) {
|
||||
obj = this.object;
|
||||
}
|
||||
var listeners = this.listeners[type];
|
||||
if (listeners != null) {
|
||||
listeners.push( {obj: obj, func: func} );
|
||||
}
|
||||
}
|
||||
var listeners = this.listeners[type];
|
||||
listeners.push( {obj: obj, func: func} );
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {String} type
|
||||
* @param {Object} obj If none specified, defaults to this.object
|
||||
* @param {Function} func
|
||||
*/
|
||||
unregister: function (type, obj, func) {
|
||||
if (obj == null) {
|
||||
obj = this.object;
|
||||
}
|
||||
var listeners = this.listeners[type];
|
||||
for (var i = 0; i < listeners.length; i++) {
|
||||
if (listeners[i].obj == obj && listeners[i].type == type) {
|
||||
listeners.splice(i, 1);
|
||||
break;
|
||||
if (listeners != null) {
|
||||
for (var i = 0; i < listeners.length; i++) {
|
||||
if (listeners[i].obj == obj && listeners[i].func == func) {
|
||||
listeners.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/** Remove all listeners for a given event type. If type is not registered,
|
||||
* does nothing.
|
||||
*
|
||||
* @param {String} type
|
||||
*/
|
||||
remove: function(type) {
|
||||
this.listeners[type].pop();
|
||||
if (this.listeners[type] != null) {
|
||||
this.listeners[type] = new Array();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {event} evt
|
||||
*/
|
||||
/** Trigger a specified registered event
|
||||
*
|
||||
* @param {String} type
|
||||
* @param {Event} evt
|
||||
*/
|
||||
triggerEvent: function (type, evt) {
|
||||
|
||||
// prep evt object with object & div references
|
||||
if (evt == null) {
|
||||
evt = new Object();
|
||||
}
|
||||
evt.object = this.object;
|
||||
evt.element = this.element;
|
||||
|
||||
// execute all callbacks registered for specified type
|
||||
var listeners = this.listeners[type];
|
||||
if ((listeners != null) && (listeners.length > 0)) {
|
||||
for (var i = 0; i < listeners.length; i++) {
|
||||
var callback = listeners[i];
|
||||
var continueChain;
|
||||
if (callback.obj != null) {
|
||||
// use the 'call' method to bind the context to callback.obj
|
||||
continueChain = callback.func.call(callback.obj, evt);
|
||||
} else {
|
||||
continueChain = callback.func(evt);
|
||||
}
|
||||
|
||||
if ((continueChain != null) && (continueChain == false)) {
|
||||
// if callback returns false, execute no more callbacks.
|
||||
break;
|
||||
}
|
||||
}
|
||||
// don't fall through to other DOM elements
|
||||
Event.stop(evt);
|
||||
}
|
||||
},
|
||||
|
||||
/** Basically just a wrapper to the triggerEvent() function, but takes
|
||||
* care to set a property 'xy' on the event with the current mouse
|
||||
* position.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {Event} evt
|
||||
*/
|
||||
handleBrowserEvent: function (evt) {
|
||||
evt.xy = this.getMousePosition(evt);
|
||||
this.triggerEvent(evt.type, evt)
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {event} evt
|
||||
*
|
||||
* @return {OpenLayers.Pixel}
|
||||
*/
|
||||
* @private
|
||||
*
|
||||
* @param {Event} evt
|
||||
*
|
||||
* @returns The current xy coordinate of the mouse, adjusted for offsets
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
getMousePosition: function (evt) {
|
||||
if (!this.div.offsets) {
|
||||
this.div.offsets = Position.page(this.div);
|
||||
if (!this.element.offsets) {
|
||||
this.element.offsets = Position.page(this.element);
|
||||
}
|
||||
return new OpenLayers.Pixel(
|
||||
evt.clientX - this.div.offsets[0],
|
||||
evt.clientY - this.div.offsets[1]);
|
||||
(evt.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)) - this.element.offsets[0],
|
||||
(evt.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) - this.element.offsets[1]
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {str} type
|
||||
* @param {event} evt
|
||||
*/
|
||||
triggerEvent: function (type, evt) {
|
||||
if (evt == null) {
|
||||
evt = {};
|
||||
}
|
||||
evt.object = this.object;
|
||||
evt.div = this.div;
|
||||
|
||||
var listeners = this.listeners[type];
|
||||
for (var i = 0; i < listeners.length; i++) {
|
||||
var callback = listeners[i];
|
||||
var continueChain = callback.func.call(callback.obj, evt);
|
||||
if (continueChain != null && !continueChain) break;
|
||||
}
|
||||
}
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Events"
|
||||
};
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Util.js
|
||||
*/
|
||||
OpenLayers.Feature = Class.create();
|
||||
OpenLayers.Feature.prototype= {
|
||||
@@ -32,15 +35,14 @@ OpenLayers.Feature.prototype= {
|
||||
* @constructor
|
||||
*
|
||||
* @param {OpenLayers.Layer} layer
|
||||
* @param {String} id
|
||||
* @param {OpenLayers.LonLat} lonlat
|
||||
* @param {Object} data
|
||||
*/
|
||||
initialize: function(layer, lonlat, data, id) {
|
||||
initialize: function(layer, lonlat, data) {
|
||||
this.layer = layer;
|
||||
this.lonlat = lonlat;
|
||||
this.data = (data != null) ? data : new Object();
|
||||
this.id = (id ? id : 'f' + Math.random());
|
||||
this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,57 +1,66 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
OpenLayers.Feature.WFS = Class.create();
|
||||
OpenLayers.Feature.WFS.prototype =
|
||||
Object.extend( new OpenLayers.Feature(), {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {OpenLayers.Layer} layer
|
||||
* @param {XMLNode} xmlNode
|
||||
*/
|
||||
initialize: function(layer, xmlNode) {
|
||||
var newArguments = arguments;
|
||||
if (arguments.length > 0) {
|
||||
var data = this.processXMLNode(xmlNode);
|
||||
newArguments = new Array(layer, data.lonlat, data, data.id)
|
||||
}
|
||||
OpenLayers.Feature.prototype.initialize.apply(this, newArguments);
|
||||
|
||||
if (arguments.length > 0) {
|
||||
this.createMarker();
|
||||
this.layer.addMarker(this.marker);
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
if (this.marker != null) {
|
||||
this.layer.removeMarker(this.marker);
|
||||
}
|
||||
OpenLayers.Feature.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {XMLNode} xmlNode
|
||||
*
|
||||
* @returns Data Object with 'id', 'lonlat', and private properties set
|
||||
* @type Object
|
||||
*/
|
||||
processXMLNode: function(xmlNode) {
|
||||
//this should be overridden by subclasses
|
||||
|
||||
// must return an Object with 'id' and 'lonlat' values set
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Feature.WFS"
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Feature.js
|
||||
*/
|
||||
OpenLayers.Feature.WFS = Class.create();
|
||||
OpenLayers.Feature.WFS.prototype =
|
||||
Object.extend( new OpenLayers.Feature(), {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {OpenLayers.Layer} layer
|
||||
* @param {XMLNode} xmlNode
|
||||
*/
|
||||
initialize: function(layer, xmlNode) {
|
||||
var newArguments = arguments;
|
||||
if (arguments.length > 0) {
|
||||
var data = this.processXMLNode(xmlNode);
|
||||
newArguments = new Array(layer, data.lonlat, data)
|
||||
}
|
||||
OpenLayers.Feature.prototype.initialize.apply(this, newArguments);
|
||||
|
||||
if (arguments.length > 0) {
|
||||
this.createMarker();
|
||||
this.layer.addMarker(this.marker);
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
if (this.marker != null) {
|
||||
this.layer.removeMarker(this.marker);
|
||||
}
|
||||
OpenLayers.Feature.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {XMLNode} xmlNode
|
||||
*
|
||||
* @returns Data Object with 'id', 'lonlat', and private properties set
|
||||
* @type Object
|
||||
*/
|
||||
processXMLNode: function(xmlNode) {
|
||||
//this should be overridden by subclasses
|
||||
// must return an Object with 'id' and 'lonlat' values set
|
||||
var point = xmlNode.getElementsByTagName("Point");
|
||||
var text = OpenLayers.Util.getXmlNodeValue(point[0].getElementsByTagName("coordinates")[0]);
|
||||
var floats = text.split(",");
|
||||
return {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]),
|
||||
parseFloat(floats[1])),
|
||||
id: null};
|
||||
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Feature.WFS"
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
* @class
|
||||
*/
|
||||
OpenLayers.Icon = Class.create();
|
||||
OpenLayers.Icon.prototype = {
|
||||
|
||||
@@ -53,7 +54,10 @@ OpenLayers.Icon.prototype = {
|
||||
* @type OpenLayers.Icon
|
||||
*/
|
||||
clone: function() {
|
||||
return new OpenLayers.Icon(this.size, this.url, this.offset);
|
||||
return new OpenLayers.Icon(this.url,
|
||||
this.size,
|
||||
this.offset,
|
||||
this.calculateOffset);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -92,15 +96,28 @@ OpenLayers.Icon.prototype = {
|
||||
this.px = px;
|
||||
}
|
||||
|
||||
if ((this.px != null) && (this.imageDiv != null)) {
|
||||
if (this.calculateOffset) {
|
||||
this.offset = this.calculateOffset(this.size);
|
||||
if (this.imageDiv != null) {
|
||||
if (this.px == null) {
|
||||
this.display(false);
|
||||
} else {
|
||||
if (this.calculateOffset) {
|
||||
this.offset = this.calculateOffset(this.size);
|
||||
}
|
||||
var offsetPx = this.px.offset(this.offset);
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, offsetPx);
|
||||
this.display(true);
|
||||
}
|
||||
var offsetPx = this.px.offset(this.offset);
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, offsetPx);
|
||||
}
|
||||
},
|
||||
|
||||
/** Hide or show the icon
|
||||
*
|
||||
* @param {Boolean} display
|
||||
*/
|
||||
display: function(display) {
|
||||
this.imageDiv.style.display = (display) ? "" : "none";
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Icon"
|
||||
};
|
||||
@@ -1,34 +1,104 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
OpenLayers.Layer = Class.create();
|
||||
OpenLayers.Layer.prototype = {
|
||||
|
||||
/** @type String */
|
||||
id: null,
|
||||
|
||||
/** @type String */
|
||||
name: null,
|
||||
|
||||
/** @type DOMElement */
|
||||
div: null,
|
||||
|
||||
/** This variable is set in map.addLayer, not within the layer itself
|
||||
* @type OpenLayers.Map */
|
||||
/** This variable is set when the layer is added to the map, via the
|
||||
* accessor function setMap()
|
||||
*
|
||||
* @type OpenLayers.Map */
|
||||
map: null,
|
||||
|
||||
/** Whether or not the layer is a base layer. This should be set
|
||||
* individually by all subclasses.
|
||||
* Default is false
|
||||
*
|
||||
* @type Boolean
|
||||
*/
|
||||
isBaseLayer: false,
|
||||
|
||||
/** asserts whether or not the layer's images have an alpha channel
|
||||
*
|
||||
* @type boolean */
|
||||
alpha: false,
|
||||
|
||||
// OPTIONS
|
||||
|
||||
/** @type Array */
|
||||
options: null,
|
||||
|
||||
/** @type String */
|
||||
projection: null,
|
||||
|
||||
/** @type String */
|
||||
units: null,
|
||||
|
||||
/** @type Array */
|
||||
scales: null,
|
||||
|
||||
/** @type Array */
|
||||
resolutions: null,
|
||||
|
||||
/** @type OpenLayers.Bounds */
|
||||
maxExtent: null,
|
||||
|
||||
/** @type OpenLayers.Bounds */
|
||||
minExtent: null,
|
||||
|
||||
/** @type float */
|
||||
maxResolution: null,
|
||||
|
||||
/** @type float */
|
||||
minResolution: null,
|
||||
|
||||
/** @type int */
|
||||
numZoomLevels: null,
|
||||
|
||||
/** @type float */
|
||||
minScale: null,
|
||||
|
||||
/** @type float */
|
||||
maxScale: null,
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {String} name
|
||||
* @param {Object} options Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize: function(name) {
|
||||
initialize: function(name, options) {
|
||||
if (arguments.length > 0) {
|
||||
|
||||
//store a copy of the custom options for later cloning
|
||||
this.options = Object.extend(new Object(), options);
|
||||
|
||||
//add options to layer
|
||||
Object.extend(this, this.options);
|
||||
|
||||
this.name = name;
|
||||
|
||||
this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
|
||||
|
||||
if (this.div == null) {
|
||||
this.div = OpenLayers.Util.createDiv();
|
||||
this.div.style.width = "100%";
|
||||
this.div.style.height = "100%";
|
||||
this.div.id = this.id;
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -42,33 +112,102 @@ OpenLayers.Layer.prototype = {
|
||||
this.map.removeLayer(this);
|
||||
}
|
||||
this.map = null;
|
||||
this.name = null;
|
||||
this.div = null;
|
||||
this.options = null;
|
||||
},
|
||||
|
||||
/**
|
||||
* @params {OpenLayers.Bounds} bound
|
||||
* @params {Boolean} zoomChanged tells when zoom has changed, as layers have to do some init work in that case.
|
||||
|
||||
/**
|
||||
* @returns An exact clone of this OpenLayers.Layer
|
||||
* @type OpenLayers.Layer
|
||||
*/
|
||||
moveTo: function (bound, zoomChanged) {
|
||||
// not implemented here
|
||||
return;
|
||||
clone: function (obj) {
|
||||
|
||||
if (obj == null) {
|
||||
obj = new OpenLayers.Layer(this.name, this.options);
|
||||
}
|
||||
|
||||
// catch any randomly tagged-on properties
|
||||
OpenLayers.Util.applyDefaults(obj, this);
|
||||
|
||||
// a cloned layer should never have its map property set
|
||||
// because it has not been added to a map yet.
|
||||
obj.map = null;
|
||||
|
||||
return obj;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {String} newName
|
||||
*/
|
||||
setName: function(newName) {
|
||||
this.name = newName;
|
||||
if (this.map != null)
|
||||
this.map.events.triggerEvent("changelayer");
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Object} newOptions
|
||||
*/
|
||||
addOptions: function (newOptions) {
|
||||
|
||||
// update our copy for clone
|
||||
Object.extend(this.options, newOptions);
|
||||
|
||||
// add new options to this
|
||||
Object.extend(this, this.options);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
onMapResize: function() {
|
||||
//this function can be implemented by subclasses
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Bounds} bound
|
||||
* @param {Boolean} zoomChanged tells when zoom has changed, as layers
|
||||
* have to do some init work in that case.
|
||||
* @param {Boolean} minor
|
||||
*/
|
||||
moveTo:function(bounds, zoomChanged, minor) {
|
||||
//this function can be implemented by subclasses.
|
||||
},
|
||||
|
||||
/** Set the map property for the layer. This is done through an accessor
|
||||
* so that subclasses can override this and take special action once
|
||||
* they have their map variable set.
|
||||
*
|
||||
* Here we take care to bring over any of the necessary default properties
|
||||
* from the map.
|
||||
*
|
||||
* @param {OpenLayers.Map} map
|
||||
*/
|
||||
setMap: function(map) {
|
||||
this.map = map;
|
||||
|
||||
var properties = new Array(
|
||||
'projection', 'units',
|
||||
'scales', 'resolutions',
|
||||
'maxScale', 'minScale',
|
||||
'maxResolution', 'minResolution',
|
||||
'minExtent', 'maxExtent',
|
||||
'numZoomLevels'
|
||||
);
|
||||
if (this.map.maxZoomLevel && !this.numZoomLevels) {
|
||||
this.numZoomLevels = this.map.maxZoomLevel + 1;
|
||||
}
|
||||
for(var i=0; i < properties.length; i++) {
|
||||
if (this[properties[i]] == null) {
|
||||
this[properties[i]] = this.map[properties[i]];
|
||||
}
|
||||
}
|
||||
if (this.isBaseLayer) {
|
||||
this.initResolutions();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns Whether or not the layer is a base layer. This should be
|
||||
* determined individually by all subclasses.
|
||||
* @type Boolean
|
||||
*/
|
||||
isBaseLayer: function() {
|
||||
//this function should be implemented by all subclasses.
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns Whether or not the layer is visible
|
||||
* @type Boolean
|
||||
@@ -78,15 +217,238 @@ OpenLayers.Layer.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {bool} visible
|
||||
*/
|
||||
setVisibility: function(visible) {
|
||||
this.div.style.display = (visible) ? "block" : "none";
|
||||
if ((visible) && (this.map != null)) {
|
||||
this.moveTo(this.map.getExtent());
|
||||
* @param {Boolean} visible
|
||||
* @param {Boolean} noEvent
|
||||
*/
|
||||
setVisibility: function(visible, noEvent) {
|
||||
if (visible != this.getVisibility()) {
|
||||
this.div.style.display = (visible) ? "block" : "none";
|
||||
if ((visible) && (this.map != null)) {
|
||||
var extent = this.map.getExtent();
|
||||
if (extent != null) {
|
||||
this.moveTo(this.map.getExtent(), true);
|
||||
}
|
||||
}
|
||||
if ((this.map != null) &&
|
||||
((noEvent == null) || (noEvent == false))) {
|
||||
this.map.events.triggerEvent("changelayer");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Boolean} isBaseLayer
|
||||
*/
|
||||
setIsBaseLayer: function(isBaseLayer) {
|
||||
this.isBaseLayer = isBaseLayer;
|
||||
if (this.map != null) {
|
||||
this.map.events.triggerEvent("changelayer");
|
||||
}
|
||||
},
|
||||
|
||||
/********************************************************/
|
||||
/* */
|
||||
/* Baselayer Functions */
|
||||
/* */
|
||||
/********************************************************/
|
||||
|
||||
/** This method's responsibility is to set up the 'resolutions' array
|
||||
* for the layer -- this array is what the layer will use to interface
|
||||
* between the zoom levels of the map and the resolution display of the
|
||||
* layer.
|
||||
*
|
||||
* The user has several options that determine how the array is set up.
|
||||
*
|
||||
* For a detailed explanation, see the following wiki from the
|
||||
* openlayers.org homepage:
|
||||
*
|
||||
* http://trac.openlayers.org/wiki/SettingZoomLevels
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
initResolutions: function() {
|
||||
|
||||
if ((this.scales != null) || (this.resolutions != null)) {
|
||||
//preset levels
|
||||
if (this.scales != null) {
|
||||
this.resolutions = new Array();
|
||||
for(var i = 0; i < this.scales.length; i++) {
|
||||
this.resolutions[i] =
|
||||
OpenLayers.Util.getResolutionFromScale(this.scales[i],
|
||||
this.units);
|
||||
}
|
||||
}
|
||||
this.numZoomLevels = this.resolutions.length;
|
||||
|
||||
} else {
|
||||
//maxResolution and numZoomLevels
|
||||
|
||||
this.resolutions = new Array();
|
||||
|
||||
// determine maxResolution
|
||||
if (this.minScale) {
|
||||
this.maxResolution =
|
||||
OpenLayers.Util.getResolutionFromScale(this.minScale,
|
||||
this.units);
|
||||
} else if (this.maxResolution == "auto") {
|
||||
var viewSize = this.map.getSize();
|
||||
var wRes = this.maxExtent.getWidth() / viewSize.w;
|
||||
var hRes = this.maxExtent.getHeight()/ viewSize.h;
|
||||
this.maxResolution = Math.max(wRes, hRes);
|
||||
}
|
||||
|
||||
// determine minResolution
|
||||
if (this.maxScale != null) {
|
||||
this.minResolution =
|
||||
OpenLayers.Util.getResolutionFromScale(this.maxScale);
|
||||
} else if ((this.minResolution == "auto") &&
|
||||
(this.minExtent != null)){
|
||||
var viewSize = this.map.getSize();
|
||||
var wRes = this.minExtent.getWidth() / viewSize.w;
|
||||
var hRes = this.minExtent.getHeight()/ viewSize.h;
|
||||
this.minResolution = Math.max(wRes, hRes);
|
||||
}
|
||||
|
||||
// determine numZoomLevels
|
||||
if (this.minResolution != null) {
|
||||
var ratio = this.maxResolution / this.minResolution;
|
||||
this.numZoomLevels =
|
||||
Math.floor(Math.log(ratio) / Math.log(2)) + 1;
|
||||
}
|
||||
|
||||
// now we have numZoomLevels and maxResolution,
|
||||
// we can populate the resolutions array
|
||||
for (var i=0; i < this.numZoomLevels; i++) {
|
||||
this.resolutions.push(this.maxResolution / Math.pow(2, i));
|
||||
}
|
||||
}
|
||||
this.resolutions = this.resolutions.sort().reverse();
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns The currently selected resolution of the map, taken from the
|
||||
* resolutions array, indexed by current zoom level.
|
||||
* @type float
|
||||
*/
|
||||
getResolution: function() {
|
||||
var zoom = this.map.getZoom();
|
||||
return this.resolutions[zoom];
|
||||
},
|
||||
|
||||
/** Calculates based on resolution, center, and mapsize
|
||||
*
|
||||
* @param {float} resolution Specific resolution to get an extent for.
|
||||
* If null, this.getResolution() is called
|
||||
* @returns A Bounds object which represents the lon/lat bounds of the
|
||||
* current viewPort.
|
||||
* @type OpenLayers.Bounds
|
||||
*/
|
||||
getExtent: function(resolution) {
|
||||
var extent = null;
|
||||
|
||||
var center = this.map.getCenter();
|
||||
if (center != null) {
|
||||
|
||||
if (resolution == null) {
|
||||
resolution = this.getResolution();
|
||||
}
|
||||
var size = this.map.getSize();
|
||||
var w_deg = size.w * resolution;
|
||||
var h_deg = size.h * resolution;
|
||||
|
||||
extent = new OpenLayers.Bounds(center.lon - w_deg / 2,
|
||||
center.lat - h_deg / 2,
|
||||
center.lon + w_deg / 2,
|
||||
center.lat + h_deg / 2);
|
||||
|
||||
}
|
||||
|
||||
return extent;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Bounds} bounds
|
||||
*
|
||||
* @returns The index of the zoomLevel (entry in the resolutions array)
|
||||
* that still contains the passed-in extent. We do this by
|
||||
* calculating the ideal resolution for the given exteng (based
|
||||
* on the map size) and then find the smallest resolution that
|
||||
* is greater than this ideal resolution.
|
||||
* @type int
|
||||
*/
|
||||
getZoomForExtent: function(extent) {
|
||||
var viewSize = this.map.getSize();
|
||||
var idealResolution = Math.max( extent.getWidth() / viewSize.w,
|
||||
extent.getHeight() / viewSize.h );
|
||||
|
||||
return this.getZoomForResolution(idealResolution);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {float} resolution
|
||||
*
|
||||
* @returns The index of the zoomLevel (entry in the resolutions array)
|
||||
* that is the smallest resolution that is greater than the
|
||||
* passed-in resolution.
|
||||
* @type int
|
||||
*/
|
||||
getZoomForResolution: function(resolution) {
|
||||
|
||||
for(var i=1; i <= this.resolutions.length; i++) {
|
||||
if ( this.resolutions[i] < resolution) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (i - 1);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} viewPortPx
|
||||
*
|
||||
* @returns An OpenLayers.LonLat which is the passed-in view port
|
||||
* OpenLayers.Pixel, translated into lon/lat by the layer
|
||||
* @type OpenLayers.LonLat
|
||||
*/
|
||||
getLonLatFromViewPortPx: function (viewPortPx) {
|
||||
var size = this.map.getSize();
|
||||
var center = this.map.getCenter();
|
||||
var res = this.map.getResolution();
|
||||
|
||||
var delta_x = viewPortPx.x - (size.w / 2);
|
||||
var delta_y = viewPortPx.y - (size.h / 2);
|
||||
|
||||
return new OpenLayers.LonLat(center.lon + delta_x * res ,
|
||||
center.lat - delta_y * res);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.LonLat} lonlat
|
||||
*
|
||||
* @returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat,
|
||||
* translated into view port pixels
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
getViewPortPxFromLonLat: function (lonlat) {
|
||||
var resolution = this.map.getResolution();
|
||||
var extent = this.map.getExtent();
|
||||
return new OpenLayers.Pixel(
|
||||
Math.round(1/resolution * (lonlat.lon - extent.left)),
|
||||
Math.round(1/resolution * (extent.top - lonlat.lat))
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the opacity for the entire layer (all images)
|
||||
* @param {Float} opacity
|
||||
*/
|
||||
setOpacity: function(opacity) {
|
||||
this.opacity = opacity;
|
||||
for(var i=0; i<this.div.childNodes.length; ++i) {
|
||||
var element = this.div.childNodes[i];
|
||||
OpenLayers.Util.setOpacity(element, opacity);
|
||||
}
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Layer"
|
||||
};
|
||||
|
||||
47
lib/OpenLayers/Layer/Boxes.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Layer.js
|
||||
* @requires OpenLayers/Layer/Markers.js
|
||||
*/
|
||||
OpenLayers.Layer.Boxes = Class.create();
|
||||
OpenLayers.Layer.Boxes.prototype =
|
||||
Object.extend( new OpenLayers.Layer.Markers(), {
|
||||
|
||||
initialize: function () {
|
||||
OpenLayers.Layer.Markers.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
/** Calculate the pixel location for the marker, create it, and
|
||||
* add it to the layer's div
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {OpenLayers.Marker.Box} marker
|
||||
*/
|
||||
drawMarker: function(marker) {
|
||||
var bounds = marker.bounds;
|
||||
var topleft = this.map.getLayerPxFromLonLat(
|
||||
new OpenLayers.LonLat(bounds.left, bounds.top));
|
||||
var botright = this.map.getLayerPxFromLonLat(
|
||||
new OpenLayers.LonLat(bounds.right, bounds.bottom));
|
||||
if (botright == null || topleft == null) {
|
||||
marker.display(false);
|
||||
} else {
|
||||
var sz = new OpenLayers.Size(
|
||||
botright.x - topleft.x, botright.y - topleft.y);
|
||||
var markerDiv = marker.draw(topleft, sz);
|
||||
if (!marker.drawn) {
|
||||
this.div.appendChild(markerDiv);
|
||||
marker.drawn = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Layer.Boxes"
|
||||
});
|
||||