Index: trunk/extensions/Maps/Services/OSM/Maps_OSMDispMap.php |
— | — | @@ -24,7 +24,20 @@ |
25 | 25 | * @see MapsBaseMap::addSpecificMapHTML() |
26 | 26 | */ |
27 | 27 | 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 | + ); |
29 | 42 | } |
30 | 43 | |
31 | 44 | } |
\ No newline at end of file |
Index: trunk/extensions/Maps/Services/OSM/Maps_OSM.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | * |
22 | 22 | * @author Jeroen De Dauw |
23 | 23 | */ |
24 | | -class MapsOpenLayers extends MapsMappingService { |
| 24 | +class MapsOSM extends MapsMappingService { |
25 | 25 | |
26 | 26 | function __construct() { |
27 | 27 | parent::__construct( |
Index: trunk/extensions/Maps/Maps_Settings.php |
— | — | @@ -65,14 +65,18 @@ |
66 | 66 | |
67 | 67 | # Yahoo! Maps API |
68 | 68 | include_once $egMapsDir . 'Services/YahooMaps/YahooMaps.php'; |
| 69 | + |
| 70 | + # Yahoo! Maps API |
| 71 | + include_once $egMapsDir . 'Services/OSM/OSM.php'; |
69 | 72 | |
70 | 73 | # 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. |
72 | 75 | $egMapsAvailableServices = array( |
73 | 76 | 'googlemaps2', |
74 | 77 | 'googlemaps3', |
75 | 78 | 'yahoomaps', |
76 | | - 'openlayers' |
| 79 | + 'openlayers', |
| 80 | + 'osm' |
77 | 81 | ); |
78 | 82 | |
79 | 83 | # String. The default mapping service, which will be used when no default |
— | — | @@ -405,17 +409,17 @@ |
406 | 410 | |
407 | 411 | |
408 | 412 | |
409 | | - # OpenStreetMap (OpenLayers optimized for OSM) |
| 413 | + # OpenStreetMap |
410 | 414 | |
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 | + |
412 | 419 | # String. The OSM map name prefix. It can not be identical to the one of |
413 | 420 | # another mapping service. |
414 | | - $egMapsOSMPrefix = 'map_osm'; |
| 421 | + $egMapsOSMPrefix = 'map_osm'; |
415 | 422 | |
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 | + /* |
420 | 424 | # Array of String. The default controls for OSM maps. This value will only be |
421 | 425 | # used when the user does not provide one. |
422 | 426 | # Available values: layerswitcher, mouseposition, autopanzoom, panzoom, |