http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69028
Revision: 69028
Author: jeroendedauw
Date: 2010-07-04 22:24:11 +0000 (Sun, 04 Jul 2010)
Log Message:
-----------
Changes for 0.6.4 - Follow up to r69022 - re-adding OSM
Modified Paths:
--------------
trunk/extensions/Maps/Maps_Settings.php
trunk/extensions/Maps/Services/OSM/Maps_OSM.php
trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php
Modified: trunk/extensions/Maps/Maps_Settings.php
===================================================================
--- trunk/extensions/Maps/Maps_Settings.php 2010-07-04 22:11:20 UTC (rev
69027)
+++ trunk/extensions/Maps/Maps_Settings.php 2010-07-04 22:24:11 UTC (rev
69028)
@@ -65,14 +65,18 @@
# Yahoo! Maps API
include_once $egMapsDir . 'Services/YahooMaps/YahooMaps.php';
+
+ # Yahoo! Maps API
+ include_once $egMapsDir . 'Services/OSM/OSM.php';
# Array of String. Array containing all the mapping services that will
be made available to the user.
- # Currently Maps provides the following services: googlemaps,
yahoomaps, openlayers.
+ # Currently Maps provides the following services: googlemaps,
yahoomaps, openlayers, osm.
$egMapsAvailableServices = array(
'googlemaps2',
'googlemaps3',
'yahoomaps',
- 'openlayers'
+ 'openlayers',
+ 'osm'
);
# String. The default mapping service, which will be used when no
default
@@ -405,17 +409,17 @@
- # OpenStreetMap (OpenLayers optimized for OSM)
+ # OpenStreetMap
- /*
+ # Integer. The default zoom of a map. This value will only be
used when the
+ # user does not provide one.
+ $egMapsOSMZoom = 13;
+
# String. The OSM map name prefix. It can not be identical to
the one of
# another mapping service.
- $egMapsOSMPrefix = 'map_osm';
+ $egMapsOSMPrefix = 'map_osm';
- # Integer. The default zoom of a map. This value will only be
used when the
- # user does not provide one.
- $egMapsOSMZoom = 13;
-
+ /*
# Array of String. The default controls for OSM maps. This
value will only be
# used when the user does not provide one.
# Available values: layerswitcher, mouseposition, autopanzoom,
panzoom,
Modified: trunk/extensions/Maps/Services/OSM/Maps_OSM.php
===================================================================
--- trunk/extensions/Maps/Services/OSM/Maps_OSM.php 2010-07-04 22:11:20 UTC
(rev 69027)
+++ trunk/extensions/Maps/Services/OSM/Maps_OSM.php 2010-07-04 22:24:11 UTC
(rev 69028)
@@ -20,7 +20,7 @@
*
* @author Jeroen De Dauw
*/
-class MapsOpenLayers extends MapsMappingService {
+class MapsOSM extends MapsMappingService {
function __construct() {
parent::__construct(
Modified: trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php
===================================================================
--- trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php 2010-07-04
22:11:20 UTC (rev 69027)
+++ trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php 2010-07-04
22:24:11 UTC (rev 69028)
@@ -24,7 +24,20 @@
* @see MapsBaseMap::addSpecificMapHTML()
*/
public function addSpecificMapHTML() {
- // TODO
+ global $egMapsOSMPrefix, $egOSMOnThisPage;
+
+ $egOSMOnThisPage++;
+ $mapName = $egMapsOSMPrefix . '_' . $egOSMOnThisPage;
+
+ $this->output .= Html::element(
+ 'iframe',
+ array(
+ 'id' => $mapName,
+ 'style' => "width: $this->width; height:
$this->height; clear: both;",
+ 'src' =>
"http://toolserver.org/~kolossos/openlayers/kml-on-ol.php?zoom={$this->zoom}&lat={$this->centreLat}&lon={$this->centreLon}&lang=en"
+ ),
+ wfMsg( 'maps-loading-map' )
+ );
}
}
\ No newline at end of file
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs