r69028 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69027‎ | r69028 | r69029 >
Date:22:24, 4 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.6.4 - Follow up to r69022 - re-adding OSM
Modified paths:
  • /trunk/extensions/Maps/Maps_Settings.php (modified) (history)
  • /trunk/extensions/Maps/Services/OSM/Maps_OSM.php (modified) (history)
  • /trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php
@@ -24,7 +24,20 @@
2525 * @see MapsBaseMap::addSpecificMapHTML()
2626 */
2727 public function addSpecificMapHTML() {
28 - // TODO
 28+ global $egMapsOSMPrefix, $egOSMOnThisPage;
 29+
 30+ $egOSMOnThisPage++;
 31+ $mapName = $egMapsOSMPrefix . '_' . $egOSMOnThisPage;
 32+
 33+ $this->output .= Html::element(
 34+ 'iframe',
 35+ array(
 36+ 'id' => $mapName,
 37+ 'style' => "width: $this->width; height: $this->height; clear: both;",
 38+ 'src' => "http://toolserver.org/~kolossos/openlayers/kml-on-ol.php?zoom={$this->zoom}&lat={$this->centreLat}&lon={$this->centreLon}&lang=en"
 39+ ),
 40+ wfMsg( 'maps-loading-map' )
 41+ );
2942 }
3043
3144 }
\ No newline at end of file
Index: trunk/extensions/Maps/Services/OSM/Maps_OSM.php
@@ -20,7 +20,7 @@
2121 *
2222 * @author Jeroen De Dauw
2323 */
24 -class MapsOpenLayers extends MapsMappingService {
 24+class MapsOSM extends MapsMappingService {
2525
2626 function __construct() {
2727 parent::__construct(
Index: trunk/extensions/Maps/Maps_Settings.php
@@ -65,14 +65,18 @@
6666
6767 # Yahoo! Maps API
6868 include_once $egMapsDir . 'Services/YahooMaps/YahooMaps.php';
 69+
 70+ # Yahoo! Maps API
 71+ include_once $egMapsDir . 'Services/OSM/OSM.php';
6972
7073 # Array of String. Array containing all the mapping services that will be made available to the user.
71 - # Currently Maps provides the following services: googlemaps, yahoomaps, openlayers.
 74+ # Currently Maps provides the following services: googlemaps, yahoomaps, openlayers, osm.
7275 $egMapsAvailableServices = array(
7376 'googlemaps2',
7477 'googlemaps3',
7578 'yahoomaps',
76 - 'openlayers'
 79+ 'openlayers',
 80+ 'osm'
7781 );
7882
7983 # String. The default mapping service, which will be used when no default
@@ -405,17 +409,17 @@
406410
407411
408412
409 - # OpenStreetMap (OpenLayers optimized for OSM)
 413+ # OpenStreetMap
410414
411 - /*
 415+ # Integer. The default zoom of a map. This value will only be used when the
 416+ # user does not provide one.
 417+ $egMapsOSMZoom = 13;
 418+
412419 # String. The OSM map name prefix. It can not be identical to the one of
413420 # another mapping service.
414 - $egMapsOSMPrefix = 'map_osm';
 421+ $egMapsOSMPrefix = 'map_osm';
415422
416 - # Integer. The default zoom of a map. This value will only be used when the
417 - # user does not provide one.
418 - $egMapsOSMZoom = 13;
419 -
 423+ /*
420424 # Array of String. The default controls for OSM maps. This value will only be
421425 # used when the user does not provide one.
422426 # Available values: layerswitcher, mouseposition, autopanzoom, panzoom,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r69022Re-adding OSM support based on work by toolserver guys (will maker follow up ...jeroendedauw21:40, 4 July 2010

Status & tagging log