r27507 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r27506‎ | r27507 | r27508 >
Date:23:48, 14 November 2007
Author:dschwen
Status:old
Tags:
Comment:
bugfixes, code cleanup, and documentation for the javascript part. check http://tools.wikimedia.de/~dschwen/wikiminiatlas/wma3.html for an updated working demo.
Modified paths:
  • /trunk/extensions/WikiMiniAtlas/wikiminiatlas.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiMiniAtlas/wikiminiatlas.js
@@ -38,177 +38,173 @@
3939 //
4040 function WikiMiniAtlas( obj )
4141 {
42 - // defaults
43 - this.coordinate_region = '';
44 - this.width = 500;
45 - this.height = 300;
 42+ if( obj == null ) { alert( 'Please pass a valid DOM object to the WikiMiniAtlas constructor!' ); return; }
4643
47 - // globals
48 - this.widget = null;
 44+ //
 45+ // global bookkeeping
 46+ //
4947 this.id = WMA_Global.max_id;
5048 WMA_Global.max_id++;
5149 WMA_Global.WMA[this.id] = this;
5250
53 - this.map = null;
54 - this.nx = 0;
55 - this.ny = 0;
56 - this.tile = 0;
57 -
 51+ // mouse wheel related stuff
5852 this.date = new Date();
5953 this.lastwheel = 0;
6054 this.wheeldelay = 1;
6155
 56+ // map display related stuff
6257 this.dragging = null;
 58+ this.nx = 0;
 59+ this.ny = 0;
6360 this.gx = 0;
6461 this.gy = 0;
 62+ this.refreshmap = null;
6563 this.zoom = 1;
6664 this.marker = { lat: 0.0, lon: 0.0, obj: null, locked: true };
67 - this.taget_button = null;
68 - this.settings = null;
69 - this.lang = '';
70 - this.site = '';
7165
 66+ // scalebar related stuff
7267 this.circ_eq = 40075.0; // equatorial circumfence in km
7368 this.scalelabel = null;
7469 this.scalebar = null;
7570
76 - this.tileset = 0;
 71+ this.width = obj.clientWidth;
 72+ this.height = obj.clientHeight;
7773
7874 //
79 - // Insert the map Widget into the page.
 75+ // gut the container widget of all its children
8076 //
81 - // do this when constructing the object
82 - // the obj parameter should be a div
83 - // which will be filled with a WMA
84 - // function wikiminiatlasInstall() {
85 - // jetzt obj
86 - //var coordinates = document.getElementById('wikiminiatlas_widget');
 77+ for( var i = 0; i < obj.childNodes.length; i++ )
 78+ obj.removeChild( obj.childNodes[i] );
8779
88 - if( obj != null && this.widget == null) {
89 - // vorher noch obj anpassen (padding weg)
90 - obj.style.padding = '0';
 80+ //
 81+ // add a new plain div which will contain all the subobjects of the map
 82+ //
 83+ this.widget = this.newElement( 'div', { style: { width: this.width, height: this.height, padding: '0px' } }, {} );
 84+ obj.appendChild( this.widget );
9185
92 - this.marker.lat = parseFloat( obj.getAttribute( 'wma_lat' ) || '0' );
93 - this.marker.lon = parseFloat( obj.getAttribute( 'wma_lon' ) || '0' );
94 - this.zoom = parseInt( obj.getAttribute( 'wma_zoom' ) || '1' );
95 - this.width = obj.clientWidth;
96 - this.height = obj.clientHeight;
97 - this.site = obj.getAttribute( 'wma_site' ) || 'en';
98 - this.lang = obj.getAttribute( 'wma_lang' ) || this.site;
 86+ this.marker.lat = parseFloat( obj.getAttribute( 'wma_lat' ) || '0' );
 87+ this.marker.lon = parseFloat( obj.getAttribute( 'wma_lon' ) || '0' );
 88+ this.zoom = parseInt( obj.getAttribute( 'wma_zoom' ) || '1' );
 89+ this.tileset = parseInt( obj.getAttribute( 'wma_tileset' ) || '0' );
 90+ this.site = obj.getAttribute( 'wma_site' ) || 'en';
 91+ this.lang = obj.getAttribute( 'wma_lang' ) || this.site;
 92+ this.coordinate_region = '';
9993
100 - this.widget = obj;
 94+ var WikiMiniAtlasHTML;
 95+ if( this.lang == 'co' || this.lang == 'commons' ) this.lang = 'en';
10196
102 - var WikiMiniAtlasHTML;
103 - if( this.lang == 'co' || this.lang == 'commons' ) this.lang = 'en';
 97+ //
 98+ // Fill missing i18n items
 99+ //
 100+ for( var item in this.strings )
 101+ if( !this.strings[item][this.lang] ) this.strings[item][this.lang] = this.strings[item]['en'];
104102
105 - // Fill missing i18n items
106 - for( var item in this.strings )
107 - if( !this.strings[item][this.lang] ) this.strings[item][this.lang] = this.strings[item]['en'];
 103+ //
 104+ // create UI elements
 105+ //
 106+ var button_plus = this.newElement( 'img',
 107+ {
 108+ src: this.imgbase + 'button_plus.png',
 109+ title: this.strings.zoomIn[this.lang],
 110+ style: { left: '10px', top: '10px', zIndex: '30', position: 'absolute', cursor: 'pointer' }
 111+ }, { mousedown: this.zoomIn } );
 112+ var button_minus = this.newElement( 'img',
 113+ {
 114+ src: this.imgbase + 'button_minus.png',
 115+ title: this.strings.zoomOut[this.lang],
 116+ style: { left: '10px', top: '32px', zIndex: '30', position: 'absolute', cursor: 'pointer' }
 117+ }, { mousedown: this.zoomOut } );
 118+ this.taget_button = this.newElement( 'img',
 119+ {
 120+ src: this.imgbase + 'button_target_locked.png',
 121+ title: this.strings.center[this.lang],
 122+ style: { left: '10px', top: '54px', zIndex: '30', position: 'absolute', cursor: 'pointer' }
 123+ }, { mousedown: this.moveToTarget } );
 124+ var button_menu = this.newElement( 'img',
 125+ {
 126+ src: this.imgbase + 'button_menu.png',
 127+ title: this.strings.settings[this.lang],
 128+ style: { right: '40px', top: '8px', width: '18px', zIndex: '50', position: 'absolute', cursor: 'pointer' }
 129+ }, { click: this.toggleSettings } );
 130+ var homepage_link = this.newElement( 'a',
 131+ {
 132+ href: 'http://meta.wikimedia.org/wiki/WikiMiniAtlas/' + this.lang,
 133+ target: '_top',
 134+ style: { zIndex: '11', position: 'absolute', right: '10px', bottom: '3px', color: 'black', fontSize: '5pt' }
 135+ }, {} );
 136+ homepage_link.appendChild( document.createTextNode( "WikiMiniAtlas" ) );
108137
109 - var button_plus = this.newElement( 'img',
110 - {
111 - src: this.imgbase + 'button_plus.png',
112 - title: this.strings.zoomIn[this.lang],
113 - style: { left: '10px', top: '10px', zIndex: '30', position: 'absolute', cursor: 'pointer' }
114 - }, { mousedown: this.zoomIn } );
 138+ //
 139+ // build scalebar
 140+ //
 141+ var scalebox = document.createElement( 'div' );
 142+ this.scalebar = document.createElement( 'div' );
 143+ this.scalelabel = document.createElement( 'div' );
 144+ this.scalelabel.appendChild( document.createTextNode( "null" ) );
 145+ scalebox.appendChild( this.scalebar );
 146+ scalebox.appendChild( this.scalelabel );
115147
116 - var button_minus = this.newElement( 'img',
117 - {
118 - src: this.imgbase + 'button_minus.png',
119 - title: this.strings.zoomOut[this.lang],
120 - style: { left: '10px', top: '32px', zIndex: '30', position: 'absolute', cursor: 'pointer' }
121 - }, { mousedown: this.zoomOut } );
 148+ WikiMiniAtlasHTML = '';
122149
123 - this.taget_button = this.newElement( 'img',
124 - {
125 - src: this.imgbase + 'button_target_locked.png',
126 - title: this.strings.center[this.lang],
127 - style: { left: '10px', top: '54px', zIndex: '30', position: 'absolute', cursor: 'pointer' }
128 - }, { mousedown: this.moveToTarget } );
 150+ // Settings page
 151+ WikiMiniAtlasHTML +=
 152+ '<div id="wikiminiatlas_settings">' +
 153+ '<h4>' + this.strings.settings[this.lang] + '</h4>' +
 154+ '<p class="option">' + this.strings.mode[this.lang] + ' <select onchange="WMA_Global.WMA['+this.id+'].selectTileset(this.value)">';
129155
130 - var button_menu = this.newElement( 'img',
131 - {
132 - src: this.imgbase + 'button_menu.png',
133 - title: this.strings.settings[this.lang],
134 - style: { right: '40px', top: '8px', width: '18px', zIndex: '50', position: 'absolute', cursor: 'pointer' }
135 - }, { click: this.toggleSettings } );
136 -
137 -
138 -
139 - var homepage_link = this.newElement( 'a',
140 - {
141 - href: 'http://meta.wikimedia.org/wiki/WikiMiniAtlas/' + this.lang,
142 - target: '_top',
143 - style: { zIndex: '11', position: 'absolute', right: '10px', bottom: '3px', color: 'black', fontSize: '5pt' }
144 - }, {} );
145 - homepage_link.appendChild( document.createTextNode( "WikiMiniAtlas" ) );
146 -
147 - var scalebox = document.createElement( 'div' );
148 - this.scalebar = document.createElement( 'div' );
149 - this.scalelabel = document.createElement( 'div' );
150 - this.scalelabel.appendChild( document.createTextNode( "null" ) );
151 - scalebox.appendChild( this.scalebar );
152 - scalebox.appendChild( this.scalelabel );
153 -
154 - WikiMiniAtlasHTML = '';
155 -
156 - // Settings page
157 - WikiMiniAtlasHTML +=
158 - '<div id="wikiminiatlas_settings">' +
159 - '<h4>' + this.strings.settings[this.lang] + '</h4>' +
160 - '<p class="option">' + this.strings.mode[this.lang] + ' <select onchange="wmaSelectTileset(this.value)">';
161 -
162 - for( var i = 0; i < this.tilesets.length; i++ )
163 - {
164 - WikiMiniAtlasHTML +=
165 - '<option value="'+i+'">' + this.tilesets[i].name + '</option>';
166 - }
167 -
 156+ for( var i = 0; i < this.tilesets.length; i++ )
 157+ {
168158 WikiMiniAtlasHTML +=
169 - '</select></p>' +
170 - '<p class="option">' + this.strings.labelSet[this.lang] + ' <select onchange="wmaLabelSet(this.value)">'
 159+ '<option value="'+i+'">' + this.tilesets[i].name + '</option>';
 160+ }
171161
172 - for( var i in this.sites )
173 - {
174 - WikiMiniAtlasHTML +=
175 - '<option value="'+i+'">' + this.sites[i] + '</option>';
176 - }
 162+ WikiMiniAtlasHTML +=
 163+ '</select></p>' +
 164+ '<p class="option">' + this.strings.labelSet[this.lang] + ' <select onchange="WMA_Global.WMA['+this.id+'].labelSet(this.value)">'
177165
 166+ for( var i in this.sites )
 167+ {
178168 WikiMiniAtlasHTML +=
179 - '</select></p>' +
180 - '<p class="option">' + this.strings.linkColor[this.lang] + ' <select onchange="wmaLinkColor(this.value)">' +
181 - '<option value="#2255aa">blue</option>' +
182 - '<option value="red">red</option>' +
183 - '<option value="white">white</option>' +
184 - '<option value="black">black</option></select></p>' +
185 - //'<p class="option" style="font-size: 50%; color:gray">Debug info:<br>marker: ' + this.marker.lat + ', ' + this.marker.lon + '<br>site:' + this.site+', uilang' + this.lang + '</p>' +
186 - '<a href="http://tools.wikimedia.de/"><img src="/images/wikimedia-toolserver-button.png" border="0"></a>' +
187 - '</div>' +
188 - '</div>';
 169+ '<option value="'+i+'">' + this.sites[i] + '</option>';
 170+ }
189171
190 - this.widget.style.clip = 'rect(0px,' + this.width + 'px,' + this.height + 'px,0px)';
191 - this.widget.style.position = 'absolute';
192 - this.widget.style.overflow = 'hidden';
 172+ WikiMiniAtlasHTML +=
 173+ '</select></p>' +
 174+ '<p class="option">' + this.strings.linkColor[this.lang] + ' <select onchange="WMA_Global.WMA['+this.id+'].linkColor(this.value)">' +
 175+ '<option value="#2255aa">blue</option>' +
 176+ '<option value="red">red</option>' +
 177+ '<option value="white">white</option>' +
 178+ '<option value="black">black</option></select></p>' +
 179+ //'<p class="option" style="font-size: 50%; color:gray">Debug info:<br>marker: ' + this.marker.lat + ', ' + this.marker.lon + '<br>site:' + this.site+', uilang' + this.lang + '</p>' +
 180+ '<a href="http://tools.wikimedia.de/"><img src="/images/wikimedia-toolserver-button.png" border="0"></a>' +
 181+ '</div>' +
 182+ '</div>';
193183
194 - this.widget.oncontextmenu = function() { return false; };
195 - this.widget.innerHTML = WikiMiniAtlasHTML ;
 184+ this.widget.style.clip = 'rect(0px,' + this.width + 'px,' + this.height + 'px,0px)';
 185+ this.widget.style.position = 'absolute';
 186+ this.widget.style.overflow = 'hidden';
196187
197 - this.widget.appendChild( button_minus );
198 - this.widget.appendChild( button_plus );
199 - this.widget.appendChild( button_menu );
200 - this.widget.appendChild( this.taget_button );
201 - this.widget.appendChild( homepage_link );
 188+ this.widget.oncontextmenu = function() { return false; };
 189+ this.widget.innerHTML = WikiMiniAtlasHTML ;
 190+ this.settings = document.getElementById( 'wikiminiatlas_settings' );
202191
203 - // register global events (just once!)
204 - if( this.id == 0 )
205 - {
206 - document.onmousemove = WMA_Global.mouseMoveHandler;
207 - document.onmouseup = WMA_Global.mouseUpHandler;
208 - }
 192+ this.widget.appendChild( button_minus );
 193+ this.widget.appendChild( button_plus );
 194+ this.widget.appendChild( button_menu );
 195+ this.widget.appendChild( this.taget_button );
 196+ this.widget.appendChild( homepage_link );
209197
210 - this.initializeMap();
211 - this.moveToTarget();
 198+ //
 199+ // register global events (just once!)
 200+ //
 201+ if( this.id == 0 )
 202+ {
 203+ document.onmousemove = WMA_Global.mouseMoveHandler;
 204+ document.onmouseup = WMA_Global.mouseUpHandler;
212205 }
 206+
 207+ this.initializeMap();
 208+ this.moveToTarget();
213209 }
214210
215211 //
@@ -333,7 +329,7 @@
334330 }
335331
336332 //
337 -// Set new map Position (to wikiminiatlas_gx, wikiminiatlas_gy)
 333+// Set new map Position (to gx, gy)
