Index: trunk/extensions/SlippyMap/SlippyMap.class.php |
— | — | @@ -265,8 +265,8 @@ |
266 | 266 | |
267 | 267 | <!-- This inline stylesheet defines how the two extra buttons look, and where they are positioned. --> |
268 | 268 | <style> .buttonsPanel div { float:left; display:block; position:relative; left:50px; margin-left:3px; margin-top:7px; width:36px; height:19px; }</style> |
269 | | -<style> .buttonsPanel .getWikiCodeButtonItemInactive { width:36px; height:19px; background-image:url('" . $wgScriptPath . "/extensions/SlippyMap/wikicode-button.png'); }</style> |
270 | | -<style> .buttonsPanel .resetButtonItemInactive { width:36px; height:19px; background-image:url('" . $wgScriptPath . "/extensions/SlippyMap/reset-button.png'); }</style> |
| 269 | +<style> .buttonsPanel .getWikiCodeButtonItemInactive { width:36px; height:19px; background-image:url('$wgScriptPath/extensions/SlippyMap/wikicode-button.png'); }</style> |
| 270 | +<style> .buttonsPanel .resetButtonItemInactive { width:36px; height:19px; background-image:url('$wgScriptPath/extensions/SlippyMap/reset-button.png'); }</style> |
271 | 271 | |
272 | 272 | <!-- bring in the OpenLayers javascript library --> |
273 | 273 | <script src="http://openlayers.org/api/OpenLayers.js"></script> |
— | — | @@ -286,11 +286,11 @@ |
287 | 287 | |
288 | 288 | addOnloadHook( slippymap_init ); |
289 | 289 | |
290 | | - function slippymap_resetPosition() { |
| 290 | + function slippymap_resetPosition${unique}() { |
291 | 291 | map${unique}.setCenter(lonLat${unique}, zoom${unique}); |
292 | 292 | } |
293 | 293 | |
294 | | - function slippymap_getWikicode() { |
| 294 | + function slippymap_getWikicode${unique}() { |
295 | 295 | LL = map${unique}.getCenter().transform(map${unique}.getProjectionObject(), new OpenLayers.Projection("EPSG:4326")); |
296 | 296 | Z = map${unique}.getZoom(); |
297 | 297 | size = map${unique}.getSize(); |
— | — | @@ -323,20 +323,20 @@ |
324 | 324 | |
325 | 325 | map${unique}.setCenter(lonLat${unique}, zoom${unique}); |
326 | 326 | |
327 | | - var getWikiCodeButton = new OpenLayers.Control.Button({ |
| 327 | + var getWikiCodeButton${unique} = new OpenLayers.Control.Button({ |
328 | 328 | title: "${slippymap_button_code}", |
329 | 329 | displayClass: "getWikiCodeButton", |
330 | | - trigger: slippymap_getWikicode |
| 330 | + trigger: slippymap_getWikicode${unique} |
331 | 331 | }); |
332 | 332 | |
333 | | - var resetButton = new OpenLayers.Control.Button({ |
| 333 | + var resetButton${unique} = new OpenLayers.Control.Button({ |
334 | 334 | title: "${slippymap_resetview}", |
335 | 335 | displayClass: "resetButton", |
336 | | - trigger: slippymap_resetPosition |
| 336 | + trigger: slippymap_resetPosition${unique} |
337 | 337 | }); |
338 | 338 | |
339 | 339 | var panel${unique} = new OpenLayers.Control.Panel( { displayClass: "buttonsPanel" } ); |
340 | | - panel${unique}.addControls([getWikiCodeButton, resetButton]); |
| 340 | + panel${unique}.addControls([getWikiCodeButton${unique}, resetButton${unique}]); |
341 | 341 | map${unique}.addControl(panel${unique}); |
342 | 342 | } |
343 | 343 | </script> |