Fix all cases where we have Windows line endings, and set eol-style="native"

on all files. Hopefully, this makes it easier for people to write patches
and do other neat things. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1424 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-09-09 15:46:17 +00:00
parent 8305808bee
commit 28bff61128
13 changed files with 1006 additions and 1006 deletions
+36 -36
View File
@@ -1,36 +1,36 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> <!-- 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" [ <!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_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/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_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg"> <!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> <!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;" <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" 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"> overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
<g i:extraneous="self"> <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="M27.875,1.375"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,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="#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,27.645"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/> <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"/> <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"/> <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="#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="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"/> <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"/> <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="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="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="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"/> <line fill="#FFBF00" stroke="#000000" x1="18.69" y1="7.869" x2="21.03" y2="10.852"/>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

+36 -36
View File
@@ -1,36 +1,36 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> <!-- 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" [ <!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_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/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_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg"> <!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> <!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;" <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" 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"> overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
<g i:extraneous="self"> <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="M27.875,1.375"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,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="#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,27.645"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/> <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"/> <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"/> <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="#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="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"/> <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"/> <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="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="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="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"/> <line fill="#FFBF00" stroke="#000000" x1="17.69" y1="8.869" x2="20.03" y2="11.852"/>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

+44 -44
View File
@@ -1,44 +1,44 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> <!-- 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" [ <!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_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/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_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg"> <!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> <!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;" <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" 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"> overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
<g i:extraneous="self"> <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="M27.875,1.375"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,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="#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,27.645"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/> <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"/> <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"/> <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="#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="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"/> <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 <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 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 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 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 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.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 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 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.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.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 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 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.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"/> 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> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

+44 -44
View File
@@ -1,44 +1,44 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> <!-- 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" [ <!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_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/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_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg"> <!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> <!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;" <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" 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"> overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
<g i:extraneous="self"> <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="M27.875,1.375"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,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="#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,27.645"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/> <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"/> <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"/> <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="#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="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"/> <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 <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 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 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 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 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.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 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 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.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.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 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 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.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"/> 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> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