338334 //
339335 //function moveWikiMiniAtlasMapTo()
340336 WikiMiniAtlas.prototype.moveMapTo = function()
@@ -341,8 +337,21 @@
342338 if( this.gy < 0 ) this.gy = 0;
343339 if( this.gx < 0 ) this.gx += Math.floor( this.getZoomsize() * 256 );
344340
345 - var lx = Math.floor( this.gx / 128 ) % this.nx;
346 - var ly = Math.floor( this.gy / 128 ) % this.ny;
 341+ var lx = Math.floor( this.gx / 128 );
 342+ var ly = Math.floor( this.gy / 128 );
 343+ var refresh = true;
 344+
 345+ //
 346+ // speed up map movement by omitting unescessary tile refreshes
 347+ //
 348+ if( this.refreshmap != null && this.refreshmap.x == lx && this.refreshmap.y == ly )
 349+ refresh = false;
 350+ else
 351+ this.refreshmap = { x: lx, y: ly };
 352+
 353+ lx = lx % this.nx;
 354+ ly - ly % this.ny;
 355+
347356 var fx = this.gx % 128;
348357 var fy = this.gy % 128;
349358 var n;
@@ -362,37 +371,40 @@
363372 thistile.style.left = (i*128-fx) + 'px';
364373 thistile.style.top = (j*128-fy) + 'px';
365374
366 - //thistile.innerHTML = (Math.floor(wikiminiatlas_gx/128)+i)+','+(Math.floor(wikiminiatlas_gy/128)+j);
367 - tileurl = 'url("' +
368 - this.tilesets[ this.tileset ].getTileURL( (Math.floor( this.gy/128)+j), (Math.floor(this.gx/128)+i), this.zoom ) + '")';
369 - dataurl = this.getDataURL( ( Math.floor( this.gy/128 ) + j ), ( Math.floor( this.gx/128 ) + i ), this.zoom );
370 -
371 - if( WMA_Global.tile_URL[this.id][n] != tileurl )
 375+ if( refresh )
