Offset 1, 2 lines modified | Offset 1, 2 lines modified | ||
1 | · | 1 | ·f3dc48632174b06cb5ba5666912fad85·720948·javascript·optional·libjs-openlayers_2.13.1+ds2-10_all.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2023-01-14·13:27:41.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2023-01-14·13:27:41.000000·debian-binary |
2 | -rw-r--r--···0········0········0·····368 | 2 | -rw-r--r--···0········0········0·····3684·2023-01-14·13:27:41.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0···71 | 3 | -rw-r--r--···0········0········0···717072·2023-01-14·13:27:41.000000·data.tar.xz |
Offset 5083, 323 lines modified | Offset 5083, 2109 lines modified | ||
5083 | ········return·this._hasString(this.options.corners,·"all",·"bottom",·"bl",·"br"); | 5083 | ········return·this._hasString(this.options.corners,·"all",·"bottom",·"bl",·"br"); |
5084 | ····}, | 5084 | ····}, |
5085 | ····_hasSingleTextChild:·function(el)·{ | 5085 | ····_hasSingleTextChild:·function(el)·{ |
5086 | ········return·el.childNodes.length·==·1·&&·el.childNodes[0].nodeType·==·3; | 5086 | ········return·el.childNodes.length·==·1·&&·el.childNodes[0].nodeType·==·3; |
5087 | ····} | 5087 | ····} |
5088 | }; | 5088 | }; |
5089 | /*·====================================================================== | 5089 | /*·====================================================================== |
5090 | ····OpenLayers/ | 5090 | ····OpenLayers/Tile.js |
5091 | ···======================================================================·*/ | 5091 | ···======================================================================·*/ |
5092 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for | 5092 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for |
5093 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. | 5093 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. |
5094 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the | 5094 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the |
5095 | ·*·full·text·of·the·license.·*/ | 5095 | ·*·full·text·of·the·license.·*/ |
5096 | /** | 5096 | /** |
5097 | ·*·@requires·OpenLayers/BaseTypes/Class.js | 5097 | ·*·@requires·OpenLayers/BaseTypes/Class.js |
5098 | ·*·@requires·OpenLayers/Util.js | ||
5098 | ·*/ | 5099 | ·*/ |
5099 | /** | 5100 | /** |
5100 | ·*·Class:·OpenLayers. | 5101 | ·*·Class:·OpenLayers.Tile· |
5101 | ·*· | 5102 | ·*·This·is·a·class·designed·to·designate·a·single·tile,·however |
5103 | ·*·····it·is·explicitly·designed·to·do·relatively·little.·Tiles·store· | ||
5104 | ·*·····information·about·themselves·--·such·as·the·URL·that·they·are·related | ||
5105 | ·*·····to,·and·their·size·-·but·do·not·add·themselves·to·the·layer·div· | ||
5106 | ·*·····automatically,·for·example.·Create·a·new·tile·with·the· | ||
5107 | ·*·····<OpenLayers.Tile>·constructor,·or·a·subclass.· | ||
5108 | ·*· | ||
5109 | ·*·TBD·3.0·-·remove·reference·to·url·in·above·paragraph | ||
5110 | ·*· | ||
5102 | ·*/ | 5111 | ·*/ |
5103 | OpenLayers. | 5112 | OpenLayers.Tile·=·OpenLayers.Class({ |
5113 | ····/** | ||
5114 | ·····*·APIProperty:·events | ||
5115 | ·····*·{<OpenLayers.Events>}·An·events·object·that·handles·all· | ||
5116 | ·····*·····events·on·the·tile. | ||
5117 | ·····* | ||
5118 | ·····*·Register·a·listener·for·a·particular·event·with·the·following·syntax: | ||
5119 | ·····*·(code) | ||
5120 | ·····*·tile.events.register(type,·obj,·listener); | ||
5121 | ·····*·(end) | ||
5122 | ·····* | ||
5123 | ·····*·Supported·event·types: | ||
5124 | ·····*·beforedraw·-·Triggered·before·the·tile·is·drawn.·Used·to·defer | ||
5125 | ·····*·····drawing·to·an·animation·queue.·To·defer·drawing,·listeners·need | ||
5126 | ·····*·····to·return·false,·which·will·abort·drawing.·The·queue·handler·needs | ||
5127 | ·····*·····to·call·<draw>(true)·to·actually·draw·the·tile. | ||
5128 | ·····*·loadstart·-·Triggered·when·tile·loading·starts. | ||
5129 | ·····*·loadend·-·Triggered·when·tile·loading·ends. | ||
5130 | ·····*·loaderror·-·Triggered·before·the·loadend·event·(i.e.·when·the·tile·is | ||
5131 | ·····*·····still·hidden)·if·the·tile·could·not·be·loaded. | ||
5132 | ·····*·reload·-·Triggered·when·an·already·loading·tile·is·reloaded. | ||
5133 | ·····*·unload·-·Triggered·before·a·tile·is·unloaded. | ||
5134 | ·····*/ | ||
5135 | ····events:·null, | ||
5104 | ····/** | 5136 | ····/** |
5105 | ·····*·APIProperty:·zIndex | ||
5106 | ·····*·{Number}·The·zIndex·determines·the·rendering·order·for·a·symbolizer. | ||
5107 | ·····*·····Symbolizers·with·larger·zIndex·values·are·rendered·over·symbolizers | ||
5108 | ·····*· | 5137 | ·····*·APIProperty:·eventListeners |
5138 | ·····*·{Object}·If·set·as·an·option·at·construction,·the·eventListeners | ||
5139 | ·····*·····object·will·be·registered·with·<OpenLayers.Events.on>.··Object | ||
5140 | ·····*·····structure·must·be·a·listeners·object·as·shown·in·the·example·for | ||
5141 | ·····*·····the·events.on·method. | ||
5142 | ·····* | ||
5143 | ·····*·This·options·can·be·set·in·the·``tileOptions``·option·from | ||
5144 | ·····*·<OpenLayers.Layer.Grid>.·For·example,·to·be·notified·of·the | ||
5145 | ·····*·``loadend``·event·of·each·tiles: | ||
5146 | ·····*·(code) | ||
5147 | ·····*·new·OpenLayers.Layer.OSM('osm',·'http://tile.openstreetmap.org/${z}/${x}/${y}.png',·{ | ||
5148 | ·····*·····tileOptions:·{ | ||
5149 | ·····*·········eventListeners:·{ | ||
5150 | ·····*·············'loadend':·function(evt)·{ | ||
5151 | ·····*·················//·do·something·on·loadend | ||
5152 | ·····*·············} | ||
5153 | ·····*·········} | ||
5154 | ·····*·····} | ||
5155 | ·····*·}); | ||
5156 | ·····*·(end) | ||
5109 | ·····*/ | 5157 | ·····*/ |
5110 | ···· | 5158 | ····eventListeners:·null, |
5111 | ····/** | 5159 | ····/** |
5112 | ·····*·Constructor:·OpenLayers.Symbolizer | ||
5113 | ·····*· | 5160 | ·····*·Property:·id· |
5161 | ·····*·{String}·null | ||
5162 | ·····*/ | ||
5163 | ····id:·null, | ||
5164 | ····/**· | ||
5165 | ·····*·Property:·layer· | ||
5166 | ·····*·{<OpenLayers.Layer>}·layer·the·tile·is·attached·to· | ||
5167 | ·····*/ | ||
5168 | ····layer:·null, | ||
5169 | ····/** | ||
5170 | ·····*·Property:·url | ||
5171 | ·····*·{String}·url·of·the·request. | ||
5114 | ·····* | 5172 | ·····* |
5173 | ·····*·TBD·3.0· | ||
5174 | ·····*·Deprecated.·The·base·tile·class·does·not·need·an·url.·This·should·be· | ||
5175 | ·····*·handled·in·subclasses.·Does·not·belong·here. | ||
5176 | ·····*/ | ||
5177 | ····url:·null, | ||
5178 | ····/**· | ||
5179 | ·····*·APIProperty:·bounds· | ||
5180 | ·····*·{<OpenLayers.Bounds>}·null | ||
5181 | ·····*/ | ||
5182 | ····bounds:·null, | ||
5183 | ····/**· | ||
5184 | ·····*·Property:·size· | ||
5185 | ·····*·{<OpenLayers.Size>}·null | ||
5186 | ·····*/ | ||
5187 | ····size:·null, | ||
5188 | ····/**· | ||
5189 | ·····*·Property:·position· | ||
5190 | ·····*·{<OpenLayers.Pixel>}·Top·Left·pixel·of·the·tile | ||
5191 | ·····*/ | ||
5192 | ····position:·null, | ||
Max diff block lines reached; 4195207/4200174 bytes (99.88%) of diff not shown. |
Offset 263, 449 lines modified | Offset 263, 14 lines modified | ||
263 | ············source.hasOwnProperty·&&·source.hasOwnProperty("toString"))·{ | 263 | ············source.hasOwnProperty·&&·source.hasOwnProperty("toString"))·{ |
264 | ············destination.toString·=·source.toString; | 264 | ············destination.toString·=·source.toString; |
265 | ········} | 265 | ········} |
266 | ····} | 266 | ····} |
267 | ····return·destination; | 267 | ····return·destination; |
268 | }; | 268 | }; |
269 | /*·====================================================================== | 269 | /*·====================================================================== |
270 | ····OpenLayers/Util/vendorPrefix.js | ||
271 | ···======================================================================·*/ | ||
272 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for | ||
273 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. | ||
274 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the | ||
275 | ·*·full·text·of·the·license.·*/ | ||
276 | /** | ||
277 | ·*·@requires·OpenLayers/SingleFile.js | ||
278 | ·*/ | ||
279 | OpenLayers.Util·=·OpenLayers.Util·||·{}; | ||
280 | /** | ||
281 | ·*·Namespace:·OpenLayers.Util.vendorPrefix | ||
282 | ·*·A·collection·of·utility·functions·to·detect·vendor·prefixed·features | ||
283 | ·*/ | ||
284 | OpenLayers.Util.vendorPrefix·=·(function()·{ | ||
285 | ····"use·strict"; | ||
286 | ····var·VENDOR_PREFIXES·=·["",·"O",·"ms",·"Moz",·"Webkit"], | ||
287 | ········divStyle·=·document.createElement("div").style, | ||
288 | ········cssCache·=·{}, | ||
289 | ········jsCache·=·{}; | ||
290 | ····/** | ||
291 | ·····*·Function:·domToCss | ||
292 | ·····*·Converts·a·upper·camel·case·DOM·style·property·name·to·a·CSS·property | ||
293 | ·····*······i.e.·transformOrigin·->·transform-origin | ||
294 | ·····*······or···WebkitTransformOrigin·->·-webkit-transform-origin | ||
295 | ·····* | ||
296 | ·····*·Parameters: | ||
297 | ·····*·prefixedDom·-·{String}·The·property·to·convert | ||
298 | ·····* | ||
299 | ·····*·Returns: | ||
300 | ·····*·{String}·The·CSS·property | ||
301 | ·····*/ | ||
302 | ····function·domToCss(prefixedDom)·{ | ||
303 | ········if·(!prefixedDom)·{ | ||
304 | ············return·null; | ||
305 | ········} | ||
306 | ········return·prefixedDom. | ||
307 | ········replace(/([A-Z])/g,·function(c)·{ | ||
308 | ············return·"-"·+·c.toLowerCase(); | ||
309 | ········}). | ||
310 | ········replace(/^ms-/,·"-ms-"); | ||
311 | ····} | ||
312 | ····/** | ||
313 | ·····*·APIMethod:·css | ||
314 | ·····*·Detect·which·property·is·used·for·a·CSS·property | ||
315 | ·····* | ||
316 | ·····*·Parameters: | ||
317 | ·····*·property·-·{String}·The·standard·(unprefixed)·CSS·property·name | ||
318 | ·····* | ||
319 | ·····*·Returns: | ||
320 | ·····*·{String}·The·standard·CSS·property,·prefixed·property·or·null·if·not | ||
321 | ·····*··········supported | ||
322 | ·····*/ | ||
323 | ····function·css(property)·{ | ||
324 | ········if·(cssCache[property]·===·undefined)·{ | ||
325 | ············var·domProperty·=·property. | ||
326 | ············replace(/(-[\s\S])/g,·function(c)·{ | ||
327 | ················return·c.charAt(1).toUpperCase(); | ||
328 | ············}); | ||
329 | ············var·prefixedDom·=·style(domProperty); | ||
330 | ············cssCache[property]·=·domToCss(prefixedDom); | ||
331 | ········} | ||
332 | ········return·cssCache[property]; | ||
333 | ····} | ||
334 | ····/** | ||
335 | ·····*·APIMethod:·js | ||
336 | ·····*·Detect·which·property·is·used·for·a·JS·property/method | ||
337 | ·····* | ||
338 | ·····*·Parameters: | ||
339 | ·····*·obj·-·{Object}·The·object·to·test·on | ||
340 | ·····*·property·-·{String}·The·standard·(unprefixed)·JS·property·name | ||
341 | ·····* | ||
342 | ·····*·Returns: | ||
343 | ·····*·{String}·The·standard·JS·property,·prefixed·property·or·null·if·not | ||
344 | ·····*··········supported | ||
345 | ·····*/ | ||
346 | ····function·js(obj,·property)·{ | ||
347 | ········if·(jsCache[property]·===·undefined)·{ | ||
348 | ············var·tmpProp, | ||
349 | ················i·=·0, | ||
350 | ················l·=·VENDOR_PREFIXES.length, | ||
351 | ················prefix, | ||
352 | ················isStyleObj·=·(typeof·obj.cssText·!==·"undefined"); | ||
353 | ············jsCache[property]·=·null; | ||
354 | ············for·(;·i·<·l;·i++)·{ | ||
355 | ················prefix·=·VENDOR_PREFIXES[i]; | ||
356 | ················if·(prefix)·{ | ||
357 | ····················if·(!isStyleObj)·{ | ||
358 | ························//·js·prefix·should·be·lower-case,·while·style | ||
359 | ························//·properties·have·upper·case·on·first·character | ||
360 | ························prefix·=·prefix.toLowerCase(); | ||
361 | ····················} | ||
362 | ····················tmpProp·=·prefix·+·property.charAt(0).toUpperCase()·+·property.slice(1); | ||
363 | ················}·else·{ | ||
364 | ····················tmpProp·=·property; | ||
365 | ················} | ||
366 | ················if·(obj[tmpProp]·!==·undefined)·{ | ||
367 | ····················jsCache[property]·=·tmpProp; | ||
368 | ····················break; | ||
369 | ················} | ||
370 | ············} | ||
371 | ········} | ||
372 | ········return·jsCache[property]; | ||
373 | ····} | ||
374 | ····/** | ||
375 | ·····*·APIMethod:·style | ||
376 | ·····*·Detect·which·property·is·used·for·a·DOM·style·property | ||
377 | ·····* | ||
378 | ·····*·Parameters: | ||
Max diff block lines reached; 1597036/1610472 bytes (99.17%) of diff not shown. |
Offset 62, 204 lines modified | Offset 62, 14 lines modified | ||
62 | ········var·sourceIsEvt·=·typeof·window.Event·==·"function"·&&·source·instanceof·window.Event; | 62 | ········var·sourceIsEvt·=·typeof·window.Event·==·"function"·&&·source·instanceof·window.Event; |
63 | ········if·(!sourceIsEvt·&&·source.hasOwnProperty·&&·source.hasOwnProperty("toString"))·{ | 63 | ········if·(!sourceIsEvt·&&·source.hasOwnProperty·&&·source.hasOwnProperty("toString"))·{ |
64 | ············destination.toString·=·source.toString | 64 | ············destination.toString·=·source.toString |
65 | ········} | 65 | ········} |
66 | ····} | 66 | ····} |
67 | ····return·destination | 67 | ····return·destination |
68 | }; | 68 | }; |
69 | OpenLayers.Util·=·OpenLayers.Util·||·{}; | ||
70 | OpenLayers.Util.vendorPrefix·=·function()·{ | ||
71 | ····"use·strict"; | ||
72 | ····var·VENDOR_PREFIXES·=·["",·"O",·"ms",·"Moz",·"Webkit"], | ||
73 | ········divStyle·=·document.createElement("div").style, | ||
74 | ········cssCache·=·{}, | ||
75 | ········jsCache·=·{}; | ||
76 | ····function·domToCss(prefixedDom)·{ | ||
77 | ········if·(!prefixedDom)·{ | ||
78 | ············return·null | ||
79 | ········} | ||
80 | ········return·prefixedDom.replace(/([A-Z])/g,·function(c)·{ | ||
81 | ············return·"-"·+·c.toLowerCase() | ||
82 | ········}).replace(/^ms-/,·"-ms-") | ||
83 | ····} | ||
84 | ····function·css(property)·{ | ||
85 | ········if·(cssCache[property]·===·undefined)·{ | ||
86 | ············var·domProperty·=·property.replace(/(-[\s\S])/g,·function(c)·{ | ||
87 | ················return·c.charAt(1).toUpperCase() | ||
88 | ············}); | ||
89 | ············var·prefixedDom·=·style(domProperty); | ||
90 | ············cssCache[property]·=·domToCss(prefixedDom) | ||
91 | ········} | ||
92 | ········return·cssCache[property] | ||
93 | ····} | ||
94 | ····function·js(obj,·property)·{ | ||
95 | ········if·(jsCache[property]·===·undefined)·{ | ||
96 | ············var·tmpProp,·i·=·0, | ||
97 | ················l·=·VENDOR_PREFIXES.length, | ||
98 | ················prefix,·isStyleObj·=·typeof·obj.cssText·!==·"undefined"; | ||
99 | ············jsCache[property]·=·null; | ||
100 | ············for·(;·i·<·l;·i++)·{ | ||
101 | ················prefix·=·VENDOR_PREFIXES[i]; | ||
102 | ················if·(prefix)·{ | ||
103 | ····················if·(!isStyleObj)·{ | ||
104 | ························prefix·=·prefix.toLowerCase() | ||
105 | ····················} | ||
106 | ····················tmpProp·=·prefix·+·property.charAt(0).toUpperCase()·+·property.slice(1) | ||
107 | ················}·else·{ | ||
108 | ····················tmpProp·=·property | ||
109 | ················} | ||
110 | ················if·(obj[tmpProp]·!==·undefined)·{ | ||
111 | ····················jsCache[property]·=·tmpProp; | ||
112 | ····················break | ||
113 | ················} | ||
114 | ············} | ||
115 | ········} | ||
116 | ········return·jsCache[property] | ||
117 | ····} | ||
118 | ····function·style(property)·{ | ||
119 | ········return·js(divStyle,·property) | ||
120 | ····} | ||
121 | ····return·{ | ||
122 | ········css:·css, | ||
123 | ········js:·js, | ||
124 | ········style:·style, | ||
125 | ········cssCache:·cssCache, | ||
126 | ········jsCache:·jsCache | ||
127 | ····} | ||
128 | }(); | ||
129 | OpenLayers.Animation·=·function(window)·{ | ||
130 | ····var·requestAnimationFrame·=·OpenLayers.Util.vendorPrefix.js(window,·"requestAnimationFrame"); | ||
131 | ····var·isNative·=·!!requestAnimationFrame; | ||
132 | ····var·requestFrame·=·function()·{ | ||
133 | ········var·request·=·window[requestAnimationFrame]·||·function(callback,·element)·{ | ||
134 | ············window.setTimeout(callback,·16) | ||
135 | ········}; | ||
136 | ········return·function(callback,·element)·{ | ||
137 | ············request.apply(window,·[callback,·element]) | ||
138 | ········} | ||
139 | ····}(); | ||
140 | ····var·counter·=·0; | ||
141 | ····var·loops·=·{}; | ||
142 | ····function·start(callback,·duration,·element)·{ | ||
143 | ········duration·=·duration·>·0·?·duration·:·Number.POSITIVE_INFINITY; | ||
144 | ········var·id·=·++counter; | ||
145 | ········var·start·=·+new·Date; | ||
146 | ········loops[id]·=·function()·{ | ||
147 | ············if·(loops[id]·&&·+new·Date·-·start·<=·duration)·{ | ||
148 | ················callback(); | ||
149 | ················if·(loops[id])·{ | ||
150 | ····················requestFrame(loops[id],·element) | ||
151 | ················} | ||
152 | ············}·else·{ | ||
153 | ················delete·loops[id] | ||
154 | ············} | ||
155 | ········}; | ||
156 | ········requestFrame(loops[id],·element); | ||
157 | ········return·id | ||
158 | ····} | ||
159 | ····function·stop(id)·{ | ||
160 | ········delete·loops[id] | ||
161 | ····} | ||
162 | ····return·{ | ||
163 | ········isNative:·isNative, | ||
164 | ········requestFrame:·requestFrame, | ||
165 | ········start:·start, | ||
166 | ········stop:·stop | ||
167 | ····} | ||
168 | }(window); | ||
169 | OpenLayers.Kinetic·=·OpenLayers.Class({ | ||
170 | ····threshold:·0, | ||
171 | ····deceleration:·.0035, | ||
172 | ····nbPoints:·100, | ||
173 | ····delay:·200, | ||
174 | ····points:·undefined, | ||
175 | ····timerId:·undefined, | ||
176 | ····initialize:·function(options)·{ | ||
177 | ········OpenLayers.Util.extend(this,·options) | ||
178 | ····}, | ||
179 | ····begin:·function()·{ | ||
180 | ········OpenLayers.Animation.stop(this.timerId); | ||
181 | ········this.timerId·=·undefined; | ||
182 | ········this.points·=·[] | ||
Max diff block lines reached; 571606/577918 bytes (98.91%) of diff not shown. |
Offset 2063, 79 lines modified | Offset 2063, 715 lines modified | ||
2063 | ····_isBottomRounded:·function()·{ | 2063 | ····_isBottomRounded:·function()·{ |
2064 | ········return·this._hasString(this.options.corners,·"all",·"bottom",·"bl",·"br") | 2064 | ········return·this._hasString(this.options.corners,·"all",·"bottom",·"bl",·"br") |
2065 | ····}, | 2065 | ····}, |
2066 | ····_hasSingleTextChild:·function(el)·{ | 2066 | ····_hasSingleTextChild:·function(el)·{ |
2067 | ········return·el.childNodes.length·==·1·&&·el.childNodes[0].nodeType·==·3 | 2067 | ········return·el.childNodes.length·==·1·&&·el.childNodes[0].nodeType·==·3 |
2068 | ····} | 2068 | ····} |
2069 | }; | 2069 | }; |
2070 | OpenLayers. | 2070 | OpenLayers.Tile·=·OpenLayers.Class({ |
2071 | ····zIndex:·0, | ||
2072 | ···· | 2071 | ····events:·null, |
2072 | ····eventListeners:·null, | ||
2073 | ····id:·null, | ||
2074 | ····layer:·null, | ||
2075 | ····url:·null, | ||
2076 | ····bounds:·null, | ||
2077 | ····size:·null, | ||
2078 | ····position:·null, | ||
2079 | ····isLoading:·false, | ||
2080 | ····initialize:·function(layer,·position,·bounds,·url,·size,·options)·{ | ||
2081 | ········this.layer·=·layer; | ||
2082 | ········this.position·=·position.clone(); | ||
2083 | ········this.setBounds(bounds); | ||
2084 | ········this.url·=·url; | ||
2085 | ········if·(size)·{ | ||
2086 | ············this.size·=·size.clone() | ||
2087 | ········} | ||
2088 | ········this.id·=·OpenLayers.Util.createUniqueID("Tile_"); | ||
2073 | ········OpenLayers.Util.extend(this,· | 2089 | ········OpenLayers.Util.extend(this,·options); |
2090 | ········this.events·=·new·OpenLayers.Events(this); | ||
2091 | ········if·(this.eventListeners·instanceof·Object)·{ | ||
2092 | ············this.events.on(this.eventListeners) | ||
2093 | ········} | ||
2074 | ····}, | 2094 | ····}, |
2075 | ···· | 2095 | ····unload:·function()·{ |
2076 | ········var·Type·=·eval(this.CLASS_NAME); | ||
2077 | ········ | 2096 | ········if·(this.isLoading)·{ |
2097 | ············this.isLoading·=·false; | ||
2098 | ············this.events.triggerEvent("unload") | ||
2099 | ········} | ||
2078 | ····}, | 2100 | ····}, |
2101 | ····destroy:·function()·{ | ||
2102 | ········this.layer·=·null; | ||
2103 | ········this.bounds·=·null; | ||
2104 | ········this.size·=·null; | ||
2105 | ········this.position·=·null; | ||
2106 | ········if·(this.eventListeners)·{ | ||
2107 | ············this.events.un(this.eventListeners) | ||
2108 | ········} | ||
2109 | ········this.events.destroy(); | ||
2110 | ········this.eventListeners·=·null; | ||
2111 | ········this.events·=·null | ||
2112 | ····}, | ||
2113 | ····draw:·function(force)·{ | ||
2114 | ········if·(!force)·{ | ||
2115 | ············this.clear() | ||
2116 | ········} | ||
2117 | ········var·draw·=·this.shouldDraw(); | ||
2118 | ········if·(draw·&&·!force·&&·this.events.triggerEvent("beforedraw")·===·false)·{ | ||
2119 | ············draw·=·null | ||
2120 | ········} | ||
2121 | ········return·draw | ||
2122 | ····}, | ||
2123 | ····shouldDraw:·function()·{ | ||
2124 | ········var·withinMaxExtent·=·false, | ||
2125 | ············maxExtent·=·this.layer.maxExtent; | ||
2126 | ········if·(maxExtent)·{ | ||
2127 | ············var·map·=·this.layer.map; | ||
2128 | ············var·worldBounds·=·map.baseLayer.wrapDateLine·&&·map.getMaxExtent(); | ||
2129 | ············if·(this.bounds.intersectsBounds(maxExtent,·{ | ||
2130 | ····················inclusive:·false, | ||
2131 | ····················worldBounds:·worldBounds | ||
2132 | ················}))·{ | ||
2133 | ················withinMaxExtent·=·true | ||
2134 | ············} | ||
2135 | ········} | ||
2136 | ········return·withinMaxExtent·||·this.layer.displayOutsideMaxExtent | ||
2137 | ····}, | ||
2138 | ····setBounds:·function(bounds)·{ | ||
2139 | ········bounds·=·bounds.clone(); | ||
2140 | ········if·(this.layer.map.baseLayer.wrapDateLine)·{ | ||
2141 | ············var·worldExtent·=·this.layer.map.getMaxExtent(), | ||
2142 | ················tolerance·=·this.layer.map.getResolution(); | ||
2143 | ············bounds·=·bounds.wrapDateLine(worldExtent,·{ | ||
2144 | ················leftTolerance:·tolerance, | ||
2145 | ················rightTolerance:·tolerance | ||
2146 | ············}) | ||
2147 | ········} | ||
2148 | ········this.bounds·=·bounds | ||
2149 | ····}, | ||
2150 | ····moveTo:·function(bounds,·position,·redraw)·{ | ||
2151 | ········if·(redraw·==·null)·{ | ||
2152 | ············redraw·=·true | ||
2153 | ········} | ||
2154 | ········this.setBounds(bounds); | ||
2155 | ········this.position·=·position.clone(); | ||
2156 | ········if·(redraw)·{ | ||
2157 | ············this.draw() | ||
2158 | ········} | ||
2159 | ····}, | ||
2160 | ····clear:·function(draw)·{}, | ||
2079 | ····CLASS_NAME:·"OpenLayers. | 2161 | ····CLASS_NAME:·"OpenLayers.Tile" |
2080 | }); | 2162 | }); |
2081 | OpenLayers. | 2163 | OpenLayers.Feature·=·OpenLayers.Class({ |
2082 | ····layer:·null, | 2164 | ····layer:·null, |
2165 | ····id:·null, | ||
2166 | ····lonlat:·null, | ||
2167 | ····data:·null, | ||
2168 | ····marker:·null, | ||
2169 | ····popupClass:·null, | ||
2170 | ····popup:·null, | ||
2171 | ····initialize:·function(layer,·lonlat,·data)·{ | ||
2172 | ········this.layer·=·layer; | ||
2173 | ········this.lonlat·=·lonlat; | ||
2174 | ········this.data·=·data·!=·null·?·data·:·{}; | ||
2175 | ········this.id·=·OpenLayers.Util.createUniqueID(this.CLASS_NAME·+·"_") | ||
2176 | ····}, | ||
2177 | ····destroy:·function()·{ | ||
2178 | ········if·(this.layer·!=·null·&&·this.layer.map·!=·null)·{ | ||
2179 | ············if·(this.popup·!=·null)·{ | ||
2180 | ················this.layer.map.removePopup(this.popup) | ||
2181 | ············} | ||
2182 | ········} | ||
2183 | ········if·(this.layer·!=·null·&&·this.marker·!=·null)·{ | ||
2184 | ············this.layer.removeMarker(this.marker) | ||
2185 | ········} | ||
2186 | ········this.layer·=·null; | ||
2187 | ········this.id·=·null; | ||
Max diff block lines reached; 1575669/1596002 bytes (98.73%) of diff not shown. |
Offset 263, 449 lines modified | Offset 263, 14 lines modified | ||
263 | ············source.hasOwnProperty·&&·source.hasOwnProperty("toString"))·{ | 263 | ············source.hasOwnProperty·&&·source.hasOwnProperty("toString"))·{ |
264 | ············destination.toString·=·source.toString; | 264 | ············destination.toString·=·source.toString; |
265 | ········} | 265 | ········} |
266 | ····} | 266 | ····} |
267 | ····return·destination; | 267 | ····return·destination; |
268 | }; | 268 | }; |
269 | /*·====================================================================== | 269 | /*·====================================================================== |
270 | ····OpenLayers/Util/vendorPrefix.js | ||
271 | ···======================================================================·*/ | ||
272 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for | ||
273 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. | ||
274 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the | ||
275 | ·*·full·text·of·the·license.·*/ | ||
276 | /** | ||
277 | ·*·@requires·OpenLayers/SingleFile.js | ||
278 | ·*/ | ||
279 | OpenLayers.Util·=·OpenLayers.Util·||·{}; | ||
280 | /** | ||
281 | ·*·Namespace:·OpenLayers.Util.vendorPrefix | ||
282 | ·*·A·collection·of·utility·functions·to·detect·vendor·prefixed·features | ||
283 | ·*/ | ||
284 | OpenLayers.Util.vendorPrefix·=·(function()·{ | ||
285 | ····"use·strict"; | ||
286 | ····var·VENDOR_PREFIXES·=·["",·"O",·"ms",·"Moz",·"Webkit"], | ||
287 | ········divStyle·=·document.createElement("div").style, | ||
288 | ········cssCache·=·{}, | ||
289 | ········jsCache·=·{}; | ||
290 | ····/** | ||
291 | ·····*·Function:·domToCss | ||
292 | ·····*·Converts·a·upper·camel·case·DOM·style·property·name·to·a·CSS·property | ||
293 | ·····*······i.e.·transformOrigin·->·transform-origin | ||
294 | ·····*······or···WebkitTransformOrigin·->·-webkit-transform-origin | ||
295 | ·····* | ||
296 | ·····*·Parameters: | ||
297 | ·····*·prefixedDom·-·{String}·The·property·to·convert | ||
298 | ·····* | ||
299 | ·····*·Returns: | ||
300 | ·····*·{String}·The·CSS·property | ||
301 | ·····*/ | ||
302 | ····function·domToCss(prefixedDom)·{ | ||
303 | ········if·(!prefixedDom)·{ | ||
304 | ············return·null; | ||
305 | ········} | ||
306 | ········return·prefixedDom. | ||
307 | ········replace(/([A-Z])/g,·function(c)·{ | ||
308 | ············return·"-"·+·c.toLowerCase(); | ||
309 | ········}). | ||
310 | ········replace(/^ms-/,·"-ms-"); | ||
311 | ····} | ||
312 | ····/** | ||
313 | ·····*·APIMethod:·css | ||
314 | ·····*·Detect·which·property·is·used·for·a·CSS·property | ||
315 | ·····* | ||
316 | ·····*·Parameters: | ||
317 | ·····*·property·-·{String}·The·standard·(unprefixed)·CSS·property·name | ||
318 | ·····* | ||
319 | ·····*·Returns: | ||
320 | ·····*·{String}·The·standard·CSS·property,·prefixed·property·or·null·if·not | ||
321 | ·····*··········supported | ||
322 | ·····*/ | ||
323 | ····function·css(property)·{ | ||
324 | ········if·(cssCache[property]·===·undefined)·{ | ||
325 | ············var·domProperty·=·property. | ||
326 | ············replace(/(-[\s\S])/g,·function(c)·{ | ||
327 | ················return·c.charAt(1).toUpperCase(); | ||
328 | ············}); | ||
329 | ············var·prefixedDom·=·style(domProperty); | ||
330 | ············cssCache[property]·=·domToCss(prefixedDom); | ||
331 | ········} | ||
332 | ········return·cssCache[property]; | ||
333 | ····} | ||
334 | ····/** | ||
335 | ·····*·APIMethod:·js | ||
336 | ·····*·Detect·which·property·is·used·for·a·JS·property/method | ||
337 | ·····* | ||
338 | ·····*·Parameters: | ||
339 | ·····*·obj·-·{Object}·The·object·to·test·on | ||
340 | ·····*·property·-·{String}·The·standard·(unprefixed)·JS·property·name | ||
341 | ·····* | ||
342 | ·····*·Returns: | ||
343 | ·····*·{String}·The·standard·JS·property,·prefixed·property·or·null·if·not | ||
344 | ·····*··········supported | ||
345 | ·····*/ | ||
346 | ····function·js(obj,·property)·{ | ||
347 | ········if·(jsCache[property]·===·undefined)·{ | ||
348 | ············var·tmpProp, | ||
349 | ················i·=·0, | ||
350 | ················l·=·VENDOR_PREFIXES.length, | ||
351 | ················prefix, | ||
352 | ················isStyleObj·=·(typeof·obj.cssText·!==·"undefined"); | ||
353 | ············jsCache[property]·=·null; | ||
354 | ············for·(;·i·<·l;·i++)·{ | ||
355 | ················prefix·=·VENDOR_PREFIXES[i]; | ||
356 | ················if·(prefix)·{ | ||
357 | ····················if·(!isStyleObj)·{ | ||
358 | ························//·js·prefix·should·be·lower-case,·while·style | ||
359 | ························//·properties·have·upper·case·on·first·character | ||
360 | ························prefix·=·prefix.toLowerCase(); | ||
361 | ····················} | ||
362 | ····················tmpProp·=·prefix·+·property.charAt(0).toUpperCase()·+·property.slice(1); | ||
363 | ················}·else·{ | ||
364 | ····················tmpProp·=·property; | ||
365 | ················} | ||
366 | ················if·(obj[tmpProp]·!==·undefined)·{ | ||
367 | ····················jsCache[property]·=·tmpProp; | ||
368 | ····················break; | ||
369 | ················} | ||
370 | ············} | ||
371 | ········} | ||
372 | ········return·jsCache[property]; | ||
373 | ····} | ||
374 | ····/** | ||
375 | ·····*·APIMethod:·style | ||
376 | ·····*·Detect·which·property·is·used·for·a·DOM·style·property | ||
377 | ·····* | ||
378 | ·····*·Parameters: | ||
Max diff block lines reached; 1209461/1222897 bytes (98.90%) of diff not shown. |
Offset 62, 204 lines modified | Offset 62, 14 lines modified | ||
62 | ········var·sourceIsEvt·=·typeof·window.Event·==·"function"·&&·source·instanceof·window.Event; | 62 | ········var·sourceIsEvt·=·typeof·window.Event·==·"function"·&&·source·instanceof·window.Event; |
63 | ········if·(!sourceIsEvt·&&·source.hasOwnProperty·&&·source.hasOwnProperty("toString"))·{ | 63 | ········if·(!sourceIsEvt·&&·source.hasOwnProperty·&&·source.hasOwnProperty("toString"))·{ |
64 | ············destination.toString·=·source.toString | 64 | ············destination.toString·=·source.toString |
65 | ········} | 65 | ········} |
66 | ····} | 66 | ····} |
67 | ····return·destination | 67 | ····return·destination |
68 | }; | 68 | }; |
69 | OpenLayers.Util·=·OpenLayers.Util·||·{}; | ||
70 | OpenLayers.Util.vendorPrefix·=·function()·{ | ||
71 | ····"use·strict"; | ||
72 | ····var·VENDOR_PREFIXES·=·["",·"O",·"ms",·"Moz",·"Webkit"], | ||
73 | ········divStyle·=·document.createElement("div").style, | ||
74 | ········cssCache·=·{}, | ||
75 | ········jsCache·=·{}; | ||
76 | ····function·domToCss(prefixedDom)·{ | ||
77 | ········if·(!prefixedDom)·{ | ||
78 | ············return·null | ||
79 | ········} | ||
80 | ········return·prefixedDom.replace(/([A-Z])/g,·function(c)·{ | ||
81 | ············return·"-"·+·c.toLowerCase() | ||
82 | ········}).replace(/^ms-/,·"-ms-") | ||
83 | ····} | ||
84 | ····function·css(property)·{ | ||
85 | ········if·(cssCache[property]·===·undefined)·{ | ||
86 | ············var·domProperty·=·property.replace(/(-[\s\S])/g,·function(c)·{ | ||
87 | ················return·c.charAt(1).toUpperCase() | ||
88 | ············}); | ||
89 | ············var·prefixedDom·=·style(domProperty); | ||
90 | ············cssCache[property]·=·domToCss(prefixedDom) | ||
91 | ········} | ||
92 | ········return·cssCache[property] | ||
93 | ····} | ||
94 | ····function·js(obj,·property)·{ | ||
95 | ········if·(jsCache[property]·===·undefined)·{ | ||
96 | ············var·tmpProp,·i·=·0, | ||
97 | ················l·=·VENDOR_PREFIXES.length, | ||
98 | ················prefix,·isStyleObj·=·typeof·obj.cssText·!==·"undefined"; | ||
99 | ············jsCache[property]·=·null; | ||
100 | ············for·(;·i·<·l;·i++)·{ | ||
101 | ················prefix·=·VENDOR_PREFIXES[i]; | ||
102 | ················if·(prefix)·{ | ||
103 | ····················if·(!isStyleObj)·{ | ||
104 | ························prefix·=·prefix.toLowerCase() | ||
105 | ····················} | ||
106 | ····················tmpProp·=·prefix·+·property.charAt(0).toUpperCase()·+·property.slice(1) | ||
107 | ················}·else·{ | ||
108 | ····················tmpProp·=·property | ||
109 | ················} | ||
110 | ················if·(obj[tmpProp]·!==·undefined)·{ | ||
111 | ····················jsCache[property]·=·tmpProp; | ||
112 | ····················break | ||
113 | ················} | ||
114 | ············} | ||
115 | ········} | ||
116 | ········return·jsCache[property] | ||
117 | ····} | ||
118 | ····function·style(property)·{ | ||
119 | ········return·js(divStyle,·property) | ||
120 | ····} | ||
121 | ····return·{ | ||
122 | ········css:·css, | ||
123 | ········js:·js, | ||
124 | ········style:·style, | ||
125 | ········cssCache:·cssCache, | ||
126 | ········jsCache:·jsCache | ||
127 | ····} | ||
128 | }(); | ||
129 | OpenLayers.Animation·=·function(window)·{ | ||
130 | ····var·requestAnimationFrame·=·OpenLayers.Util.vendorPrefix.js(window,·"requestAnimationFrame"); | ||
131 | ····var·isNative·=·!!requestAnimationFrame; | ||
132 | ····var·requestFrame·=·function()·{ | ||
133 | ········var·request·=·window[requestAnimationFrame]·||·function(callback,·element)·{ | ||
134 | ············window.setTimeout(callback,·16) | ||
135 | ········}; | ||
136 | ········return·function(callback,·element)·{ | ||
137 | ············request.apply(window,·[callback,·element]) | ||
138 | ········} | ||
139 | ····}(); | ||
140 | ····var·counter·=·0; | ||
141 | ····var·loops·=·{}; | ||
142 | ····function·start(callback,·duration,·element)·{ | ||
143 | ········duration·=·duration·>·0·?·duration·:·Number.POSITIVE_INFINITY; | ||
144 | ········var·id·=·++counter; | ||
145 | ········var·start·=·+new·Date; | ||
146 | ········loops[id]·=·function()·{ | ||
147 | ············if·(loops[id]·&&·+new·Date·-·start·<=·duration)·{ | ||
148 | ················callback(); | ||
149 | ················if·(loops[id])·{ | ||
150 | ····················requestFrame(loops[id],·element) | ||
151 | ················} | ||
152 | ············}·else·{ | ||
153 | ················delete·loops[id] | ||
154 | ············} | ||
155 | ········}; | ||
156 | ········requestFrame(loops[id],·element); | ||
157 | ········return·id | ||
158 | ····} | ||
159 | ····function·stop(id)·{ | ||
160 | ········delete·loops[id] | ||
161 | ····} | ||
162 | ····return·{ | ||
163 | ········isNative:·isNative, | ||
164 | ········requestFrame:·requestFrame, | ||
165 | ········start:·start, | ||
166 | ········stop:·stop | ||
167 | ····} | ||
168 | }(window); | ||
169 | OpenLayers.Kinetic·=·OpenLayers.Class({ | ||
170 | ····threshold:·0, | ||
171 | ····deceleration:·.0035, | ||
172 | ····nbPoints:·100, | ||
173 | ····delay:·200, | ||
174 | ····points:·undefined, | ||
175 | ····timerId:·undefined, | ||
176 | ····initialize:·function(options)·{ | ||
177 | ········OpenLayers.Util.extend(this,·options) | ||
178 | ····}, | ||
179 | ····begin:·function()·{ | ||
180 | ········OpenLayers.Animation.stop(this.timerId); | ||
181 | ········this.timerId·=·undefined; | ||
182 | ········this.points·=·[] | ||
Max diff block lines reached; 480814/487126 bytes (98.70%) of diff not shown. |
Offset 33176, 639 lines modified | Offset 33176, 14 lines modified | ||
33176 | /** | 33176 | /** |
33177 | ·*·Constant:·CORNER_SIZE | 33177 | ·*·Constant:·CORNER_SIZE |
33178 | ·*·{Integer}·5.·Border·space·for·the·RICO·corners. | 33178 | ·*·{Integer}·5.·Border·space·for·the·RICO·corners. |
33179 | ·*/ | 33179 | ·*/ |
33180 | OpenLayers.Popup.AnchoredBubble.CORNER_SIZE·=·5; | 33180 | OpenLayers.Popup.AnchoredBubble.CORNER_SIZE·=·5; |
33181 | /*·====================================================================== | 33181 | /*·====================================================================== |
33182 | ····OpenLayers/Symbolizer.js | ||
33183 | ···======================================================================·*/ | ||
33184 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for | ||
33185 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. | ||
33186 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the | ||
33187 | ·*·full·text·of·the·license.·*/ | ||
33188 | /** | ||
33189 | ·*·@requires·OpenLayers/BaseTypes/Class.js | ||
33190 | ·*/ | ||
33191 | /** | ||
33192 | ·*·Class:·OpenLayers.Symbolizer | ||
33193 | ·*·Base·class·representing·a·symbolizer·used·for·feature·rendering. | ||
33194 | ·*/ | ||
33195 | OpenLayers.Symbolizer·=·OpenLayers.Class({ | ||
33196 | ····/** | ||
33197 | ·····*·APIProperty:·zIndex | ||
33198 | ·····*·{Number}·The·zIndex·determines·the·rendering·order·for·a·symbolizer. | ||
33199 | ·····*·····Symbolizers·with·larger·zIndex·values·are·rendered·over·symbolizers | ||
33200 | ·····*·····with·smaller·zIndex·values.··Default·is·0. | ||
33201 | ·····*/ | ||
33202 | ····zIndex:·0, | ||
33203 | ····/** | ||
33204 | ·····*·Constructor:·OpenLayers.Symbolizer | ||
33205 | ·····*·Instances·of·this·class·are·not·useful.··See·one·of·the·subclasses. | ||
33206 | ·····* | ||
33207 | ·····*·Parameters: | ||
33208 | ·····*·config·-·{Object}·An·object·containing·properties·to·be·set·on·the· | ||
33209 | ·····*·····symbolizer.··Any·documented·symbolizer·property·can·be·set·at· | ||
33210 | ·····*·····construction. | ||
33211 | ·····* | ||
33212 | ·····*·Returns: | ||
33213 | ·····*·A·new·symbolizer. | ||
33214 | ·····*/ | ||
33215 | ····initialize:·function(config)·{ | ||
33216 | ········OpenLayers.Util.extend(this,·config); | ||
33217 | ····}, | ||
33218 | ····/**· | ||
33219 | ·····*·APIMethod:·clone | ||
33220 | ·····*·Create·a·copy·of·this·symbolizer. | ||
33221 | ·····* | ||
33222 | ·····*·Returns·a·symbolizer·of·the·same·type·with·the·same·properties. | ||
33223 | ·····*/ | ||
33224 | ····clone:·function()·{ | ||
33225 | ········var·Type·=·eval(this.CLASS_NAME); | ||
33226 | ········return·new·Type(OpenLayers.Util.extend({},·this)); | ||
33227 | ····}, | ||
33228 | ····CLASS_NAME:·"OpenLayers.Symbolizer" | ||
33229 | }); | ||
33230 | /*·====================================================================== | ||
33231 | ····OpenLayers/Strategy.js | ||
33232 | ···======================================================================·*/ | ||
33233 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for | ||
33234 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. | ||
33235 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the | ||
33236 | ·*·full·text·of·the·license.·*/ | ||
33237 | /** | ||
33238 | ·*·@requires·OpenLayers/BaseTypes/Class.js | ||
33239 | ·*/ | ||
33240 | /** | ||
33241 | ·*·Class:·OpenLayers.Strategy | ||
33242 | ·*·Abstract·vector·layer·strategy·class.··Not·to·be·instantiated·directly.··Use | ||
33243 | ·*·····one·of·the·strategy·subclasses·instead. | ||
33244 | ·*/ | ||
33245 | OpenLayers.Strategy·=·OpenLayers.Class({ | ||
33246 | ····/** | ||
33247 | ·····*·Property:·layer | ||
33248 | ·····*·{<OpenLayers.Layer.Vector>}·The·layer·this·strategy·belongs·to. | ||
33249 | ·····*/ | ||
33250 | ····layer:·null, | ||
33251 | ····/** | ||
33252 | ·····*·Property:·options | ||
33253 | ·····*·{Object}·Any·options·sent·to·the·constructor. | ||
33254 | ·····*/ | ||
33255 | ····options:·null, | ||
33256 | ····/**· | ||
33257 | ·····*·Property:·active· | ||
33258 | ·····*·{Boolean}·The·control·is·active. | ||
33259 | ·····*/ | ||
33260 | ····active:·null, | ||
33261 | ····/** | ||
33262 | ·····*·Property:·autoActivate | ||
33263 | ·····*·{Boolean}·The·creator·of·the·strategy·can·set·autoActivate·to·false | ||
33264 | ·····*······to·fully·control·when·the·protocol·is·activated·and·deactivated. | ||
33265 | ·····*······Defaults·to·true. | ||
33266 | ·····*/ | ||
33267 | ····autoActivate:·true, | ||
33268 | ····/** | ||
33269 | ·····*·Property:·autoDestroy | ||
33270 | ·····*·{Boolean}·The·creator·of·the·strategy·can·set·autoDestroy·to·false | ||
33271 | ·····*······to·fully·control·when·the·strategy·is·destroyed.·Defaults·to | ||
33272 | ·····*······true. | ||
33273 | ·····*/ | ||
33274 | ····autoDestroy:·true, | ||
33275 | ····/** | ||
33276 | ·····*·Constructor:·OpenLayers.Strategy | ||
33277 | ·····*·Abstract·class·for·vector·strategies.··Create·instances·of·a·subclass. | ||
33278 | ·····* | ||
33279 | ·····*·Parameters: | ||
33280 | ·····*·options·-·{Object}·Optional·object·whose·properties·will·be·set·on·the | ||
33281 | ·····*·····instance. | ||
33282 | ·····*/ | ||
Max diff block lines reached; 3315984/3333540 bytes (99.47%) of diff not shown. |
Offset 13318, 226 lines modified | Offset 13318, 14 lines modified | ||
13318 | ········var·corner·=·OpenLayers.Bounds.oppositeQuadrant(this.relativePosition); | 13318 | ········var·corner·=·OpenLayers.Bounds.oppositeQuadrant(this.relativePosition); |
13319 | ········OpenLayers.Util.removeItem(corners,·corner); | 13319 | ········OpenLayers.Util.removeItem(corners,·corner); |
13320 | ········return·corners.join("·") | 13320 | ········return·corners.join("·") |
13321 | ····}, | 13321 | ····}, |
13322 | ····CLASS_NAME:·"OpenLayers.Popup.AnchoredBubble" | 13322 | ····CLASS_NAME:·"OpenLayers.Popup.AnchoredBubble" |
13323 | }); | 13323 | }); |
13324 | OpenLayers.Popup.AnchoredBubble.CORNER_SIZE·=·5; | 13324 | OpenLayers.Popup.AnchoredBubble.CORNER_SIZE·=·5; |
13325 | OpenLayers.Symbolizer·=·OpenLayers.Class({ | ||
13326 | ····zIndex:·0, | ||
13327 | ····initialize:·function(config)·{ | ||
13328 | ········OpenLayers.Util.extend(this,·config) | ||
13329 | ····}, | ||
13330 | ····clone:·function()·{ | ||
13331 | ········var·Type·=·eval(this.CLASS_NAME); | ||
13332 | ········return·new·Type(OpenLayers.Util.extend({},·this)) | ||
13333 | ····}, | ||
13334 | ····CLASS_NAME:·"OpenLayers.Symbolizer" | ||
13335 | }); | ||
13336 | OpenLayers.Strategy·=·OpenLayers.Class({ | ||
13337 | ····layer:·null, | ||
13338 | ····options:·null, | ||
13339 | ····active:·null, | ||
13340 | ····autoActivate:·true, | ||
13341 | ····autoDestroy:·true, | ||
13342 | ····initialize:·function(options)·{ | ||
13343 | ········OpenLayers.Util.extend(this,·options); | ||
13344 | ········this.options·=·options; | ||
13345 | ········this.active·=·false | ||
13346 | ····}, | ||
13347 | ····destroy:·function()·{ | ||
13348 | ········this.deactivate(); | ||
13349 | ········this.layer·=·null; | ||
13350 | ········this.options·=·null | ||
13351 | ····}, | ||
13352 | ····setLayer:·function(layer)·{ | ||
13353 | ········this.layer·=·layer | ||
13354 | ····}, | ||
13355 | ····activate:·function()·{ | ||
13356 | ········if·(!this.active)·{ | ||
13357 | ············this.active·=·true; | ||
13358 | ············return·true | ||
13359 | ········} | ||
13360 | ········return·false | ||
13361 | ····}, | ||
13362 | ····deactivate:·function()·{ | ||
13363 | ········if·(this.active)·{ | ||
13364 | ············this.active·=·false; | ||
13365 | ············return·true | ||
13366 | ········} | ||
13367 | ········return·false | ||
13368 | ····}, | ||
13369 | ····CLASS_NAME:·"OpenLayers.Strategy" | ||
13370 | }); | ||
13371 | OpenLayers.Kinetic·=·OpenLayers.Class({ | ||
13372 | ····threshold:·0, | ||
13373 | ····deceleration:·.0035, | ||
13374 | ····nbPoints:·100, | ||
13375 | ····delay:·200, | ||
13376 | ····points:·undefined, | ||
13377 | ····timerId:·undefined, | ||
13378 | ····initialize:·function(options)·{ | ||
13379 | ········OpenLayers.Util.extend(this,·options) | ||
13380 | ····}, | ||
13381 | ····begin:·function()·{ | ||
13382 | ········OpenLayers.Animation.stop(this.timerId); | ||
13383 | ········this.timerId·=·undefined; | ||
13384 | ········this.points·=·[] | ||
13385 | ····}, | ||
13386 | ····update:·function(xy)·{ | ||
13387 | ········this.points.unshift({ | ||
13388 | ············xy:·xy, | ||
13389 | ············tick:·(new·Date).getTime() | ||
13390 | ········}); | ||
13391 | ········if·(this.points.length·>·this.nbPoints)·{ | ||
13392 | ············this.points.pop() | ||
13393 | ········} | ||
13394 | ····}, | ||
13395 | ····end:·function(xy)·{ | ||
13396 | ········var·last,·now·=·(new·Date).getTime(); | ||
13397 | ········for·(var·i·=·0,·l·=·this.points.length,·point;·i·<·l;·i++)·{ | ||
13398 | ············point·=·this.points[i]; | ||
13399 | ············if·(now·-·point.tick·>·this.delay)·{ | ||
13400 | ················break | ||
13401 | ············} | ||
13402 | ············last·=·point | ||
13403 | ········} | ||
13404 | ········if·(!last)·{ | ||
13405 | ············return | ||
13406 | ········} | ||
13407 | ········var·time·=·(new·Date).getTime()·-·last.tick; | ||
13408 | ········var·dist·=·Math.sqrt(Math.pow(xy.x·-·last.xy.x,·2)·+·Math.pow(xy.y·-·last.xy.y,·2)); | ||
13409 | ········var·speed·=·dist·/·time; | ||
13410 | ········if·(speed·==·0·||·speed·<·this.threshold)·{ | ||
13411 | ············return | ||
13412 | ········} | ||
13413 | ········var·theta·=·Math.asin((xy.y·-·last.xy.y)·/·dist); | ||
13414 | ········if·(last.xy.x·<=·xy.x)·{ | ||
13415 | ············theta·=·Math.PI·-·theta | ||
13416 | ········} | ||
13417 | ········return·{ | ||
13418 | ············speed:·speed, | ||
13419 | ············theta:·theta | ||
13420 | ········} | ||
13421 | ····}, | ||
13422 | ····move:·function(info,·callback)·{ | ||
13423 | ········var·v0·=·info.speed; | ||
13424 | ········var·fx·=·Math.cos(info.theta); | ||
13425 | ········var·fy·=·-Math.sin(info.theta); | ||
13426 | ········var·initialTime·=·(new·Date).getTime(); | ||
13427 | ········var·lastX·=·0; | ||
13428 | ········var·lastY·=·0; | ||
13429 | ········var·timerCallback·=·function()·{ | ||
13430 | ············if·(this.timerId·==·null)·{ | ||
13431 | ················return | ||
13432 | ············} | ||
13433 | ············var·t·=·(new·Date).getTime()·-·initialTime; | ||
13434 | ············var·p·=·-this.deceleration·*·Math.pow(t,·2)·/·2·+·v0·*·t; | ||
13435 | ············var·x·=·p·*·fx; | ||
13436 | ············var·y·=·p·*·fy; | ||
13437 | ············var·args·=·{}; | ||
13438 | ············args.end·=·false; | ||
13439 | ············var·v·=·-this.deceleration·*·t·+·v0; | ||
13440 | ············if·(v·<=·0)·{ | ||
13441 | ················OpenLayers.Animation.stop(this.timerId); | ||
13442 | ················this.timerId·=·null; | ||
13443 | ················args.end·=·true | ||
13444 | ············} | ||
Max diff block lines reached; 1427662/1434474 bytes (99.53%) of diff not shown. |