r69022 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69021‎ | r69022 | r69023 >
Date:21:40, 4 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Re-adding OSM support based on work by toolserver guys (will maker follow up with all code soon)
Modified paths:
  • /trunk/extensions/Maps/Services/OSM (added) (history)
  • /trunk/extensions/Maps/Services/OSM/Maps_OSM.php (added) (history)
  • /trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php (added) (history)
  • /trunk/extensions/Maps/Services/OSM/OSM.php (added) (history)

Diff [purge]

Index: trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php
@@ -0,0 +1,30 @@
 2+<?php
 3+
 4+/**
 5+ * Class for handling the display_map parser function with OSM
 6+ *
 7+ * @file Maps_OSMDispMap.php
 8+ * @ingroup OSM
 9+ *
 10+ * @author Jeroen De Dauw
 11+ */
 12+
 13+if ( !defined( 'MEDIAWIKI' ) ) {
 14+ die( 'Not an entry point.' );
 15+}
 16+
 17+class MapsOSMDispMap extends MapsBaseMap {
 18+
 19+ protected function getDefaultZoom() {
 20+ global $egMapsOSMZoom;
 21+ return $egMapsOSMZoom;
 22+ }
 23+
 24+ /**
 25+ * @see MapsBaseMap::addSpecificMapHTML()
 26+ */
 27+ public function addSpecificMapHTML() {
 28+ // TODO
 29+ }
 30+
 31+}
\ No newline at end of file
Property changes on: trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php
___________________________________________________________________
Name: svn:eol-style
132 + native
Index: trunk/extensions/Maps/Services/OSM/Maps_OSM.php
@@ -0,0 +1,32 @@
 2+<?php
 3+
 4+/**
 5+ * File holding the MapsOSM class.
 6+ *
 7+ * @file Maps_OSM.php
 8+ * @ingroup OSM
 9+ *
 10+ * @author Jeroen De Dauw
 11+ */
 12+
 13+if ( !defined( 'MEDIAWIKI' ) ) {
 14+ die( 'Not an entry point.' );
 15+}
 16+
 17+/**
 18+ * TODO
 19+ *
 20+ * @ingroup OSM
 21+ *
 22+ * @author Jeroen De Dauw
 23+ */
 24+class MapsOpenLayers extends MapsMappingService {
 25+
 26+ function __construct() {
 27+ parent::__construct(
 28+ 'osm',
 29+ array( 'openstreetmap' )
 30+ );
 31+ }
 32+
 33+}
\ No newline at end of file
Property changes on: trunk/extensions/Maps/Services/OSM/Maps_OSM.php
___________________________________________________________________
Name: svn:eol-style
134 + native
Index: trunk/extensions/Maps/Services/OSM/OSM.php
@@ -0,0 +1,37 @@
 2+<?php
 3+
 4+/**
 5+ * This groupe contains all OSM related files of the Maps extension.
 6+ *
 7+ * @defgroup OSM OpenStreetMap
 8+ * @ingroup Maps
 9+ */
 10+
 11+/**
 12+ * This file holds the hook and initialization for the OSM service.
 13+ *
 14+ * @file OSM.php
 15+ * @ingroup OSM
 16+ *
 17+ * @author Jeroen De Dauw
 18+ */
 19+
 20+if ( !defined( 'MEDIAWIKI' ) ) {
 21+ die( 'Not an entry point.' );
 22+}
 23+
 24+$wgHooks['MappingServiceLoad'][] = 'efMapsInitOSM';
 25+
 26+function efMapsInitOSM() {
 27+ global $egMapsServices, $wgAutoloadClasses;
 28+
 29+ $wgAutoloadClasses['MapsOSM'] = dirname( __FILE__ ) . '/Maps_OSM.php';
 30+ $wgAutoloadClasses['MapsOSMDispMap'] = dirname( __FILE__ ) . '/Maps_OSMDispMap.php';
 31+
 32+ $osm = new MapsOSM();
 33+ $osm->addFeature( 'display_map', 'MapsOSMDispMap' );
 34+
 35+ $egMapsServices[$osm->getName()] = $osm;
 36+
 37+ return true;
 38+}
\ No newline at end of file
Property changes on: trunk/extensions/Maps/Services/OSM/OSM.php
___________________________________________________________________
Name: svn:eol-style
139 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r69028Changes for 0.6.4 - Follow up to r69022 - re-adding OSMjeroendedauw22:24, 4 July 2010

Status & tagging log