372376 {
373 - WMA_Global.tile_URL[this.id][n] = tileurl;
374 - thistile.style.backgroundImage = tileurl;
 377+ //thistile.innerHTML = (Math.floor(wikiminiatlas_gx/128)+i)+','+(Math.floor(wikiminiatlas_gy/128)+j);
 378+ tileurl = 'url("' +
 379+ this.tilesets[ this.tileset ].getTileURL( (Math.floor( this.gy/128)+j), (Math.floor(this.gx/128)+i), this.zoom ) + '")';
 380+ dataurl = this.getDataURL( ( Math.floor( this.gy/128 ) + j ), ( Math.floor( this.gx/128 ) + i ), this.zoom );
375381
376 - if( WMA_Global.XHR[this.id][n] &&
377 - ( WMA_Global.XHR[this.id][n].readyState == 1 ||
378 - WMA_Global.XHR[this.id][n].readyState == 2 ||
379 - WMA_Global.XHR[this.id][n].readyState == 3 ) )
 382+ if( WMA_Global.tile_URL[this.id][n] != tileurl )
380383 {
381 - WMA_Global.XHR[this.id][n].abort();
 384+ WMA_Global.tile_URL[this.id][n] = tileurl;
 385+ thistile.style.backgroundImage = tileurl;
 386+
 387+ if( WMA_Global.XHR[this.id][n] &&
 388+ ( WMA_Global.XHR[this.id][n].readyState == 1 ||
 389+ WMA_Global.XHR[this.id][n].readyState == 2 ||
 390+ WMA_Global.XHR[this.id][n].readyState == 3 ) )
 391+ {
 392+ WMA_Global.XHR[this.id][n].abort();
 393+ }
 394+
 395+ WMA_Global.XHR[this.id][n].open( "GET", dataurl, true );
 396+ thistile.innerHTML = 'loading';
 397+ WMA_Global.XHR[this.id][n].onreadystatechange = WMA_Global.XHR_callback[this.id][n];
 398+ WMA_Global.XHR[this.id][n].send( null );
382399 }
383 -
384 - WMA_Global.XHR[this.id][n].open( "GET", dataurl, true );
385 - thistile.innerHTML = 'loading';
386 - WMA_Global.XHR[this.id][n].onreadystatechange = WMA_Global.XHR_callback[this.id][n];
387 - WMA_Global.XHR[this.id][n].send( null );
388400 }
389401
390 - var newcoords = this.latLonToXY( this.marker.lat, this.marker.lon );
391 - var newx = ( newcoords.x - this.gx );
392 - if( newx < -100 ) newx += ( this.getZoomsize() * 256 );
393 - this.marker.obj.style.left = ( newx - 6 ) + 'px';
394 - this.marker.obj.style.top = ( newcoords.y - this.gy -6 ) + 'px';
395402 }
396403
 404+ var newcoords = this.latLonToXY( this.marker.lat, this.marker.lon );
 405+ var newx = ( newcoords.x - this.gx );
 406+ if( newx < -100 ) newx += ( this.getZoomsize() * 256 );
 407+ this.marker.obj.style.left = ( newx - 6 ) + 'px';
 408+ this.marker.obj.style.top = ( newcoords.y - this.gy -6 ) + 'px';