+36 -36
View File
@@ -1,36 +1,36 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!--> <meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
<style type="text/css"> <style type="text/css">
#map { #map {
width: 800px; width: 800px;
height: 475px; height: 475px;
border: 1px solid black; border: 1px solid black;
} }
</style> </style>
<script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers.js"></script>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
var zoom = 5; var zoom = 5;
var map, layer; var map, layer;
function init(){ function init(){
map = new OpenLayers.Map( $('map') ); map = new OpenLayers.Map( $('map') );
layer = new OpenLayers.Layer.WMS( "OpenStreetMap WMS", layer = new OpenLayers.Layer.WMS( "OpenStreetMap WMS",
"http://tile.openstreetmap.org/ruby/wmsmod.rbx?" ); "http://tile.openstreetmap.org/ruby/wmsmod.rbx?" );
layer.setTileSize(new OpenLayers.Size(256,128)); layer.setTileSize(new OpenLayers.Size(256,128));
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(-0.02197265625,51.492919921875), 13); map.setCenter(new OpenLayers.LonLat(-0.02197265625,51.492919921875), 13);
map.addControl( new OpenLayers.Control.LayerSwitcher() ); map.addControl( new OpenLayers.Control.LayerSwitcher() );
} }
// --> // -->
</script> </script>
</head> </head>
<body onload="init()"> <body onload="init()">
<div id="map"></div> <div id="map"></div>
</body> </body>
</html> </html>
+35 -35
View File
@@ -1,35 +1,35 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!--> <meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
<style type="text/css"> <style type="text/css">
#map { #map {
width: 800px; width: 800px;
height: 475px; height: 475px;
border: 1px solid black; border: 1px solid black;
} }
</style> </style>
<script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers.js"></script>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
var lon = 5; var lon = 5;
var lat = 40; var lat = 40;
var zoom = 5; var zoom = 5;
var map, layer; var map, layer;
function init(){ function init(){
map = new OpenLayers.Map( $('map') ); map = new OpenLayers.Map( $('map') );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
map.addControl( new OpenLayers.Control.LayerSwitcher() ); map.addControl( new OpenLayers.Control.LayerSwitcher() );
} }
// --> // -->
</script> </script>
</head> </head>
<body onload="init()"> <body onload="init()">
<div id="map"></div> <div id="map"></div>
</body> </body>
</html> </html>
+39 -39
View File
@@ -1,39 +1,39 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!--> <meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
<style type="text/css"> <style type="text/css">
#map { #map {
width: 512px; width: 512px;
height: 512px; height: 512px;
border: 1px solid black; border: 1px solid black;
} }
</style> </style>
<script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script> <script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script>
<script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers.js"></script>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
var map, layer, velayer; var map, layer, velayer;
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
yahooLayer = new OpenLayers.Layer.Yahoo( "Yahoo"); yahooLayer = new OpenLayers.Layer.Yahoo( "Yahoo");
map.addLayer(yahooLayer); map.addLayer(yahooLayer);
map.setCenter(new OpenLayers.LonLat(-5, 40), 4); map.setCenter(new OpenLayers.LonLat(-5, 40), 4);
map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.LayerSwitcher());
} }
// --> // -->
</script> </script>
</head> </head>
<body onload="init()"> <body onload="init()">
<h1>OpenLayers Example</h1> <h1>OpenLayers Example</h1>
<div id="map"></div> <div id="map"></div>
</body> </body>
</html> </html>
+54 -54
View File
@@ -1,54 +1,54 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!--> <meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
<style type="text/css"> <style type="text/css">
#map { #map {
width: 800px; width: 800px;
height: 475px; height: 475px;
border: 1px solid black; border: 1px solid black;
} }
</style> </style>
<script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers.js"></script>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
var lon = 50; var lon = 50;
var lat = 0; var lat = 0;
var zoom = 0; var zoom = 0;
var map, layer; var map, layer;
function init(){ function init(){
var options = { 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], // 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], // scales: [50000000, 10000000],
// maxResolution: 0.17578125, // maxResolution: 0.17578125,
// minResolution: 0.0439453125, // minResolution: 0.0439453125,
// maxScale: 10000000, // maxScale: 10000000,
// minScale: 50000000, // minScale: 50000000,
minResolution: "auto", minResolution: "auto",
minExtent: new OpenLayers.Bounds(-1, -1, 1, 1), minExtent: new OpenLayers.Bounds(-1, -1, 1, 1),
maxResolution: "auto", maxResolution: "auto",
maxExtent: new OpenLayers.Bounds(-180, -90, 90, 180), maxExtent: new OpenLayers.Bounds(-180, -90, 90, 180),
// numZoomLevels: 5, // numZoomLevels: 5,
controls: [new OpenLayers.Control.MouseDefaults()] controls: [new OpenLayers.Control.MouseDefaults()]
}; };
map = new OpenLayers.Map( $('map') , options); map = new OpenLayers.Map( $('map') , options);
map.addControl(new OpenLayers.Control.PanZoomBar()); map.addControl(new OpenLayers.Control.PanZoomBar());
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'});
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
} }
// --> // -->
</script> </script>
</head> </head>
<body onload="init()"> <body onload="init()">
<div id="map"></div> <div id="map"></div>
</body> </body>
</html> </html>
+53 -53
View File
@@ -2,51 +2,51 @@
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
* text of the license. */ * text of the license. */
/** /**
* @class * @class
* *
* @requires OpenLayers/Feature.js * @requires OpenLayers/Feature.js
*/ */
OpenLayers.Feature.WFS = Class.create(); OpenLayers.Feature.WFS = Class.create();
OpenLayers.Feature.WFS.prototype = OpenLayers.Feature.WFS.prototype =
Object.extend( new OpenLayers.Feature(), { Object.extend( new OpenLayers.Feature(), {
/** /**
* @constructor * @constructor
* *
* @param {OpenLayers.Layer} layer * @param {OpenLayers.Layer} layer
* @param {XMLNode} xmlNode * @param {XMLNode} xmlNode
*/ */
initialize: function(layer, xmlNode) { initialize: function(layer, xmlNode) {
var newArguments = arguments; var newArguments = arguments;
if (arguments.length > 0) { if (arguments.length > 0) {
var data = this.processXMLNode(xmlNode); var data = this.processXMLNode(xmlNode);
newArguments = new Array(layer, data.lonlat, data) newArguments = new Array(layer, data.lonlat, data)
} }
OpenLayers.Feature.prototype.initialize.apply(this, newArguments); OpenLayers.Feature.prototype.initialize.apply(this, newArguments);
if (arguments.length > 0) { if (arguments.length > 0) {
this.createMarker(); this.createMarker();
this.layer.addMarker(this.marker); this.layer.addMarker(this.marker);
} }
}, },
destroy: function() { destroy: function() {
if (this.marker != null) { if (this.marker != null) {
this.layer.removeMarker(this.marker); this.layer.removeMarker(this.marker);
} }
OpenLayers.Feature.prototype.destroy.apply(this, arguments); OpenLayers.Feature.prototype.destroy.apply(this, arguments);
}, },
/** /**
* @param {XMLNode} xmlNode * @param {XMLNode} xmlNode
* *
* @returns Data Object with 'id', 'lonlat', and private properties set * @returns Data Object with 'id', 'lonlat', and private properties set
* @type Object * @type Object
*/ */
processXMLNode: function(xmlNode) { processXMLNode: function(xmlNode) {
//this should be overridden by subclasses //this should be overridden by subclasses
// must return an Object with 'id' and 'lonlat' values set // must return an Object with 'id' and 'lonlat' values set
var point = xmlNode.getElementsByTagName("Point"); var point = xmlNode.getElementsByTagName("Point");
var text = OpenLayers.Util.getXmlNodeValue(point[0].getElementsByTagName("coordinates")[0]); var text = OpenLayers.Util.getXmlNodeValue(point[0].getElementsByTagName("coordinates")[0]);
var floats = text.split(","); var floats = text.split(",");
@@ -54,13 +54,13 @@ OpenLayers.Feature.WFS.prototype =
parseFloat(floats[1])), parseFloat(floats[1])),
id: null}; id: null};
}, },
/** @final @type String */ /** @final @type String */
CLASS_NAME: "OpenLayers.Feature.WFS" CLASS_NAME: "OpenLayers.Feature.WFS"
}); });
+226 -226
View File
@@ -2,234 +2,234 @@
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
* text of the license. */ * text of the license. */
/** /**
* @class * @class
*/ */
OpenLayers.Popup = Class.create(); OpenLayers.Popup = Class.create();
OpenLayers.Popup.WIDTH = 200; OpenLayers.Popup.WIDTH = 200;
OpenLayers.Popup.HEIGHT = 200; OpenLayers.Popup.HEIGHT = 200;
OpenLayers.Popup.COLOR = "white"; OpenLayers.Popup.COLOR = "white";
OpenLayers.Popup.OPACITY = 1; OpenLayers.Popup.OPACITY = 1;
OpenLayers.Popup.BORDER = "0px"; OpenLayers.Popup.BORDER = "0px";
OpenLayers.Popup.prototype = { OpenLayers.Popup.prototype = {
/** @type OpenLayers.Events*/ /** @type OpenLayers.Events*/
events: null, events: null,
/** @type String */ /** @type String */
id: "", id: "",
/** @type OpenLayers.LonLat */ /** @type OpenLayers.LonLat */
lonlat: null, lonlat: null,
/** @type DOMElement */ /** @type DOMElement */
div: null, div: null,
/** @type OpenLayers.Size*/ /** @type OpenLayers.Size*/
size: null, size: null,
/** @type String */ /** @type String */
contentHTML: "", contentHTML: "",
/** @type String */ /** @type String */
backgroundColor: "", backgroundColor: "",
/** @type float */ /** @type float */
opacity: "", opacity: "",
/** @type String */ /** @type String */
border: "", border: "",
/** this gets set in Map.js when the popup is added to the map /** this gets set in Map.js when the popup is added to the map
* @type OpenLayers.Map */ * @type OpenLayers.Map */
map: null, map: null,
/** /**
* @constructor * @constructor
* *
* @param {String} id * @param {String} id
* @param {OpenLayers.LonLat} lonlat * @param {OpenLayers.LonLat} lonlat
* @param {OpenLayers.Size} size * @param {OpenLayers.Size} size
* @param {String} contentHTML * @param {String} contentHTML
*/ */
initialize:function(id, lonlat, size, contentHTML) { initialize:function(id, lonlat, size, contentHTML) {
if (id == null) { if (id == null) {
id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
} }
this.id = id; this.id = id;
this.lonlat = lonlat; this.lonlat = lonlat;
this.size = (size != null) ? size this.size = (size != null) ? size
: new OpenLayers.Size( : new OpenLayers.Size(
OpenLayers.Popup.WIDTH, OpenLayers.Popup.WIDTH,
OpenLayers.Popup.HEIGHT); OpenLayers.Popup.HEIGHT);
if (contentHTML != null) { if (contentHTML != null) {
this.contentHTML = contentHTML; this.contentHTML = contentHTML;
} }
this.backgroundColor = OpenLayers.Popup.COLOR; this.backgroundColor = OpenLayers.Popup.COLOR;
this.opacity = OpenLayers.Popup.OPACITY; this.opacity = OpenLayers.Popup.OPACITY;
this.border = OpenLayers.Popup.BORDER; this.border = OpenLayers.Popup.BORDER;
this.div = OpenLayers.Util.createDiv(this.id, null, null, this.div = OpenLayers.Util.createDiv(this.id, null, null,
null, null, null, "hidden"); null, null, null, "hidden");
this.events = new OpenLayers.Events(this, this.div, null); this.events = new OpenLayers.Events(this, this.div, null);
}, },
/** /**
*/ */
destroy: function() { destroy: function() {
if (this.map != null) { if (this.map != null) {
this.map.removePopup(this); this.map.removePopup(this);
} }
this.div = null; this.div = null;
this.map = null; this.map = null;
}, },
/** /**
* @param {OpenLayers.Pixel} px * @param {OpenLayers.Pixel} px
* *
* @returns Reference to a div that contains the drawn popup * @returns Reference to a div that contains the drawn popup
* @type DOMElement * @type DOMElement
*/ */
draw: function(px) { draw: function(px) {
if (px == null) { if (px == null) {
if ((this.lonlat != null) && (this.map != null)) { if ((this.lonlat != null) && (this.map != null)) {
px = this.map.getLayerPxFromLonLat(this.lonlat); px = this.map.getLayerPxFromLonLat(this.lonlat);
} }
} }
this.setSize(); this.setSize();
this.setBackgroundColor(); this.setBackgroundColor();
this.setOpacity(); this.setOpacity();
this.setBorder(); this.setBorder();
this.setContentHTML(); this.setContentHTML();
this.moveTo(px); this.moveTo(px);
return this.div; return this.div;
}, },
/** /**
* if the popup has a lonlat and its map members set, * if the popup has a lonlat and its map members set,
* then have it move itself to its proper position * then have it move itself to its proper position
*/ */
updatePosition: function() { updatePosition: function() {
if ((this.lonlat) && (this.map)) { if ((this.lonlat) && (this.map)) {
var px = this.map.getLayerPxFromLonLat(this.lonlat); var px = this.map.getLayerPxFromLonLat(this.lonlat);
this.moveTo(px); this.moveTo(px);
} }
}, },
/** /**
* @param {OpenLayers.Pixel} px * @param {OpenLayers.Pixel} px
*/ */
moveTo: function(px) { moveTo: function(px) {
if ((px != null) && (this.div != null)) { if ((px != null) && (this.div != null)) {
this.div.style.left = px.x + "px"; this.div.style.left = px.x + "px";
this.div.style.top = px.y + "px"; this.div.style.top = px.y + "px";
} }
}, },
/** /**
* @returns Boolean indicating whether or not the popup is visible * @returns Boolean indicating whether or not the popup is visible
* @type Boolean * @type Boolean
*/ */
visible: function() { visible: function() {
return Element.visible(this.div); return Element.visible(this.div);
}, },
/** /**
* *
*/ */
toggle: function() { toggle: function() {
Element.toggle(this.div); Element.toggle(this.div);
}, },
/** /**
* *
*/ */
show: function() { show: function() {
Element.show(this.div); Element.show(this.div);
}, },
/** /**
* *
*/ */
hide: function() { hide: function() {
Element.hide(this.div); Element.hide(this.div);
}, },
/** /**
* @param {OpenLayers.Size} size * @param {OpenLayers.Size} size
*/ */
setSize:function(size) { setSize:function(size) {
if (size != undefined) { if (size != undefined) {
this.size = size; this.size = size;
} }
if (this.div != null) { if (this.div != null) {
this.div.style.width = this.size.w + "px"; this.div.style.width = this.size.w + "px";
this.div.style.height = this.size.h + "px"; this.div.style.height = this.size.h + "px";
} }
}, },
/** /**
* @param {String} color * @param {String} color
*/ */
setBackgroundColor:function(color) { setBackgroundColor:function(color) {
if (color != undefined) { if (color != undefined) {
this.backgroundColor = color; this.backgroundColor = color;
} }
if (this.div != null) { if (this.div != null) {
this.div.style.backgroundColor = this.backgroundColor; this.div.style.backgroundColor = this.backgroundColor;
} }
}, },
/** /**
* @param {float} opacity * @param {float} opacity
*/ */
setOpacity:function(opacity) { setOpacity:function(opacity) {
if (opacity != undefined) { if (opacity != undefined) {
this.opacity = opacity; this.opacity = opacity;
} }
if (this.div != null) { if (this.div != null) {
// for Mozilla and Safari // for Mozilla and Safari
this.div.style.opacity = this.opacity; this.div.style.opacity = this.opacity;
// for IE // for IE
this.div.style.filter = 'alpha(opacity=' + this.opacity*100 + ')'; this.div.style.filter = 'alpha(opacity=' + this.opacity*100 + ')';
} }
}, },
/** /**
* @param {int} border * @param {int} border
*/ */
setBorder:function(border) { setBorder:function(border) {
if (border != undefined) { if (border != undefined) {
this.border = border; this.border = border;
} }
if (this.div != null) { if (this.div != null) {
this.div.style.border = this.border; this.div.style.border = this.border;
} }
}, },
/** /**
* @param {String} contentHTML * @param {String} contentHTML
*/ */
setContentHTML:function(contentHTML) { setContentHTML:function(contentHTML) {
if (contentHTML != null) { if (contentHTML != null) {
this.contentHTML = contentHTML; this.contentHTML = contentHTML;
} }
if (this.div != null) { if (this.div != null) {
this.div.innerHTML = this.contentHTML; this.div.innerHTML = this.contentHTML;
} }
}, },
CLASS_NAME: "OpenLayers.Popup" CLASS_NAME: "OpenLayers.Popup"
}; };
+120 -120
View File
@@ -1,126 +1,126 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
* text of the license. */ * text of the license. */
/** /**
* @class * @class
* *
* @requires OpenLayers/Popup.js * @requires OpenLayers/Popup.js
*/ */
OpenLayers.Popup.Anchored = Class.create(); OpenLayers.Popup.Anchored = Class.create();
OpenLayers.Popup.Anchored.prototype = OpenLayers.Popup.Anchored.prototype =
Object.extend( new OpenLayers.Popup(), { Object.extend( new OpenLayers.Popup(), {
/** "lr", "ll", "tr", "tl" - relative position of the popup. /** "lr", "ll", "tr", "tl" - relative position of the popup.
* @type String */ * @type String */
relativePosition: null, relativePosition: null,
/** Object which must have expose a 'size' (OpenLayers.Size) and /** Object which must have expose a 'size' (OpenLayers.Size) and
* 'offset' (OpenLayers.Pixel) * 'offset' (OpenLayers.Pixel)
* @type Object */ * @type Object */
anchor: null, anchor: null,
/** /**
* @constructor * @constructor
* *
* @param {String} id * @param {String} id
* @param {OpenLayers.LonLat} lonlat * @param {OpenLayers.LonLat} lonlat
* @param {OpenLayers.Size} size * @param {OpenLayers.Size} size
* @param {String} contentHTML * @param {String} contentHTML
* @param {Object} anchor Object which must expose a * @param {Object} anchor Object which must expose a
* - 'size' (OpenLayers.Size) and * - 'size' (OpenLayers.Size) and
* - 'offset' (OpenLayers.Pixel) * - 'offset' (OpenLayers.Pixel)
* (this is generally an OpenLayers.Icon) * (this is generally an OpenLayers.Icon)
*/ */
initialize:function(id, lonlat, size, contentHTML, anchor) { initialize:function(id, lonlat, size, contentHTML, anchor) {
var newArguments = new Array(id, lonlat, size, contentHTML); var newArguments = new Array(id, lonlat, size, contentHTML);
OpenLayers.Popup.prototype.initialize.apply(this, newArguments); OpenLayers.Popup.prototype.initialize.apply(this, newArguments);
this.anchor = (anchor != null) ? anchor this.anchor = (anchor != null) ? anchor
: { size: new OpenLayers.Size(0,0), : { size: new OpenLayers.Size(0,0),
offset: new OpenLayers.Pixel(0,0)}; offset: new OpenLayers.Pixel(0,0)};
}, },
/** /**
* @param {OpenLayers.Pixel} px * @param {OpenLayers.Pixel} px
* *
* @returns Reference to a div that contains the drawn popup * @returns Reference to a div that contains the drawn popup
* @type DOMElement * @type DOMElement
*/ */
draw: function(px) { draw: function(px) {
if (px == null) { if (px == null) {
if ((this.lonlat != null) && (this.map != null)) { if ((this.lonlat != null) && (this.map != null)) {
px = this.map.getLayerPxFromLonLat(this.lonlat); px = this.map.getLayerPxFromLonLat(this.lonlat);
} }
} }
//calculate relative position //calculate relative position
this.relativePosition = this.calculateRelativePosition(px); this.relativePosition = this.calculateRelativePosition(px);
return OpenLayers.Popup.prototype.draw.apply(this, arguments); return OpenLayers.Popup.prototype.draw.apply(this, arguments);
}, },
/** /**
* @private * @private
* *
* @param {OpenLayers.Pixel} px * @param {OpenLayers.Pixel} px
* *
* @returns The relative position ("br" "tr" "tl "bl") at which the popup * @returns The relative position ("br" "tr" "tl "bl") at which the popup
* should be placed * should be placed
* @type String * @type String
*/ */
calculateRelativePosition:function(px) { calculateRelativePosition:function(px) {
var lonlat = this.map.getLonLatFromLayerPx(px); var lonlat = this.map.getLonLatFromLayerPx(px);
var extent = this.map.getExtent(); var extent = this.map.getExtent();
var quadrant = extent.determineQuadrant(lonlat); var quadrant = extent.determineQuadrant(lonlat);
return OpenLayers.Bounds.oppositeQuadrant(quadrant); return OpenLayers.Bounds.oppositeQuadrant(quadrant);
}, },
/** /**
* @param {OpenLayers.Pixel} px * @param {OpenLayers.Pixel} px
*/ */
moveTo: function(px) { moveTo: function(px) {
var newPx = this.calculateNewPx(px); var newPx = this.calculateNewPx(px);
var newArguments = new Array(newPx); var newArguments = new Array(newPx);
OpenLayers.Popup.prototype.moveTo.apply(this, newArguments); OpenLayers.Popup.prototype.moveTo.apply(this, newArguments);
}, },
/** /**
* @param {OpenLayers.Size} size * @param {OpenLayers.Size} size
*/ */
setSize:function(size) { setSize:function(size) {
OpenLayers.Popup.prototype.setSize.apply(this, arguments); OpenLayers.Popup.prototype.setSize.apply(this, arguments);
if ((this.lonlat) && (this.map)) { if ((this.lonlat) && (this.map)) {
var px = this.map.getLayerPxFromLonLat(this.lonlat); var px = this.map.getLayerPxFromLonLat(this.lonlat);
this.moveTo(px); this.moveTo(px);
} }
}, },
/** /**
* @private * @private
* *
* @param {OpenLayers.Pixel} px * @param {OpenLayers.Pixel} px
* *
* @returns The the new px position of the popup on the screen * @returns The the new px position of the popup on the screen
* relative to the passed-in px * relative to the passed-in px
* @type OpenLayers.Pixel * @type OpenLayers.Pixel
*/ */
calculateNewPx:function(px) { calculateNewPx:function(px) {
var newPx = px.offset(this.anchor.offset); var newPx = px.offset(this.anchor.offset);
var top = (this.relativePosition.charAt(0) == 't'); var top = (this.relativePosition.charAt(0) == 't');
newPx.y += (top) ? -this.size.h : this.anchor.size.h; newPx.y += (top) ? -this.size.h : this.anchor.size.h;
var left = (this.relativePosition.charAt(1) == 'l'); var left = (this.relativePosition.charAt(1) == 'l');
newPx.x += (left) ? -this.size.w : this.anchor.size.w; newPx.x += (left) ? -this.size.w : this.anchor.size.w;
return newPx; return newPx;
}, },
CLASS_NAME: "OpenLayers.Popup.Anchored" CLASS_NAME: "OpenLayers.Popup.Anchored"
}); });
+178 -178
View File
@@ -1,184 +1,184 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
* text of the license. */ * text of the license. */
/** /**
* @class * @class
* *
* @requires OpenLayers/Popup/Anchored.js * @requires OpenLayers/Popup/Anchored.js
*/ */
OpenLayers.Popup.AnchoredBubble = Class.create(); OpenLayers.Popup.AnchoredBubble = Class.create();
//Border space for the rico corners //Border space for the rico corners
OpenLayers.Popup.AnchoredBubble.CORNER_SIZE = 5; OpenLayers.Popup.AnchoredBubble.CORNER_SIZE = 5;
OpenLayers.Popup.AnchoredBubble.prototype = OpenLayers.Popup.AnchoredBubble.prototype =
Object.extend( new OpenLayers.Popup.Anchored(), { Object.extend( new OpenLayers.Popup.Anchored(), {
/** @type DOMElement */ /** @type DOMElement */
contentDiv:null, contentDiv:null,
/** /**
* @constructor * @constructor
* *
* @param {String} id * @param {String} id
* @param {OpenLayers.LonLat} lonlat * @param {OpenLayers.LonLat} lonlat
* @param {OpenLayers.Size} size * @param {OpenLayers.Size} size
* @param {String} contentHTML * @param {String} contentHTML
* @param {Object} anchor Object which must expose a * @param {Object} anchor Object which must expose a
* - 'size' (OpenLayers.Size) and * - 'size' (OpenLayers.Size) and
* - 'offset' (OpenLayers.Pixel) * - 'offset' (OpenLayers.Pixel)
* (this is generally an OpenLayers.Icon) * (this is generally an OpenLayers.Icon)
*/ */
initialize:function(id, lonlat, size, contentHTML, anchor) { initialize:function(id, lonlat, size, contentHTML, anchor) {
OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments); OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments);
}, },
/** /**
* @param {OpenLayers.Pixel} px * @param {OpenLayers.Pixel} px
* *
* @returns Reference to a div that contains the drawn popup * @returns Reference to a div that contains the drawn popup
* @type DOMElement * @type DOMElement
*/ */
draw: function(px) { draw: function(px) {
OpenLayers.Popup.Anchored.prototype.draw.apply(this, arguments); OpenLayers.Popup.Anchored.prototype.draw.apply(this, arguments);
// make the content Div // make the content Div
var contentSize = this.size.clone(); var contentSize = this.size.clone();
contentSize.h -= (2 * OpenLayers.Popup.AnchoredBubble.CORNER_SIZE); contentSize.h -= (2 * OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);
var id = this.div.id + "_contentDiv"; var id = this.div.id + "_contentDiv";
this.contentDiv = OpenLayers.Util.createDiv(id, null, contentSize, this.contentDiv = OpenLayers.Util.createDiv(id, null, contentSize,
null, "relative", null, null, "relative", null,
"hidden"); "hidden");
this.div.appendChild(this.contentDiv); this.div.appendChild(this.contentDiv);
this.setContentHTML(); this.setContentHTML();
this.setRicoCorners(true); this.setRicoCorners(true);
//set the popup color and opacity //set the popup color and opacity
this.setBackgroundColor(); this.setBackgroundColor();
this.setOpacity(); this.setOpacity();
return this.div; return this.div;
}, },
/** /**
* @param {OpenLayers.Size} size * @param {OpenLayers.Size} size
*/ */
setSize:function(size) { setSize:function(size) {
OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments); OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments);
if (this.contentDiv != null) { if (this.contentDiv != null) {
var contentSize = this.size.clone(); var contentSize = this.size.clone();
contentSize.h -= (2 * OpenLayers.Popup.AnchoredBubble.CORNER_SIZE); contentSize.h -= (2 * OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);
this.contentDiv.style.height = contentSize.h + "px"; this.contentDiv.style.height = contentSize.h + "px";
//size has changed - must redo corners //size has changed - must redo corners
this.setRicoCorners(false); this.setRicoCorners(false);
} }
}, },
/** /**
* @param {String} color * @param {String} color
*/ */
setBackgroundColor:function(color) { setBackgroundColor:function(color) {
if (color != undefined) { if (color != undefined) {
this.backgroundColor = color; this.backgroundColor = color;
} }
if (this.div != null) { if (this.div != null) {
if (this.contentDiv != null) { if (this.contentDiv != null) {
this.div.style.background = "transparent"; this.div.style.background = "transparent";
Rico.Corner.changeColor(this.contentDiv, this.backgroundColor); Rico.Corner.changeColor(this.contentDiv, this.backgroundColor);
} }
} }
}, },
/** /**
* @param {float} opacity * @param {float} opacity
*/ */
setOpacity:function(opacity) { setOpacity:function(opacity) {
if (opacity != undefined) { if (opacity != undefined) {
this.opacity = opacity; this.opacity = opacity;
} }
if (this.div != null) { if (this.div != null) {
if (this.contentDiv != null) { if (this.contentDiv != null) {
Rico.Corner.changeOpacity(this.contentDiv, this.opacity); Rico.Corner.changeOpacity(this.contentDiv, this.opacity);
} }
} }
}, },
/** Bubble Popups can not have a border /** Bubble Popups can not have a border
* *
* @param {int} border * @param {int} border
*/ */
setBorder:function(border) { setBorder:function(border) {
this.border = 0; this.border = 0;
}, },
/** /**
* @param {String} contentHTML * @param {String} contentHTML
*/ */
setContentHTML:function(contentHTML) { setContentHTML:function(contentHTML) {
if (contentHTML != null) { if (contentHTML != null) {
this.contentHTML = contentHTML; this.contentHTML = contentHTML;
} }
if (this.contentDiv != null) { if (this.contentDiv != null) {
this.contentDiv.innerHTML = this.contentHTML; this.contentDiv.innerHTML = this.contentHTML;
} }
}, },
/** /**
* @private * @private
* *
* @param {Boolean} firstTime Is this the first time the corners are being * @param {Boolean} firstTime Is this the first time the corners are being
* rounded? * rounded?
* *
* update the rico corners according to the popup's * update the rico corners according to the popup's
* current relative postion * current relative postion
*/ */
setRicoCorners:function(firstTime) { setRicoCorners:function(firstTime) {
var corners = this.getCornersToRound(this.relativePosition); var corners = this.getCornersToRound(this.relativePosition);
var options = {corners: corners, var options = {corners: corners,
color: this.backgroundColor, color: this.backgroundColor,
bgColor: "transparent", bgColor: "transparent",
blend: false}; blend: false};
if (firstTime) { if (firstTime) {
Rico.Corner.round(this.div, options); Rico.Corner.round(this.div, options);
} else { } else {
Rico.Corner.reRound(this.contentDiv, options); Rico.Corner.reRound(this.contentDiv, options);
//set the popup color and opacity //set the popup color and opacity
this.setBackgroundColor(); this.setBackgroundColor();
this.setOpacity(); this.setOpacity();
} }
}, },
/** /**
* @private * @private
* *
* @returns The proper corners string ("tr tl bl br") for rico * @returns The proper corners string ("tr tl bl br") for rico
* to round * to round
* @type String * @type String
*/ */
getCornersToRound:function() { getCornersToRound:function() {
var corners = ['tl', 'tr', 'bl', 'br']; var corners = ['tl', 'tr', 'bl', 'br'];
//we want to round all the corners _except_ the opposite one. //we want to round all the corners _except_ the opposite one.
var corner = OpenLayers.Bounds.oppositeQuadrant(this.relativePosition); var corner = OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);
corners.remove(corner); corners.remove(corner);
return corners.join(" "); return corners.join(" ");
}, },
CLASS_NAME: "OpenLayers.Popup.AnchoredBubble" CLASS_NAME: "OpenLayers.Popup.AnchoredBubble"
}); });
+105 -105
View File
@@ -1,105 +1,105 @@
<html> <html>
<head> <head>
<script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers.js"></script>
<script type="text/javascript"><!-- <script type="text/javascript"><!--
var popup; var popup;
function test_01_Popup_default_constructor(t) { function test_01_Popup_default_constructor(t) {
t.plan( 8 ); t.plan( 8 );
var size = new OpenLayers.Size(OpenLayers.Popup.WIDTH, var size = new OpenLayers.Size(OpenLayers.Popup.WIDTH,
OpenLayers.Popup.HEIGHT); OpenLayers.Popup.HEIGHT);
popup = new OpenLayers.Popup(); popup = new OpenLayers.Popup();
t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" ); t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" );
t.ok(popup.id.startsWith("OpenLayers.Popup"), "valid default popupid"); t.ok(popup.id.startsWith("OpenLayers.Popup"), "valid default popupid");
var firstID = popup.id; var firstID = popup.id;
t.ok(popup.size.equals(size), "good default popup.size"); t.ok(popup.size.equals(size), "good default popup.size");
t.eq(popup.contentHTML, "", "good default popup.contentHTML"); t.eq(popup.contentHTML, "", "good default popup.contentHTML");
t.eq(popup.backgroundColor, OpenLayers.Popup.COLOR, "good default popup.backgroundColor"); t.eq(popup.backgroundColor, OpenLayers.Popup.COLOR, "good default popup.backgroundColor");
t.eq(popup.opacity, OpenLayers.Popup.OPACITY, "good default popup.opacity"); t.eq(popup.opacity, OpenLayers.Popup.OPACITY, "good default popup.opacity");
t.eq(popup.border, OpenLayers.Popup.BORDER, "good default popup.border"); t.eq(popup.border, OpenLayers.Popup.BORDER, "good default popup.border");
popup = new OpenLayers.Popup(); popup = new OpenLayers.Popup();
var newID = popup.id; var newID = popup.id;
t.ok(newID != firstID, "default id generator creating unique ids"); t.ok(newID != firstID, "default id generator creating unique ids");
} }
function test_02_Popup_constructor (t) { function test_02_Popup_constructor (t) {
t.plan( 5 ); t.plan( 5 );
var id = "chicken"; var id = "chicken";
var w = 500; var w = 500;
var h = 400; var h = 400;
var sz = new OpenLayers.Size(w,h); var sz = new OpenLayers.Size(w,h);
var lon = 5; var lon = 5;
var lat = 40; var lat = 40;
var ll = new OpenLayers.LonLat(lon, lat); var ll = new OpenLayers.LonLat(lon, lat);
var content = "foo"; var content = "foo";
popup = new OpenLayers.Popup(id, popup = new OpenLayers.Popup(id,
ll, ll,
sz, sz,
content); content);
t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" ); t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" );
t.eq(popup.id, id, "popup.id set correctly"); t.eq(popup.id, id, "popup.id set correctly");
t.ok(popup.lonlat.equals(ll), "popup.lonlat set correctly"); t.ok(popup.lonlat.equals(ll), "popup.lonlat set correctly");
t.ok(popup.size.equals(sz), "popup.size set correctly"); t.ok(popup.size.equals(sz), "popup.size set correctly");
t.eq(popup.contentHTML, content, "contentHTML porpoerty of set correctly"); t.eq(popup.contentHTML, content, "contentHTML porpoerty of set correctly");
} }
function test_03_Popup_draw(t) { function test_03_Popup_draw(t) {
t.plan( 11 ); t.plan( 11 );
var id = "chicken"; var id = "chicken";
var x = 50; var x = 50;
var y = 100; var y = 100;
var w = 500; var w = 500;
var h = 400; var h = 400;
var content = "charlie"; var content = "charlie";
var color = "red"; var color = "red";
var opacity = 0.5; var opacity = 0.5;
var border = "1px solid"; var border = "1px solid";
popup = new OpenLayers.Popup(id); popup = new OpenLayers.Popup(id);
popup.setSize(new OpenLayers.Size(w, h)); popup.setSize(new OpenLayers.Size(w, h));
popup.setContentHTML(content); popup.setContentHTML(content);
popup.setBackgroundColor(color); popup.setBackgroundColor(color);
popup.setOpacity(opacity); popup.setOpacity(opacity);
popup.setBorder(border); popup.setBorder(border);
popup.draw(new OpenLayers.Pixel(x, y)); popup.draw(new OpenLayers.Pixel(x, y));
t.eq(popup.div.id, id, "popup.div.id set correctly"); t.eq(popup.div.id, id, "popup.div.id set correctly");
t.eq(popup.div.style.left, x + "px", "left position of popup.div set correctly"); t.eq(popup.div.style.left, x + "px", "left position of popup.div set correctly");
t.eq(popup.div.style.top, y + "px", "top position of popup.div set correctly"); t.eq(popup.div.style.top, y + "px", "top position of popup.div set correctly");
t.eq(popup.div.style.width, w + "px", "width position of popup.div set correctly"); t.eq(popup.div.style.width, w + "px", "width position of popup.div set correctly");
t.eq(popup.div.style.height, h + "px", "heightposition of popup.div set correctly"); t.eq(popup.div.style.height, h + "px", "heightposition of popup.div set correctly");
t.eq(popup.div.innerHTML, content, "good default popup.contentHTML"); t.eq(popup.div.innerHTML, content, "good default popup.contentHTML");
t.eq(popup.div.style.backgroundColor, color, "good default popup.backgroundColor"); t.eq(popup.div.style.backgroundColor, color, "good default popup.backgroundColor");
if (navigator.appName.indexOf("Microsoft") == -1) { if (navigator.appName.indexOf("Microsoft") == -1) {
t.eq(parseFloat(popup.div.style.opacity), opacity, "good default popup.opacity"); t.eq(parseFloat(popup.div.style.opacity), opacity, "good default popup.opacity");
} else { } else {
t.eq(popup.div.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default popup.opacity"); t.eq(popup.div.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default popup.opacity");
} }
t.ok(popup.div.style.border.indexOf(border) != -1, "good default popup.border"); t.ok(popup.div.style.border.indexOf(border) != -1, "good default popup.border");
x += 50; x += 50;
popup.moveTo(new OpenLayers.Pixel(x, y)); popup.moveTo(new OpenLayers.Pixel(x, y));
t.eq(popup.div.style.left, x + "px", "moveTo updates left position of popup.div correctly"); t.eq(popup.div.style.left, x + "px", "moveTo updates left position of popup.div correctly");
t.eq(popup.div.style.top, y + "px", "moveTo updates top position of popup.div correctly"); t.eq(popup.div.style.top, y + "px", "moveTo updates top position of popup.div correctly");
} }
// --> // -->
</script> </script>
</head> </head>
<body> <body>
</body> </body>
</html> </html>