Offset 1, 2 lines modified | Offset 1, 2 lines modified | ||
1 | · | 1 | ·2f894cbbe952d882ea4b0c5431d1cbc8·706880·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···7 | 3 | -rw-r--r--···0········0········0···703004·2023-01-14·13:27:41.000000·data.tar.xz |
Offset 263, 519 lines modified | Offset 263, 1775 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/ | 270 | ····OpenLayers/Console.js |
271 | ···======================================================================·*/ | 271 | ···======================================================================·*/ |
272 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for | 272 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for |
273 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. | 273 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. |
274 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the | 274 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the |
275 | ·*·full·text·of·the·license.·*/ | 275 | ·*·full·text·of·the·license.·*/ |
276 | /** | 276 | /** |
277 | ·*·@requires·OpenLayers/BaseTypes/Class.js | 277 | ·*·@requires·OpenLayers/BaseTypes/Class.js |
278 | ·*/ | 278 | ·*/ |
279 | /** | 279 | /** |
280 | ·*·Class:·OpenLayers.Geometry | ||
281 | ·*·A·Geometry·is·a·description·of·a·geographic·object.··Create·an·instance·of | ||
282 | ·*·this·class·with·the·<OpenLayers.Geometry>·constructor.··This·is·a·base·class, | ||
283 | ·*· | 280 | ·*·Namespace:·OpenLayers.Console |
281 | ·*·The·OpenLayers.Console·namespace·is·used·for·debugging·and·error·logging. | ||
282 | ·*·If·the·Firebug·Lite·(../Firebug/firebug.js)·is·included·before·this·script, | ||
283 | ·*·calls·to·OpenLayers.Console·methods·will·get·redirected·to·window.console. | ||
284 | ·*·This·makes·use·of·the·Firebug·extension·where·available·and·allows·for | ||
285 | ·*·cross-browser·debugging·Firebug·style. | ||
284 | ·* | 286 | ·* |
285 | ·*·Note·that·if·you·use·the·<OpenLayers.Geometry.fromWKT>·method,·you·must | ||
286 | ·*· | 287 | ·*·Note: |
288 | ·*·Note·that·behavior·will·differ·with·the·Firebug·extention·and·Firebug·Lite. | ||
289 | ·*·Most·notably,·the·Firebug·Lite·console·does·not·currently·allow·for | ||
290 | ·*·hyperlinks·to·code·or·for·clicking·on·object·to·explore·their·properties. | ||
291 | ·*· | ||
287 | ·*/ | 292 | ·*/ |
288 | OpenLayers. | 293 | OpenLayers.Console·=·{ |
294 | ····/** | ||
295 | ·····*·Create·empty·functions·for·all·console·methods.··The·real·value·of·these | ||
296 | ·····*·properties·will·be·set·if·Firebug·Lite·(../Firebug/firebug.js·script)·is | ||
297 | ·····*·included.··We·explicitly·require·the·Firebug·Lite·script·to·trigger | ||
298 | ·····*·functionality·of·the·OpenLayers.Console·methods. | ||
299 | ·····*/ | ||
289 | ····/** | 300 | ····/** |
290 | ·····*·Property:·id | ||
291 | ·····*· | 301 | ·····*·APIFunction:·log |
302 | ·····*·Log·an·object·in·the·console.··The·Firebug·Lite·console·logs·string | ||
303 | ·····*·representation·of·objects.··Given·multiple·arguments,·they·will | ||
304 | ·····*·be·cast·to·strings·and·logged·with·a·space·delimiter.··If·the·first | ||
305 | ·····*·argument·is·a·string·with·printf-like·formatting,·subsequent·arguments | ||
306 | ·····*·will·be·used·in·string·substitution.··Any·additional·arguments·(beyond | ||
307 | ·····*·the·number·substituted·in·a·format·string)·will·be·appended·in·a·space- | ||
308 | ·····*·delimited·line. | ||
309 | ·····*· | ||
310 | ·····*·Parameters: | ||
311 | ·····*·object·-·{Object} | ||
292 | ·····*/ | 312 | ·····*/ |
293 | ···· | 313 | ····log:·function()·{}, |
294 | ····/** | 314 | ····/** |
295 | ·····*·Property:·parent | ||
296 | ·····*·{<OpenLayers.Geometry>}This·is·set·when·a·Geometry·is·added·as·component | ||
297 | ·····*· | 315 | ·····*·APIFunction:·debug |
316 | ·····*·Writes·a·message·to·the·console,·including·a·hyperlink·to·the·line | ||
317 | ·····*·where·it·was·called. | ||
318 | ·····* | ||
319 | ·····*·May·be·called·with·multiple·arguments·as·with·OpenLayers.Console.log(). | ||
320 | ·····*· | ||
321 | ·····*·Parameters: | ||
322 | ·····*·object·-·{Object} | ||
298 | ·····*/ | 323 | ·····*/ |
299 | ···· | 324 | ····debug:·function()·{}, |
300 | ····/** | 325 | ····/** |
301 | ·····*·Property:·bounds· | ||
302 | ·····*· | 326 | ·····*·APIFunction:·info |
327 | ·····*·Writes·a·message·to·the·console·with·the·visual·"info"·icon·and·color | ||
328 | ·····*·coding·and·a·hyperlink·to·the·line·where·it·was·called. | ||
329 | ·····* | ||
330 | ·····*·May·be·called·with·multiple·arguments·as·with·OpenLayers.Console.log(). | ||
331 | ·····*· | ||
332 | ·····*·Parameters: | ||
333 | ·····*·object·-·{Object} | ||
303 | ·····*/ | 334 | ·····*/ |
304 | ···· | 335 | ····info:·function()·{}, |
305 | ····/** | 336 | ····/** |
306 | ·····*·Constructor:·OpenLayers.Geometry | ||
307 | ·····*· | 337 | ·····*·APIFunction:·warn |
338 | ·····*·Writes·a·message·to·the·console·with·the·visual·"warning"·icon·and | ||
339 | ·····*·color·coding·and·a·hyperlink·to·the·line·where·it·was·called. | ||
340 | ·····* | ||
341 | ·····*·May·be·called·with·multiple·arguments·as·with·OpenLayers.Console.log(). | ||
342 | ·····*· | ||
343 | ·····*·Parameters: | ||
344 | ·····*·object·-·{Object} | ||
308 | ·····*/ | 345 | ·····*/ |
346 | ····warn:·function()·{}, | ||
347 | ····/** | ||
348 | ·····*·APIFunction:·error | ||
349 | ·····*·Writes·a·message·to·the·console·with·the·visual·"error"·icon·and·color | ||
350 | ·····*·coding·and·a·hyperlink·to·the·line·where·it·was·called. | ||
351 | ·····* | ||
352 | ·····*·May·be·called·with·multiple·arguments·as·with·OpenLayers.Console.log(). | ||
353 | ·····*· | ||
354 | ·····*·Parameters: | ||
355 | ·····*·object·-·{Object} | ||
356 | ·····*/ | ||
357 | ····error:·function()·{}, | ||
358 | ····/** | ||
359 | ·····*·APIFunction:·userError | ||
360 | ·····*·A·single·interface·for·showing·error·messages·to·the·user.·The·default | ||
361 | ·····*·behavior·is·a·Javascript·alert,·though·this·can·be·overridden·by | ||
362 | ·····*·reassigning·OpenLayers.Console.userError·to·a·different·function. | ||
363 | ·····* | ||
364 | ·····*·Expects·a·single·error·message | ||
365 | ·····*· | ||
366 | ·····*·Parameters: | ||
367 | ·····*·error·-·{Object} | ||
368 | ·····*/ | ||
369 | ····userError:·function(error)·{ | ||
370 | ········alert(error); | ||
371 | ····}, | ||
Max diff block lines reached; 3897359/3912304 bytes (99.62%) of diff not shown. |
Offset 263, 14 lines modified | Offset 263, 449 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; 1585847/1599283 bytes (99.16%) of diff not shown. |
Offset 62, 14 lines modified | Offset 62, 204 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; 659271/665583 bytes (99.05%) of diff not shown. |
Offset 62, 218 lines modified | Offset 62, 676 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.Console·=·{ | ||
70 | ····log:·function()·{}, | ||
71 | ····debug:·function()·{}, | ||
72 | ····info:·function()·{}, | ||
73 | ····warn:·function()·{}, | ||
74 | ····error:·function()·{}, | ||
75 | ····userError:·function(error)·{ | ||
76 | ········alert(error) | ||
77 | ····}, | ||
78 | ····assert:·function()·{}, | ||
79 | ····dir:·function()·{}, | ||
80 | ····dirxml:·function()·{}, | ||
81 | ····trace:·function()·{}, | ||
82 | ····group:·function()·{}, | ||
83 | ····groupEnd:·function()·{}, | ||
84 | ····time:·function()·{}, | ||
85 | ····timeEnd:·function()·{}, | ||
86 | ····profile:·function()·{}, | ||
87 | ····profileEnd:·function()·{}, | ||
88 | ····count:·function()·{}, | ||
89 | ····CLASS_NAME:·"OpenLayers.Console" | ||
90 | }; | ||
91 | (function()·{ | ||
92 | ····var·scripts·=·document.getElementsByTagName("script"); | ||
93 | ····for·(var·i·=·0,·len·=·scripts.length;·i·<·len;·++i)·{ | ||
94 | ········if·(scripts[i].src.indexOf("firebug.js")·!=·-1)·{ | ||
95 | ············if·(console)·{ | ||
96 | ················OpenLayers.Util.extend(OpenLayers.Console,·console); | ||
97 | ················break | ||
98 | ············} | ||
99 | ········} | ||
100 | ····} | ||
101 | })(); | ||
69 | OpenLayers. | 102 | OpenLayers.Popup·=·OpenLayers.Class({ |
103 | ····events:·null, | ||
104 | ····id:·"", | ||
105 | ····lonlat:·null, | ||
70 | ····i | 106 | ····div:·null, |
107 | ····contentSize:·null, | ||
108 | ····size:·null, | ||
109 | ····contentHTML:·null, | ||
110 | ····backgroundColor:·"", | ||
111 | ····opacity:·"", | ||
112 | ····border:·"", | ||
113 | ····contentDiv:·null, | ||
114 | ····groupDiv:·null, | ||
115 | ····closeDiv:·null, | ||
116 | ····autoSize:·false, | ||
117 | ····minSize:·null, | ||
118 | ····maxSize:·null, | ||
119 | ····displayClass:·"olPopup", | ||
120 | ····contentDisplayClass:·"olPopupContent", | ||
121 | ····padding:·0, | ||
122 | ····disableFirefoxOverflowHack:·false, | ||
123 | ····fixPadding:·function()·{ | ||
124 | ········if·(typeof·this.padding·==·"number")·{ | ||
125 | ············this.padding·=·new·OpenLayers.Bounds(this.padding,·this.padding,·this.padding,·this.padding) | ||
126 | ········} | ||
127 | ····}, | ||
128 | ····panMapIfOutOfView:·false, | ||
129 | ····keepInMap:·false, | ||
130 | ····closeOnMove:·false, | ||
71 | ···· | 131 | ····map:·null, |
72 | ····bounds:·null, | ||
73 | ····initialize:·function()·{ | 132 | ····initialize:·function(id,·lonlat,·contentSize,·contentHTML,·closeBox,·closeBoxCallback)·{ |
133 | ········if·(id·==·null)·{ | ||
74 | ········ | 134 | ············id·=·OpenLayers.Util.createUniqueID(this.CLASS_NAME·+·"_") |
135 | ········} | ||
136 | ········this.id·=·id; | ||
137 | ········this.lonlat·=·lonlat; | ||
138 | ········this.contentSize·=·contentSize·!=·null·?·contentSize·:·new·OpenLayers.Size(OpenLayers.Popup.WIDTH,·OpenLayers.Popup.HEIGHT); | ||
139 | ········if·(contentHTML·!=·null)·{ | ||
140 | ············this.contentHTML·=·contentHTML | ||
141 | ········} | ||
142 | ········this.backgroundColor·=·OpenLayers.Popup.COLOR; | ||
143 | ········this.opacity·=·OpenLayers.Popup.OPACITY; | ||
144 | ········this.border·=·OpenLayers.Popup.BORDER; | ||
145 | ········this.div·=·OpenLayers.Util.createDiv(this.id,·null,·null,·null,·null,·null,·"hidden"); | ||
146 | ········this.div.className·=·this.displayClass; | ||
147 | ········var·groupDivId·=·this.id·+·"_GroupDiv"; | ||
148 | ········this.groupDiv·=·OpenLayers.Util.createDiv(groupDivId,·null,·null,·null,·"relative",·null,·"hidden"); | ||
149 | ········var·id·=·this.div.id·+·"_contentDiv"; | ||
150 | ········this.contentDiv·=·OpenLayers.Util.createDiv(id,·null,·this.contentSize.clone(),·null,·"relative"); | ||
151 | ········this.contentDiv.className·=·this.contentDisplayClass; | ||
152 | ········this.groupDiv.appendChild(this.contentDiv); | ||
153 | ········this.div.appendChild(this.groupDiv); | ||
154 | ········if·(closeBox)·{ | ||
155 | ············this.addCloseBox(closeBoxCallback) | ||
156 | ········} | ||
157 | ········this.registerEvents() | ||
75 | ····}, | 158 | ····}, |
76 | ····destroy:·function()·{ | 159 | ····destroy:·function()·{ |
77 | ········this.id·=·null; | 160 | ········this.id·=·null; |
161 | ········this.lonlat·=·null; | ||
162 | ········this.size·=·null; | ||
163 | ········this.contentHTML·=·null; | ||
164 | ········this.backgroundColor·=·null; | ||
165 | ········this.opacity·=·null; | ||
78 | ········this.bo | 166 | ········this.border·=·null; |
167 | ········if·(this.closeOnMove·&&·this.map)·{ | ||
168 | ············this.map.events.unregister("movestart",·this,·this.hide) | ||
169 | ········} | ||
170 | ········this.events.destroy(); | ||
171 | ········this.events·=·null; | ||
172 | ········if·(this.closeDiv)·{ | ||
173 | ············OpenLayers.Event.stopObservingElement(this.closeDiv); | ||
174 | ············this.groupDiv.removeChild(this.closeDiv) | ||
175 | ········} | ||
176 | ········this.closeDiv·=·null; | ||
177 | ········this.div.removeChild(this.groupDiv); | ||
178 | ········this.groupDiv·=·null; | ||
179 | ········if·(this.map·!=·null)·{ | ||
180 | ············this.map.removePopup(this) | ||
181 | ········} | ||
182 | ········this.map·=·null; | ||
183 | ········this.div·=·null; | ||
184 | ········this.autoSize·=·null; | ||
185 | ········this.minSize·=·null; | ||
186 | ········this.maxSize·=·null; | ||
187 | ········this.padding·=·null; | ||
Max diff block lines reached; 1685028/1689653 bytes (99.73%) of diff not shown. |
Offset 13915, 539 lines modified | Offset 13915, 1106 lines modified | ||
13915 | ········this.tileCache·=·null; | 13915 | ········this.tileCache·=·null; |
13916 | ········this.tileCacheIndex·=·null; | 13916 | ········this.tileCacheIndex·=·null; |
13917 | ········this._destroyed·=·true; | 13917 | ········this._destroyed·=·true; |
13918 | ····} | 13918 | ····} |
13919 | }); | 13919 | }); |
13920 | /*·====================================================================== | 13920 | /*·====================================================================== |
13921 | ····OpenLayers/ | 13921 | ····OpenLayers/Layer/XYZ.js |
13922 | ···======================================================================·*/ | 13922 | ···======================================================================·*/ |
13923 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for | 13923 | /*·Copyright·(c)·2006-2013·by·OpenLayers·Contributors·(see·authors.txt·for |
13924 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. | 13924 | ·*·full·list·of·contributors).·Published·under·the·2-clause·BSD·license. |
13925 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the | 13925 | ·*·See·license.txt·in·the·OpenLayers·distribution·or·repository·for·the |
13926 | ·*·full·text·of·the·license.·*/ | 13926 | ·*·full·text·of·the·license.·*/ |
13927 | /** | 13927 | /** |
13928 | ·*·@requires·OpenLayers/BaseTypes/Class.js | ||
13929 | ·*·@requires·OpenLayers/ | 13928 | ·*·@requires·OpenLayers/Layer/Grid.js |
13930 | ·*/ | 13929 | ·*/ |
13931 | /** | 13930 | /**· |
13932 | ·*·Class:·OpenLayers. | 13931 | ·*·Class:·OpenLayers.Layer.XYZ |
13933 | ·*·Base·class·for·format·reading/writing·a·variety·of·formats.··Subclasses | ||
13934 | ·*· | 13932 | ·*·The·XYZ·class·is·designed·to·make·it·easier·for·people·who·have·tiles |
13933 | ·*·arranged·by·a·standard·XYZ·grid.· | ||
13934 | ·*· | ||
13935 | ·*·Inherits·from: | ||
13936 | ·*··-·<OpenLayers.Layer.Grid> | ||
13935 | ·*/ | 13937 | ·*/ |
13936 | OpenLayers. | 13938 | OpenLayers.Layer.XYZ·=·OpenLayers.Class(OpenLayers.Layer.Grid,·{ |
13937 | ····/** | 13939 | ····/** |
13938 | ·····*·Property:·options | ||
13939 | ·····*· | 13940 | ·····*·APIProperty:·isBaseLayer |
13941 | ·····*·Default·is·true,·as·this·is·designed·to·be·a·base·tile·source.· | ||
13940 | ·····*/ | 13942 | ·····*/ |
13941 | ···· | 13943 | ····isBaseLayer:·true, |
13942 | ····/** | 13944 | ····/** |
13945 | ·····*·APIProperty:·sphericalMercator | ||
13946 | ·····*·Whether·the·tile·extents·should·be·set·to·the·defaults·for· | ||
13947 | ·····*····spherical·mercator.·Useful·for·things·like·OpenStreetMap. | ||
13948 | ·····*····Default·is·false,·except·for·the·OSM·subclass. | ||
13943 | ·····*·APIProperty:·externalProjection | ||
13944 | ·····*·{<OpenLayers.Projection>}·When·passed·a·externalProjection·and | ||
13945 | ·····*·····internalProjection,·the·format·will·reproject·the·geometries·it | ||
13946 | ·····*·····reads·or·writes.·The·externalProjection·is·the·projection·used·by | ||
13947 | ·····*·····the·content·which·is·passed·into·read·or·which·comes·out·of·write. | ||
13948 | ·····*·····In·order·to·reproject,·a·projection·transformation·function·for·the | ||
13949 | ·····*·····specified·projections·must·be·available.·This·support·may·be· | ||
13950 | ·····*·····provided·via·proj4js·or·via·a·custom·transformation·function.·See | ||
13951 | ·····*·····{<OpenLayers.Projection.addTransform>}·for·more·information·on | ||
13952 | ·····*·····custom·transformations. | ||
13953 | ·····*/ | 13949 | ·····*/ |
13954 | ···· | 13950 | ····sphericalMercator:·false, |
13955 | ····/** | 13951 | ····/** |
13956 | ·····*·APIProperty:·internalProjection | ||
13957 | ·····*·{<OpenLayers.Projection>}·When·passed·a·externalProjection·and | ||
13958 | ·····*·····internalProjection,·the·format·will·reproject·the·geometries·it | ||
13959 | ·····*·····reads·or·writes.·The·internalProjection·is·the·projection·used·by | ||
13960 | ·····*·····the·geometries·which·are·returned·by·read·or·which·are·passed·into | ||
13961 | ·····*·····write.··In·order·to·reproject,·a·projection·transformation·function | ||
13962 | ·····*·····for·the·specified·projections·must·be·available.·This·support·may·be | ||
13963 | ·····*·····provided·via·proj4js·or·via·a·custom·transformation·function.·See | ||
13964 | ·····*·····{<OpenLayers.Projection.addTransform>}·for·more·information·on | ||
13965 | ·····*· | 13952 | ·····*·APIProperty:·zoomOffset |
13953 | ·····*·{Number}·If·your·cache·has·more·zoom·levels·than·you·want·to·provide | ||
13954 | ·····*·····access·to·with·this·layer,·supply·a·zoomOffset.··This·zoom·offset | ||
13955 | ·····*·····is·added·to·the·current·map·zoom·level·to·determine·the·level | ||
13956 | ·····*·····for·a·requested·tile.··For·example,·if·you·supply·a·zoomOffset | ||
13957 | ·····*·····of·3,·when·the·map·is·at·the·zoom·0,·tiles·will·be·requested·from | ||
13958 | ·····*·····level·3·of·your·cache.··Default·is·0·(assumes·cache·level·and·map | ||
13959 | ·····*·····zoom·are·equivalent).··Using·<zoomOffset>·is·an·alternative·to | ||
13960 | ·····*·····setting·<serverResolutions>·if·you·only·want·to·expose·a·subset | ||
13961 | ·····*·····of·the·server·resolutions. | ||
13966 | ·····*/ | 13962 | ·····*/ |
13967 | ···· | 13963 | ····zoomOffset:·0, |
13968 | ····/** | 13964 | ····/** |
13969 | ·····*·APIProperty:·data | ||
13970 | ·····*·{Object}·When·<keepData>·is·true,·this·is·the·parsed·string·sent·to | ||
13971 | ·····*·· | 13965 | ·····*·APIProperty:·serverResolutions |
13966 | ·····*·{Array}·A·list·of·all·resolutions·available·on·the·server.··Only·set·this | ||
13967 | ·····*·····property·if·the·map·resolutions·differ·from·the·server.·This | ||
13968 | ·····*·····property·serves·two·purposes.·(a)·<serverResolutions>·can·include | ||
13969 | ·····*·····resolutions·that·the·server·supports·and·that·you·don't·want·to | ||
13970 | ·····*·····provide·with·this·layer;·you·can·also·look·at·<zoomOffset>,·which·is | ||
13971 | ·····*·····an·alternative·to·<serverResolutions>·for·that·specific·purpose. | ||
13972 | ·····*·····(b)·The·map·can·work·with·resolutions·that·aren't·supported·by | ||
13973 | ·····*·····the·server,·i.e.·that·aren't·in·<serverResolutions>.·When·the | ||
13974 | ·····*·····map·is·displayed·in·such·a·resolution·data·for·the·closest | ||
13975 | ·····*·····server-supported·resolution·is·loaded·and·the·layer·div·is | ||
13976 | ·····*·····stretched·as·necessary. | ||
13972 | ·····*/ | 13977 | ·····*/ |
13973 | ···· | 13978 | ····serverResolutions:·null, |
13974 | ····/** | 13979 | ····/** |
13975 | ·····*·APIProperty:·keepData | ||
13976 | ·····*·{Object}·Maintain·a·reference·(<data>)·to·the·most·recently·read·data. | ||
13977 | ·····*· | 13980 | ·····*·Constructor:·OpenLayers.Layer.XYZ |
13981 | ·····* | ||
13982 | ·····*·Parameters: | ||
13983 | ·····*·name·-·{String} | ||
13984 | ·····*·url·-·{String} | ||
13985 | ·····*·options·-·{Object}·Hashtable·of·extra·options·to·tag·onto·the·layer | ||
13978 | ·····*/ | 13986 | ·····*/ |
13979 | ···· | 13987 | ····initialize:·function(name,·url,·options)·{ |
13988 | ········if·(options·&&·options.sphericalMercator·||·this.sphericalMercator)·{ | ||
13989 | ············options·=·OpenLayers.Util.extend({ | ||
13990 | ················projection:·"EPSG:900913", | ||
13991 | ················numZoomLevels:·19 | ||
13992 | ············},·options); | ||
13993 | ········} | ||
13994 | ········OpenLayers.Layer.Grid.prototype.initialize.apply(this,·[ | ||
13995 | ············name·||·this.name,·url·||·this.url,·{}, | ||
13996 | ············options | ||
13997 | ········]); | ||
13998 | ····}, | ||
13980 | ····/** | 13999 | ····/** |
13981 | ·····*·Constructor:·OpenLayers.Format | ||
13982 | ·····*· | 14000 | ·····*·APIMethod:·clone |
14001 | ·····*·Create·a·clone·of·this·layer | ||
13983 | ·····* | 14002 | ·····* |
13984 | ·····*·Parameters: | 14003 | ·····*·Parameters: |
14004 | ·····*·obj·-·{Object}·Is·this·ever·used? | ||
Max diff block lines reached; 605735/612105 bytes (98.96%) of diff not shown. |
Offset 5452, 183 lines modified | Offset 5452, 369 lines modified | ||
5452 | ········this.tileQueue·=·null; | 5452 | ········this.tileQueue·=·null; |
5453 | ········this.tileQueueId·=·null; | 5453 | ········this.tileQueueId·=·null; |
5454 | ········this.tileCache·=·null; | 5454 | ········this.tileCache·=·null; |
5455 | ········this.tileCacheIndex·=·null; | 5455 | ········this.tileCacheIndex·=·null; |
5456 | ········this._destroyed·=·true | 5456 | ········this._destroyed·=·true |
5457 | ····} | 5457 | ····} |
5458 | }); | 5458 | }); |
5459 | OpenLayers.Layer.XYZ·=·OpenLayers.Class(OpenLayers.Layer.Grid,·{ | ||
5460 | ····isBaseLayer:·true, | ||
5461 | ····sphericalMercator:·false, | ||
5462 | ····zoomOffset:·0, | ||
5463 | ····serverResolutions:·null, | ||
5459 | OpenLayers.Format·=·OpenLayers.Class({ | ||
5460 | ····options:·null, | ||
5461 | ····externalProjection:·null, | ||
5462 | ····internalProjection:·null, | ||
5463 | ····data:·null, | ||
5464 | ····keepData:·false, | ||
5465 | ····initialize:·function(options)·{ | 5464 | ····initialize:·function(name,·url,·options)·{ |
5466 | ········OpenLayers.Util.extend(this,·options); | ||
5467 | ········ | 5465 | ········if·(options·&&·options.sphericalMercator·||·this.sphericalMercator)·{ |
5466 | ············options·=·OpenLayers.Util.extend({ | ||
5467 | ················projection:·"EPSG:900913", | ||
5468 | ················numZoomLevels:·19 | ||
5469 | ············},·options) | ||
5470 | ········} | ||
5471 | ········OpenLayers.Layer.Grid.prototype.initialize.apply(this,·[name·||·this.name,·url·||·this.url,·{},·options]) | ||
5468 | ····}, | 5472 | ····}, |
5469 | ····destroy:·function()·{}, | ||
5470 | ····read:·function(data)·{ | ||
5471 | ···· | 5473 | ····clone:·function(obj)·{ |
5474 | ········if·(obj·==·null)·{ | ||
5475 | ············obj·=·new·OpenLayers.Layer.XYZ(this.name,·this.url,·this.getOptions()) | ||
5476 | ········} | ||
5477 | ········obj·=·OpenLayers.Layer.Grid.prototype.clone.apply(this,·[obj]); | ||
5478 | ········return·obj | ||
5472 | ····}, | 5479 | ····}, |
5473 | ····write:·function(object)·{ | ||
5474 | ···· | 5480 | ····getURL:·function(bounds)·{ |
5481 | ········var·xyz·=·this.getXYZ(bounds); | ||
5482 | ········var·url·=·this.url; | ||
5483 | ········if·(OpenLayers.Util.isArray(url))·{ | ||
5484 | ············var·s·=·""·+·xyz.x·+·xyz.y·+·xyz.z; | ||
5485 | ············url·=·this.selectUrl(s,·url) | ||
5486 | ········} | ||
5487 | ········return·OpenLayers.String.format(url,·xyz) | ||
5475 | ····}, | 5488 | ····}, |
5489 | ····getXYZ:·function(bounds)·{ | ||
5490 | ········var·res·=·this.getServerResolution(); | ||
5491 | ········var·x·=·Math.round((bounds.left·-·this.maxExtent.left)·/·(res·*·this.tileSize.w)); | ||
5492 | ········var·y·=·Math.round((this.maxExtent.top·-·bounds.top)·/·(res·*·this.tileSize.h)); | ||
5493 | ········var·z·=·this.getServerZoom(); | ||
5476 | ····CLASS_NAME:·"OpenLayers.Format" | ||
5477 | }); | ||
5478 | OpenLayers.Format.JSON·=·OpenLayers.Class(OpenLayers.Format,·{ | ||
5479 | ····indent:·"····", | ||
5480 | ····space:·"·", | ||
5481 | ····newline:·"\n", | ||
5482 | ····level:·0, | ||
5483 | ····pretty:·false, | ||
5484 | ····nativeJSON:·function()·{ | ||
5485 | ········return·!!(window.JSON·&&·typeof·JSON.parse·==·"function"·&&·typeof·JSON.stringify·==·"function") | ||
5486 | ····}(), | ||
5487 | ····read:·function(json,·filter)·{ | ||
5488 | ········var·object; | ||
5489 | ········if·(this. | 5494 | ········if·(this.wrapDateLine)·{ |
5495 | ············var·limit·=·Math.pow(2,·z); | ||
5496 | ············x·=·(x·%·limit·+·limit)·%·limit | ||
5497 | ········} | ||
5498 | ········return·{ | ||
5490 | ············object·=·JSON.parse(json,·filter) | ||
5491 | ········}·else·try·{ | ||
5492 | ············if·(/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g,·"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,·"]").replace(/(?:^|:|,)(?:\s*\[)+/g,·"")))·{ | ||
5493 | ················object·=·eval("("·+·json·+·")"); | ||
5494 | ················if·(typeof·filter·===·"function")·{ | ||
5495 | ····················function·walk(k,·v)·{ | ||
5496 | ························if·(v·&&·typeof·v·===·"object")·{ | ||
5497 | ····························for·(var·i·in·v)·{ | ||
5498 | ································if·(v.hasOwnProperty(i))·{ | ||
5499 | ····································v[i]·=·walk(i,·v[i]) | ||
5500 | ································} | ||
5501 | ····························} | ||
5502 | ························} | ||
5503 | ························return·filter(k,·v) | ||
5504 | ····················} | ||
5505 | ····················object·=·walk("",·object) | ||
5506 | ············ | 5499 | ············x:·x, |
5500 | ············y:·y, | ||
5507 | ············ | 5501 | ············z:·z |
5508 | ········}·catch·(e)·{} | ||
5509 | ········if·(this.keepData)·{ | ||
5510 | ············this.data·=·object | ||
5511 | ········} | 5502 | ········} |
5512 | ········return·object | ||
5513 | ····}, | 5503 | ····}, |
5504 | ····setMap:·function(map)·{ | ||
5505 | ········OpenLayers.Layer.Grid.prototype.setMap.apply(this,·arguments); | ||
5506 | ········if·(!this.tileOrigin)·{ | ||
5507 | ············this.tileOrigin·=·new·OpenLayers.LonLat(this.maxExtent.left,·this.maxExtent.bottom) | ||
5514 | ····write:·function(value,·pretty)·{ | ||
5515 | ········this.pretty·=·!!pretty; | ||
5516 | ········var·json·=·null; | ||
5517 | ········var·type·=·typeof·value; | ||
5518 | ········if·(this.serialize[type])·{ | ||
5519 | ············try·{ | ||
5520 | ················json·=·!this.pretty·&&·this.nativeJSON·?·JSON.stringify(value)·:·this.serialize[type].apply(this,·[value]) | ||
5521 | ············}·catch·(err)·{ | ||
5522 | ················OpenLayers.Console.error("Trouble·serializing:·"·+·err) | ||
5523 | ············} | ||
5524 | ········} | 5508 | ········} |
5525 | ········return·json | ||
5526 | ····}, | 5509 | ····}, |
5527 | ····writeIndent:·function()·{ | ||
5528 | ········var·pieces·=·[]; | ||
5529 | ········if·(this.pretty)·{ | ||
5530 | ············for·(var·i·=·0;·i·<·this.level;·++i)·{ | ||
5531 | ················pieces.push(this.indent) | ||
5532 | ····· | 5510 | ····CLASS_NAME:·"OpenLayers.Layer.XYZ" |
5511 | }); | ||
5512 | OpenLayers.Layer.OSM·=·OpenLayers.Class(OpenLayers.Layer.XYZ,·{ | ||
5513 | ····name:·"OpenStreetMap", | ||
5514 | ····url:·["http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",·"http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",·"http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"], | ||
5515 | ····attribution:·"©·<a·href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>·contributors", | ||
5516 | ····sphericalMercator:·true, | ||
5517 | ····wrapDateLine:·true, | ||
5518 | ····tileOptions:·null, | ||
5519 | ····initialize:·function(name,·url,·options)·{ | ||
Max diff block lines reached; 288497/294084 bytes (98.10%) of diff not shown. |
Offset 33176, 14 lines modified | Offset 33176, 1903 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/Kinetic.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 | ·*·@requires·OpenLayers/Animation.js | ||
33191 | ·*/ | ||
33192 | OpenLayers.Kinetic·=·OpenLayers.Class({ | ||
33193 | ····/** | ||
33194 | ·····*·Property:·threshold | ||
33195 | ·····*·In·most·cases·changing·the·threshold·isn't·needed. | ||
33196 | ·····*·In·px/ms,·default·to·0. | ||
33197 | ·····*/ | ||
33198 | ····threshold:·0, | ||
33199 | ····/** | ||
33200 | ·····*·Property:·deceleration | ||
33201 | ·····*·{Float}·the·deseleration·in·px/ms²,·default·to·0.0035. | ||
33202 | ·····*/ | ||
33203 | ····deceleration:·0.0035, | ||
33204 | ····/** | ||
33205 | ·····*·Property:·nbPoints | ||
33206 | ·····*·{Integer}·the·number·of·points·we·use·to·calculate·the·kinetic | ||
33207 | ·····*·initial·values. | ||
33208 | ·····*/ | ||
33209 | ····nbPoints:·100, | ||
33210 | ····/** | ||
33211 | ·····*·Property:·delay | ||
33212 | ·····*·{Float}·time·to·consider·to·calculate·the·kinetic·initial·values. | ||
33213 | ·····*·In·ms,·default·to·200. | ||
33214 | ·····*/ | ||
33215 | ····delay:·200, | ||
33216 | ····/** | ||
33217 | ·····*·Property:·points | ||
33218 | ·····*·List·of·points·use·to·calculate·the·kinetic·initial·values. | ||
33219 | ·····*/ | ||
33220 | ····points:·undefined, | ||
33221 | ····/** | ||
33222 | ·····*·Property:·timerId | ||
33223 | ·····*·ID·of·the·timer. | ||
33224 | ·····*/ | ||
33225 | ····timerId:·undefined, | ||
33226 | ····/** | ||
33227 | ·····*·Constructor:·OpenLayers.Kinetic | ||
33228 | ·····* | ||
33229 | ·····*·Parameters: | ||
33230 | ·····*·options·-·{Object} | ||
33231 | ·····*/ | ||
33232 | ····initialize:·function(options)·{ | ||
33233 | ········OpenLayers.Util.extend(this,·options); | ||
33234 | ····}, | ||
33235 | ····/** | ||
33236 | ·····*·Method:·begin | ||
33237 | ·····*·Begins·the·dragging. | ||
33238 | ·····*/ | ||
33239 | ····begin:·function()·{ | ||
33240 | ········OpenLayers.Animation.stop(this.timerId); | ||
33241 | ········this.timerId·=·undefined; | ||
33242 | ········this.points·=·[]; | ||
33243 | ····}, | ||
33244 | ····/** | ||
33245 | ·····*·Method:·update | ||
33246 | ·····*·Updates·during·the·dragging. | ||
33247 | ·····* | ||
33248 | ·····*·Parameters: | ||
33249 | ·····*·xy·-·{<OpenLayers.Pixel>}·The·new·position. | ||
33250 | ·····*/ | ||
33251 | ····update:·function(xy)·{ | ||
33252 | ········this.points.unshift({ | ||
33253 | ············xy:·xy, | ||
33254 | ············tick:·new·Date().getTime() | ||
33255 | ········}); | ||
33256 | ········if·(this.points.length·>·this.nbPoints)·{ | ||
33257 | ············this.points.pop(); | ||
33258 | ········} | ||
33259 | ····}, | ||
33260 | ····/** | ||
33261 | ·····*·Method:·end | ||
33262 | ·····*·Ends·the·dragging,·start·the·kinetic. | ||
33263 | ·····* | ||
33264 | ·····*·Parameters: | ||
33265 | ·····*·xy·-·{<OpenLayers.Pixel>}·The·last·position. | ||
33266 | ·····* | ||
33267 | ·····*·Returns: | ||
33268 | ·····*·{Object}·An·object·with·two·properties:·"speed",·and·"theta".·The | ||
33269 | ·····*·····"speed"·and·"theta"·values·are·to·be·passed·to·the·move· | ||
33270 | ·····*·····function·when·starting·the·animation. | ||
33271 | ·····*/ | ||
33272 | ····end:·function(xy)·{ | ||
33273 | ········var·last,·now·=·new·Date().getTime(); | ||
33274 | ········for·(var·i·=·0,·l·=·this.points.length,·point;·i·<·l;·i++)·{ | ||
33275 | ············point·=·this.points[i]; | ||
33276 | ············if·(now·-·point.tick·>·this.delay)·{ | ||
33277 | ················break; | ||
33278 | ············} | ||
33279 | ············last·=·point; | ||
33280 | ········} | ||
33281 | ········if·(!last)·{ | ||
33282 | ············return; | ||
33283 | ········} | ||
33284 | ········var·time·=·new·Date().getTime()·-·last.tick; | ||
33285 | ········var·dist·=·Math.sqrt(Math.pow(xy.x·-·last.xy.x,·2)·+ | ||
33286 | ············Math.pow(xy.y·-·last.xy.y,·2)); | ||
33287 | ········var·speed·=·dist·/·time; | ||
33288 | ········if·(speed·==·0·||·speed·<·this.threshold)·{ | ||
Max diff block lines reached; 2681602/2738825 bytes (97.91%) of diff not shown. |
Offset 13318, 14 lines modified | Offset 13318, 718 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.Kinetic·=·OpenLayers.Class({ | ||
13326 | ····threshold:·0, | ||
13327 | ····deceleration:·.0035, | ||
13328 | ····nbPoints:·100, | ||
13329 | ····delay:·200, | ||
13330 | ····points:·undefined, | ||
13331 | ····timerId:·undefined, | ||
13332 | ····initialize:·function(options)·{ | ||
13333 | ········OpenLayers.Util.extend(this,·options) | ||
13334 | ····}, | ||
13335 | ····begin:·function()·{ | ||
13336 | ········OpenLayers.Animation.stop(this.timerId); | ||
13337 | ········this.timerId·=·undefined; | ||
13338 | ········this.points·=·[] | ||
13339 | ····}, | ||
13340 | ····update:·function(xy)·{ | ||
13341 | ········this.points.unshift({ | ||
13342 | ············xy:·xy, | ||
13343 | ············tick:·(new·Date).getTime() | ||
13344 | ········}); | ||
13345 | ········if·(this.points.length·>·this.nbPoints)·{ | ||
13346 | ············this.points.pop() | ||
13347 | ········} | ||
13348 | ····}, | ||
13349 | ····end:·function(xy)·{ | ||
13350 | ········var·last,·now·=·(new·Date).getTime(); | ||
13351 | ········for·(var·i·=·0,·l·=·this.points.length,·point;·i·<·l;·i++)·{ | ||
13352 | ············point·=·this.points[i]; | ||
13353 | ············if·(now·-·point.tick·>·this.delay)·{ | ||
13354 | ················break | ||
13355 | ············} | ||
13356 | ············last·=·point | ||
13357 | ········} | ||
13358 | ········if·(!last)·{ | ||
13359 | ············return | ||
13360 | ········} | ||
13361 | ········var·time·=·(new·Date).getTime()·-·last.tick; | ||
13362 | ········var·dist·=·Math.sqrt(Math.pow(xy.x·-·last.xy.x,·2)·+·Math.pow(xy.y·-·last.xy.y,·2)); | ||
13363 | ········var·speed·=·dist·/·time; | ||
13364 | ········if·(speed·==·0·||·speed·<·this.threshold)·{ | ||
13365 | ············return | ||
13366 | ········} | ||
13367 | ········var·theta·=·Math.asin((xy.y·-·last.xy.y)·/·dist); | ||
13368 | ········if·(last.xy.x·<=·xy.x)·{ | ||
13369 | ············theta·=·Math.PI·-·theta | ||
13370 | ········} | ||
13371 | ········return·{ | ||
13372 | ············speed:·speed, | ||
13373 | ············theta:·theta | ||
13374 | ········} | ||
13375 | ····}, | ||
13376 | ····move:·function(info,·callback)·{ | ||
13377 | ········var·v0·=·info.speed; | ||
13378 | ········var·fx·=·Math.cos(info.theta); | ||
13379 | ········var·fy·=·-Math.sin(info.theta); | ||
13380 | ········var·initialTime·=·(new·Date).getTime(); | ||
13381 | ········var·lastX·=·0; | ||
13382 | ········var·lastY·=·0; | ||
13383 | ········var·timerCallback·=·function()·{ | ||
13384 | ············if·(this.timerId·==·null)·{ | ||
13385 | ················return | ||
13386 | ············} | ||
13387 | ············var·t·=·(new·Date).getTime()·-·initialTime; | ||
13388 | ············var·p·=·-this.deceleration·*·Math.pow(t,·2)·/·2·+·v0·*·t; | ||
13389 | ············var·x·=·p·*·fx; | ||
13390 | ············var·y·=·p·*·fy; | ||
13391 | ············var·args·=·{}; | ||
13392 | ············args.end·=·false; | ||
13393 | ············var·v·=·-this.deceleration·*·t·+·v0; | ||
13394 | ············if·(v·<=·0)·{ | ||
13395 | ················OpenLayers.Animation.stop(this.timerId); | ||
13396 | ················this.timerId·=·null; | ||
13397 | ················args.end·=·true | ||
13398 | ············} | ||
13399 | ············args.x·=·x·-·lastX; | ||
13400 | ············args.y·=·y·-·lastY; | ||
13401 | ············lastX·=·x; | ||
13402 | ············lastY·=·y; | ||
13403 | ············callback(args.x,·args.y,·args.end) | ||
13404 | ········}; | ||
13405 | ········this.timerId·=·OpenLayers.Animation.start(OpenLayers.Function.bind(timerCallback,·this)) | ||
13406 | ····}, | ||
13407 | ····CLASS_NAME:·"OpenLayers.Kinetic" | ||
13408 | }); | ||
13409 | OpenLayers.Icon·=·OpenLayers.Class({ | ||
13410 | ····url:·null, | ||
13411 | ····size:·null, | ||
13412 | ····offset:·null, | ||
13413 | ····calculateOffset:·null, | ||
13414 | ····imageDiv:·null, | ||
13415 | ····px:·null, | ||
13416 | ····initialize:·function(url,·size,·offset,·calculateOffset)·{ | ||
13417 | ········this.url·=·url; | ||
13418 | ········this.size·=·size·||·{ | ||
13419 | ············w:·20, | ||
13420 | ············h:·20 | ||
13421 | ········}; | ||
13422 | ········this.offset·=·offset·||·{ | ||
13423 | ············x:·-(this.size.w·/·2), | ||
13424 | ············y:·-(this.size.h·/·2) | ||
13425 | ········}; | ||
13426 | ········this.calculateOffset·=·calculateOffset; | ||
13427 | ········var·id·=·OpenLayers.Util.createUniqueID("OL_Icon_"); | ||
13428 | ········this.imageDiv·=·OpenLayers.Util.createAlphaImageDiv(id) | ||
13429 | ····}, | ||
13430 | ····destroy:·function()·{ | ||
13431 | ········this.erase(); | ||
13432 | ········OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild); | ||
13433 | ········this.imageDiv.innerHTML·=·""; | ||
13434 | ········this.imageDiv·=·null | ||
13435 | ····}, | ||
13436 | ····clone:·function()·{ | ||
13437 | ········return·new·OpenLayers.Icon(this.url,·this.size,·this.offset,·this.calculateOffset) | ||
13438 | ····}, | ||
13439 | ····setSize:·function(size)·{ | ||
13440 | ········if·(size·!=·null)·{ | ||
13441 | ············this.size·=·size | ||
13442 | ········} | ||
13443 | ········this.draw() | ||
13444 | ····}, | ||
Max diff block lines reached; 1309693/1333070 bytes (98.25%) of diff not shown. |