397409 }
398410
399411 //
@@ -590,6 +602,7 @@
591603
592604 me.gx = newcoords.x - me.width/2;
593605 me.gy = newcoords.y - me.height/2;
 606+ this.refreshmap = null;
594607 me.moveMapTo();
595608
596609 return false;
@@ -622,6 +635,7 @@
623636 var newcoords = me.latLonToXY( mapcenter.lat, mapcenter.lon );
624637 me.gx = newcoords.x - me.width/2;
625638 me.gy = newcoords.y - me.height/2;
 639+ this.refreshmap = null;
626640 me.moveMapTo();
627641
628642 return false;
@@ -644,7 +658,8 @@
645659 this.gy = newcoords.y - this.height/2;
646660 }
647661
648 - this.moveWikiMiniAtlasMapTo();
 662+ this.refreshmap = null;
 663+ this.moveMapTo();
649664 this.toggleSettings();
650665 }
651666
@@ -1121,7 +1136,7 @@
11221137 name: "Physical",
11231138 getTileURL: function(y,x,z)
11241139 {
1125 - return this.imgbase+'relief/'+z+'/'+y+'_'+( x % ( this.zoomsize[z] * 2 ) ) + '.png';
 1140+ return WikiMiniAtlas.prototype.imgbase + 'relief/' + z + '/' + y + '_' + ( x % ( this.zoomsize[z] * 2 ) ) + '.png';
11261141 },
11271142 linkcolor: "#2255aa",
11281143 zoomsize: [ 3, 6 ,12 ,24 ,48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304 ],
@@ -1132,7 +1147,7 @@
11331148 name: "Minimal basemap (coastlines)",
11341149 getTileURL: function(y,x,z)
11351150 {
1136 - return this.imgbase+'newzoom'+(z+1)+'/tile_'+y+'_'+(x % ( this.zoomsize[z] * 2 ) ) + '.png';
 1151+ return WikiMiniAtlas.prototype.imgbase + 'newzoom' + ( z + 1 ) + '/tile_' + y + '_' + ( x % ( this.zoomsize[z] * 2 ) ) + '.png';
11371152 },
11381153 linkcolor: "#2255aa",
11391154 zoomsize: [ 3, 6 ,12 ,24 ,48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304 ],
@@ -1146,7 +1161,7 @@
11471162 var x1 = x % ( this.zoomsize[z] * 2 );
11481163 if( x1<0 ) x1 += ( this.zoomsize[z] * 2 );
11491164
1150 - return imgbase + 'satellite/earth/'+z+'/'+y+'_'+x1+'.jpg';
 1165+ return WikiMiniAtlas.prototype.imgbase + 'satellite/earth/' + z + '/' + y + '_' + x1 + '.jpg';
11511166 },
11521167 linkcolor: "white",
11531168 zoomsize: [ 3, 6 ,12 ,24 ,48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304 ],
@@ -1157,7 +1172,8 @@
11581173 name: "Night on Earth",
11591174 getTileURL: function(y,x,z)
11601175 {
1161 - return imgbase+'nightonearth/'+z+'/'+y+'_'+(x % ( this.zoomsize[z] * 2 ) ) + '.png';
 1176+ return WikiMiniAtlas.prototype.imgbase +
 1177+ 'nightonearth/' + z + '/' + y + '_' + ( x % ( this.zoomsize[z] * 2 ) ) + '.png';
11621178 },
11631179 linkcolor: "#2255aa",
11641180 zoomsize: [ 3, 6 ,12 ,24 ,48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304 ],
@@ -1168,8 +1184,8 @@
11691185 name: "Daily aqua",
11701186 getTileURL: function(y,x,z)
11711187 {
1172 - return imgbase +
1173 - 'satellite/sat2.php?x='+(x % ( this.zoomsize[z] * 2 ) ) + '&y=' + y + '&z=' + z + '&l=0';
 1188+ return WikiMiniAtlas.prototype.imgbase +
 1189+ 'satellite/sat2.php?x=' + ( x % ( this.zoomsize[z] * 2 ) ) + '&y=' + y + '&z=' + z + '&l=0';
11741190 },
11751191 linkcolor: "#aa0000",
11761192 zoomsize: [ 3, 6 ,12 ,24 ,48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304 ],
@@ -1180,8 +1196,8 @@
11811197 name: "Daily terra",
11821198 getTileURL: function(y,x,z)
11831199 {
1184 - return imgbase +
1185 - 'satellite/sat2.php?x='+(x % ( this.zoomsize[z] * 2 ) )+'&y='+y+'&z='+z+'&l=1';
 1200+ return WikiMiniAtlas.prototype.imgbase +
 1201+ 'satellite/sat2.php?x=' + ( x % ( this.zoomsize[z] * 2 ) ) + '&y=' + y + '&z=' + z + '&l=1';
11861202 },
11871203 linkcolor: "#aa0000",
11881204 zoomsize: [ 3, 6 ,12 ,24 ,48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304 ],
@@ -1195,7 +1211,7 @@
11961212 var x1 = x % ( this.zoomsize[z] * 2 );
11971213 if( x1<0 ) x1+=( this.prototype.zoomsize[z] * 2 );
11981214
1199 - return imgbase + 'satellite/moon/'+z+'/'+y+'_'+x1+'.jpg';
 1215+ return WikiMiniAtlas.prototype.imgbase + 'satellite/moon/' + z + '/' + y + '_' + x1 + '.jpg';
12001216 },
12011217 linkcolor: "#aa0000",
12021218 zoomsize: [ 3, 6 ,12 ,24 ,48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304 ],

Status & tagging log