Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/YahooMaps/SM_YahooMapsFunctions.js |
— | — | @@ -0,0 +1,54 @@ |
| 2 | + /** |
| 3 | + * Javascript functions for Yahoo! Maps functionality in Semantic Maps |
| 4 | + * |
| 5 | + * @file SM_YahooMapsFunctions.js |
| 6 | + * @ingroup SMYahooMaps |
| 7 | + * |
| 8 | + * @author Jeroen De Dauw |
| 9 | + */ |
| 10 | + |
| 11 | +/** |
| 12 | + * This function holds specific functionality for the Yahoo! Maps form input of Semantic Maps |
| 13 | + * TODO: Refactor as much code as possible to non specific functions |
| 14 | + */ |
| 15 | +function makeFormInputYahooMap(mapName, locationFieldName, lat, lon, zoom, type, types, controls, scrollWheelZoom, marker_lat, marker_lon) { |
| 16 | + var map = createYahooMap(document.getElementById(mapName), new YGeoPoint(lat, lon), zoom, type, types, controls, scrollWheelZoom, [getYMarkerData(marker_lat, marker_lon, '', '', '')]); |
| 17 | + |
| 18 | + // Show a starting marker only if marker coordinates are provided |
| 19 | + if (marker_lat != null && marker_lon != null) { |
| 20 | + map.addOverlay(createYMarker(new YGeoPoint(marker_lat, marker_lon))); |
| 21 | + } |
| 22 | + |
| 23 | + // Click event handler for updating the location of the marker |
| 24 | + YEvent.Capture(map, EventsList.MouseClick, |
| 25 | + function(_e, point) { |
| 26 | + var loc = new YGeoPoint(point.Lat, point.Lon) |
| 27 | + map.removeMarkersAll(); |
| 28 | + document.getElementById(locationFieldName).value = convertLatToDMS(point.Lat)+', '+convertLngToDMS(point.Lon); |
| 29 | + map.addMarker(loc); |
| 30 | + map.panToLatLon(loc); |
| 31 | + } |
| 32 | + ); |
| 33 | + |
| 34 | + // Make the map variable available for other functions |
| 35 | + if (!window.YMaps) window.YMaps = new Object; |
| 36 | + eval("window.YMaps." + mapName + " = map;"); |
| 37 | +} |
| 38 | + |
| 39 | +/** |
| 40 | + * This function holds specific functionality for the Yahoo! Maps form input of Semantic Maps |
| 41 | + * TODO: Refactor as much code as possible to non specific functions |
| 42 | + */ |
| 43 | +function showYAddress(address, mapName, outputElementName, notFoundFormat) { |
| 44 | + var map = YMaps[mapName]; |
| 45 | + |
| 46 | + map.removeMarkersAll(); |
| 47 | + map.drawZoomAndCenter(address); |
| 48 | + |
| 49 | + YEvent.Capture(map, EventsList.onEndGeoCode, |
| 50 | + function(resultObj) { |
| 51 | + map.addOverlay(new YMarker(resultObj.GeoPoint)); |
| 52 | + document.getElementById(outputElementName).value = convertLatToDMS(resultObj.GeoPoint.Lat) + ', ' + convertLngToDMS(resultObj.GeoPoint.Lon); |
| 53 | + } |
| 54 | + ); |
| 55 | +} |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/YahooMaps/SM_YahooMapsFunctions.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 56 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/YahooMaps/SM_YahooMaps.php |
— | — | @@ -0,0 +1,39 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * This groupe contains all Yahoo! Maps related files of the Semantic Maps extension. |
| 6 | + * |
| 7 | + * @defgroup SMYahooMaps Yahoo! Maps |
| 8 | + * @ingroup SemanticMaps |
| 9 | + */ |
| 10 | + |
| 11 | +/** |
| 12 | + * This file holds the general information for the Yahoo! Maps service. |
| 13 | + * |
| 14 | + * @file SM_YahooMaps.php |
| 15 | + * @ingroup SMYahooMaps |
| 16 | + * |
| 17 | + * @author Jeroen De Dauw |
| 18 | + */ |
| 19 | + |
| 20 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 21 | + die( 'Not an entry point.' ); |
| 22 | +} |
| 23 | + |
| 24 | +$wgHooks['MappingServiceLoad'][] = 'smfInitYahooMaps'; |
| 25 | + |
| 26 | +function smfInitYahooMaps() { |
| 27 | + global $egMapsServices, $wgAutoloadClasses; |
| 28 | + |
| 29 | + $wgAutoloadClasses['SMYahooMapsQP'] = dirname( __FILE__ ) . '/SM_YahooMapsQP.php'; |
| 30 | + |
| 31 | + // TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found. |
| 32 | + if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMYahooMapsFormInput'] = dirname( __FILE__ ) . '/SM_YahooMapsFormInput.php'; |
| 33 | + |
| 34 | + if ( array_key_exists( 'yahoomaps', $egMapsServices ) ) { |
| 35 | + $egMapsServices['yahoomaps']->addFeature( 'qp', 'SMYahooMapsQP' ); |
| 36 | + $egMapsServices['yahoomaps']->addFeature( 'fi', 'SMYahooMapsFormInput' ); |
| 37 | + } |
| 38 | + |
| 39 | + return true; |
| 40 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/YahooMaps/SM_YahooMaps.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 41 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/YahooMaps/SM_YahooMapsQP.php |
— | — | @@ -0,0 +1,96 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * A query printer for maps using the Yahoo Maps API |
| 5 | + * |
| 6 | + * @file SM_YahooMaps.php |
| 7 | + * @ingroup SMYahooMaps |
| 8 | + * |
| 9 | + * @author Jeroen De Dauw |
| 10 | + */ |
| 11 | + |
| 12 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 13 | + die( 'Not an entry point.' ); |
| 14 | +} |
| 15 | + |
| 16 | +final class SMYahooMapsQP extends SMMapPrinter { |
| 17 | + |
| 18 | + protected function getServiceName() { |
| 19 | + return 'yahoomaps'; |
| 20 | + } |
| 21 | + |
| 22 | + /** |
| 23 | + * @see SMMapPrinter::setQueryPrinterSettings() |
| 24 | + */ |
| 25 | + protected function setQueryPrinterSettings() { |
| 26 | + global $egMapsYahooMapsZoom, $egMapsYahooMapsPrefix; |
| 27 | + |
| 28 | + $this->defaultZoom = $egMapsYahooMapsZoom; |
| 29 | + } |
| 30 | + |
| 31 | + /** |
| 32 | + * @see SMMapPrinter::addSpecificMapHTML() |
| 33 | + */ |
| 34 | + protected function addSpecificMapHTML() { |
| 35 | + global $egMapsYahooMapsPrefix, $egYahooMapsOnThisPage; |
| 36 | + |
| 37 | + $egYahooMapsOnThisPage++; |
| 38 | + $mapName = $egMapsYahooMapsPrefix . '_' . $egYahooMapsOnThisPage; |
| 39 | + |
| 40 | + // TODO: refactor up like done in maps with display point |
| 41 | + $markerItems = array(); |
| 42 | + |
| 43 | + foreach ( $this->mLocations as $location ) { |
| 44 | + // Create a string containing the marker JS. |
| 45 | + list( $lat, $lon, $title, $label, $icon ) = $location; |
| 46 | + |
| 47 | + $markerItems[] = "getYMarkerData($lat, $lon, '$title', '$label', '$icon')"; |
| 48 | + } |
| 49 | + |
| 50 | + $markersString = implode( ',', $markerItems ); |
| 51 | + |
| 52 | + $this->output .= Html::element( |
| 53 | + 'div', |
| 54 | + array( |
| 55 | + 'id' => $mapName, |
| 56 | + 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;", |
| 57 | + ), |
| 58 | + wfMsg( 'maps-loading-map' ) |
| 59 | + ); |
| 60 | + |
| 61 | + $this->mService->addDependency( Html::inlineScript( <<<EOT |
| 62 | +addOnloadHook( |
| 63 | + function() { |
| 64 | + initializeYahooMap( |
| 65 | + '$mapName', |
| 66 | + $this->centreLat, |
| 67 | + $this->centreLon, |
| 68 | + $this->zoom, |
| 69 | + $this->type, |
| 70 | + [$this->types], |
| 71 | + [$this->controls], |
| 72 | + $this->autozoom, |
| 73 | + [$markersString] |
| 74 | + ); |
| 75 | + } |
| 76 | +); |
| 77 | +EOT |
| 78 | + ) ); |
| 79 | + } |
| 80 | + |
| 81 | + /** |
| 82 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the specific ones to the list. |
| 83 | + */ |
| 84 | + public function getParameters() { |
| 85 | + $params = parent::getParameters(); |
| 86 | + |
| 87 | + $allowedTypes = MapsYahooMaps::getTypeNames(); |
| 88 | + |
| 89 | + $params[] = array( 'name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_controls' ), 'values' => MapsYahooMaps::getControlNames() ); |
| 90 | + $params[] = array( 'name' => 'types', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_types' ), 'values' => $allowedTypes ); |
| 91 | + $params[] = array( 'name' => 'type', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_type' ), 'values' => $allowedTypes ); |
| 92 | + $params[] = array( 'name' => 'autozoom', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_autozoom' ), 'values' => array( 'on', 'off' ) ); |
| 93 | + |
| 94 | + return $params; |
| 95 | + } |
| 96 | + |
| 97 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/YahooMaps/SM_YahooMapsQP.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 98 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/YahooMaps/SM_YahooMapsFormInput.php |
— | — | @@ -0,0 +1,112 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | +* Form input hook that adds an Yahoo! Maps map format to Semantic Forms |
| 6 | + * |
| 7 | + * @file SM_YahooMapsFormInput.php |
| 8 | + * @ingroup SMYahooMaps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +final class SMYahooMapsFormInput extends SMFormInput { |
| 18 | + |
| 19 | + protected $specificParameters = array(); |
| 20 | + |
| 21 | + /** |
| 22 | + * @see MapsMapFeature::setMapSettings() |
| 23 | + */ |
| 24 | + protected function setMapSettings() { |
| 25 | + global $egMapsYahooMapsZoom, $egMapsYahooMapsPrefix; |
| 26 | + |
| 27 | + $this->elementNamePrefix = $egMapsYahooMapsPrefix; |
| 28 | + $this->showAddresFunction = 'showYAddress'; |
| 29 | + |
| 30 | + $this->earthZoom = 17; |
| 31 | + |
| 32 | + $this->defaultZoom = $egMapsYahooMapsZoom; |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * @see MapsMapFeature::addFormDependencies() |
| 37 | + */ |
| 38 | + protected function addFormDependencies() { |
| 39 | + global $wgOut; |
| 40 | + global $smgScriptPath, $smgYahooFormsOnThisPage, $smgStyleVersion, $egMapsJsExt; |
| 41 | + |
| 42 | + $this->mService->addDependencies( $wgOut ); |
| 43 | + |
| 44 | + if ( empty( $smgYahooFormsOnThisPage ) ) { |
| 45 | + $smgYahooFormsOnThisPage = 0; |
| 46 | + |
| 47 | + $wgOut->addScriptFile( "$smgScriptPath/Services/YahooMaps/SM_YahooMapsFunctions{$egMapsJsExt}?$smgStyleVersion" ); |
| 48 | + } |
| 49 | + } |
| 50 | + |
| 51 | + /** |
| 52 | + * @see MapsMapFeature::doMapServiceLoad() |
| 53 | + */ |
| 54 | + protected function doMapServiceLoad() { |
| 55 | + global $egYahooMapsOnThisPage, $smgYahooFormsOnThisPage, $egMapsYahooMapsPrefix; |
| 56 | + |
| 57 | + self::addFormDependencies(); |
| 58 | + |
| 59 | + $egYahooMapsOnThisPage++; |
| 60 | + $smgYahooFormsOnThisPage++; |
| 61 | + |
| 62 | + $this->elementNr = $egYahooMapsOnThisPage; |
| 63 | + $this->mapName = $egMapsYahooMapsPrefix . '_' . $egYahooMapsOnThisPage; |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * @see MapsMapFeature::addSpecificMapHTML() |
| 68 | + */ |
| 69 | + protected function addSpecificMapHTML() { |
| 70 | + global $wgOut; |
| 71 | + |
| 72 | + $this->output .= Html::element( |
| 73 | + 'div', |
| 74 | + array( |
| 75 | + 'id' => $this->mapName, |
| 76 | + 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;", |
| 77 | + ), |
| 78 | + wfMsg( 'maps-loading-map' ) |
| 79 | + ); |
| 80 | + |
| 81 | + $wgOut->addInlineScript( <<<EOT |
| 82 | +addOnloadHook( |
| 83 | + function() { |
| 84 | + makeFormInputYahooMap( |
| 85 | + '$this->mapName', |
| 86 | + '$this->coordsFieldName', |
| 87 | + $this->centreLat, |
| 88 | + $this->centreLon, |
| 89 | + $this->zoom, |
| 90 | + $this->type, |
| 91 | + [$this->types], |
| 92 | + [$this->controls], |
| 93 | + $this->autozoom, |
| 94 | + {$this->markerCoords['lat']}, |
| 95 | + {$this->markerCoords['lon']} |
| 96 | + ); |
| 97 | + } |
| 98 | +); |
| 99 | +EOT |
| 100 | + ); |
| 101 | + |
| 102 | + } |
| 103 | + |
| 104 | + /** |
| 105 | + * @see SMFormInput::manageGeocoding() |
| 106 | + */ |
| 107 | + protected function manageGeocoding() { |
| 108 | + global $egYahooMapsKey; |
| 109 | + $this->enableGeocoding = strlen( trim( $egYahooMapsKey ) ) > 0; |
| 110 | + if ( $this->enableGeocoding ) $this->mService->addDependencies( $this->output ); |
| 111 | + } |
| 112 | + |
| 113 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/YahooMaps/SM_YahooMapsFormInput.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 114 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/OpenLayers/SM_OpenLayersFunctions.js |
— | — | @@ -0,0 +1,98 @@ |
| 2 | + /** |
| 3 | + * Javascript functions for OpenLayers functionality in Semantic Maps |
| 4 | + * |
| 5 | + * @file SM_OpenLayersFunctions.js |
| 6 | + * @ingroup SMOpenLayers |
| 7 | + * |
| 8 | + * @author Jeroen De Dauw |
| 9 | + */ |
| 10 | + |
| 11 | +/** |
| 12 | + * This function holds specific functionality for the Open Layers form input of Semantic Maps |
| 13 | + */ |
| 14 | +function makeFormInputOpenLayer( mapName, locationFieldName, lat, lon, zoom, marker_lat, marker_lon, layers, controls, height, langCode ) { |
| 15 | + var markers = Array(); |
| 16 | + |
| 17 | + // Show a starting marker only if marker coordinates are provided |
| 18 | + if (marker_lat != null && marker_lon != null) { |
| 19 | + markers.push(getOLMarkerData(marker_lon, marker_lat, '', '', '')); |
| 20 | + } |
| 21 | + |
| 22 | + // Click event handler for updating the location of the marker |
| 23 | + // TODO / FIXME: This will probably cause problems when used for multiple maps on one page. |
| 24 | + OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { |
| 25 | + defaultHandlerOptions: { |
| 26 | + 'single': true, |
| 27 | + 'double': false, |
| 28 | + 'pixelTolerance': 0, |
| 29 | + 'stopSingle': false, |
| 30 | + 'stopDouble': false |
| 31 | + }, |
| 32 | + |
| 33 | + initialize: function(options) { |
| 34 | + this.handlerOptions = OpenLayers.Util.extend( |
| 35 | + {}, this.defaultHandlerOptions |
| 36 | + ); |
| 37 | + OpenLayers.Control.prototype.initialize.apply( |
| 38 | + this, arguments |
| 39 | + ); |
| 40 | + this.handler = new OpenLayers.Handler.Click( |
| 41 | + this, { |
| 42 | + 'click': this.trigger |
| 43 | + }, this.handlerOptions |
| 44 | + ); |
| 45 | + }, |
| 46 | + |
| 47 | + trigger: function(e) { |
| 48 | + var lonlat = map.getLonLatFromViewPortPx(e.xy); |
| 49 | + |
| 50 | + replaceMarker(mapName, lonlat); |
| 51 | + |
| 52 | + var proj = new OpenLayers.Projection("EPSG:4326"); |
| 53 | + lonlat.transform(map.getProjectionObject(), proj); |
| 54 | + |
| 55 | + document.getElementById(locationFieldName).value = convertLatToDMS(lonlat.lat)+', '+convertLngToDMS(lonlat.lon); |
| 56 | + } |
| 57 | + |
| 58 | + }); |
| 59 | + |
| 60 | + var clickHanler = new OpenLayers.Control.Click(); |
| 61 | + controls.push(clickHanler); |
| 62 | + |
| 63 | + var map = initOpenLayer( mapName, lon, lat, zoom, layers, controls, markers, height, langCode ); |
| 64 | + |
| 65 | + // Make the map variable available for other functions |
| 66 | + if (!window.OLMaps) window.OLMaps = new Object; |
| 67 | + eval("window.OLMaps." + mapName + " = map;"); |
| 68 | +} |
| 69 | + |
| 70 | +/** |
| 71 | + * Remove all markers from an OL map (that's in window.OLMaps), and place a new one. |
| 72 | + * |
| 73 | + * @param mapName Name of the map as in OLMaps[mapName]. |
| 74 | + * @param newLocation The location for the new marker. |
| 75 | + * @return |
| 76 | + */ |
| 77 | +function replaceMarker(mapName, newLocation) { |
| 78 | + var map = OLMaps[mapName]; |
| 79 | + var markerLayer = map.getLayer('markerLayer'); |
| 80 | + |
| 81 | + removeMarkers(markerLayer); |
| 82 | + markerLayer.addMarker(getOLMarker(markerLayer, getOLMarkerData(newLocation.lon, newLocation.lat, '', '', ''), map.getProjectionObject())); |
| 83 | + |
| 84 | + map.panTo(newLocation); |
| 85 | +} |
| 86 | + |
| 87 | +/** |
| 88 | + * Removes all markers from a marker layer. |
| 89 | + * |
| 90 | + * @param markerLayer The layer to remove all markers from. |
| 91 | + * @return |
| 92 | + */ |
| 93 | +function removeMarkers(markerLayer) { |
| 94 | + var markerCollection = markerLayer.markers; |
| 95 | + |
| 96 | + for (var i = 0; i < markerCollection.length; i++) { |
| 97 | + markerLayer.removeMarker(markerCollection[i]); |
| 98 | + } |
| 99 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/OpenLayers/SM_OpenLayersFunctions.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 100 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/OpenLayers/SM_OpenLayers.php |
— | — | @@ -0,0 +1,39 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * This groupe contains all OpenLayers related files of the Semantic Maps extension. |
| 6 | + * |
| 7 | + * @defgroup SMOpenLayers OpenLayers |
| 8 | + * @ingroup SemanticMaps |
| 9 | + */ |
| 10 | + |
| 11 | +/** |
| 12 | + * This file holds the general information for the OpenLayers service. |
| 13 | + * |
| 14 | + * @file SM_OpenLayers.php |
| 15 | + * @ingroup SMOpenLayers |
| 16 | + * |
| 17 | + * @author Jeroen De Dauw |
| 18 | + */ |
| 19 | + |
| 20 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 21 | + die( 'Not an entry point.' ); |
| 22 | +} |
| 23 | + |
| 24 | +$wgHooks['MappingServiceLoad'][] = 'smfInitOpenLayers'; |
| 25 | + |
| 26 | +function smfInitOpenLayers() { |
| 27 | + global $egMapsServices, $wgAutoloadClasses; |
| 28 | + |
| 29 | + $wgAutoloadClasses['SMOpenLayersQP'] = dirname( __FILE__ ) . '/SM_OpenLayersQP.php'; |
| 30 | + |
| 31 | + // TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found. |
| 32 | + if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMOpenLayersFormInput'] = dirname( __FILE__ ) . '/SM_OpenLayersFormInput.php'; |
| 33 | + |
| 34 | + if ( array_key_exists( 'openlayers', $egMapsServices ) ) { |
| 35 | + $egMapsServices['openlayers']->addFeature( 'qp', 'SMOpenLayersQP' ); |
| 36 | + $egMapsServices['openlayers']->addFeature( 'fi', 'SMOpenLayersFormInput' ); |
| 37 | + } |
| 38 | + |
| 39 | + return true; |
| 40 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/OpenLayers/SM_OpenLayers.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 41 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/OpenLayers/SM_OpenLayersQP.php |
— | — | @@ -0,0 +1,95 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * A query printer for maps using the Open Layers API |
| 6 | + * |
| 7 | + * @file SM_OpenLayersQP.php |
| 8 | + * @ingroup SMOpenLayers |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +final class SMOpenLayersQP extends SMMapPrinter { |
| 18 | + |
| 19 | + protected function getServiceName() { |
| 20 | + return 'openlayers'; |
| 21 | + } |
| 22 | + |
| 23 | + /** |
| 24 | + * @see SMMapPrinter::setQueryPrinterSettings() |
| 25 | + */ |
| 26 | + protected function setQueryPrinterSettings() { |
| 27 | + global $egMapsOpenLayersZoom; |
| 28 | + $this->defaultZoom = $egMapsOpenLayersZoom; |
| 29 | + } |
| 30 | + |
| 31 | + /** |
| 32 | + * @see SMMapPrinter::addSpecificMapHTML() |
| 33 | + */ |
| 34 | + protected function addSpecificMapHTML() { |
| 35 | + global $wgLang, $egMapsOpenLayersPrefix, $egOpenLayersOnThisPage; |
| 36 | + |
| 37 | + $egOpenLayersOnThisPage++; |
| 38 | + $mapName = $egMapsOpenLayersPrefix . '_' . $egOpenLayersOnThisPage; |
| 39 | + |
| 40 | + // TODO: refactor up like done in maps with display point |
| 41 | + $markerItems = array(); |
| 42 | + |
| 43 | + foreach ( $this->mLocations as $location ) { |
| 44 | + // Create a string containing the marker JS . |
| 45 | + list( $lat, $lon, $title, $label, $icon ) = $location; |
| 46 | + |
| 47 | + $markerItems[] = "getOLMarkerData($lon, $lat, '$title', '$label', '$icon')"; |
| 48 | + } |
| 49 | + |
| 50 | + $markersString = implode( ',', $markerItems ); |
| 51 | + |
| 52 | + $this->output .= Html::element( |
| 53 | + 'div', |
| 54 | + array( |
| 55 | + 'id' => $mapName, |
| 56 | + 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;", |
| 57 | + ), |
| 58 | + wfMsg( 'maps-loading-map' ) |
| 59 | + ); |
| 60 | + |
| 61 | + $layerItems = $this->mService->createLayersStringAndLoadDependencies( $this->layers ); |
| 62 | + |
| 63 | + $langCode = $wgLang->getCode(); |
| 64 | + |
| 65 | + $this->mService->addDependency( Html::inlineScript( <<<EOT |
| 66 | +addOnloadHook( |
| 67 | + function() { |
| 68 | + initOpenLayer( |
| 69 | + '$mapName', |
| 70 | + $this->centreLat, |
| 71 | + $this->centreLon, |
| 72 | + $this->zoom, |
| 73 | + [$layerItems], |
| 74 | + [$this->controls], |
| 75 | + [$markersString], |
| 76 | + '$langCode' |
| 77 | + ); |
| 78 | + } |
| 79 | +); |
| 80 | +EOT |
| 81 | + ) ); |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the specific ones to the list. |
| 86 | + */ |
| 87 | + public function getParameters() { |
| 88 | + $params = parent::getParameters(); |
| 89 | + |
| 90 | + $params[] = array( 'name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_controls' ), 'values' => MapsOpenLayers::getControlNames() ); |
| 91 | + $params[] = array( 'name' => 'layers', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_layers' ), 'values' => MapsOpenLayers::getLayerNames() ); |
| 92 | + |
| 93 | + return $params; |
| 94 | + } |
| 95 | + |
| 96 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/OpenLayers/SM_OpenLayersQP.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 97 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/OpenLayers/SM_OpenLayersFormInput.php |
— | — | @@ -0,0 +1,113 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Form input hook that adds an Open Layers map format to Semantic Forms |
| 6 | + * |
| 7 | + * @file SM_OpenLayersFormInput.php |
| 8 | + * @ingroup SMOpenLayers |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +final class SMOpenLayersFormInput extends SMFormInput { |
| 18 | + |
| 19 | + protected $specificParameters = array(); |
| 20 | + |
| 21 | + /** |
| 22 | + * @see MapsMapFeature::setMapSettings() |
| 23 | + */ |
| 24 | + protected function setMapSettings() { |
| 25 | + global $egMapsOpenLayersZoom, $egMapsOpenLayersPrefix; |
| 26 | + |
| 27 | + $this->elementNamePrefix = $egMapsOpenLayersPrefix; |
| 28 | + |
| 29 | + $this->earthZoom = 1; |
| 30 | + |
| 31 | + $this->defaultZoom = $egMapsOpenLayersZoom; |
| 32 | + } |
| 33 | + |
| 34 | + /** |
| 35 | + * @see MapsMapFeature::addFormDependencies() |
| 36 | + */ |
| 37 | + protected function addFormDependencies() { |
| 38 | + global $wgOut; |
| 39 | + global $smgScriptPath, $smgOLFormsOnThisPage, $smgStyleVersion, $egMapsJsExt; |
| 40 | + |
| 41 | + $this->mService->addDependencies( $wgOut ); |
| 42 | + |
| 43 | + if ( empty( $smgOLFormsOnThisPage ) ) { |
| 44 | + $smgOLFormsOnThisPage = 0; |
| 45 | + |
| 46 | + $wgOut->addScriptFile( "$smgScriptPath/Services/OpenLayers/SM_OpenLayersFunctions{$egMapsJsExt}?$smgStyleVersion" ); |
| 47 | + } |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * @see MapsMapFeature::doMapServiceLoad() |
| 52 | + */ |
| 53 | + protected function doMapServiceLoad() { |
| 54 | + global $egOpenLayersOnThisPage, $smgOLFormsOnThisPage, $egMapsOpenLayersPrefix; |
| 55 | + |
| 56 | + self::addFormDependencies(); |
| 57 | + |
| 58 | + $egOpenLayersOnThisPage++; |
| 59 | + $smgOLFormsOnThisPage++; |
| 60 | + |
| 61 | + $this->elementNr = $egOpenLayersOnThisPage; |
| 62 | + $this->mapName = $egMapsOpenLayersPrefix . '_' . $egOpenLayersOnThisPage; |
| 63 | + } |
| 64 | + |
| 65 | + /** |
| 66 | + * @see MapsMapFeature::addSpecificMapHTML() |
| 67 | + */ |
| 68 | + protected function addSpecificMapHTML() { |
| 69 | + global $wgOut, $wgLang; |
| 70 | + |
| 71 | + $this->output .= Html::element( |
| 72 | + 'div', |
| 73 | + array( |
| 74 | + 'id' => $this->mapName, |
| 75 | + 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;", |
| 76 | + ), |
| 77 | + wfMsg( 'maps-loading-map' ) |
| 78 | + ); |
| 79 | + |
| 80 | + $layerItems = $this->mService->createLayersStringAndLoadDependencies( $this->layers ); |
| 81 | + |
| 82 | + $langCode = $wgLang->getCode(); |
| 83 | + |
| 84 | + $wgOut->addInlineScript( <<<EOT |
| 85 | +addOnloadHook( |
| 86 | + function() { |
| 87 | + makeFormInputOpenLayer( |
| 88 | + '$this->mapName', |
| 89 | + '$this->coordsFieldName', |
| 90 | + $this->centreLat, |
| 91 | + $this->centreLon, |
| 92 | + $this->zoom, |
| 93 | + {$this->markerCoords['lat']}, |
| 94 | + {$this->markerCoords['lon']}, |
| 95 | + [$layerItems], |
| 96 | + [$this->controls], |
| 97 | + '$langCode' |
| 98 | + ); |
| 99 | + } |
| 100 | +); |
| 101 | +EOT |
| 102 | + ); |
| 103 | + |
| 104 | + } |
| 105 | + |
| 106 | + /** |
| 107 | + * @see SMFormInput::manageGeocoding() |
| 108 | + * TODO: find a geocoding service that can be used here |
| 109 | + */ |
| 110 | + protected function manageGeocoding() { |
| 111 | + $this->enableGeocoding = false; |
| 112 | + } |
| 113 | + |
| 114 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/OpenLayers/SM_OpenLayersFormInput.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 115 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/GoogleMaps/SM_GoogleMapsFunctions.js |
— | — | @@ -0,0 +1,65 @@ |
| 2 | + /** |
| 3 | + * Javascript functions for Google Maps functionality in Semantic Maps |
| 4 | + * |
| 5 | + * @file SM_GoogleMapFunctions.js |
| 6 | + * @ingroup SMGoogleMaps |
| 7 | + * |
| 8 | + * @author Jeroen De Dauw |
| 9 | + */ |
| 10 | + |
| 11 | +/** |
| 12 | + * This function holds specific functionality for the Google Maps form input of Semantic Maps |
| 13 | + * TODO: Refactor as much code as possible to non specific functions |
| 14 | + */ |
| 15 | +function makeGoogleMapFormInput(mapName, locationFieldName, mapOptions, marker_lat, marker_lon) { |
| 16 | + if (GBrowserIsCompatible()) { |
| 17 | + mapOptions.centre = new GLatLng(mapOptions.lat, mapOptions.lon); |
| 18 | + var map = createGoogleMap(mapName, mapOptions, [getGMarkerData(marker_lat, marker_lon, '', '', '')]); |
| 19 | + |
| 20 | + // Show a starting marker only if marker coordinates are provided |
| 21 | + if (marker_lat != null && marker_lon != null) { |
| 22 | + map.addOverlay(new GMarker(new GLatLng(marker_lat, marker_lon))); |
| 23 | + } |
| 24 | + |
| 25 | + // Click event handler for updating the location of the marker |
| 26 | + GEvent.addListener(map, "click", |
| 27 | + function(overlay, point) { |
| 28 | + if (overlay) { |
| 29 | + map.removeOverlay(overlay); |
| 30 | + } else { |
| 31 | + map.clearOverlays(); |
| 32 | + document.getElementById(locationFieldName).value = convertLatToDMS(point.y)+', '+convertLngToDMS(point.x); |
| 33 | + map.addOverlay(new GMarker(point)); |
| 34 | + map.panTo(point); |
| 35 | + } |
| 36 | + } |
| 37 | + ); |
| 38 | + |
| 39 | + // Make the map variable available for other functions |
| 40 | + if (!window.GMaps) window.GMaps = new Object; |
| 41 | + eval("window.GMaps." + mapName + " = map;"); |
| 42 | + } |
| 43 | +} |
| 44 | + |
| 45 | +/** |
| 46 | + * This function holds specific functionality for the Google Maps form input of Semantic Maps |
| 47 | + */ |
| 48 | +function showGAddress(address, mapName, outputElementName, notFoundFormat) { |
| 49 | + var map = GMaps[mapName]; |
| 50 | + var geocoder = new GClientGeocoder(); |
| 51 | + |
| 52 | + geocoder.getLatLng(address, |
| 53 | + function(point) { |
| 54 | + if (!point) { |
| 55 | + window.alert(address + ' ' + notFoundFormat); |
| 56 | + } else { |
| 57 | + map.clearOverlays(); |
| 58 | + map.setCenter(point, 14); |
| 59 | + var marker = new GMarker(point); |
| 60 | + map.addOverlay(marker); |
| 61 | + document.getElementById(outputElementName).value = convertLatToDMS(point.y) + ', ' + convertLngToDMS(point.x); |
| 62 | + } |
| 63 | + } |
| 64 | + ); |
| 65 | + |
| 66 | +} |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/GoogleMaps/SM_GoogleMapsFunctions.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 67 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/GoogleMaps/SM_GoogleMaps.php |
— | — | @@ -0,0 +1,39 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * This groupe contains all Google Maps related files of the Semantic Maps extension. |
| 6 | + * |
| 7 | + * @defgroup SMGoogleMaps Google Maps |
| 8 | + * @ingroup SemanticMaps |
| 9 | + */ |
| 10 | + |
| 11 | +/** |
| 12 | + * This file holds the general information for the Google Maps service. |
| 13 | + * |
| 14 | + * @file SM_GoogleMaps.php |
| 15 | + * @ingroup SMGoogleMaps |
| 16 | + * |
| 17 | + * @author Jeroen De Dauw |
| 18 | + */ |
| 19 | + |
| 20 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 21 | + die( 'Not an entry point.' ); |
| 22 | +} |
| 23 | + |
| 24 | +$wgHooks['MappingServiceLoad'][] = 'smfInitGoogleMaps'; |
| 25 | + |
| 26 | +function smfInitGoogleMaps() { |
| 27 | + global $egMapsServices, $wgAutoloadClasses; |
| 28 | + |
| 29 | + $wgAutoloadClasses['SMGoogleMapsQP'] = dirname( __FILE__ ) . '/SM_GoogleMapsQP.php'; |
| 30 | + |
| 31 | + // TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found. |
| 32 | + if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMGoogleMapsFormInput'] = dirname( __FILE__ ) . '/SM_GoogleMapsFormInput.php'; |
| 33 | + |
| 34 | + if ( array_key_exists( 'googlemaps2', $egMapsServices ) ) { |
| 35 | + $egMapsServices['googlemaps2']->addFeature( 'qp', 'SMGoogleMapsQP' ); |
| 36 | + $egMapsServices['googlemaps2']->addFeature( 'fi', 'SMGoogleMapsFormInput' ); |
| 37 | + } |
| 38 | + |
| 39 | + return true; |
| 40 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/GoogleMaps/SM_GoogleMaps.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 41 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/GoogleMaps/SM_GoogleMapsQP.php |
— | — | @@ -0,0 +1,112 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * A query printer for maps using the Google Maps API |
| 5 | + * |
| 6 | + * @file SM_GoogleMaps.php |
| 7 | + * @ingroup SMGoogleMaps |
| 8 | + * |
| 9 | + * @author Robert Buzink |
| 10 | + * @author Yaron Koren |
| 11 | + * @author Jeroen De Dauw |
| 12 | + */ |
| 13 | + |
| 14 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 15 | + die( 'Not an entry point.' ); |
| 16 | +} |
| 17 | + |
| 18 | +final class SMGoogleMapsQP extends SMMapPrinter { |
| 19 | + |
| 20 | + protected function getServiceName() { |
| 21 | + return 'googlemaps2'; |
| 22 | + } |
| 23 | + |
| 24 | + /** |
| 25 | + * @see SMMapPrinter::setQueryPrinterSettings() |
| 26 | + */ |
| 27 | + protected function setQueryPrinterSettings() { |
| 28 | + global $egMapsGoogleMapsZoom, $egMapsGMapOverlays; |
| 29 | + |
| 30 | + $this->defaultZoom = $egMapsGoogleMapsZoom; |
| 31 | + |
| 32 | + $this->specificParameters = array( |
| 33 | + 'overlays' => array( |
| 34 | + 'type' => array( 'string', 'list' ), |
| 35 | + 'criteria' => array( |
| 36 | + 'is_google_overlay' => array() |
| 37 | + ), |
| 38 | + 'default' => $egMapsGMapOverlays, |
| 39 | + ), |
| 40 | + ); |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * @see SMMapPrinter::addSpecificMapHTML() |
| 45 | + */ |
| 46 | + protected function addSpecificMapHTML() { |
| 47 | + global $egMapsGoogleMapsPrefix, $egGoogleMapsOnThisPage; |
| 48 | + |
| 49 | + $egGoogleMapsOnThisPage++; |
| 50 | + $mapName = $egMapsGoogleMapsPrefix . '_' . $egGoogleMapsOnThisPage; |
| 51 | + |
| 52 | + $this->mService->addOverlayOutput( $this->output, $mapName, $this->overlays, $this->controls ); |
| 53 | + |
| 54 | + // TODO: refactor up like done in maps with display point |
| 55 | + $markerItems = array(); |
| 56 | + |
| 57 | + foreach ( $this->mLocations as $location ) { |
| 58 | + list( $lat, $lon, $title, $label, $icon ) = $location; |
| 59 | + $markerItems[] = "getGMarkerData($lat, $lon, '$title', '$label', '$icon')"; |
| 60 | + } |
| 61 | + |
| 62 | + // Create a string containing the marker JS. |
| 63 | + $markersString = implode( ',', $markerItems ); |
| 64 | + |
| 65 | + $this->output .= Html::element( |
| 66 | + 'div', |
| 67 | + array( |
| 68 | + 'id' => $mapName, |
| 69 | + 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;", |
| 70 | + ), |
| 71 | + wfMsg( 'maps-loading-map' ) |
| 72 | + ); |
| 73 | + |
| 74 | + $this->mService->addDependency( Html::inlineScript( <<<EOT |
| 75 | +addOnloadHook( |
| 76 | + function() { |
| 77 | + initializeGoogleMap('$mapName', |
| 78 | + { |
| 79 | + lat: $this->centreLat, |
| 80 | + lon: $this->centreLon, |
| 81 | + zoom: $this->zoom, |
| 82 | + type: $this->type, |
| 83 | + types: [$this->types], |
| 84 | + controls: [$this->controls], |
| 85 | + scrollWheelZoom: $this->autozoom, |
| 86 | + kml: [$this->kml] |
| 87 | + }, |
| 88 | + [$markersString] |
| 89 | + ); |
| 90 | + } |
| 91 | +); |
| 92 | +EOT |
| 93 | + ) ); |
| 94 | + } |
| 95 | + |
| 96 | + /** |
| 97 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the specific ones to the list. |
| 98 | + */ |
| 99 | + public function getParameters() { |
| 100 | + $params = parent::getParameters(); |
| 101 | + |
| 102 | + $allowedTypes = MapsGoogleMaps::getTypeNames(); |
| 103 | + |
| 104 | + $params[] = array( 'name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_controls' ), 'values' => MapsGoogleMaps::getControlNames() ); |
| 105 | + $params[] = array( 'name' => 'types', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_types' ), 'values' => $allowedTypes ); |
| 106 | + $params[] = array( 'name' => 'type', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_type' ), 'values' => $allowedTypes ); |
| 107 | + $params[] = array( 'name' => 'overlays', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_overlays' ), 'values' => MapsGoogleMaps::getOverlayNames() ); |
| 108 | + $params[] = array( 'name' => 'autozoom', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_autozoom' ), 'values' => array( 'on', 'off' ) ); |
| 109 | + |
| 110 | + return $params; |
| 111 | + } |
| 112 | + |
| 113 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/GoogleMaps/SM_GoogleMapsQP.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 114 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Services/GoogleMaps/SM_GoogleMapsFormInput.php |
— | — | @@ -0,0 +1,122 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * A class that holds static helper functions and extension hooks for the Google Maps service |
| 6 | + * |
| 7 | + * @file SM_GoogleMapsFormInput.php |
| 8 | + * @ingroup SMGoogleMaps |
| 9 | + * |
| 10 | + * @author Robert Buzink |
| 11 | + * @author Yaron Koren |
| 12 | + * @author Jeroen De Dauw |
| 13 | + */ |
| 14 | + |
| 15 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 16 | + die( 'Not an entry point.' ); |
| 17 | +} |
| 18 | + |
| 19 | +final class SMGoogleMapsFormInput extends SMFormInput { |
| 20 | + |
| 21 | + protected $specificParameters = array(); |
| 22 | + |
| 23 | + /** |
| 24 | + * @see MapsMapFeature::setMapSettings() |
| 25 | + */ |
| 26 | + protected function setMapSettings() { |
| 27 | + global $egMapsGoogleMapsZoom, $egMapsGoogleMapsPrefix; |
| 28 | + |
| 29 | + $this->elementNamePrefix = $egMapsGoogleMapsPrefix; |
| 30 | + $this->showAddresFunction = 'showGAddress'; |
| 31 | + |
| 32 | + $this->earthZoom = 1; |
| 33 | + |
| 34 | + $this->defaultZoom = $egMapsGoogleMapsZoom; |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * (non-PHPdoc) |
| 39 | + * @see smw/extensions/SemanticMaps/FormInputs/SMFormInput#addFormDependencies() |
| 40 | + */ |
| 41 | + protected function addFormDependencies() { |
| 42 | + global $wgOut; |
| 43 | + global $smgScriptPath, $smgGoogleFormsOnThisPage, $smgStyleVersion, $egMapsJsExt; |
| 44 | + |
| 45 | + $this->mService->addDependencies( $wgOut ); |
| 46 | + |
| 47 | + if ( empty( $smgGoogleFormsOnThisPage ) ) { |
| 48 | + $smgGoogleFormsOnThisPage = 0; |
| 49 | + $wgOut->addScriptFile( "$smgScriptPath/Services/GoogleMaps/SM_GoogleMapsFunctions{$egMapsJsExt}?$smgStyleVersion" ); |
| 50 | + } |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * @see MapsMapFeature::doMapServiceLoad() |
| 55 | + */ |
| 56 | + protected function doMapServiceLoad() { |
| 57 | + global $egGoogleMapsOnThisPage, $smgGoogleFormsOnThisPage, $egMapsGoogleMapsPrefix; |
| 58 | + |
| 59 | + self::addFormDependencies(); |
| 60 | + |
| 61 | + $egGoogleMapsOnThisPage++; |
| 62 | + $smgGoogleFormsOnThisPage++; |
| 63 | + |
| 64 | + $this->elementNr = $egGoogleMapsOnThisPage; |
| 65 | + $this->mapName = $egMapsGoogleMapsPrefix . '_' . $egGoogleMapsOnThisPage; |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * @see MapsMapFeature::addSpecificFormInputHTML() |
| 70 | + */ |
| 71 | + protected function addSpecificMapHTML() { |
| 72 | + global $wgOut; |
| 73 | + |
| 74 | + // Remove the overlays control in case it's present. |
| 75 | + // TODO: make less insane |
| 76 | + if ( in_string( 'overlays', $this->controls ) ) { |
| 77 | + $this->controls = str_replace( array( ",'overlays'", "'overlays'," ), '', $this->controls ); |
| 78 | + } |
| 79 | + |
| 80 | + $this->output .= Html::element( |
| 81 | + 'div', |
| 82 | + array( |
| 83 | + 'id' => $this->mapName, |
| 84 | + 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;", |
| 85 | + ), |
| 86 | + wfMsg( 'maps-loading-map' ) |
| 87 | + ); |
| 88 | + |
| 89 | + $wgOut->addInlineScript( <<<EOT |
| 90 | +addOnloadHook( |
| 91 | + function() { |
| 92 | + makeGoogleMapFormInput( |
| 93 | + '$this->mapName', |
| 94 | + '$this->coordsFieldName', |
| 95 | + { |
| 96 | + lat: $this->centreLat, |
| 97 | + lon: $this->centreLon, |
| 98 | + zoom: $this->zoom, |
| 99 | + type: $this->type, |
| 100 | + types: [$this->types], |
| 101 | + controls: [$this->controls], |
| 102 | + scrollWheelZoom: $this->autozoom, |
| 103 | + kml: [$this->kml] |
| 104 | + }, |
| 105 | + {$this->markerCoords['lat']}, |
| 106 | + {$this->markerCoords['lon']} |
| 107 | + ); |
| 108 | + } |
| 109 | +); |
| 110 | +EOT |
| 111 | + ); |
| 112 | + } |
| 113 | + |
| 114 | + /** |
| 115 | + * @see SMFormInput::manageGeocoding() |
| 116 | + */ |
| 117 | + protected function manageGeocoding() { |
| 118 | + global $egGoogleMapsKey, $wgParser; |
| 119 | + $this->enableGeocoding = $egGoogleMapsKey != ''; |
| 120 | + if ( $this->enableGeocoding ) $this->mService->addDependencies( $wgParser ); |
| 121 | + } |
| 122 | + |
| 123 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Services/GoogleMaps/SM_GoogleMapsFormInput.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 124 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/GeoCoords/SM_GeoCoordsValue.php |
— | — | @@ -0,0 +1,373 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * File holding the SMGeoCoordsValue class. |
| 5 | + * |
| 6 | + * @file SM_GeoCoordsValue.php |
| 7 | + * @ingroup SMWDataValues |
| 8 | + * @ingroup SemanticMaps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + * @author Markus Krötzsch |
| 12 | + */ |
| 13 | + |
| 14 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 15 | + die( 'Not an entry point.' ); |
| 16 | +} |
| 17 | + |
| 18 | +/** |
| 19 | + * Implementation of datavalues that are geographic coordinates. |
| 20 | + * |
| 21 | + * @author Jeroen De Dauw |
| 22 | + * @author Markus Krötzsch |
| 23 | + * |
| 24 | + * @since 0.6 |
| 25 | + * |
| 26 | + * @ingroup SemanticMaps |
| 27 | + */ |
| 28 | +class SMGeoCoordsValue extends SMWDataValue { |
| 29 | + |
| 30 | + protected $mCoordinateSet; |
| 31 | + protected $mWikivalue; |
| 32 | + |
| 33 | + /** |
| 34 | + * Adds support for the geographical coordinate data type to Semantic MediaWiki. |
| 35 | + * |
| 36 | + * @since 0.6 |
| 37 | + * |
| 38 | + * TODO: i18n keys still need to be moved |
| 39 | + * |
| 40 | + * @return true |
| 41 | + */ |
| 42 | + public static function initGeoCoordsType() { |
| 43 | + SMWDataValueFactory::registerDatatype( '_geo', __CLASS__, 'Geographic coordinate' ); |
| 44 | + return true; |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * Defines the signature for geographical fields needed for the smw_coords table. |
| 49 | + * |
| 50 | + * @since 0.6 |
| 51 | + * |
| 52 | + * @param array $fieldTypes The field types defined by SMW, passed by reference. |
| 53 | + * |
| 54 | + * @return true |
| 55 | + */ |
| 56 | + public static function initGeoCoordsFieldTypes( array $fieldTypes ) { |
| 57 | + global $smgUseSpatialExtensions; |
| 58 | + |
| 59 | + // Only add the table when the SQL store is not a postgres database, and it has not been added by SMW itself. |
| 60 | + if ( $smgUseSpatialExtensions && !array_key_exists( 'c', $fieldTypes ) ) { |
| 61 | + $fieldTypes['c'] = 'Point NOT NULL'; |
| 62 | + } |
| 63 | + |
| 64 | + return true; |
| 65 | + } |
| 66 | + |
| 67 | + /** |
| 68 | + * Defines the layout for the smw_coords table which is used to store value of the GeoCoords type. |
| 69 | + * |
| 70 | + * @since 0.6 |
| 71 | + * |
| 72 | + * @param array $propertyTables The property tables defined by SMW, passed by reference. |
| 73 | + */ |
| 74 | + public static function initGeoCoordsTable( array $propertyTables ) { |
| 75 | + global $smgUseSpatialExtensions; |
| 76 | + |
| 77 | + // No spatial extensions support for postgres yet, so just store as 2 float fields. |
| 78 | + $signature = $smgUseSpatialExtensions ? array( 'point' => 'c' ) : array( 'lat' => 'f', 'lon' => 'f' ); |
| 79 | + $indexes = $smgUseSpatialExtensions ? array( array( 'point', 'SPATIAL INDEX' ) ) : array_keys( $signature ); |
| 80 | + |
| 81 | + $propertyTables['smw_coords'] = new SMWSQLStore2Table( |
| 82 | + 'sm_coords', |
| 83 | + $signature, |
| 84 | + $indexes // These are the fields that should be indexed. |
| 85 | + ); |
| 86 | + |
| 87 | + return true; |
| 88 | + } |
| 89 | + |
| 90 | + /** |
| 91 | + * @see SMWDataValue::parseUserValue |
| 92 | + * |
| 93 | + * @since 0.6 |
| 94 | + */ |
| 95 | + protected function parseUserValue( $value ) { |
| 96 | + $this->parseUserValueOrQuery( $value ); |
| 97 | + } |
| 98 | + |
| 99 | + /** |
| 100 | + * Overwrite SMWDataValue::getQueryDescription() to be able to process |
| 101 | + * comparators between all values. |
| 102 | + * |
| 103 | + * @since 0.6 |
| 104 | + * |
| 105 | + * @param string $value |
| 106 | + * |
| 107 | + * @return SMWDescription |
| 108 | + */ |
| 109 | + public function getQueryDescription( $value ) { |
| 110 | + return $this->parseUserValueOrQuery( $value, true ); |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * Parses the value into the coordinates and any meta data provided, such as distance. |
| 115 | + * |
| 116 | + * @since 0.6 |
| 117 | + * |
| 118 | + * @param $value String |
| 119 | + * @param $asQuery Boolean |
| 120 | + */ |
| 121 | + protected function parseUserValueOrQuery( $value, $asQuery = false ) { |
| 122 | + $this->mWikivalue = $value; |
| 123 | + |
| 124 | + $comparator = SMW_CMP_EQ; |
| 125 | + |
| 126 | + if ( $value == '' ) { |
| 127 | + $this->addError( wfMsg( 'smw_novalues' ) ); |
| 128 | + } else { |
| 129 | + SMWDataValue::prepareValue( $value, $comparator ); |
| 130 | + |
| 131 | + $parts = explode( '(', $value ); |
| 132 | + |
| 133 | + $coordinates = trim( array_shift( $parts ) ); |
| 134 | + $distance = count( $parts ) > 0 ? trim( array_shift( $parts ) ) : false; |
| 135 | + |
| 136 | + if ( $distance !== false ) { |
| 137 | + $distance = substr( trim( $distance ), 0, -1 ); |
| 138 | + |
| 139 | + if ( !MapsDistanceParser::isDistance( $distance ) ) { |
| 140 | + $this->addError( wfMsgExt( 'semanticmaps-unrecognizeddistance', array( 'parsemag' ), $distance ) ); |
| 141 | + $distance = false; |
| 142 | + } |
| 143 | + } |
| 144 | + |
| 145 | + $parsedCoords = MapsCoordinateParser::parseCoordinates( $coordinates ); |
| 146 | + if ( $parsedCoords ) { |
| 147 | + $this->mCoordinateSet = $parsedCoords; |
| 148 | + |
| 149 | + if ( $this->m_caption === false && !$asQuery ) { |
| 150 | + global $smgQPCoodFormat, $smgQPCoodDirectional; |
| 151 | + $this->m_caption = MapsCoordinateParser::formatCoordinates( $parsedCoords, $smgQPCoodFormat, $smgQPCoodDirectional ); |
| 152 | + } |
| 153 | + } else { |
| 154 | + $this->addError( wfMsgExt( 'maps_unrecognized_coords', array( 'parsemag' ), $coordinates, 1 ) ); |
| 155 | + } |
| 156 | + } |
| 157 | + |
| 158 | + if ( $asQuery ) { |
| 159 | + $this->setUserValue( $value ); |
| 160 | + |
| 161 | + switch ( true ) { |
| 162 | + case !$this->isValid() : |
| 163 | + return new SMWThingDescription(); |
| 164 | + break; |
| 165 | + case $distance !== false : |
| 166 | + return new SMAreaValueDescription( $this, $comparator, $distance ); |
| 167 | + break; |
| 168 | + default : |
| 169 | + return new SMGeoCoordsValueDescription( $this, $comparator ); |
| 170 | + break; |
| 171 | + } |
| 172 | + } |
| 173 | + } |
| 174 | + |
| 175 | + /** |
| 176 | + * @see SMWDataValue::parseDBkeys |
| 177 | + * |
| 178 | + * @since 0.6 |
| 179 | + */ |
| 180 | + protected function parseDBkeys( $args ) { |
| 181 | + global $smgUseSpatialExtensions, $smgQPCoodFormat, $smgQPCoodDirectional; |
| 182 | + |
| 183 | + if ( $smgUseSpatialExtensions ) { |
| 184 | + //die(__METHOD__); |
| 185 | + //var_dump($args);exit; |
| 186 | + } |
| 187 | + else { |
| 188 | + $this->mCoordinateSet['lat'] = $args[0]; |
| 189 | + $this->mCoordinateSet['lon'] = $args[1]; |
| 190 | + } |
| 191 | + |
| 192 | + $this->m_caption = MapsCoordinateParser::formatCoordinates( |
| 193 | + $this->mCoordinateSet, |
| 194 | + $smgQPCoodFormat, |
| 195 | + $smgQPCoodDirectional |
| 196 | + ); |
| 197 | + |
| 198 | + $this->mWikivalue = $this->m_caption; |
| 199 | + } |
| 200 | + |
| 201 | + /** |
| 202 | + * @see SMWDataValue::getDBkeys |
| 203 | + * |
| 204 | + * @since 0.6 |
| 205 | + */ |
| 206 | + public function getDBkeys() { |
| 207 | + global $smgUseSpatialExtensions; |
| 208 | + |
| 209 | + $this->unstub(); |
| 210 | + |
| 211 | + if ( $smgUseSpatialExtensions ) { |
| 212 | + // TODO: test this |
| 213 | + $point = str_replace( ',', '.', " POINT({$this->mCoordinateSet['lat']} {$this->mCoordinateSet['lon']}) " ); |
| 214 | + |
| 215 | + $dbr = wfGetDB( DB_SLAVE ); |
| 216 | + $row = $dbr->selectRow( 'page', "GeomFromText('$point') AS geom", '' ); |
| 217 | + |
| 218 | + return array( $row->geom ); |
| 219 | + } |
| 220 | + else { |
| 221 | + return array( |
| 222 | + $this->mCoordinateSet['lat'], |
| 223 | + $this->mCoordinateSet['lon'] |
| 224 | + ); |
| 225 | + } |
| 226 | + } |
| 227 | + |
| 228 | + /** |
| 229 | + * @see SMWDataValue::getSignature |
| 230 | + * |
| 231 | + * @since 0.6 |
| 232 | + */ |
| 233 | + public function getSignature() { |
| 234 | + global $smgUseSpatialExtensions; |
| 235 | + return $smgUseSpatialExtensions ? 'c' : 'ff'; |
| 236 | + } |
| 237 | + |
| 238 | + /** |
| 239 | + * @see SMWDataValue::getShortWikiText |
| 240 | + * |
| 241 | + * @since 0.6 |
| 242 | + */ |
| 243 | + public function getShortWikiText( $linked = null ) { |
| 244 | + if ( $this->isValid() && ( $linked !== null ) && ( $linked !== false ) ) { |
| 245 | + SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
| 246 | + |
| 247 | + // TODO: fix lang keys so they include the space and coordinates. |
| 248 | + |
| 249 | + return '<span class="smwttinline">' . htmlspecialchars( $this->m_caption ) . '<span class="smwttcontent">' . |
| 250 | + htmlspecialchars ( wfMsgForContent( 'maps-latitude' ) . ' ' . $this->mCoordinateSet['lat'] ) . '<br />' . |
| 251 | + htmlspecialchars ( wfMsgForContent( 'maps-longitude' ) . ' ' . $this->mCoordinateSet['lon'] ) . |
| 252 | + '</span></span>'; |
| 253 | + } |
| 254 | + else { |
| 255 | + return htmlspecialchars( $this->m_caption ); |
| 256 | + } |
| 257 | + } |
| 258 | + |
| 259 | + /** |
| 260 | + * @see SMWDataValue::getShortHTMLText |
| 261 | + * |
| 262 | + * @since 0.6 |
| 263 | + */ |
| 264 | + public function getShortHTMLText( $linker = null ) { |
| 265 | + return $this->getShortWikiText( $linker ); |
| 266 | + } |
| 267 | + |
| 268 | + /** |
| 269 | + * @see SMWDataValue::getLongWikiText |
| 270 | + * |
| 271 | + * @since 0.6 |
| 272 | + */ |
| 273 | + public function getLongWikiText( $linked = null ) { |
| 274 | + if ( !$this->isValid() ) { |
| 275 | + return $this->getErrorText(); |
| 276 | + } |
| 277 | + else { |
| 278 | + global $smgQPCoodFormat, $smgQPCoodDirectional; |
| 279 | + return MapsCoordinateParser::formatCoordinates( $this->mCoordinateSet, $smgQPCoodFormat, $smgQPCoodDirectional ); |
| 280 | + } |
| 281 | + } |
| 282 | + |
| 283 | + /** |
| 284 | + * @see SMWDataValue::getLongHTMLText |
| 285 | + * |
| 286 | + * @since 0.6 |
| 287 | + */ |
| 288 | + public function getLongHTMLText( $linker = null ) { |
| 289 | + return $this->getLongWikiText( $linker ); |
| 290 | + } |
| 291 | + |
| 292 | + /** |
| 293 | + * @see SMWDataValue::getWikiValue |
| 294 | + * |
| 295 | + * @since 0.6 |
| 296 | + */ |
| 297 | + public function getWikiValue() { |
| 298 | + $this->unstub(); |
| 299 | + return $this->mWikivalue; |
| 300 | + } |
| 301 | + |
| 302 | + /** |
| 303 | + * @see SMWDataValue::getExportData |
| 304 | + * |
| 305 | + * @since 0.6 |
| 306 | + */ |
| 307 | + public function getExportData() { |
| 308 | + if ( $this->isValid() ) { |
| 309 | + global $smgQPCoodFormat, $smgQPCoodDirectional; |
| 310 | + $lit = new SMWExpLiteral( |
| 311 | + MapsCoordinateParser::formatCoordinates( $this->mCoordinateSet, $smgQPCoodFormat, $smgQPCoodDirectional ), |
| 312 | + $this, |
| 313 | + 'http://www.w3.org/2001/XMLSchema#string' |
| 314 | + ); |
| 315 | + return new SMWExpData( $lit ); |
| 316 | + } else { |
| 317 | + return null; |
| 318 | + } |
| 319 | + } |
| 320 | + |
| 321 | + /** |
| 322 | + * Create links to mapping services based on a wiki-editable message. The parameters |
| 323 | + * available to the message are: |
| 324 | + * |
| 325 | + * $1: The location in non-directional float notation. |
| 326 | + * $2: The location in directional DMS notation. |
| 327 | + * $3: The latitude in non-directional float notation. |
| 328 | + * $4 The longitude in non-directional float notation. |
| 329 | + * |
| 330 | + * @since 0.6.4 |
| 331 | + * |
| 332 | + * @return array |
| 333 | + */ |
| 334 | + protected function getServiceLinkParams() { |
| 335 | + return array( |
| 336 | + MapsCoordinateParser::formatCoordinates( $this->mCoordinateSet, 'float', false ), |
| 337 | + MapsCoordinateParser::formatCoordinates( $this->mCoordinateSet, 'dms', true ), |
| 338 | + $this->mCoordinateSet['lat'], |
| 339 | + $this->mCoordinateSet['lon'] |
| 340 | + ); |
| 341 | + } |
| 342 | + |
| 343 | + /** |
| 344 | + * @since 0.6 |
| 345 | + * |
| 346 | + * @return array |
| 347 | + */ |
| 348 | + public function getCoordinateSet() { |
| 349 | + return $this->mCoordinateSet; |
| 350 | + } |
| 351 | + |
| 352 | + /** |
| 353 | + * @see SMWDataValue::getValueIndex |
| 354 | + * |
| 355 | + * @since 0.6 |
| 356 | + * |
| 357 | + * @return integer |
| 358 | + */ |
| 359 | + public function getValueIndex() { |
| 360 | + return 0; |
| 361 | + } |
| 362 | + |
| 363 | + /** |
| 364 | + * @see SMWDataValue::getLabelIndex |
| 365 | + * |
| 366 | + * @since 0.6 |
| 367 | + * |
| 368 | + * @return integer |
| 369 | + */ |
| 370 | + public function getLabelIndex() { |
| 371 | + return 0; |
| 372 | + } |
| 373 | + |
| 374 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/GeoCoords/SM_GeoCoordsValue.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 375 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/GeoCoords/SM_GeoCoords.php |
— | — | @@ -0,0 +1,29 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * File containing the registration and initialization code for the Semantic MediaWiki |
| 6 | + * Geographical Coordinates data type, and things it's dependent on. |
| 7 | + * |
| 8 | + * @file SM_GeoCoords.php |
| 9 | + * @ingroup SemanticMaps |
| 10 | + * |
| 11 | + * @author Jeroen De Dauw |
| 12 | + */ |
| 13 | + |
| 14 | +// Registration of the Geographical Coordinate type. |
| 15 | +$wgAutoloadClasses['SMGeoCoordsValue'] = dirname( __FILE__ ) . '/SM_GeoCoordsValue.php'; |
| 16 | + |
| 17 | +// Registration of the Geographical Coordinate value description class. |
| 18 | +$wgAutoloadClasses['SMGeoCoordsValueDescription'] = dirname( __FILE__ ) . '/SM_GeoCoordsValueDescription.php'; |
| 19 | + |
| 20 | +// Registration of the Geographical Coordinate are description class. |
| 21 | +$wgAutoloadClasses['SMAreaValueDescription'] = dirname( __FILE__ ) . '/SM_AreaValueDescription.php'; |
| 22 | + |
| 23 | +// Hook for initializing the Geographical Coordinate type. |
| 24 | +$wgHooks['smwInitDatatypes'][] = 'SMGeoCoordsValue::initGeoCoordsType'; |
| 25 | + |
| 26 | +// Hook for initializing the field types needed by Geographical Coordinates. |
| 27 | +$wgHooks['SMWCustomSQLStoreFieldType'][] = 'SMGeoCoordsValue::initGeoCoordsFieldTypes'; |
| 28 | + |
| 29 | +// Hook for defining a table to store geographical coordinates in. |
| 30 | +$wgHooks['SMWPropertyTables'][] = 'SMGeoCoordsValue::initGeoCoordsTable'; |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/GeoCoords/SM_GeoCoords.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 31 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/GeoCoords/SM_GeoCoordsValueDescription.php |
— | — | @@ -0,0 +1,106 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * File holding the SMGeoCoordsValueDescription class. |
| 6 | + * |
| 7 | + * @file SM_GeoCoordsValueDescription.php |
| 8 | + * @ingroup SemanticMaps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +/** |
| 18 | + * Description of one data value of type Goegraphical Coordinates. |
| 19 | + * |
| 20 | + * @author Jeroen De Dauw |
| 21 | + * |
| 22 | + * @since 0.6 |
| 23 | + * |
| 24 | + * @ingroup SemanticMaps |
| 25 | + */ |
| 26 | +class SMGeoCoordsValueDescription extends SMWValueDescription { |
| 27 | + |
| 28 | + /** |
| 29 | + * Constructor. |
| 30 | + * |
| 31 | + * @since 0.6 |
| 32 | + * |
| 33 | + * @param SMGeoCoordsValue $dataValue |
| 34 | + */ |
| 35 | + public function __construct( SMGeoCoordsValue $dataValue, $comparator ) { |
| 36 | + parent::__construct( $dataValue, $comparator ); |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * @see SMWDescription::getQueryString |
| 41 | + * |
| 42 | + * @since 0.6 |
| 43 | + * |
| 44 | + * @param Boolean $asvalue |
| 45 | + */ |
| 46 | + public function getQueryString( $asValue = false ) { |
| 47 | + if ( $this->m_datavalue !== null ) { |
| 48 | + $queryString = $this->m_datavalue->getWikiValue(); |
| 49 | + return $asValue ? $queryString : "[[$queryString]]"; |
| 50 | + } else { |
| 51 | + return $asValue ? '+' : ''; |
| 52 | + } |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * @see SMWDescription::getSQLCondition |
| 57 | + * |
| 58 | + * @since 0.6 |
| 59 | + * |
| 60 | + * @param string $tableName |
| 61 | + * @param array $fieldNames |
| 62 | + * @param DatabaseBase or Database $dbs |
| 63 | + * |
| 64 | + * @return true |
| 65 | + */ |
| 66 | + public function getSQLCondition( $tableName, array $fieldNames, $dbs ) { |
| 67 | + global $smgUseSpatialExtensions; |
| 68 | + |
| 69 | + $dataValue = $this->getDatavalue(); |
| 70 | + |
| 71 | + // Only execute the query when the description's type is geographical coordinates, |
| 72 | + // the description is valid, and the near comparator is used. |
| 73 | + if ( $dataValue->getTypeID() != '_geo' || !$dataValue->isValid() ) return false; |
| 74 | + |
| 75 | + $comparator = false; |
| 76 | + |
| 77 | + switch ( $this->getComparator() ) { |
| 78 | + case SMW_CMP_EQ: $comparator = '='; break; |
| 79 | + case SMW_CMP_LEQ: $comparator = '<='; break; |
| 80 | + case SMW_CMP_GEQ: $comparator = '>='; break; |
| 81 | + case SMW_CMP_NEQ: $comparator = '!='; break; |
| 82 | + } |
| 83 | + |
| 84 | + if ( $comparator ) { |
| 85 | + $coordinates = $dataValue->getCoordinateSet(); |
| 86 | + |
| 87 | + $lat = $dbs->addQuotes( $coordinates['lat'] ); |
| 88 | + $lon = $dbs->addQuotes( $coordinates['lon'] ); |
| 89 | + |
| 90 | + $conditions = array(); |
| 91 | + |
| 92 | + if ( $smgUseSpatialExtensions ) { |
| 93 | + // TODO |
| 94 | + } |
| 95 | + else { |
| 96 | + $conditions[] = "{$tableName}.$fieldNames[0] $comparator $lat"; |
| 97 | + $conditions[] = "{$tableName}.$fieldNames[1] $comparator $lon"; |
| 98 | + } |
| 99 | + |
| 100 | + return implode( ' && ', $conditions ); |
| 101 | + } |
| 102 | + else { |
| 103 | + return false; |
| 104 | + } |
| 105 | + } |
| 106 | + |
| 107 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/GeoCoords/SM_GeoCoordsValueDescription.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 108 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/GeoCoords/SM_AreaValueDescription.php |
— | — | @@ -0,0 +1,200 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * File holding the SMAreaValueDescription class. |
| 6 | + * |
| 7 | + * @file SM_AreaValueDescription.php |
| 8 | + * @ingroup SemanticMaps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +/** |
| 18 | + * Description of a geographical area defined by a coordinates set and a distance to the bounds. |
| 19 | + * The bounds are a 'rectangle' (but bend due to the earhs curvature), as the resulting query |
| 20 | + * would otherwise be to resource intensive. |
| 21 | + * |
| 22 | + * @author Jeroen De Dauw |
| 23 | + * |
| 24 | + * TODO: would be awesome to use Spatial Extensions to select coordinates |
| 25 | + * |
| 26 | + * @since 0.6 |
| 27 | + * |
| 28 | + * @ingroup SemanticMaps |
| 29 | + */ |
| 30 | +class SMAreaValueDescription extends SMWValueDescription { |
| 31 | + protected $mBounds = false; |
| 32 | + |
| 33 | + /** |
| 34 | + * Constructor. |
| 35 | + * |
| 36 | + * @since 0.6 |
| 37 | + * |
| 38 | + * @param SMGeoCoordsValue $dataValue |
| 39 | + * @param string $comparator |
| 40 | + * @param string $radius |
| 41 | + */ |
| 42 | + public function __construct( SMGeoCoordsValue $dataValue, $comparator, $radius ) { |
| 43 | + parent::__construct( $dataValue, $comparator ); |
| 44 | + |
| 45 | + // Only if the MapsGeoFunctions class is loaded, we can create the bounding box. |
| 46 | + if ( self::geoFunctionsAreAvailable() ) { |
| 47 | + $this->calculateBounds( $dataValue, $radius ); |
| 48 | + } |
| 49 | + } |
| 50 | + |
| 51 | + /** |
| 52 | + * Sets the mBounds fields to an array returned by SMAreaValueDescription::getBoundingBox. |
| 53 | + * |
| 54 | + * @since 0.6 |
| 55 | + * |
| 56 | + * @param SMGeoCoordsValue $dataValue |
| 57 | + * @param string $radius |
| 58 | + */ |
| 59 | + protected function calculateBounds( SMGeoCoordsValue $dataValue, $radius ) { |
| 60 | + $this->mBounds = self::getBoundingBox( |
| 61 | + $dataValue->getCoordinateSet(), |
| 62 | + MapsDistanceParser::parseDistance( $radius ) |
| 63 | + ); |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * @see SMWDescription:getQueryString |
| 68 | + * |
| 69 | + * @since 0.6 |
| 70 | + * |
| 71 | + * @param Boolean $asvalue |
| 72 | + */ |
| 73 | + public function getQueryString( $asValue = false ) { |
| 74 | + if ( $this->m_datavalue !== null ) { |
| 75 | + $queryString = $this->m_datavalue->getWikiValue(); |
| 76 | + return $asValue ? $queryString : "[[$queryString]]"; |
| 77 | + } else { |
| 78 | + return $asValue ? '+' : ''; |
| 79 | + } |
| 80 | + } |
| 81 | + |
| 82 | + /** |
| 83 | + * @see SMWDescription:prune |
| 84 | + * |
| 85 | + * @since 0.6 |
| 86 | + */ |
| 87 | + public function prune( &$maxsize, &$maxdepth, &$log ) { |
| 88 | + if ( ( $maxsize < $this->getSize() ) || ( $maxdepth < $this->getDepth() ) ) { |
| 89 | + $log[] = $this->getQueryString(); |
| 90 | + |
| 91 | + $result = new SMWThingDescription(); |
| 92 | + $result->setPrintRequests( $this->getPrintRequests() ); |
| 93 | + |
| 94 | + return $result; |
| 95 | + } else { |
| 96 | + $maxsize = $maxsize - $this->getSize(); |
| 97 | + $maxdepth = $maxdepth - $this->getDepth(); |
| 98 | + return $this; |
| 99 | + } |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * Returns the bounds of the area. |
| 104 | + * |
| 105 | + * @since 0.6 |
| 106 | + * |
| 107 | + * @return array |
| 108 | + */ |
| 109 | + public function getBounds() { |
| 110 | + return $this->mBounds; |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * @see SMWDescription::getSQLCondition |
| 115 | + * |
| 116 | + * @since 0.6 |
| 117 | + * |
| 118 | + * @param string $tableName |
| 119 | + * @param array $fieldNames |
| 120 | + * @param DatabaseBase or Database $dbs |
| 121 | + * |
| 122 | + * @return string or false |
| 123 | + */ |
| 124 | + public function getSQLCondition( $tableName, array $fieldNames, $dbs ) { |
| 125 | + global $smgUseSpatialExtensions; |
| 126 | + |
| 127 | + $dataValue = $this->getDatavalue(); |
| 128 | + |
| 129 | + // Only execute the query when the description's type is geographical coordinates, |
| 130 | + // the description is valid, and the near comparator is used. |
| 131 | + if ( $dataValue->getTypeID() != '_geo' |
| 132 | + || !$dataValue->isValid() |
| 133 | + || ( $this->getComparator() != SMW_CMP_EQ && $this->getComparator() != SMW_CMP_NEQ ) |
| 134 | + ) { |
| 135 | + return false; |
| 136 | + } |
| 137 | + |
| 138 | + $boundingBox = $this->getBounds(); |
| 139 | + |
| 140 | + $north = $dbs->addQuotes( $boundingBox['north'] ); |
| 141 | + $east = $dbs->addQuotes( $boundingBox['east'] ); |
| 142 | + $south = $dbs->addQuotes( $boundingBox['south'] ); |
| 143 | + $west = $dbs->addQuotes( $boundingBox['west'] ); |
| 144 | + |
| 145 | + $isEq = $this->getComparator() == SMW_CMP_EQ; |
| 146 | + |
| 147 | + $conditions = array(); |
| 148 | + |
| 149 | + if ( $smgUseSpatialExtensions ) { |
| 150 | + // TODO |
| 151 | + } |
| 152 | + else { |
| 153 | + $smallerThen = $isEq ? '<' : '>='; |
| 154 | + $biggerThen = $isEq ? '>' : '<='; |
| 155 | + $joinCond = $isEq ? '&&' : '||'; |
| 156 | + |
| 157 | + $conditions[] = "{$tableName}.$fieldNames[0] $smallerThen $north"; |
| 158 | + $conditions[] = "{$tableName}.$fieldNames[0] $biggerThen $south"; |
| 159 | + $conditions[] = "{$tableName}.$fieldNames[1] $smallerThen $east"; |
| 160 | + $conditions[] = "{$tableName}.$fieldNames[1] $biggerThen $west"; |
| 161 | + } |
| 162 | + |
| 163 | + return implode( " $joinCond ", $conditions ); |
| 164 | + } |
| 165 | + |
| 166 | + /** |
| 167 | + * Returns the lat and lon limits of a bounding box around a circle defined by the provided parameters. |
| 168 | + * |
| 169 | + * @since 0.6 |
| 170 | + * |
| 171 | + * @param array $centerCoordinates Array containing non-directional float coordinates with lat and lon keys. |
| 172 | + * @param float $circleRadius The radidus of the circle to create a bounding box for, in m. |
| 173 | + * |
| 174 | + * @return An associative array containing the limits with keys north, east, south and west. |
| 175 | + */ |
| 176 | + protected static function getBoundingBox( array $centerCoordinates, $circleRadius ) { |
| 177 | + $north = MapsGeoFunctions::findDestination( $centerCoordinates, 0, $circleRadius ); |
| 178 | + $east = MapsGeoFunctions::findDestination( $centerCoordinates, 90, $circleRadius ); |
| 179 | + $south = MapsGeoFunctions::findDestination( $centerCoordinates, 180, $circleRadius ); |
| 180 | + $west = MapsGeoFunctions::findDestination( $centerCoordinates, 270, $circleRadius ); |
| 181 | + |
| 182 | + return array( |
| 183 | + 'north' => $north['lat'], |
| 184 | + 'east' => $east['lon'], |
| 185 | + 'south' => $south['lat'], |
| 186 | + 'west' => $west['lon'], |
| 187 | + ); |
| 188 | + } |
| 189 | + |
| 190 | + /** |
| 191 | + * Returns a boolean indicating if MapsGeoFunctions is available. |
| 192 | + * |
| 193 | + * @since 0.6 |
| 194 | + * |
| 195 | + * @return boolean |
| 196 | + */ |
| 197 | + protected static function geoFunctionsAreAvailable() { |
| 198 | + return class_exists( 'MapsGeoFunctions' ); |
| 199 | + } |
| 200 | + |
| 201 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/GeoCoords/SM_AreaValueDescription.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 202 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/SM_Settings.php |
— | — | @@ -0,0 +1,92 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * File defining the settings for the Semantic Maps extension |
| 6 | + * More info can be found at http://www.mediawiki.org/wiki/Extension:Semantic_Maps#Settings |
| 7 | + * |
| 8 | + * NOTICE: |
| 9 | + * Changing one of these settings can be done by copieng or cutting it, |
| 10 | + * and placing it in LocalSettings.php, AFTER the inclusion of Semantic Maps. |
| 11 | + * |
| 12 | + * @file SM_Settings.php |
| 13 | + * @ingroup SemanticMaps |
| 14 | + * |
| 15 | + * @author Jeroen De Dauw |
| 16 | + */ |
| 17 | + |
| 18 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 19 | + die( 'Not an entry point.' ); |
| 20 | +} |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +# Features configuration |
| 25 | + |
| 26 | + # (named) Array of String. This array contains the available features for Maps. |
| 27 | + # Commenting out the inclusion of any feature will make Maps completely ignore it, and so improve performance. |
| 28 | + |
| 29 | + # Query printers |
| 30 | + include_once $smgDir . 'Features/QueryPrinters/SM_QueryPrinters.php'; |
| 31 | + # Form imputs |
| 32 | + include_once $smgDir . 'Features/FormInputs/SM_FormInputs.php'; |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +# Mapping services configuration |
| 37 | + |
| 38 | + # Include the mapping services that should be loaded into Semantic Maps. |
| 39 | + # Commenting or removing a mapping service will cause Semantic Maps to completely ignore it, and so improve performance. |
| 40 | + # Google Maps API v2 |
| 41 | + include_once $smgDir . 'Services/GoogleMaps/SM_GoogleMaps.php'; |
| 42 | + # OpenLayers API |
| 43 | + include_once $smgDir . 'Services/OpenLayers/SM_OpenLayers.php'; |
| 44 | + # Yahoo! Maps API |
| 45 | + include_once $smgDir . 'Services/YahooMaps/SM_YahooMaps.php'; |
| 46 | + |
| 47 | + # Array of String. The default mapping service for each feature, which will be used when no valid service is provided by the user. |
| 48 | + # Each service needs to be enabled, if not, the first one from the available services will be taken. |
| 49 | + # Note: The default service needs to be available for the feature you set it for, since it's used as a fallback mechanism. |
| 50 | + $egMapsDefaultServices['qp'] = 'googlemaps2'; |
| 51 | + $egMapsDefaultServices['fi'] = 'googlemaps2'; |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +# General |
| 56 | + |
| 57 | + # Boolean. Indicates if spatial extensions should be used for coordinate storage. |
| 58 | + # Spatial extensions significantly speed up querying, but are not present by default on postgres databases. |
| 59 | + # If this value is false, coordinates will be stored in 2 float fields. |
| 60 | + # You are unlikely to need to change this setting, so don't unless you know what you are doing! |
| 61 | + $smgUseSpatialExtensions = false; // TODO: $wgDBtype != 'postgres'; |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +# Queries |
| 66 | + |
| 67 | + # Boolean. The default value for the forceshow parameter. Will force a map to be shown even when there are no query results |
| 68 | + # when set to true. This value will only be used when the user does not provide one. |
| 69 | + $smgQPForceShow = false; |
| 70 | + |
| 71 | + # Boolean. The default value for the showtitle parameter. Will hide the title in the marker pop-ups when set to true. |
| 72 | + # This value will only be used when the user does not provide one. |
| 73 | + $smgQPShowTitle = true; |
| 74 | + |
| 75 | + # String or false. Allows you to define the content and it's layout of marker pop-ups via a template. |
| 76 | + # This value will only be used when the user does not provide one. |
| 77 | + $smgQPTemplate = false; |
| 78 | + |
| 79 | + # Enum. The default output format of coordinates. |
| 80 | + # Possible values: Maps_COORDS_FLOAT, Maps_COORDS_DMS, Maps_COORDS_DM, Maps_COORDS_DD |
| 81 | + $smgQPCoodFormat = $egMapsCoordinateNotation; |
| 82 | + |
| 83 | + # Boolean. Indicates if coordinates should be outputted in directional notation by default. |
| 84 | + $smgQPCoodDirectional = $egMapsCoordinateDirectional; |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +# Forms |
| 89 | + |
| 90 | + # Integer or string. The default width and height of maps in forms created by using Semantic Forms. |
| 91 | + # These values only be used when the user does not provide them. |
| 92 | + $smgFIWidth = 665; |
| 93 | + $smgFIHeight = $egMapsMapHeight; |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/SM_Settings.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 94 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/INSTALL |
— | — | @@ -0,0 +1,47 @@ |
| 2 | +[[Semantic Maps 0.6.4]]
|
| 3 | +
|
| 4 | +Make sure you have Semantic MediaWiki, Maps and Validator successfully installed before proceeding
|
| 5 | +withthe installation. Semantic Maps and Maps are always released together. This means you should
|
| 6 | +always use the same version of Maps as the one of Semantic Maps you have. For example Maps 0.3.4
|
| 7 | +and Semantic Maps 0.3.4, but not Maps 0.2 and Semantic Maps 0.3. For the correct version of
|
| 8 | +Validator, see the INSTALL file of Maps. Once you have downloaded the code, place the 'SemanticMaps'
|
| 9 | +directory within your MediaWiki 'extensions' directory. Then add the following code to your
|
| 10 | +LocalSettings.php file after the lines that install Maps:
|
| 11 | +
|
| 12 | +# Semantic Maps
|
| 13 | +require_once( "$IP/extensions/SemanticMaps/SemanticMaps.php" );
|
| 14 | +
|
| 15 | +The placement of the inclusion of Maps and Semantic Maps needs to be at a certain position. Hold
|
| 16 | +the following rules into account:
|
| 17 | +* Maps needs to be included before Semantic Maps.
|
| 18 | +* Semantic MediaWiki needs to be included before Maps.
|
| 19 | +* Semantic Forms (if used) needs to be included before Maps (after SMW).
|
| 20 | +An example of a typical inclusion order: ..., SMW, ..., SF, ..., Validator, Maps, SM, ...
|
| 21 | +
|
| 22 | +Once you have successfully installed Semantic Maps, please add your wiki to the sites that use
|
| 23 | +Semantic Maps section [0].
|
| 24 | +
|
| 25 | +=== Upgrading to 0.6 ===
|
| 26 | +
|
| 27 | +Make sure you have upgraded SMW to version 1.5.1 before installing Semantic Maps 0.6!
|
| 28 | +
|
| 29 | +When upgrading to 0.6 from any previous version, you need to run the "database installation and upgrade" script in [http://semantic-mediawiki.org/wiki/Help:Installation#Upgrading_existing_installations Special:SMWAdmin]. Not doing this will result into fatal PHP errors. You will also need to run the "data repair and upgrade" script on the same page, which is required in order to store all coordinates so that Semantic Maps recognizes them. Not doing this will result into queries not returning any coordinates.
|
| 30 | +
|
| 31 | +=== Upgrading from Semantic Google Maps ===
|
| 32 | +
|
| 33 | +If you have Semantic Google Maps installed, and want to upgrade to Semantic Maps, these are the steps you need to follow:
|
| 34 | +
|
| 35 | +* Remove the SemanticGoogleMaps directory from your extension directory.
|
| 36 | +* Remove (when you use it) Google Geocoder in a similar fashion.
|
| 37 | +* Upload both Maps and Semantic Maps to your extension directory.
|
| 38 | +* Make sure your API keys are in the right place (the variable $wgGoogleMapsKey will need to be renamed, or copied, to $egGoogleMapsKey).
|
| 39 | +* Change all #semantic_google_map parser functions with #display_point.
|
| 40 | +* Add parameter names to the value of the #display_point calls.
|
| 41 | +
|
| 42 | +After doing all these steps, you should be done. Maps and Semantic Maps are designed to be backward compatible with SGM, so all SGM code ''should'' work on Semantic Maps. If you encounter some problem though, please let the extension developers know.
|
| 43 | +
|
| 44 | +
|
| 45 | +More information can be found at [1].
|
| 46 | +
|
| 47 | +[0] http://www.mediawiki.org/wiki/Extension:Semantic_Maps#Sites_that_use_Semantic_Maps
|
| 48 | +[1] http://mapping.referata.com/wiki/Semantic_Maps#Installation |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_6_4/RELEASE-NOTES |
— | — | @@ -0,0 +1,319 @@ |
| 2 | +For a documentation of all features, see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
|
| 3 | +
|
| 4 | +== Semantic Maps change log ==
|
| 5 | +This change log contains a list of completed to-do's (new features, bug fixes, refactoring) for every
|
| 6 | +version of Semantic Maps. You can find the most upt-do-date version at
|
| 7 | +http://www.mediawiki.org/wiki/Extension:Semantic_Maps/Version_history#Semantic_Maps_change_log
|
| 8 | +
|
| 9 | +
|
| 10 | +=== Semantic Maps 0.6.4 ===
|
| 11 | +(2010-07-08)
|
| 12 | +
|
| 13 | +==== New features ====
|
| 14 | +
|
| 15 | +* Re-added service link support, which got removed in 0.6.
|
| 16 | +
|
| 17 | +==== Refactoring ====
|
| 18 | +
|
| 19 | +* Moved more functionality over from feature classes to service classes to prevent crazy code-flow and code duplication.
|
| 20 | +
|
| 21 | +==== Bug fixes ====
|
| 22 | +
|
| 23 | +* Fixed php notice that occurred in some queries, introduced in 0.6.3.
|
| 24 | +
|
| 25 | +* Fixed issue that caused result format maps not to load when a centre address was provided that could not be geocoded.
|
| 26 | +
|
| 27 | +=== Semantic Maps 0.6.3 ===
|
| 28 | +(2010-06-20)
|
| 29 | +
|
| 30 | +==== Bug fixes ====
|
| 31 | +
|
| 32 | +* Fixed issue that caused Yahoo! Maps and OpenLayers maps not to load on form pages.
|
| 33 | +
|
| 34 | +* Fixed php warning originating from Validator that occurred on form pages with maps.
|
| 35 | +
|
| 36 | +* Fixed issue that caused a fatal error when doing a query via special:ask with a mapping format, present since 0.6.
|
| 37 | +
|
| 38 | +=== Semantic Maps 0.6.2 ===
|
| 39 | +(2010-06-07)
|
| 40 | +
|
| 41 | +==== Bug fixes ====
|
| 42 | +
|
| 43 | +* Fixed fatal error that occurred when editing a page via a form with a map on it.
|
| 44 | +
|
| 45 | +=== Semantic Maps 0.6.1 ===
|
| 46 | +(2010-06-04)
|
| 47 | +
|
| 48 | +==== Bug fixes ====
|
| 49 | +
|
| 50 | +* Fixed serious bug that caused mapping parameters to get ignored in semantic queries and forms.
|
| 51 | +
|
| 52 | +* Fixed fatal error that occurred when not disabling the form input feature when Semantic Forms is not installed.
|
| 53 | +
|
| 54 | +* Fixed bug in map form inputs that stored 'west' coordinates as 'south' coordinates, effectively rendering the resulting coordinate set invalid.
|
| 55 | +
|
| 56 | +=== Semantic Maps 0.6 ===
|
| 57 | +(2010-05-31)
|
| 58 | +
|
| 59 | +==== New features ====
|
| 60 | +
|
| 61 | +* Added full support for both directional and non-directional coordinate notations in DMS, DD, DM and float notation.
|
| 62 | +
|
| 63 | +* Added native geographical proximity query support.
|
| 64 | +
|
| 65 | +* Added settings to specify the width and height of maps in forms.
|
| 66 | +
|
| 67 | +* Added settings to specify the format of coordinates as shown in query printouts.
|
| 68 | +
|
| 69 | +==== Refactoring ====
|
| 70 | +
|
| 71 | +* Rewrote map divs and added loading message for each map.
|
| 72 | +
|
| 73 | +* Rewrote individual map JS to be added to the page header.
|
| 74 | +
|
| 75 | +* Restructured the directory structure to make what the services and features are more clear.
|
| 76 | +
|
| 77 | +* Rewrote storage of coordinates to make the proximity query scalable.
|
| 78 | +
|
| 79 | +==== Bug fixes ====
|
| 80 | +
|
| 81 | +* Fixed conflict with prototype library that caused compatibility problems with the Halo extension.
|
| 82 | +
|
| 83 | +=== Semantic Maps 0.5.5 ===
|
| 84 | +(2010-03-20)
|
| 85 | +
|
| 86 | +==== Refactoring ====
|
| 87 | +
|
| 88 | +* Moved the geographical proximity query from Semantic MediaWiki over to Semantic Maps.
|
| 89 | +
|
| 90 | +* Stylized the code to conform to MediaWiki's spacing conventions.
|
| 91 | +
|
| 92 | +==== Bug fixes ====
|
| 93 | +
|
| 94 | +* Fixed issue causing properties of type Page to not show up in pop-ups when using the template parameter.
|
| 95 | +
|
| 96 | +* Fixed escaping issues that caused pop-ups to break when they contained '-signs.
|
| 97 | +
|
| 98 | +=== Semantic Maps 0.5.4 ===
|
| 99 | +(2010-03-01)
|
| 100 | +
|
| 101 | +==== Bug fixes ====
|
| 102 | +
|
| 103 | +* Fixed potential xss vectors.
|
| 104 | +
|
| 105 | +* Fixed minor JS error that was present for all maps except OSM.
|
| 106 | +
|
| 107 | +* Fixed i18n issue that caused geocoords not to be recognized on several foreign language wiki's.
|
| 108 | +
|
| 109 | +=== Semantic Maps 0.5.3 ===
|
| 110 | +(2010-02-01)
|
| 111 | +
|
| 112 | +==== Bug fixes ====
|
| 113 | +
|
| 114 | +* Fixed issue with the type and types parameters in the Yahoo! Maps form input.
|
| 115 | +
|
| 116 | +* Fixed OpenLayers form input projection bug, causing the the coordinates to be wrongly interpreted.
|
| 117 | +
|
| 118 | +* Fixed marker display for the OpenLayers form inputs.
|
| 119 | +
|
| 120 | +* Fixed issue causing a fatal error when executing a query on Special:Ask with the "map" format.
|
| 121 | +
|
| 122 | +=== Semantic Maps 0.5.2 ===
|
| 123 | +(2010-01-20)
|
| 124 | +
|
| 125 | +==== New features ====
|
| 126 | +
|
| 127 | +* Added support for template= parameter to the result printers.
|
| 128 | +
|
| 129 | +* Added support for showtitle= parameter to the result printers.
|
| 130 | +
|
| 131 | +* Added icon parameter to the query printers, allowing you to set the icon for all markers that do not have a specific icon assigned via a compound query.
|
| 132 | +
|
| 133 | +==== Bug fixes ====
|
| 134 | +
|
| 135 | +* Added missing SMW #Ask: parameters to the parameter list of the Semantic Maps query printers.
|
| 136 | +
|
| 137 | +* Fixed issue with centre parameter for maps with no results (using forceshow=on).
|
| 138 | +
|
| 139 | +=== Semantic Maps 0.5.1 ===
|
| 140 | +(2009-12-25)
|
| 141 | +
|
| 142 | +==== New features ====
|
| 143 | +
|
| 144 | +* Added parameter support for the 'map' format on Special:Ask.
|
| 145 | +
|
| 146 | +* Added forceshow parameter to the result formats to allow users to force showing a map, even when there are no geographical coordinate results from a query.
|
| 147 | +
|
| 148 | +==== Refactoring ====
|
| 149 | +
|
| 150 | +* Modified the parameter definitions to work with Validator 0.2.
|
| 151 | +
|
| 152 | +* Removed redundant (because of Validator 0.2) utility function calls from the mapping classes.
|
| 153 | +
|
| 154 | +* Ensured none of the form input classes get loaded when SF is not present.
|
| 155 | +
|
| 156 | +==== Bug fixes ====
|
| 157 | +
|
| 158 | +* Fixed issue with the query printers causing error messages to be shown for ask specific parameters.
|
| 159 | +
|
| 160 | +===Semantic Maps 0.5===
|
| 161 | +(2009-12-17)
|
| 162 | +
|
| 163 | +====New features====
|
| 164 | +
|
| 165 | +* Added a result format for the OL optimized for OSM service.
|
| 166 | +
|
| 167 | +* Added support for the new Special:Ask page's parameter handling to the query printers.
|
| 168 | +
|
| 169 | +==== Refactoring ====
|
| 170 | +
|
| 171 | +* Moved the geographical coordinate data type handling from SMW to SM.
|
| 172 | +
|
| 173 | +* Added checks for extension dependencies that need to be present for Semantic Maps to be initialized.
|
| 174 | +
|
| 175 | +==== Bug fixes ====
|
| 176 | +
|
| 177 | +* Fixed issue with the form input registration. The main service names where getting changed into the default mapping service.
|
| 178 | +
|
| 179 | +===Semantic Maps 0.4.2===
|
| 180 | +(2009-11-15)
|
| 181 | +
|
| 182 | +Changes in 0.4.2 discussed on the authors blog:
|
| 183 | +
|
| 184 | +* [http://blog.bn2vs.com/2009/11/16/maps-and-semantic-maps-0-4-2/ Maps and Semantic Maps 0.4.2 released]
|
| 185 | +* [http://blog.bn2vs.com/2009/11/12/new-in-maps-0-4-2/ New in Maps 0.4.2]
|
| 186 | +
|
| 187 | +==== Bug fixes ====
|
| 188 | +
|
| 189 | +* Fixed issue with backward compatibility of the $wgGoogleMapsKey variable. It got handled at the wrong point in the form input classes, causing the form geocoding functionality to be disabled for people still using the old variable name.
|
| 190 | +
|
| 191 | +===Semantic Maps 0.4.1===
|
| 192 | +(2009-11-10)
|
| 193 | +
|
| 194 | +====New features====
|
| 195 | +
|
| 196 | +* Added smart geocoding to the QP's centre parameter.
|
| 197 | +
|
| 198 | +* Added smart geocoding to the FI's centre parameter.
|
| 199 | +
|
| 200 | +==== Bug fixes ====
|
| 201 | +
|
| 202 | +* Fixed bug in the Yahoo! Maps form input, caused by not adapting a renamed variable.
|
| 203 | +
|
| 204 | +* Fixed bug in the form scripts caused by wrongly encoded JavaScript file of Maps.
|
| 205 | +
|
| 206 | +===Semantic Maps 0.4===
|
| 207 | +(2009-11-03)
|
| 208 | +
|
| 209 | +Changes in 0.4 discussed on the authors blog:
|
| 210 | +
|
| 211 | +* [http://blog.bn2vs.com/2009/11/03/finally-maps-and-semantic-maps-0-4/ Finally! Maps and Semantic Maps 0.4!]
|
| 212 | +
|
| 213 | +====Bug fixes====
|
| 214 | +
|
| 215 | +* Fixed the repeated display of mapping services on the Special:Ask page, by [http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=58187 adding an aliasing system to SMW].
|
| 216 | +
|
| 217 | +* Fixed problem that caused the SM result formats to not get displayed on Special:Ask.
|
| 218 | +
|
| 219 | +===Semantic Maps 0.3.4===
|
| 220 | +(2009-09-12)
|
| 221 | +
|
| 222 | +Changes in 0.3.4 discussed on the authors blog:
|
| 223 | +
|
| 224 | +* [http://blog.bn2vs.com/2009/09/12/maps-and-semantic-maps-0-3-4-released/ Maps and Semantic Maps 0.3.4 released]
|
| 225 | +
|
| 226 | +====Bug fixes====
|
| 227 | +
|
| 228 | +* Fixed bug causing error for people who do not have Semantic Forms installed and enabled, presumably introduced in 0.3.
|
| 229 | +
|
| 230 | +* Fixed bug causing only the last coordinate property from a result to be shown on a map format, and so causing the predecessors to be ignored in case of multiple coordinate properties.
|
| 231 | +
|
| 232 | +====Refactoring====
|
| 233 | +
|
| 234 | +* Restructured the extension to work with the new feature hook system of Maps.
|
| 235 | +
|
| 236 | +===Semantic Maps 0.3.3===
|
| 237 | +(2009-08-15)
|
| 238 | +
|
| 239 | +Changes in 0.3.3 discussed on the authors blog:
|
| 240 | +
|
| 241 | +* [http://blog.bn2vs.com/2009/08/25/maps-and-semantic-maps-0-3-3/ Maps and Semantic Maps 0.3.3]
|
| 242 | +
|
| 243 | +====Bug fixes====
|
| 244 | +
|
| 245 | +* Fixed error caused by the 'map' format on the Special:Ask page
|
| 246 | +
|
| 247 | +===Semantic Maps 0.3.2===
|
| 248 | +(2009-08-18)
|
| 249 | +
|
| 250 | +====Bug fixes====
|
| 251 | +
|
| 252 | +* Fixed logic error that caused maps to have a wrong centre and zoom when a query only returned one result.
|
| 253 | +
|
| 254 | +* Fixed an issue with the centre parameter in queries. In some cases it would not be processed correctly and cause PHP notices.
|
| 255 | +
|
| 256 | +===Semantic Maps 0.3.1===
|
| 257 | +(2009-08-18)
|
| 258 | +
|
| 259 | +====Bug fixes====
|
| 260 | +
|
| 261 | +* Fixed script design flaw that caused errors when using the 'map' format in a query.
|
| 262 | +
|
| 263 | +===Semantic Maps 0.3===
|
| 264 | +(2009-08-14)
|
| 265 | +
|
| 266 | +Changes in 0.3 discussed on the authors blog:
|
| 267 | +
|
| 268 | +* [http://blog.bn2vs.com/2009/08/13/final-changes-for-maps-and-sm-0-3/ Final changes for Maps and SM 0.3]
|
| 269 | +
|
| 270 | +* [http://blog.bn2vs.com/2009/08/07/new-features-in-maps-and-sm-0-3/ New features in Maps and SM 0.3]
|
| 271 | +
|
| 272 | +* [http://blog.bn2vs.com/2009/08/05/structural-changes-for-maps-and-sm-0-3/ Structural changes for Maps and SM 0.3]
|
| 273 | +
|
| 274 | +====New functionality====
|
| 275 | +
|
| 276 | +* Yahoo! Maps and OpenLayers now handle the "icon=" parameter that can come from Semantic Compound Queries, as Google Maps already did.
|
| 277 | +
|
| 278 | +====Refactoring====
|
| 279 | +
|
| 280 | +* Restructured the Query Printer classes (JavaScript based logic).
|
| 281 | +
|
| 282 | +* Made form input classes weakly typed, so they fully work with the new aliasing system.
|
| 283 | +
|
| 284 | +* Integrated the new hook system of Maps.
|
| 285 | +
|
| 286 | +* Made the form input class inherit from MapsMapFeature.
|
| 287 | +
|
| 288 | +====Bug fixes====
|
| 289 | +
|
| 290 | +* Mapping formats get added only once, as opossed to multiple times in version 0.2.2.
|
| 291 | +
|
| 292 | +* Added "elementNamePrefix" to the map names and fields of form inputs to prevent JavaScript errors.
|
| 293 | +
|
| 294 | +* When a query returns no results, nothing will be displayed, instead of an empty map.
|
| 295 | +
|
| 296 | +* The Google Maps form input now zooms in correctly when a user looks up an address.
|
| 297 | +
|
| 298 | +===Semantic Maps 0.2===
|
| 299 | +(2009-07-29)
|
| 300 | +
|
| 301 | +====New functionality====
|
| 302 | +
|
| 303 | +* Added a hook for [[Extension:Admin_Links|Admin Links]].
|
| 304 | +
|
| 305 | +* Added multi geocoder integration with form inputs.
|
| 306 | +
|
| 307 | +* Added support for the Yahoo! Geocoder (in form inputs).
|
| 308 | +
|
| 309 | +====Refactoring====
|
| 310 | +
|
| 311 | +* Restructured the Form Input classes.
|
| 312 | +
|
| 313 | +====Bug fixes====
|
| 314 | +
|
| 315 | +* Fixed issue that occurred when a custom centre is set for a Yahoo! Maps map, causing the map to not display their markers correctly.
|
| 316 | +
|
| 317 | +===Semantic Maps 0.1===
|
| 318 | +(2009-07-21)
|
| 319 | +
|
| 320 | +* Initial release, featuring both result formats and form inputs for Google Maps (+ Google Earth), Yahoo! Maps and OpenLayers.
|
Index: tags/extensions/SemanticMaps/REL_0_6_4/COPYING |
— | — | @@ -0,0 +1,348 @@ |
| 2 | +The license text below "----" applies to all files within this distribution, other
|
| 3 | +than those that are in a directory which contains files named "LICENSE" or
|
| 4 | +"COPYING", or a subdirectory thereof. For those files, the license text contained in
|
| 5 | +said file overrides any license information contained in directories of smaller depth.
|
| 6 | +Alternative licenses are typically used for software that is provided by external
|
| 7 | +parties, and merely packaged with the Semantic MediaWiki release for convenience.
|
| 8 | +----
|
| 9 | +
|
| 10 | + GNU GENERAL PUBLIC LICENSE
|
| 11 | + Version 2, June 1991
|
| 12 | +
|
| 13 | + Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
| 14 | + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 15 | + Everyone is permitted to copy and distribute verbatim copies
|
| 16 | + of this license document, but changing it is not allowed.
|
| 17 | +
|
| 18 | + Preamble
|
| 19 | +
|
| 20 | + The licenses for most software are designed to take away your
|
| 21 | +freedom to share and change it. By contrast, the GNU General Public
|
| 22 | +License is intended to guarantee your freedom to share and change free
|
| 23 | +software--to make sure the software is free for all its users. This
|
| 24 | +General Public License applies to most of the Free Software
|
| 25 | +Foundation's software and to any other program whose authors commit to
|
| 26 | +using it. (Some other Free Software Foundation software is covered by
|
| 27 | +the GNU Library General Public License instead.) You can apply it to
|
| 28 | +your programs, too.
|
| 29 | +
|
| 30 | + When we speak of free software, we are referring to freedom, not
|
| 31 | +price. Our General Public Licenses are designed to make sure that you
|
| 32 | +have the freedom to distribute copies of free software (and charge for
|
| 33 | +this service if you wish), that you receive source code or can get it
|
| 34 | +if you want it, that you can change the software or use pieces of it
|
| 35 | +in new free programs; and that you know you can do these things.
|
| 36 | +
|
| 37 | + To protect your rights, we need to make restrictions that forbid
|
| 38 | +anyone to deny you these rights or to ask you to surrender the rights.
|
| 39 | +These restrictions translate to certain responsibilities for you if you
|
| 40 | +distribute copies of the software, or if you modify it.
|
| 41 | +
|
| 42 | + For example, if you distribute copies of such a program, whether
|
| 43 | +gratis or for a fee, you must give the recipients all the rights that
|
| 44 | +you have. You must make sure that they, too, receive or can get the
|
| 45 | +source code. And you must show them these terms so they know their
|
| 46 | +rights.
|
| 47 | +
|
| 48 | + We protect your rights with two steps: (1) copyright the software, and
|
| 49 | +(2) offer you this license which gives you legal permission to copy,
|
| 50 | +distribute and/or modify the software.
|
| 51 | +
|
| 52 | + Also, for each author's protection and ours, we want to make certain
|
| 53 | +that everyone understands that there is no warranty for this free
|
| 54 | +software. If the software is modified by someone else and passed on, we
|
| 55 | +want its recipients to know that what they have is not the original, so
|
| 56 | +that any problems introduced by others will not reflect on the original
|
| 57 | +authors' reputations.
|
| 58 | +
|
| 59 | + Finally, any free program is threatened constantly by software
|
| 60 | +patents. We wish to avoid the danger that redistributors of a free
|
| 61 | +program will individually obtain patent licenses, in effect making the
|
| 62 | +program proprietary. To prevent this, we have made it clear that any
|
| 63 | +patent must be licensed for everyone's free use or not licensed at all.
|
| 64 | +
|
| 65 | + The precise terms and conditions for copying, distribution and
|
| 66 | +modification follow.
|
| 67 | +
|
| 68 | + GNU GENERAL PUBLIC LICENSE
|
| 69 | + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
| 70 | +
|
| 71 | + 0. This License applies to any program or other work which contains
|
| 72 | +a notice placed by the copyright holder saying it may be distributed
|
| 73 | +under the terms of this General Public License. The "Program", below,
|
| 74 | +refers to any such program or work, and a "work based on the Program"
|
| 75 | +means either the Program or any derivative work under copyright law:
|
| 76 | +that is to say, a work containing the Program or a portion of it,
|
| 77 | +either verbatim or with modifications and/or translated into another
|
| 78 | +language. (Hereinafter, translation is included without limitation in
|
| 79 | +the term "modification".) Each licensee is addressed as "you".
|
| 80 | +
|
| 81 | +Activities other than copying, distribution and modification are not
|
| 82 | +covered by this License; they are outside its scope. The act of
|
| 83 | +running the Program is not restricted, and the output from the Program
|
| 84 | +is covered only if its contents constitute a work based on the
|
| 85 | +Program (independent of having been made by running the Program).
|
| 86 | +Whether that is true depends on what the Program does.
|
| 87 | +
|
| 88 | + 1. You may copy and distribute verbatim copies of the Program's
|
| 89 | +source code as you receive it, in any medium, provided that you
|
| 90 | +conspicuously and appropriately publish on each copy an appropriate
|
| 91 | +copyright notice and disclaimer of warranty; keep intact all the
|
| 92 | +notices that refer to this License and to the absence of any warranty;
|
| 93 | +and give any other recipients of the Program a copy of this License
|
| 94 | +along with the Program.
|
| 95 | +
|
| 96 | +You may charge a fee for the physical act of transferring a copy, and
|
| 97 | +you may at your option offer warranty protection in exchange for a fee.
|
| 98 | +
|
| 99 | + 2. You may modify your copy or copies of the Program or any portion
|
| 100 | +of it, thus forming a work based on the Program, and copy and
|
| 101 | +distribute such modifications or work under the terms of Section 1
|
| 102 | +above, provided that you also meet all of these conditions:
|
| 103 | +
|
| 104 | + a) You must cause the modified files to carry prominent notices
|
| 105 | + stating that you changed the files and the date of any change.
|
| 106 | +
|
| 107 | + b) You must cause any work that you distribute or publish, that in
|
| 108 | + whole or in part contains or is derived from the Program or any
|
| 109 | + part thereof, to be licensed as a whole at no charge to all third
|
| 110 | + parties under the terms of this License.
|
| 111 | +
|
| 112 | + c) If the modified program normally reads commands interactively
|
| 113 | + when run, you must cause it, when started running for such
|
| 114 | + interactive use in the most ordinary way, to print or display an
|
| 115 | + announcement including an appropriate copyright notice and a
|
| 116 | + notice that there is no warranty (or else, saying that you provide
|
| 117 | + a warranty) and that users may redistribute the program under
|
| 118 | + these conditions, and telling the user how to view a copy of this
|
| 119 | + License. (Exception: if the Program itself is interactive but
|
| 120 | + does not normally print such an announcement, your work based on
|
| 121 | + the Program is not required to print an announcement.)
|
| 122 | +
|
| 123 | +These requirements apply to the modified work as a whole. If
|
| 124 | +identifiable sections of that work are not derived from the Program,
|
| 125 | +and can be reasonably considered independent and separate works in
|
| 126 | +themselves, then this License, and its terms, do not apply to those
|
| 127 | +sections when you distribute them as separate works. But when you
|
| 128 | +distribute the same sections as part of a whole which is a work based
|
| 129 | +on the Program, the distribution of the whole must be on the terms of
|
| 130 | +this License, whose permissions for other licensees extend to the
|
| 131 | +entire whole, and thus to each and every part regardless of who wrote it.
|
| 132 | +
|
| 133 | +Thus, it is not the intent of this section to claim rights or contest
|
| 134 | +your rights to work written entirely by you; rather, the intent is to
|
| 135 | +exercise the right to control the distribution of derivative or
|
| 136 | +collective works based on the Program.
|
| 137 | +
|
| 138 | +In addition, mere aggregation of another work not based on the Program
|
| 139 | +with the Program (or with a work based on the Program) on a volume of
|
| 140 | +a storage or distribution medium does not bring the other work under
|
| 141 | +the scope of this License.
|
| 142 | +
|
| 143 | + 3. You may copy and distribute the Program (or a work based on it,
|
| 144 | +under Section 2) in object code or executable form under the terms of
|
| 145 | +Sections 1 and 2 above provided that you also do one of the following:
|
| 146 | +
|
| 147 | + a) Accompany it with the complete corresponding machine-readable
|
| 148 | + source code, which must be distributed under the terms of Sections
|
| 149 | + 1 and 2 above on a medium customarily used for software interchange; or,
|
| 150 | +
|
| 151 | + b) Accompany it with a written offer, valid for at least three
|
| 152 | + years, to give any third party, for a charge no more than your
|
| 153 | + cost of physically performing source distribution, a complete
|
| 154 | + machine-readable copy of the corresponding source code, to be
|
| 155 | + distributed under the terms of Sections 1 and 2 above on a medium
|
| 156 | + customarily used for software interchange; or,
|
| 157 | +
|
| 158 | + c) Accompany it with the information you received as to the offer
|
| 159 | + to distribute corresponding source code. (This alternative is
|
| 160 | + allowed only for noncommercial distribution and only if you
|
| 161 | + received the program in object code or executable form with such
|
| 162 | + an offer, in accord with Subsection b above.)
|
| 163 | +
|
| 164 | +The source code for a work means the preferred form of the work for
|
| 165 | +making modifications to it. For an executable work, complete source
|
| 166 | +code means all the source code for all modules it contains, plus any
|
| 167 | +associated interface definition files, plus the scripts used to
|
| 168 | +control compilation and installation of the executable. However, as a
|
| 169 | +special exception, the source code distributed need not include
|
| 170 | +anything that is normally distributed (in either source or binary
|
| 171 | +form) with the major components (compiler, kernel, and so on) of the
|
| 172 | +operating system on which the executable runs, unless that component
|
| 173 | +itself accompanies the executable.
|
| 174 | +
|
| 175 | +If distribution of executable or object code is made by offering
|
| 176 | +access to copy from a designated place, then offering equivalent
|
| 177 | +access to copy the source code from the same place counts as
|
| 178 | +distribution of the source code, even though third parties are not
|
| 179 | +compelled to copy the source along with the object code.
|
| 180 | +
|
| 181 | + 4. You may not copy, modify, sublicense, or distribute the Program
|
| 182 | +except as expressly provided under this License. Any attempt
|
| 183 | +otherwise to copy, modify, sublicense or distribute the Program is
|
| 184 | +void, and will automatically terminate your rights under this License.
|
| 185 | +However, parties who have received copies, or rights, from you under
|
| 186 | +this License will not have their licenses terminated so long as such
|
| 187 | +parties remain in full compliance.
|
| 188 | +
|
| 189 | + 5. You are not required to accept this License, since you have not
|
| 190 | +signed it. However, nothing else grants you permission to modify or
|
| 191 | +distribute the Program or its derivative works. These actions are
|
| 192 | +prohibited by law if you do not accept this License. Therefore, by
|
| 193 | +modifying or distributing the Program (or any work based on the
|
| 194 | +Program), you indicate your acceptance of this License to do so, and
|
| 195 | +all its terms and conditions for copying, distributing or modifying
|
| 196 | +the Program or works based on it.
|
| 197 | +
|
| 198 | + 6. Each time you redistribute the Program (or any work based on the
|
| 199 | +Program), the recipient automatically receives a license from the
|
| 200 | +original licensor to copy, distribute or modify the Program subject to
|
| 201 | +these terms and conditions. You may not impose any further
|
| 202 | +restrictions on the recipients' exercise of the rights granted herein.
|
| 203 | +You are not responsible for enforcing compliance by third parties to
|
| 204 | +this License.
|
| 205 | +
|
| 206 | + 7. If, as a consequence of a court judgment or allegation of patent
|
| 207 | +infringement or for any other reason (not limited to patent issues),
|
| 208 | +conditions are imposed on you (whether by court order, agreement or
|
| 209 | +otherwise) that contradict the conditions of this License, they do not
|
| 210 | +excuse you from the conditions of this License. If you cannot
|
| 211 | +distribute so as to satisfy simultaneously your obligations under this
|
| 212 | +License and any other pertinent obligations, then as a consequence you
|
| 213 | +may not distribute the Program at all. For example, if a patent
|
| 214 | +license would not permit royalty-free redistribution of the Program by
|
| 215 | +all those who receive copies directly or indirectly through you, then
|
| 216 | +the only way you could satisfy both it and this License would be to
|
| 217 | +refrain entirely from distribution of the Program.
|
| 218 | +
|
| 219 | +If any portion of this section is held invalid or unenforceable under
|
| 220 | +any particular circumstance, the balance of the section is intended to
|
| 221 | +apply and the section as a whole is intended to apply in other
|
| 222 | +circumstances.
|
| 223 | +
|
| 224 | +It is not the purpose of this section to induce you to infringe any
|
| 225 | +patents or other property right claims or to contest validity of any
|
| 226 | +such claims; this section has the sole purpose of protecting the
|
| 227 | +integrity of the free software distribution system, which is
|
| 228 | +implemented by public license practices. Many people have made
|
| 229 | +generous contributions to the wide range of software distributed
|
| 230 | +through that system in reliance on consistent application of that
|
| 231 | +system; it is up to the author/donor to decide if he or she is willing
|
| 232 | +to distribute software through any other system and a licensee cannot
|
| 233 | +impose that choice.
|
| 234 | +
|
| 235 | +This section is intended to make thoroughly clear what is believed to
|
| 236 | +be a consequence of the rest of this License.
|
| 237 | +
|
| 238 | + 8. If the distribution and/or use of the Program is restricted in
|
| 239 | +certain countries either by patents or by copyrighted interfaces, the
|
| 240 | +original copyright holder who places the Program under this License
|
| 241 | +may add an explicit geographical distribution limitation excluding
|
| 242 | +those countries, so that distribution is permitted only in or among
|
| 243 | +countries not thus excluded. In such case, this License incorporates
|
| 244 | +the limitation as if written in the body of this License.
|
| 245 | +
|
| 246 | + 9. The Free Software Foundation may publish revised and/or new versions
|
| 247 | +of the General Public License from time to time. Such new versions will
|
| 248 | +be similar in spirit to the present version, but may differ in detail to
|
| 249 | +address new problems or concerns.
|
| 250 | +
|
| 251 | +Each version is given a distinguishing version number. If the Program
|
| 252 | +specifies a version number of this License which applies to it and "any
|
| 253 | +later version", you have the option of following the terms and conditions
|
| 254 | +either of that version or of any later version published by the Free
|
| 255 | +Software Foundation. If the Program does not specify a version number of
|
| 256 | +this License, you may choose any version ever published by the Free Software
|
| 257 | +Foundation.
|
| 258 | +
|
| 259 | + 10. If you wish to incorporate parts of the Program into other free
|
| 260 | +programs whose distribution conditions are different, write to the author
|
| 261 | +to ask for permission. For software which is copyrighted by the Free
|
| 262 | +Software Foundation, write to the Free Software Foundation; we sometimes
|
| 263 | +make exceptions for this. Our decision will be guided by the two goals
|
| 264 | +of preserving the free status of all derivatives of our free software and
|
| 265 | +of promoting the sharing and reuse of software generally.
|
| 266 | +
|
| 267 | + NO WARRANTY
|
| 268 | +
|
| 269 | + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
| 270 | +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
| 271 | +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
| 272 | +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
| 273 | +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
| 274 | +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
| 275 | +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
| 276 | +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
| 277 | +REPAIR OR CORRECTION.
|
| 278 | +
|
| 279 | + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 280 | +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
| 281 | +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
| 282 | +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
| 283 | +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
| 284 | +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
| 285 | +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
| 286 | +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
| 287 | +POSSIBILITY OF SUCH DAMAGES.
|
| 288 | +
|
| 289 | + END OF TERMS AND CONDITIONS
|
| 290 | +
|
| 291 | + How to Apply These Terms to Your New Programs
|
| 292 | +
|
| 293 | + If you develop a new program, and you want it to be of the greatest
|
| 294 | +possible use to the public, the best way to achieve this is to make it
|
| 295 | +free software which everyone can redistribute and change under these terms.
|
| 296 | +
|
| 297 | + To do so, attach the following notices to the program. It is safest
|
| 298 | +to attach them to the start of each source file to most effectively
|
| 299 | +convey the exclusion of warranty; and each file should have at least
|
| 300 | +the "copyright" line and a pointer to where the full notice is found.
|
| 301 | +
|
| 302 | + <one line to give the program's name and a brief idea of what it does.>
|
| 303 | + Copyright (C) <year> <name of author>
|
| 304 | +
|
| 305 | + This program is free software; you can redistribute it and/or modify
|
| 306 | + it under the terms of the GNU General Public License as published by
|
| 307 | + the Free Software Foundation; either version 2 of the License, or
|
| 308 | + (at your option) any later version.
|
| 309 | +
|
| 310 | + This program is distributed in the hope that it will be useful,
|
| 311 | + but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 312 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 313 | + GNU General Public License for more details.
|
| 314 | +
|
| 315 | + You should have received a copy of the GNU General Public License
|
| 316 | + along with this program; if not, write to the Free Software
|
| 317 | + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 318 | +
|
| 319 | +
|
| 320 | +Also add information on how to contact you by electronic and paper mail.
|
| 321 | +
|
| 322 | +If the program is interactive, make it output a short notice like this
|
| 323 | +when it starts in an interactive mode:
|
| 324 | +
|
| 325 | + Gnomovision version 69, Copyright (C) year name of author
|
| 326 | + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 327 | + This is free software, and you are welcome to redistribute it
|
| 328 | + under certain conditions; type `show c' for details.
|
| 329 | +
|
| 330 | +The hypothetical commands `show w' and `show c' should show the appropriate
|
| 331 | +parts of the General Public License. Of course, the commands you use may
|
| 332 | +be called something other than `show w' and `show c'; they could even be
|
| 333 | +mouse-clicks or menu items--whatever suits your program.
|
| 334 | +
|
| 335 | +You should also get your employer (if you work as a programmer) or your
|
| 336 | +school, if any, to sign a "copyright disclaimer" for the program, if
|
| 337 | +necessary. Here is a sample; alter the names:
|
| 338 | +
|
| 339 | + Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
| 340 | + `Gnomovision' (which makes passes at compilers) written by James Hacker.
|
| 341 | +
|
| 342 | + <signature of Ty Coon>, 1 April 1989
|
| 343 | + Ty Coon, President of Vice
|
| 344 | +
|
| 345 | +This General Public License does not permit incorporating your program into
|
| 346 | +proprietary programs. If your program is a subroutine library, you may
|
| 347 | +consider it more useful to permit linking proprietary applications with the
|
| 348 | +library. If this is what you want to do, use the GNU Library General
|
| 349 | +Public License instead of this License.
|
Index: tags/extensions/SemanticMaps/REL_0_6_4/SemanticMaps.i18n.php |
— | — | @@ -0,0 +1,986 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Internationalization file for the Semantic Maps extension |
| 6 | + * |
| 7 | + * @file SemanticMaps.i18n.php |
| 8 | + * @ingroup Semantic Maps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +$messages = array(); |
| 14 | + |
| 15 | +/** English |
| 16 | + * @author Jeroen De Dauw |
| 17 | + */ |
| 18 | +$messages['en'] = array( |
| 19 | + // General |
| 20 | + 'semanticmaps_name' => 'Semantic Maps', |
| 21 | + // TODO: update demo link to the new wiki, once it has 0.6.x running. |
| 22 | + 'semanticmaps_desc' => "Provides the ability to view and edit coordinate data stored through the Semantic MediaWiki extension ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 23 | +Available map services: $1", |
| 24 | + 'semanticmaps-unrecognizeddistance' => 'The value $1 is not a valid distance.', |
| 25 | + |
| 26 | + // Forms |
| 27 | + 'semanticmaps_lookupcoordinates' => 'Look up coordinates', |
| 28 | + 'semanticmaps_enteraddresshere' => 'Enter address here', |
| 29 | + 'semanticmaps_notfound' => 'not found', |
| 30 | + |
| 31 | + // Parameter descriptions |
| 32 | + 'semanticmaps_paramdesc_format' => 'The mapping service used to generate the map', |
| 33 | + 'semanticmaps_paramdesc_geoservice' => 'The geocoding service used to turn addresses into coordinates', |
| 34 | + 'semanticmaps_paramdesc_height' => 'The height of the map, in pixels (default is $1)', |
| 35 | + 'semanticmaps_paramdesc_width' => 'The width of the map, in pixels (default is $1)', |
| 36 | + 'semanticmaps_paramdesc_zoom' => 'The zoom level of the map', |
| 37 | + 'semanticmaps_paramdesc_centre' => 'The coordinates of the maps\' centre', |
| 38 | + 'semanticmaps_paramdesc_controls' => 'The user controls placed on the map', |
| 39 | + 'semanticmaps_paramdesc_types' => 'The map types available on the map', |
| 40 | + 'semanticmaps_paramdesc_type' => 'The default map type for the map', |
| 41 | + 'semanticmaps_paramdesc_overlays' => 'The overlays available on the map', |
| 42 | + 'semanticmaps_paramdesc_autozoom' => 'If zoom in and out by using the mouse scroll wheel is enabled', |
| 43 | + 'semanticmaps_paramdesc_layers' => 'The layers available on the map', |
| 44 | +); |
| 45 | + |
| 46 | +/** Message documentation (Message documentation) |
| 47 | + * @author Fryed-peach |
| 48 | + * @author Purodha |
| 49 | + * @author Raymond |
| 50 | + */ |
| 51 | +$messages['qqq'] = array( |
| 52 | + 'semanticmaps_desc' => '{{desc}} |
| 53 | + |
| 54 | +* $1: a list of available map services', |
| 55 | + 'semanticmaps_paramdesc_overlays' => 'An "overlay" is a map layer, containing icons or images, or whatever, to enrich, in this case, the map. Could for example be a layer with speed cameras, or municipality borders.', |
| 56 | +); |
| 57 | + |
| 58 | +/** Afrikaans (Afrikaans) |
| 59 | + * @author Naudefj |
| 60 | + */ |
| 61 | +$messages['af'] = array( |
| 62 | + 'semanticmaps_desc' => 'Bied die vermoë om koördinaatdata met behulp van die Semantiese MediaWiki-uitbreiding te sien en te wysig ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 63 | +Beskikbare kaartdienste: $1', |
| 64 | + 'semanticmaps_lookupcoordinates' => 'Soek koördinate op', |
| 65 | + 'semanticmaps_enteraddresshere' => 'Voer adres hier in', |
| 66 | + 'semanticmaps_notfound' => 'nie gevind nie', |
| 67 | + 'semanticmaps_paramdesc_format' => 'Die kaartdiens wat die kaart lewer', |
| 68 | + 'semanticmaps_paramdesc_geoservice' => 'Die geokoderingsdiens gebruik om adresse na koördinate om te skakel', |
| 69 | + 'semanticmaps_paramdesc_height' => 'Die hoogte van die kaart in spikkels (standaard is $1)', |
| 70 | + 'semanticmaps_paramdesc_width' => 'Die breedte van die kaart in spikkels (standaard is $1)', |
| 71 | + 'semanticmaps_paramdesc_zoom' => 'Die zoom-vlak van die kaart', |
| 72 | + 'semanticmaps_paramdesc_centre' => 'Die koördinate van die middel van die kaart', |
| 73 | + 'semanticmaps_paramdesc_controls' => 'Die gebruikerskontroles op die kaart geplaas', |
| 74 | + 'semanticmaps_paramdesc_types' => 'Die kaarttipes beskikbaar op die kaart', |
| 75 | + 'semanticmaps_paramdesc_type' => 'Die standaard kaarttipe vir die kaart', |
| 76 | + 'semanticmaps_paramdesc_overlays' => 'Die oorleggings beskikbaar op die kaart', |
| 77 | + 'semanticmaps_paramdesc_autozoom' => 'Of in- en uitzoom met die muis se wiel moontlik is', |
| 78 | + 'semanticmaps_paramdesc_layers' => 'Die lae beskikbaar op die kaart', |
| 79 | +); |
| 80 | + |
| 81 | +/** Gheg Albanian (Gegë) |
| 82 | + * @author Mdupont |
| 83 | + */ |
| 84 | +$messages['aln'] = array( |
| 85 | + 'semanticmaps_paramdesc_zoom' => 'Shkalla e zmadhimit Harta', |
| 86 | + 'semanticmaps_paramdesc_centre' => "Koordinatat e qendrës hartave '", |
| 87 | + 'semanticmaps_paramdesc_controls' => 'Perdoruesi kontrolleve të vendosura në hartë', |
| 88 | + 'semanticmaps_paramdesc_types' => 'Llojet Harta dispozicion në hartë', |
| 89 | + 'semanticmaps_paramdesc_type' => 'Harta default lloji për hartën', |
| 90 | + 'semanticmaps_paramdesc_overlays' => 'Overlays në dispozicion në hartë', |
| 91 | + 'semanticmaps_paramdesc_autozoom' => 'Nëse zoom brenda dhe jashtë duke përdorur rrotëzën miut është i aktivizuar', |
| 92 | + 'semanticmaps_paramdesc_layers' => 'Shtresat në dispozicion në hartë', |
| 93 | +); |
| 94 | + |
| 95 | +/** Arabic (العربية) |
| 96 | + * @author Meno25 |
| 97 | + * @author OsamaK |
| 98 | + */ |
| 99 | +$messages['ar'] = array( |
| 100 | + 'semanticmaps_name' => 'خرائط دلالية', |
| 101 | + 'semanticmaps_desc' => 'يقدم إمكانية عرض وتعديل بيانات التنسيق التي خزنها امتداد سيمانتيك ميدياويكي ([http://wiki.bn2vs.com/wiki/Semantic_Maps تجربة]). |
| 102 | +خدمات الخرائط المتوفرة: $1', |
| 103 | + 'semanticmaps_lookupcoordinates' => 'ابحث عن الإحداثيات', |
| 104 | + 'semanticmaps_enteraddresshere' => 'أدخل العنوان هنا', |
| 105 | + 'semanticmaps_notfound' => 'لم يوجد', |
| 106 | + 'semanticmaps_paramdesc_format' => 'خدمة الخرائط المستخدمة لتوليد الخريطة', |
| 107 | + 'semanticmaps_paramdesc_geoservice' => 'خدمة التكويد الجغرافي المستخدمة لتحويل العناوين إلى إحداثيات', |
| 108 | + 'semanticmaps_paramdesc_height' => 'ارتفاع الخريطة، بالبكسل (افتراضيا $1)', |
| 109 | + 'semanticmaps_paramdesc_width' => 'عرض الخريطة، بالبكسل (افتراضيا $1)', |
| 110 | + 'semanticmaps_paramdesc_zoom' => 'مستوى التقريب للخريطة', |
| 111 | + 'semanticmaps_paramdesc_centre' => 'إحداثيات وسط الخريطة', |
| 112 | + 'semanticmaps_paramdesc_controls' => 'متحكمات المستخدم موضوعة على الخريطة', |
| 113 | + 'semanticmaps_paramdesc_types' => 'أنواع الخرائط المتوفرة على الخريطة', |
| 114 | + 'semanticmaps_paramdesc_type' => 'نوع الخريطة الافتراضي للخريطة', |
| 115 | + 'semanticmaps_paramdesc_overlays' => 'الطبقات الفوقية متوفرة على الخريطة', |
| 116 | + 'semanticmaps_paramdesc_autozoom' => 'لو أن التقريب والابتعاد بواسطة استخدام عجلة تدحرج الفأرة مفعلة', |
| 117 | + 'semanticmaps_paramdesc_layers' => 'الطبقات المتوفرة على الخريطة', |
| 118 | +); |
| 119 | + |
| 120 | +/** Egyptian Spoken Arabic (مصرى) |
| 121 | + * @author Ghaly |
| 122 | + * @author Meno25 |
| 123 | + */ |
| 124 | +$messages['arz'] = array( |
| 125 | + 'semanticmaps_name' => 'خرائط دلالية', |
| 126 | + 'semanticmaps_lookupcoordinates' => 'ابحث عن الإحداثيات', |
| 127 | + 'semanticmaps_enteraddresshere' => 'أدخل العنوان هنا', |
| 128 | +); |
| 129 | + |
| 130 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 131 | + * @author EugeneZelenko |
| 132 | + * @author Jim-by |
| 133 | + */ |
| 134 | +$messages['be-tarask'] = array( |
| 135 | + 'semanticmaps_name' => 'Сэмантычныя мапы', |
| 136 | + 'semanticmaps_desc' => 'Забясьпечвае магчымасьць прагляду і рэдагаваньня зьвестак пра каардынаты, якія захоўваюцца з дапамогай пашырэньня Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps дэманстрацыя]). Даступныя сэрвісы мапаў: $1', |
| 137 | + 'semanticmaps-unrecognizeddistance' => 'Значэньне $1 — няслушная адлегласьць.', |
| 138 | + 'semanticmaps_lookupcoordinates' => 'Пошук каардынатаў', |
| 139 | + 'semanticmaps_enteraddresshere' => 'Увядзіце тут адрас', |
| 140 | + 'semanticmaps_notfound' => 'ня знойдзена', |
| 141 | + 'semanticmaps_paramdesc_format' => 'Картаграфічны сэрвіс, які выкарыстоўваецца для стварэньня мапаў', |
| 142 | + 'semanticmaps_paramdesc_geoservice' => 'Сэрвіс геаграфічнага кадаваньня, які выкарыстоўваецца для пераўтварэньня адрасоў ў каардынаты', |
| 143 | + 'semanticmaps_paramdesc_height' => 'Вышыня мапы ў піксэлях (па змоўчваньні $1)', |
| 144 | + 'semanticmaps_paramdesc_width' => 'Шырыня мапы ў піксэлях (па змоўчваньні $1)', |
| 145 | + 'semanticmaps_paramdesc_zoom' => 'Маштаб мапы', |
| 146 | + 'semanticmaps_paramdesc_centre' => 'Каардынаты цэнтру мапы', |
| 147 | + 'semanticmaps_paramdesc_controls' => 'Элемэнты кіраваньня на мапе', |
| 148 | + 'semanticmaps_paramdesc_types' => 'Тыпы мапы даступныя на мапе', |
| 149 | + 'semanticmaps_paramdesc_type' => 'Тып мапы па змоўчваньні', |
| 150 | + 'semanticmaps_paramdesc_overlays' => 'Даступныя слаі на мапе', |
| 151 | + 'semanticmaps_paramdesc_autozoom' => 'Калі ўключана зьмяншэньне ці павялічэньне маштабу праз кола пракруткі мышы', |
| 152 | + 'semanticmaps_paramdesc_layers' => 'Даступныя слаі на мапе', |
| 153 | +); |
| 154 | + |
| 155 | +/** Breton (Brezhoneg) |
| 156 | + * @author Fohanno |
| 157 | + * @author Fulup |
| 158 | + * @author Y-M D |
| 159 | + */ |
| 160 | +$messages['br'] = array( |
| 161 | + 'semanticmaps_desc' => 'Talvezout a ra da welet ha da gemmañ roadennoù stoket dre an astenn Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). Servijoù kartennoù hegerz : $1', |
| 162 | + 'semanticmaps-unrecognizeddistance' => "An talvoud $1 n'eo ket un hed reizh anezhañ.", |
| 163 | + 'semanticmaps_lookupcoordinates' => 'Istimañ an daveennoù', |
| 164 | + 'semanticmaps_enteraddresshere' => "Merkit ar chomlec'h amañ", |
| 165 | + 'semanticmaps_notfound' => "N'eo ket bet kavet", |
| 166 | + 'semanticmaps_paramdesc_format' => 'Ar servij kartennaouiñ implijet da grouiñ ar gartenn', |
| 167 | + 'semanticmaps_paramdesc_geoservice' => "Ar servij geokodiñ implijet da dreiñ ar chomlec'hioù e daveennoù", |
| 168 | + 'semanticmaps_paramdesc_height' => 'Uhelder ar gartenn, e pikseloù ($1 dre izouer)', |
| 169 | + 'semanticmaps_paramdesc_width' => 'Ledander ar gartenn, e pikseloù ($1 dre izouer)', |
| 170 | + 'semanticmaps_paramdesc_zoom' => 'Live zoum ar gartenn', |
| 171 | + 'semanticmaps_paramdesc_centre' => 'Daveennoù kreiz ar gartenn', |
| 172 | + 'semanticmaps_paramdesc_controls' => "Ar c'hontrolloù implijer lakaet war ar gartenn", |
| 173 | + 'semanticmaps_paramdesc_types' => "Ar seurtoù kartennoù a c'haller kaout war ar gartenn", |
| 174 | + 'semanticmaps_paramdesc_type' => 'Ar seurt kartenn dre ziouer evit ar gartenn', |
| 175 | + 'semanticmaps_paramdesc_overlays' => "Ar gwiskadoù a c'haller da gaout war ar gartenn", |
| 176 | + 'semanticmaps_paramdesc_autozoom' => 'Mard eo gweredekaet ar zoumañ hag an dizoumañ gant rodig al logodenn', |
| 177 | + 'semanticmaps_paramdesc_layers' => 'Ar gwiskadoù zo da gaout war ar gartenn', |
| 178 | +); |
| 179 | + |
| 180 | +/** Bosnian (Bosanski) |
| 181 | + * @author CERminator |
| 182 | + * @author Palapa |
| 183 | + */ |
| 184 | +$messages['bs'] = array( |
| 185 | + 'semanticmaps_desc' => 'Daje mogućnost pregleda i uređivanja podataka koordinata koji su spremljeni putem Semantic MediaWiki proširenja ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 186 | +Dostupne usluge mapa: $1', |
| 187 | + 'semanticmaps-unrecognizeddistance' => 'Vrijednost $1 nije ispravno odstojanje.', |
| 188 | + 'semanticmaps_lookupcoordinates' => 'Nađi koordinate', |
| 189 | + 'semanticmaps_enteraddresshere' => 'Unesite adresu ovdje', |
| 190 | + 'semanticmaps_notfound' => 'nije pronađeno', |
| 191 | + 'semanticmaps_paramdesc_format' => 'Usluga kartiranja korištena za generiranje karte', |
| 192 | + 'semanticmaps_paramdesc_geoservice' => 'Usluga geokodiranja korištena za pretvaranje adresa u koordinate', |
| 193 | + 'semanticmaps_paramdesc_height' => 'Visina mape, u pikselima (pretpostavljeno je $1)', |
| 194 | + 'semanticmaps_paramdesc_width' => 'Širina mape, u pikselima (pretpostavljeno je $1)', |
| 195 | + 'semanticmaps_paramdesc_zoom' => 'Nivo zumiranja mape', |
| 196 | + 'semanticmaps_paramdesc_centre' => 'Koordinate centra karte', |
| 197 | + 'semanticmaps_paramdesc_controls' => 'Korisničke kontrole postavljene na kartu', |
| 198 | + 'semanticmaps_paramdesc_types' => 'Tipovi karti dostupnih na mapi', |
| 199 | + 'semanticmaps_paramdesc_type' => 'Pretpostavljeni tip karte za kartu', |
| 200 | + 'semanticmaps_paramdesc_overlays' => 'Slojevi dostupni na karti', |
| 201 | + 'semanticmaps_paramdesc_autozoom' => 'Ako je zumiranje i odaljavanje putem kotačića na mišu omogućeno', |
| 202 | + 'semanticmaps_paramdesc_layers' => 'Slojevi dostupni na mapi', |
| 203 | +); |
| 204 | + |
| 205 | +/** Catalan (Català) |
| 206 | + * @author Paucabot |
| 207 | + * @author Solde |
| 208 | + */ |
| 209 | +$messages['ca'] = array( |
| 210 | + 'semanticmaps_notfound' => "no s'ha trobat", |
| 211 | +); |
| 212 | + |
| 213 | +/** German (Deutsch) |
| 214 | + * @author DaSch |
| 215 | + * @author Imre |
| 216 | + * @author Pill |
| 217 | + * @author The Evil IP address |
| 218 | + * @author Umherirrender |
| 219 | + */ |
| 220 | +$messages['de'] = array( |
| 221 | + 'semanticmaps_desc' => 'Ergänzt eine Möglichkeit zum Ansehen und Bearbeiten von Koordinaten, die im Rahmen der Erweiterung „Semantisches MediaWiki“ gespeichert wurden ([http://wiki.bn2vs.com/wiki/Semantic_Maps Demo]). |
| 222 | +Unterstützte Kartendienste: $1', |
| 223 | + 'semanticmaps-unrecognizeddistance' => 'Der Wert $1 ist keine gültige Distanz.', |
| 224 | + 'semanticmaps_lookupcoordinates' => 'Koordinaten nachschlagen', |
| 225 | + 'semanticmaps_enteraddresshere' => 'Adresse hier eingeben', |
| 226 | + 'semanticmaps_notfound' => 'nicht gefunden', |
| 227 | + 'semanticmaps_paramdesc_format' => 'Der Kartographiedienst zum Generieren der Karte', |
| 228 | + 'semanticmaps_paramdesc_geoservice' => 'Der Geokodierungsdienst, um Adressen in Koordinaten umzuwandeln', |
| 229 | + 'semanticmaps_paramdesc_height' => 'Die Höhe der Karte in Pixeln (Standard ist $1)', |
| 230 | + 'semanticmaps_paramdesc_width' => 'Die Breite der Karte in Pixeln (Standard ist $1)', |
| 231 | + 'semanticmaps_paramdesc_zoom' => 'Die Vergrößerungsstufe der Karte', |
| 232 | + 'semanticmaps_paramdesc_centre' => 'Die Koordinaten der Kartenmitte', |
| 233 | + 'semanticmaps_paramdesc_controls' => 'Die Benutzerkontrollen, die sich auf der Karte befinden', |
| 234 | + 'semanticmaps_paramdesc_types' => 'Die verfügbaren Kartentypen für die Karte', |
| 235 | + 'semanticmaps_paramdesc_type' => 'Der Standard-Kartentyp für die Karte', |
| 236 | + 'semanticmaps_paramdesc_overlays' => 'Die auf der Karte verfügbaren Overlays', |
| 237 | + 'semanticmaps_paramdesc_autozoom' => 'Wenn Vergrößerung und Verkleinerung mit dem Maus-Scrollrad aktiviert ist', |
| 238 | + 'semanticmaps_paramdesc_layers' => 'Die auf der Karte verfügbaren Ebenen', |
| 239 | +); |
| 240 | + |
| 241 | +/** Lower Sorbian (Dolnoserbski) |
| 242 | + * @author Michawiki |
| 243 | + */ |
| 244 | +$messages['dsb'] = array( |
| 245 | + 'semanticmaps_desc' => 'Bitujo zmóžnosć se koordinatowe daty pśez rozšyrjenje Semantic MediaWiki woglědaś a wobźěłaś ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 246 | +K dispoziciji stojece kórtowe słužby: $1.', |
| 247 | + 'semanticmaps-unrecognizeddistance' => 'Gódnota $1 njejo płaśiwa distanca.', |
| 248 | + 'semanticmaps_lookupcoordinates' => 'Za koordinatami póglědaś', |
| 249 | + 'semanticmaps_enteraddresshere' => 'Zapódaj how adresu', |
| 250 | + 'semanticmaps_notfound' => 'njenamakany', |
| 251 | + 'semanticmaps_paramdesc_format' => 'Kartěrowańska słužba, kótaraž se wužywa, aby napórała kórtu', |
| 252 | + 'semanticmaps_paramdesc_geoservice' => 'Geokoděrowańska słužba, kótaraž se wužywa, aby pśetwóriła adrese do koordinatow', |
| 253 | + 'semanticmaps_paramdesc_height' => 'Wusokosć kórty, w pikselach (standard jo $1)', |
| 254 | + 'semanticmaps_paramdesc_width' => 'Šyrokosć kórty, w pikselach (standard jo $1)', |
| 255 | + 'semanticmaps_paramdesc_zoom' => 'Skalěrowański schóźeńk kórty', |
| 256 | + 'semanticmaps_paramdesc_centre' => 'Koordinaty srjejźišća kórty', |
| 257 | + 'semanticmaps_paramdesc_controls' => 'Wužywarske elementy na kórśe', |
| 258 | + 'semanticmaps_paramdesc_types' => 'Kórtowe typy, kótarež stoje za kórtu k dispoziciji', |
| 259 | + 'semanticmaps_paramdesc_type' => 'Standardny kórtowy typ za kórtu', |
| 260 | + 'semanticmaps_paramdesc_overlays' => 'Pśewarstowanja, kótarež stoje za kórtu k dispoziciji', |
| 261 | + 'semanticmaps_paramdesc_autozoom' => 'Jolic pówětšenje a pómjeńšenje z pomocu kólaska myški jo zmóžnjone', |
| 262 | + 'semanticmaps_paramdesc_layers' => 'Warsty, kótarež stoje za kórtu k dispoziciji', |
| 263 | +); |
| 264 | + |
| 265 | +/** Greek (Ελληνικά) |
| 266 | + * @author ZaDiak |
| 267 | + */ |
| 268 | +$messages['el'] = array( |
| 269 | + 'semanticmaps_lookupcoordinates' => 'Επιθεώρηση συντεταγμένων', |
| 270 | + 'semanticmaps_enteraddresshere' => 'Εισαγωγή διεύθυνσης εδώ', |
| 271 | + 'semanticmaps_notfound' => 'δεν βρέθηκε', |
| 272 | +); |
| 273 | + |
| 274 | +/** Esperanto (Esperanto) |
| 275 | + * @author Yekrats |
| 276 | + */ |
| 277 | +$messages['eo'] = array( |
| 278 | + 'semanticmaps_lookupcoordinates' => 'Rigardi koordinatojn', |
| 279 | + 'semanticmaps_enteraddresshere' => 'Enigu adreson ĉi tie', |
| 280 | + 'semanticmaps_notfound' => 'ne trovita', |
| 281 | +); |
| 282 | + |
| 283 | +/** Spanish (Español) |
| 284 | + * @author Crazymadlover |
| 285 | + * @author Imre |
| 286 | + * @author Locos epraix |
| 287 | + * @author Translationista |
| 288 | + */ |
| 289 | +$messages['es'] = array( |
| 290 | + 'semanticmaps_desc' => 'Proporciona la capacidad de ver y editar los datos coordinados almacenados a través de la extensión Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 291 | +Servicios de mapas disponibles: $1', |
| 292 | + 'semanticmaps-unrecognizeddistance' => 'El valor $1 no esuna distancia válida.', |
| 293 | + 'semanticmaps_lookupcoordinates' => 'Busque las coordenadas', |
| 294 | + 'semanticmaps_enteraddresshere' => 'Ingresar dirección aquí', |
| 295 | + 'semanticmaps_notfound' => 'no encontrado', |
| 296 | + 'semanticmaps_paramdesc_format' => 'El servicio cartográfico usado para generar el mapa', |
| 297 | + 'semanticmaps_paramdesc_geoservice' => 'El servicio de geocodificación para convertir direcciones en coordenadas', |
| 298 | + 'semanticmaps_paramdesc_height' => 'Alto del mapa en píxeles (el predeterminado es $1)', |
| 299 | + 'semanticmaps_paramdesc_width' => 'Ancho del mapa en píxeles (el predeterminado es $1)', |
| 300 | + 'semanticmaps_paramdesc_zoom' => 'Nivel de acercamiento del mapa', |
| 301 | + 'semanticmaps_paramdesc_centre' => 'Las coordenadas del centro del mapa', |
| 302 | + 'semanticmaps_paramdesc_controls' => 'Los controles de usuario ubicados en el mapa', |
| 303 | + 'semanticmaps_paramdesc_types' => 'Los tipos de mapa disponibles en el mapa', |
| 304 | + 'semanticmaps_paramdesc_type' => 'El tipo de mapa predeterminado para el mapa', |
| 305 | + 'semanticmaps_paramdesc_overlays' => 'FUZZY!!! Las capas disponibles en el mapa', |
| 306 | + 'semanticmaps_paramdesc_autozoom' => 'En caso de que el acercamiento y alejamiento mediante la rueda del ratón esté habilitado', |
| 307 | + 'semanticmaps_paramdesc_layers' => 'Las capas disponibles en el mapa', |
| 308 | +); |
| 309 | + |
| 310 | +/** Basque (Euskara) |
| 311 | + * @author An13sa |
| 312 | + */ |
| 313 | +$messages['eu'] = array( |
| 314 | + 'semanticmaps_lookupcoordinates' => 'Koordenatuak bilatu', |
| 315 | +); |
| 316 | + |
| 317 | +/** Finnish (Suomi) |
| 318 | + * @author Crt |
| 319 | + * @author Str4nd |
| 320 | + */ |
| 321 | +$messages['fi'] = array( |
| 322 | + 'semanticmaps_enteraddresshere' => 'Kirjoita osoite tähän', |
| 323 | + 'semanticmaps_notfound' => 'ei löytynyt', |
| 324 | + 'semanticmaps_paramdesc_height' => 'Kartan korkeus pikseleinä (oletus on $1)', |
| 325 | + 'semanticmaps_paramdesc_width' => 'Kartan leveys pikseleinä (oletus on $1)', |
| 326 | + 'semanticmaps_paramdesc_zoom' => 'Kartan suurennostaso', |
| 327 | + 'semanticmaps_paramdesc_centre' => 'Kartan keskipisteen koordinaatit', |
| 328 | +); |
| 329 | + |
| 330 | +/** French (Français) |
| 331 | + * @author Crochet.david |
| 332 | + * @author Grondin |
| 333 | + * @author IAlex |
| 334 | + * @author Jean-Frédéric |
| 335 | + * @author PieRRoMaN |
| 336 | + * @author Urhixidur |
| 337 | + */ |
| 338 | +$messages['fr'] = array( |
| 339 | + 'semanticmaps_desc' => 'Permet de voir et modifier les données de coordonnées stockées à travers l’extension Semantic MediaWiki ([http://www.mediawiki.org/wiki/Extension:Semantic_Maps Documentation]. [http://wiki.bn2vs.com/wiki/Semantic_Maps Démo]). Services de cartes disponibles : $1.', |
| 340 | + 'semanticmaps-unrecognizeddistance' => "La valeur $1 n'est pas une distance valide", |
| 341 | + 'semanticmaps_lookupcoordinates' => 'Estimer les coordonnées', |
| 342 | + 'semanticmaps_enteraddresshere' => 'Entrez ici l’adresse', |
| 343 | + 'semanticmaps_notfound' => 'pas trouvé', |
| 344 | + 'semanticmaps_paramdesc_format' => 'Le service de cartographie utilisé pour générer la carte', |
| 345 | + 'semanticmaps_paramdesc_geoservice' => 'Le service de géocodage utilisé pour transformer les adresses en coordonnées', |
| 346 | + 'semanticmaps_paramdesc_height' => 'La hauteur de la carte, en pixels ($1 par défaut)', |
| 347 | + 'semanticmaps_paramdesc_width' => 'La largeur de la carte, en pixels ($1 par défaut)', |
| 348 | + 'semanticmaps_paramdesc_zoom' => 'Le niveau d’agrandissement de la carte', |
| 349 | + 'semanticmaps_paramdesc_centre' => 'Les coordonnées du centre de la carte', |
| 350 | + 'semanticmaps_paramdesc_controls' => 'Les contrôles utilisateurs placés sur la carte', |
| 351 | + 'semanticmaps_paramdesc_types' => 'Les types de cartes disponibles sur la carte', |
| 352 | + 'semanticmaps_paramdesc_type' => 'Le type de carte par défaut pour la carte', |
| 353 | + 'semanticmaps_paramdesc_overlays' => 'Les revêtements disponibles sur la carte', |
| 354 | + 'semanticmaps_paramdesc_autozoom' => 'Si le zoom avant et arrière en utilisant la molette de la souris est activé', |
| 355 | + 'semanticmaps_paramdesc_layers' => 'Les revêtements disponibles sur la carte', |
| 356 | +); |
| 357 | + |
| 358 | +/** Galician (Galego) |
| 359 | + * @author Toliño |
| 360 | + */ |
| 361 | +$messages['gl'] = array( |
| 362 | + 'semanticmaps_desc' => 'Proporciona a capacidade de visualizar e modificar os datos de coordenadas gardados a través da extensión Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps demostración]). |
| 363 | +Servizos de mapa dispoñibles: $1', |
| 364 | + 'semanticmaps-unrecognizeddistance' => 'O valor $1 non é unha distancia válida.', |
| 365 | + 'semanticmaps_lookupcoordinates' => 'Ver as coordenadas', |
| 366 | + 'semanticmaps_enteraddresshere' => 'Introduza o enderezo aquí', |
| 367 | + 'semanticmaps_notfound' => 'non se atopou', |
| 368 | + 'semanticmaps_paramdesc_format' => 'O servizo de cartografía utilizado para xerar o mapa', |
| 369 | + 'semanticmaps_paramdesc_geoservice' => 'O servizo de xeocodificación usado para transformar enderezos en coordenadas', |
| 370 | + 'semanticmaps_paramdesc_height' => 'A altura do mapa, en píxeles (por defecto, $1)', |
| 371 | + 'semanticmaps_paramdesc_width' => 'O largo do mapa, en píxeles (por defecto, $1)', |
| 372 | + 'semanticmaps_paramdesc_zoom' => 'O nivel de zoom do mapa', |
| 373 | + 'semanticmaps_paramdesc_centre' => 'As coordenadas do centro do mapa', |
| 374 | + 'semanticmaps_paramdesc_controls' => 'Os controis de usuario situados no mapa', |
| 375 | + 'semanticmaps_paramdesc_types' => 'Os tipos de mapa dispoñibles no mapa', |
| 376 | + 'semanticmaps_paramdesc_type' => 'O tipo de mapa por defecto para o mapa', |
| 377 | + 'semanticmaps_paramdesc_overlays' => 'As sobreposicións dispoñibles no mapa', |
| 378 | + 'semanticmaps_paramdesc_autozoom' => 'Activa o achegamento e afastamento coa roda do rato', |
| 379 | + 'semanticmaps_paramdesc_layers' => 'As capas dispoñibles no mapa', |
| 380 | +); |
| 381 | + |
| 382 | +/** Swiss German (Alemannisch) |
| 383 | + * @author Als-Holder |
| 384 | + */ |
| 385 | +$messages['gsw'] = array( |
| 386 | + 'semanticmaps_desc' => 'Ergänzt e Megligkeit zum Aaluege un Bearbeite vu Koordinate, wu im Ramme vu dr Erwyterig „Semantisch MediaWiki“ gspycheret wore sin. Unterstitzti Chartedienscht: $1. [http://www.mediawiki.org/wiki/Extension:Semantic_Maps Dokumäntation]. [http://wiki.bn2vs.com/wiki/Semantic_Maps Demo]', |
| 387 | + 'semanticmaps-unrecognizeddistance' => 'Dr Wert $1 isch kei giltigi Dischtanz.', |
| 388 | + 'semanticmaps_lookupcoordinates' => 'Koordinate nooluege', |
| 389 | + 'semanticmaps_enteraddresshere' => 'Doo Adräss yygee', |
| 390 | + 'semanticmaps_notfound' => 'nit gfunde', |
| 391 | + 'semanticmaps_paramdesc_format' => 'Dr Chartedienscht, wu brucht wäre soll zum Erzyyge vu dr Charte', |
| 392 | + 'semanticmaps_paramdesc_geoservice' => 'Dr Geokodierigs-Service, wu brucht wäre soll zum umwandle vu Adrässe in Koordinate', |
| 393 | + 'semanticmaps_paramdesc_height' => 'D Hechi vu dr Charte, in Pixel (Standard: $1)', |
| 394 | + 'semanticmaps_paramdesc_width' => 'D Breiti vu dr Charte, in Pixel (Standard: $1)', |
| 395 | + 'semanticmaps_paramdesc_zoom' => 'S Zoom-Level vu dr Charte', |
| 396 | + 'semanticmaps_paramdesc_centre' => 'D Koordinate vum Mittelpunkt vu dr Charte', |
| 397 | + 'semanticmaps_paramdesc_controls' => 'D Hilfsmittel, wu in d Charte yygfiegt sin', |
| 398 | + 'semanticmaps_paramdesc_types' => 'D Chartetype, wu fir d Charte verfiegbar sin', |
| 399 | + 'semanticmaps_paramdesc_type' => 'Dr Standard-Chartetyp fir d Charte', |
| 400 | + 'semanticmaps_paramdesc_overlays' => 'D Overlays, wu fir d Charte verfiegbar sin', |
| 401 | + 'semanticmaps_paramdesc_autozoom' => 'Eb mer e Charte cha vergreßere oder verchleinere mit em Muusrad', |
| 402 | + 'semanticmaps_paramdesc_layers' => 'D Lage, wu fir Charte verfiegbar sin', |
| 403 | +); |
| 404 | + |
| 405 | +/** Hebrew (עברית) |
| 406 | + * @author Rotemliss |
| 407 | + * @author YaronSh |
| 408 | + */ |
| 409 | +$messages['he'] = array( |
| 410 | + 'semanticmaps_desc' => 'הוספת האפשרות לצפייה ולעריכה בנתוני קואורדינטה המאוחסנים דרך הרחבת המדיה־ויקי הסמנטי ([http://wiki.bn2vs.com/wiki/Semantic_Maps הדגמה]). |
| 411 | +שירותי מפה זמינים: $1', |
| 412 | + 'semanticmaps_lookupcoordinates' => 'חיפוש קואורדינטות', |
| 413 | + 'semanticmaps_enteraddresshere' => 'כתבו כתובת כאן', |
| 414 | + 'semanticmaps_notfound' => 'לא נמצאה', |
| 415 | + 'semanticmaps_paramdesc_format' => 'שירות המיפוי המשמש להכנת המפה', |
| 416 | + 'semanticmaps_paramdesc_height' => 'גובה המפה, בפיקסלים (ברירת המחדל היא $1)', |
| 417 | + 'semanticmaps_paramdesc_width' => 'רוחב המפה, בפיקסלים (ברירת המחדל היא $1)', |
| 418 | + 'semanticmaps_paramdesc_centre' => 'קואורדינטות מרכז המפה', |
| 419 | + 'semanticmaps_paramdesc_controls' => 'פקדי המשתמש ממוקמים על המפה', |
| 420 | + 'semanticmaps_paramdesc_types' => 'צורות המפה הזמינות על המפה', |
| 421 | + 'semanticmaps_paramdesc_type' => 'סוג ברירת המחדל של המפה עבור המפה', |
| 422 | + 'semanticmaps_paramdesc_layers' => 'השכבות הזמינות במפה', |
| 423 | +); |
| 424 | + |
| 425 | +/** Upper Sorbian (Hornjoserbsce) |
| 426 | + * @author Michawiki |
| 427 | + */ |
| 428 | +$messages['hsb'] = array( |
| 429 | + 'semanticmaps_desc' => 'Skići móžnosć koordinatowe daty, kotrež buchu přez rozšěrjenje Semantic MediaWiki składowane, sej wobhladać a změnić. ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). K dispoziciji stejace kartowe słužby: $1', |
| 430 | + 'semanticmaps-unrecognizeddistance' => 'Hódnota $1 płaćiwa distanca njeje.', |
| 431 | + 'semanticmaps_lookupcoordinates' => 'Za koordinatami hladać', |
| 432 | + 'semanticmaps_enteraddresshere' => 'Zapodaj tu adresu', |
| 433 | + 'semanticmaps_notfound' => 'njenamakany', |
| 434 | + 'semanticmaps_paramdesc_format' => 'Kartěrowanska słužba, kotraž so wužiwa, zo by kartu wutworiła', |
| 435 | + 'semanticmaps_paramdesc_geoservice' => 'Geokodowanska słužba, kotraž so wužiwa, zo by adresy do koordinatow přetworiła', |
| 436 | + 'semanticmaps_paramdesc_height' => 'Wysokosć karty, w pikselach (standard je $1)', |
| 437 | + 'semanticmaps_paramdesc_width' => 'Šěrokosć karty, w pikselach (standard je $1)', |
| 438 | + 'semanticmaps_paramdesc_zoom' => 'Skalowanski schodźenk karty', |
| 439 | + 'semanticmaps_paramdesc_centre' => 'Koordinaty srjedźišća karty', |
| 440 | + 'semanticmaps_paramdesc_controls' => 'Wužiwarske elementy na karće', |
| 441 | + 'semanticmaps_paramdesc_types' => 'Kartowe typy, kotrež za kartu k dispoziciji steja', |
| 442 | + 'semanticmaps_paramdesc_type' => 'Standardny kartowy typ za kartu', |
| 443 | + 'semanticmaps_paramdesc_overlays' => 'Naworštowanja, kotrež za kartu k dispoziciji steja', |
| 444 | + 'semanticmaps_paramdesc_autozoom' => 'Jeli powjetšenje a pomjenšenje z pomocu kolesko myški je zmóžnjene', |
| 445 | + 'semanticmaps_paramdesc_layers' => 'Woršty, kotrež za kartu k dispoziciji steja', |
| 446 | +); |
| 447 | + |
| 448 | +/** Hungarian (Magyar) |
| 449 | + * @author Glanthor Reviol |
| 450 | + */ |
| 451 | +$messages['hu'] = array( |
| 452 | + 'semanticmaps_desc' => 'Lehetővé teszi a szemantikus MediaWiki kiterjesztés segítségével tárolt koordinátaadatok megtekintését és szerkesztését ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 453 | +Elérhető térképszolgáltatók: $1', |
| 454 | + 'semanticmaps_lookupcoordinates' => 'Koordináták felkeresése', |
| 455 | + 'semanticmaps_enteraddresshere' => 'Add meg a címet itt', |
| 456 | + 'semanticmaps_notfound' => 'nincs találat', |
| 457 | + 'semanticmaps_paramdesc_height' => 'A térkép magassága, képpontban (alapértelmezetten $1)', |
| 458 | + 'semanticmaps_paramdesc_width' => 'A térkép szélessége, képpontban (alapértelmezetten $1)', |
| 459 | + 'semanticmaps_paramdesc_zoom' => 'A térkép nagyítása', |
| 460 | + 'semanticmaps_paramdesc_centre' => 'A térkép középpontjának koordinátái', |
| 461 | + 'semanticmaps_paramdesc_types' => 'A térképen elérhető térképtípusok', |
| 462 | + 'semanticmaps_paramdesc_type' => 'A térkép alapértelmezett térképtípusa', |
| 463 | + 'semanticmaps_paramdesc_layers' => 'A térképen elérhető rétegek', |
| 464 | +); |
| 465 | + |
| 466 | +/** Interlingua (Interlingua) |
| 467 | + * @author McDutchie |
| 468 | + */ |
| 469 | +$messages['ia'] = array( |
| 470 | + 'semanticmaps_desc' => 'Permitte vider e modificar datos de coordinatas immagazinate per le extension Semantic MediaWiki |
| 471 | +([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 472 | +Servicios cartographic disponibile: $1', |
| 473 | + 'semanticmaps-unrecognizeddistance' => 'Le valor $1 non es un distantia valide.', |
| 474 | + 'semanticmaps_lookupcoordinates' => 'Cercar coordinatas', |
| 475 | + 'semanticmaps_enteraddresshere' => 'Entra adresse hic', |
| 476 | + 'semanticmaps_notfound' => 'non trovate', |
| 477 | + 'semanticmaps_paramdesc_format' => 'Le servicio cartographic usate pro generar le carta', |
| 478 | + 'semanticmaps_paramdesc_geoservice' => 'Le servicio de geocodification usate pro converter adresses in coordinatas', |
| 479 | + 'semanticmaps_paramdesc_height' => 'Le altitude del carta, in pixeles (predefinition es $1)', |
| 480 | + 'semanticmaps_paramdesc_width' => 'Le latitude del carta, in pixeles (predefinition es $1)', |
| 481 | + 'semanticmaps_paramdesc_zoom' => 'Le nivello de zoom del carta', |
| 482 | + 'semanticmaps_paramdesc_centre' => 'Le coordinatas del centro del carta', |
| 483 | + 'semanticmaps_paramdesc_controls' => 'Le buttones de adjustamento placiate in le carta', |
| 484 | + 'semanticmaps_paramdesc_types' => 'Le typos de carta disponibile in le carta', |
| 485 | + 'semanticmaps_paramdesc_type' => 'Le typo de carta predefinite pro le carta', |
| 486 | + 'semanticmaps_paramdesc_overlays' => 'Le superpositiones disponibile in le carta', |
| 487 | + 'semanticmaps_paramdesc_autozoom' => 'Si le zoom avante e retro con le rota de rolamento del mouse es active', |
| 488 | + 'semanticmaps_paramdesc_layers' => 'Le stratos disponibile in le carta', |
| 489 | +); |
| 490 | + |
| 491 | +/** Indonesian (Bahasa Indonesia) |
| 492 | + * @author Bennylin |
| 493 | + * @author Farras |
| 494 | + */ |
| 495 | +$messages['id'] = array( |
| 496 | + 'semanticmaps_desc' => 'Memampukan penampilan dan penyuntingan data koordinat yang disimpan melalui pengaya MediaWiki Semantic ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 497 | +Layanan peta yang tersedia: $1', |
| 498 | + 'semanticmaps_lookupcoordinates' => 'Cari koordinat', |
| 499 | + 'semanticmaps_enteraddresshere' => 'Masukkan alamat di sini', |
| 500 | + 'semanticmaps_notfound' => 'tidak ditemukan', |
| 501 | + 'semanticmaps_paramdesc_format' => 'Layanan pemetaan untuk membuat peta', |
| 502 | + 'semanticmaps_paramdesc_geoservice' => 'Layanan kode geo untuk mengubah alamat menjadi koordinat', |
| 503 | + 'semanticmaps_paramdesc_height' => 'Tinggi peta, dalam piksel (umumnya $1)', |
| 504 | + 'semanticmaps_paramdesc_width' => 'Lebar peta, dalam piksel (umumnya $1)', |
| 505 | + 'semanticmaps_paramdesc_zoom' => 'Tingkat zum peta', |
| 506 | + 'semanticmaps_paramdesc_centre' => 'Koordinat bagian tengah peta', |
| 507 | + 'semanticmaps_paramdesc_controls' => 'Kontrol pengguna yang diletakkan di peta', |
| 508 | + 'semanticmaps_paramdesc_types' => 'Jenis peta tersedia di peta', |
| 509 | + 'semanticmaps_paramdesc_type' => 'Jenis peta biasa untuk peta ini', |
| 510 | + 'semanticmaps_paramdesc_overlays' => 'Lapisan yang tersedia di peta', |
| 511 | + 'semanticmaps_paramdesc_autozoom' => 'Bila ingin zum dekat dan jauh menggunakan mouse, gunakan roda gulung', |
| 512 | + 'semanticmaps_paramdesc_layers' => 'Lapisan tersedia di peta', |
| 513 | +); |
| 514 | + |
| 515 | +/** Italian (Italiano) |
| 516 | + * @author Civvì |
| 517 | + * @author Darth Kule |
| 518 | + * @author HalphaZ |
| 519 | + */ |
| 520 | +$messages['it'] = array( |
| 521 | + 'semanticmaps_desc' => "Offre la possibilità di visualizzare e modificare le coordinate memorizzate attraverso l'estensione Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). Servizi di mappe disponibili: $1", |
| 522 | + 'semanticmaps-unrecognizeddistance' => 'Il valore $1 non è una distanza valida.', |
| 523 | + 'semanticmaps_lookupcoordinates' => 'Cerca coordinate', |
| 524 | + 'semanticmaps_enteraddresshere' => 'Inserisci indirizzo qui', |
| 525 | + 'semanticmaps_notfound' => 'non trovato', |
| 526 | + 'semanticmaps_paramdesc_format' => 'Il servizio di mapping utilizzato per generare la mappa', |
| 527 | + 'semanticmaps_paramdesc_geoservice' => 'Il servizio di geocoding utilizzato per trasformare gli indirizzi in coordinate', |
| 528 | + 'semanticmaps_paramdesc_height' => "L'altezza della mappa in pixel (il valore di default è $1)", |
| 529 | + 'semanticmaps_paramdesc_width' => 'La larghezza della mappa in pixel (il valore di default è $1)', |
| 530 | + 'semanticmaps_paramdesc_zoom' => 'Il livello di zoom della mappa', |
| 531 | + 'semanticmaps_paramdesc_centre' => 'Le coordinate del centro della mappa', |
| 532 | + 'semanticmaps_paramdesc_controls' => 'I controlli utente posizionati sulla mappa', |
| 533 | + 'semanticmaps_paramdesc_types' => 'I tipi di mappa disponibili sulla mappa', |
| 534 | + 'semanticmaps_paramdesc_type' => 'Il tipo mappa predefinito per la mappa', |
| 535 | + 'semanticmaps_paramdesc_overlays' => 'Gli overlay disponibili sulla mappa', |
| 536 | + 'semanticmaps_paramdesc_autozoom' => 'Se sono attivati lo zoom avanti e indietro utilizzando la rotellina del mouse', |
| 537 | + 'semanticmaps_paramdesc_layers' => 'Gli strati (layer) disponibili sulla mappa', |
| 538 | +); |
| 539 | + |
| 540 | +/** Japanese (日本語) |
| 541 | + * @author Fryed-peach |
| 542 | + * @author Mizusumashi |
| 543 | + * @author 青子守歌 |
| 544 | + */ |
| 545 | +$messages['ja'] = array( |
| 546 | + 'semanticmaps_desc' => 'Semantic MediaWiki 拡張機能を通して格納された座標データを表示・編集する機能を提供する ([http://wiki.bn2vs.com/wiki/Semantic_Maps 実演])。次の地図サービスに対応します:$1', |
| 547 | + 'semanticmaps-unrecognizeddistance' => '値$1は有効な距離ではありません。', |
| 548 | + 'semanticmaps_lookupcoordinates' => '座標を調べる', |
| 549 | + 'semanticmaps_enteraddresshere' => '住所をここに入力します', |
| 550 | + 'semanticmaps_notfound' => '見つかりません', |
| 551 | + 'semanticmaps_paramdesc_format' => '地図の生成に利用されている地図サービス', |
| 552 | + 'semanticmaps_paramdesc_geoservice' => '住所の座標への変換に利用されているジオコーディングサービス', |
| 553 | + 'semanticmaps_paramdesc_height' => '地図の縦幅 (単位はピクセル、既定は$1)', |
| 554 | + 'semanticmaps_paramdesc_width' => '地図の横幅 (単位はピクセル、既定は$1)', |
| 555 | + 'semanticmaps_paramdesc_zoom' => '地図の拡大度', |
| 556 | + 'semanticmaps_paramdesc_centre' => '地図の中心の座標', |
| 557 | + 'semanticmaps_paramdesc_controls' => 'この地図上に設置するユーザーコントロール', |
| 558 | + 'semanticmaps_paramdesc_types' => 'この地図で利用できる地図タイプ', |
| 559 | + 'semanticmaps_paramdesc_type' => 'この地図のデフォルト地図タイプ', |
| 560 | + 'semanticmaps_paramdesc_overlays' => 'この地図で利用できるオーバーレイ', |
| 561 | + 'semanticmaps_paramdesc_autozoom' => 'マウスのスクロールホイールを使ったズームインやアウトを有効にするか', |
| 562 | + 'semanticmaps_paramdesc_layers' => 'この地図で利用できるレイヤー', |
| 563 | +); |
| 564 | + |
| 565 | +/** Khmer (ភាសាខ្មែរ) |
| 566 | + * @author Thearith |
| 567 | + */ |
| 568 | +$messages['km'] = array( |
| 569 | + 'semanticmaps_lookupcoordinates' => 'ក្រឡេកមើលកូអរដោនេ', |
| 570 | +); |
| 571 | + |
| 572 | +/** Colognian (Ripoarisch) |
| 573 | + * @author Purodha |
| 574 | + */ |
| 575 | +$messages['ksh'] = array( |
| 576 | + 'semanticmaps_desc' => 'Määt et müjjelesch, Koodinaate ze beloore un ze ändere, di per Semantesch Mediawiki faßjehallde woodte. (E [http://wiki.bn2vs.com/wiki/Semantic_Maps Beijshpöll]) Deenste för Kaate ham_mer di heh: $1', |
| 577 | + 'semanticmaps_lookupcoordinates' => 'Koordinate nohkike', |
| 578 | + 'semanticmaps_enteraddresshere' => 'Donn hee de Address enjäve', |
| 579 | + 'semanticmaps_notfound' => 'nit jefonge', |
| 580 | + 'semanticmaps_paramdesc_format' => 'Dä Deens för Kaate ußzejävve, woh heh di Kaat vun kütt', |
| 581 | + 'semanticmaps_paramdesc_geoservice' => "Dä Deens för Adräße en Ko'odinaate öm_ze_wandelle", |
| 582 | + 'semanticmaps_paramdesc_height' => 'De Hühde vun heh dä Kaat en Pixelle — schtandattmääßesch {{PLURAL:$1|$1 Pixel|$1 Pixelle|nix}}', |
| 583 | + 'semanticmaps_paramdesc_width' => 'De Breedt vun heh dä Kaat en Pixelle — schtandattmääßesch {{PLURAL:$1|$1 Pixel|$1 Pixelle|nix}}', |
| 584 | + 'semanticmaps_paramdesc_zoom' => 'Wi doll dä Zoom fö heh di Kaat es', |
| 585 | + 'semanticmaps_paramdesc_centre' => "De Ko'odinaate op de Ääd, vun de Medde vun heh dä Kaat", |
| 586 | + 'semanticmaps_paramdesc_controls' => 'De Knöppe för de Bedeenung, di op di Kaat jemohlt wäääde', |
| 587 | + 'semanticmaps_paramdesc_types' => 'De Kaate-Zoote di mer för heh di Kaat ußsöhke kann', |
| 588 | + 'semanticmaps_paramdesc_type' => 'De Schtandatt Kaate-Zoot för heh di Kaat', |
| 589 | + 'semanticmaps_paramdesc_overlays' => 'De zohsäzlijje Eijnzelheijte, di mer op di Kaat drop bränge kann', |
| 590 | + 'semanticmaps_paramdesc_autozoom' => 'Falls et erin un eruß zoome met däm Kompjuter singe Muuß ierem Rättsche aanjeschalldt es, dann:', |
| 591 | + 'semanticmaps_paramdesc_layers' => 'De Nivohs, di för di Kaat ze han sin', |
| 592 | +); |
| 593 | + |
| 594 | +/** Luxembourgish (Lëtzebuergesch) |
| 595 | + * @author Robby |
| 596 | + */ |
| 597 | +$messages['lb'] = array( |
| 598 | + 'semanticmaps_lookupcoordinates' => 'Koordinaten nokucken', |
| 599 | + 'semanticmaps_enteraddresshere' => 'Adress hei aginn', |
| 600 | + 'semanticmaps_notfound' => 'net fonnt', |
| 601 | + 'semanticmaps_paramdesc_format' => "De Kartographie-Service dee fir d'generéiere vun der Kaart benotzt gëtt", |
| 602 | + 'semanticmaps_paramdesc_height' => "D'Héicht vun der Kaart, a Pixelen (Standard ass $1)", |
| 603 | + 'semanticmaps_paramdesc_width' => "D'Breet vun der Kaart, a Pixelen (Standard ass $1)", |
| 604 | + 'semanticmaps_paramdesc_zoom' => 'DenNiveau vum Zoom vun der Kaart', |
| 605 | + 'semanticmaps_paramdesc_centre' => "D'Koordinate vum zentrum vun der Kaart", |
| 606 | + 'semanticmaps_paramdesc_controls' => "D'Benotzerkontrollen déi op der Kaart plazéiert sinn", |
| 607 | +); |
| 608 | + |
| 609 | +/** Macedonian (Македонски) |
| 610 | + * @author Bjankuloski06 |
| 611 | + */ |
| 612 | +$messages['mk'] = array( |
| 613 | + 'semanticmaps_desc' => 'Дава можност за гледање и уредување на податоци со координати складирани преку проширувањето Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps демо]). |
| 614 | +Картографски служби на располагање: $1', |
| 615 | + 'semanticmaps-unrecognizeddistance' => 'Вредноста $1 не претставува важечко растојание.', |
| 616 | + 'semanticmaps_lookupcoordinates' => 'Побарај координати', |
| 617 | + 'semanticmaps_enteraddresshere' => 'Внесете адреса тука', |
| 618 | + 'semanticmaps_notfound' => 'не е најдено ништо', |
| 619 | + 'semanticmaps_paramdesc_format' => 'Картографската служба со која се создава картата', |
| 620 | + 'semanticmaps_paramdesc_geoservice' => 'Службата за геокодирање со која адресите се претвораат во координати', |
| 621 | + 'semanticmaps_paramdesc_height' => 'Висината на картата во пиксели ($1 по основно)', |
| 622 | + 'semanticmaps_paramdesc_width' => 'Ширината на картата во пиксели ($1 по основно)', |
| 623 | + 'semanticmaps_paramdesc_zoom' => 'Размерот на картата', |
| 624 | + 'semanticmaps_paramdesc_centre' => 'Координатите на средиштето на картата', |
| 625 | + 'semanticmaps_paramdesc_controls' => 'Корисничките контроли за на картата', |
| 626 | + 'semanticmaps_paramdesc_types' => 'Типови на карти, достапни за картата', |
| 627 | + 'semanticmaps_paramdesc_type' => 'Основно зададениот тип на карта', |
| 628 | + 'semanticmaps_paramdesc_overlays' => 'Достапните облоги за картата', |
| 629 | + 'semanticmaps_paramdesc_autozoom' => 'Ако е овозможено приближување и оддалечување со тркалцето на глушецот', |
| 630 | + 'semanticmaps_paramdesc_layers' => 'Слоевите достапни на картата', |
| 631 | +); |
| 632 | + |
| 633 | +/** Dutch (Nederlands) |
| 634 | + * @author Jeroen De Dauw |
| 635 | + * @author Siebrand |
| 636 | + */ |
| 637 | +$messages['nl'] = array( |
| 638 | + 'semanticmaps_desc' => 'Biedt de mogelijkheid om locatiegegevens die zijn opgeslagen met behulp van de uitbreiding Semantic MediaWiki te bekijken en aan te passen ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 639 | +Beschikbare kaartdiensten: $1', |
| 640 | + 'semanticmaps-unrecognizeddistance' => 'De waarde "$1" is geen geldige afstand.', |
| 641 | + 'semanticmaps_lookupcoordinates' => 'Coördinaten opzoeken', |
| 642 | + 'semanticmaps_enteraddresshere' => 'Voer hier het adres in', |
| 643 | + 'semanticmaps_notfound' => 'niet gevonden', |
| 644 | + 'semanticmaps_paramdesc_format' => 'De kaartdienst die de kaart levert', |
| 645 | + 'semanticmaps_paramdesc_geoservice' => 'De geocoderingsdienst die adressen in coördinaten converteert', |
| 646 | + 'semanticmaps_paramdesc_height' => 'De hoogte van de kaart in pixels (standaard is $1)', |
| 647 | + 'semanticmaps_paramdesc_width' => 'De breedte van de kaart in pixels (standaard is $1)', |
| 648 | + 'semanticmaps_paramdesc_zoom' => 'Het zoomniveau van de kaart', |
| 649 | + 'semanticmaps_paramdesc_centre' => 'De coördinaten van het midden van de kaart', |
| 650 | + 'semanticmaps_paramdesc_controls' => 'De op de kaart te plaatsen hulpmiddelen', |
| 651 | + 'semanticmaps_paramdesc_types' => 'De voor de kaart beschikbare kaarttypen', |
| 652 | + 'semanticmaps_paramdesc_type' => 'Het standaard kaarttype voor de kaart', |
| 653 | + 'semanticmaps_paramdesc_overlays' => 'De voor de kaart beschikbare overlays', |
| 654 | + 'semanticmaps_paramdesc_autozoom' => 'Of in- en uitzoomen met het scrollwiel van de muis mogelijk is', |
| 655 | + 'semanticmaps_paramdesc_layers' => 'De lagen die beschikbaar zijn voor de kaart', |
| 656 | +); |
| 657 | + |
| 658 | +/** Norwegian Nynorsk (Norsk (nynorsk)) |
| 659 | + * @author Harald Khan |
| 660 | + */ |
| 661 | +$messages['nn'] = array( |
| 662 | + 'semanticmaps_lookupcoordinates' => 'Sjekk koordinatar', |
| 663 | + 'semanticmaps_enteraddresshere' => 'Skriv inn adressa her', |
| 664 | +); |
| 665 | + |
| 666 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 667 | + * @author Jon Harald Søby |
| 668 | + * @author Nghtwlkr |
| 669 | + */ |
| 670 | +$messages['no'] = array( |
| 671 | + 'semanticmaps_desc' => 'Tilbyr muligheten til å se og endre koordinatdata lagret gjennom Semantic MediaWiki-utvidelsen ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 672 | +Tilgjengelige karttjenester: $1', |
| 673 | + 'semanticmaps-unrecognizeddistance' => 'Verdien $1 er ikke en gyldig avstand.', |
| 674 | + 'semanticmaps_lookupcoordinates' => 'Sjekk koordinater', |
| 675 | + 'semanticmaps_enteraddresshere' => 'Skriv inn adressen her', |
| 676 | + 'semanticmaps_notfound' => 'ikke funnet', |
| 677 | + 'semanticmaps_paramdesc_format' => 'Karttjenesten brukt for å generere kart', |
| 678 | + 'semanticmaps_paramdesc_geoservice' => 'Geokodetjenesten brukt for å gjøre adresser om til koordinater', |
| 679 | + 'semanticmaps_paramdesc_height' => 'Høyden til kartet, i pixler (standard er $1)', |
| 680 | + 'semanticmaps_paramdesc_width' => 'Bredden til kartet, i pixler (standard er $1)', |
| 681 | + 'semanticmaps_paramdesc_zoom' => 'Zoomnivået til kartet', |
| 682 | + 'semanticmaps_paramdesc_centre' => 'Koordinatene til kartets senter', |
| 683 | + 'semanticmaps_paramdesc_controls' => 'Brukerkontrollene plassert på kartet', |
| 684 | + 'semanticmaps_paramdesc_types' => 'Karttypene tilgjengelig for kartet', |
| 685 | + 'semanticmaps_paramdesc_type' => 'Standard karttype for kartet', |
| 686 | + 'semanticmaps_paramdesc_overlays' => 'Overlag tilgjengelig for kartet', |
| 687 | + 'semanticmaps_paramdesc_autozoom' => 'Dersom zooming ved bruk av musehjulet er slått på', |
| 688 | + 'semanticmaps_paramdesc_layers' => 'Lagene tilgjengelig på kartet', |
| 689 | +); |
| 690 | + |
| 691 | +/** Occitan (Occitan) |
| 692 | + * @author Cedric31 |
| 693 | + */ |
| 694 | +$messages['oc'] = array( |
| 695 | + 'semanticmaps_desc' => "Permet de veire e modificar las donadas de coordenadas estocadas a travèrs l'extension Semantic MediaWiki. Servicis de mapas disponibles : $1. [http://www.mediawiki.org/wiki/Extension:Semantic_Maps Documentacion]. [http://wiki.bn2vs.com/wiki/Semantic_Maps Demo]", |
| 696 | + 'semanticmaps_lookupcoordinates' => 'Estimar las coordenadas', |
| 697 | + 'semanticmaps_enteraddresshere' => 'Picatz aicí l’adreça', |
| 698 | + 'semanticmaps_notfound' => 'pas trobat', |
| 699 | +); |
| 700 | + |
| 701 | +/** Polish (Polski) |
| 702 | + * @author Deejay1 |
| 703 | + * @author Derbeth |
| 704 | + * @author Leinad |
| 705 | + * @author Odder |
| 706 | + * @author Sp5uhe |
| 707 | + */ |
| 708 | +$messages['pl'] = array( |
| 709 | + 'semanticmaps_desc' => 'Daje możliwość przeglądania oraz edytowania współrzędnych zapisanych przez rozszerzenie Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 710 | +Dostępne serwisy mapowe: $1', |
| 711 | + 'semanticmaps-unrecognizeddistance' => 'Wartość $1 nie jest poprawną odległością.', |
| 712 | + 'semanticmaps_lookupcoordinates' => 'Wyszukaj współrzędne', |
| 713 | + 'semanticmaps_enteraddresshere' => 'Podaj adres', |
| 714 | + 'semanticmaps_notfound' => 'nie odnaleziono', |
| 715 | + 'semanticmaps_paramdesc_height' => 'Wysokość mapy w pikselach (domyślnie $1)', |
| 716 | + 'semanticmaps_paramdesc_width' => 'Szerokość mapy w pikselach (domyślnie $1)', |
| 717 | + 'semanticmaps_paramdesc_layers' => 'Warstwy dostępne na mapie', |
| 718 | +); |
| 719 | + |
| 720 | +/** Piedmontese (Piemontèis) |
| 721 | + * @author Borichèt |
| 722 | + * @author Dragonòt |
| 723 | + */ |
| 724 | +$messages['pms'] = array( |
| 725 | + 'semanticmaps_desc' => 'A dà la possibilità ëd visualisé e modìfiché le coordinà memorisà con le estension Semantic mediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 726 | +Sërvissi ëd mapa disponìbij: $1', |
| 727 | + 'semanticmaps-unrecognizeddistance' => "Ël valor $1 a l'é pa na distansa bon-a.", |
| 728 | + 'semanticmaps_lookupcoordinates' => 'Serca coordinà', |
| 729 | + 'semanticmaps_enteraddresshere' => 'Ansëriss adrëssa sì', |
| 730 | + 'semanticmaps_notfound' => 'pa trovà', |
| 731 | + 'semanticmaps_paramdesc_format' => 'Ël servissi ëd cartografìa dovrà për generé la carta', |
| 732 | + 'semanticmaps_paramdesc_geoservice' => "Ël servissi ëd geocodìfica dovrà për trasformé j'adrësse an coordinà", |
| 733 | + 'semanticmaps_paramdesc_height' => "L'autëssa dla carta, an pontin (lë stàndard a l'é $1)", |
| 734 | + 'semanticmaps_paramdesc_width' => "La larghëssa dla carta, an pontin (lë stàndard a l'é $1)", |
| 735 | + 'semanticmaps_paramdesc_zoom' => "Ël livel d'angrandiment ëd la carta", |
| 736 | + 'semanticmaps_paramdesc_centre' => 'Le coordinà dël sènter ëd la carta', |
| 737 | + 'semanticmaps_paramdesc_controls' => 'Ij contròj utent piassà an sla carta', |
| 738 | + 'semanticmaps_paramdesc_types' => 'Le sòrt ëd carte disponìbij an sla carta', |
| 739 | + 'semanticmaps_paramdesc_type' => 'Ël tipo ëd carta stàndard për la carta', |
| 740 | + 'semanticmaps_paramdesc_overlays' => 'Le dzor-posission disponìbij an sla carta', |
| 741 | + 'semanticmaps_paramdesc_autozoom' => "Se l'angrandiment anans e andré an dovrand la roëtta dël rat a l'é abilità", |
| 742 | + 'semanticmaps_paramdesc_layers' => 'Ij livej disponìbij an sla carta', |
| 743 | +); |
| 744 | + |
| 745 | +/** Pashto (پښتو) |
| 746 | + * @author Ahmed-Najib-Biabani-Ibrahimkhel |
| 747 | + */ |
| 748 | +$messages['ps'] = array( |
| 749 | + 'semanticmaps_notfound' => 'و نه موندل شو', |
| 750 | +); |
| 751 | + |
| 752 | +/** Portuguese (Português) |
| 753 | + * @author Hamilton Abreu |
| 754 | + * @author Indech |
| 755 | + * @author Malafaya |
| 756 | + */ |
| 757 | +$messages['pt'] = array( |
| 758 | + 'semanticmaps_desc' => 'Permite ver e editar dados de coordenadas, armazenados através da extensão MediaWiki Semântico ([http://wiki.bn2vs.com/wiki/Semantic_Maps demonstração]). |
| 759 | +Serviços de cartografia disponíveis: $1', |
| 760 | + 'semanticmaps-unrecognizeddistance' => 'O valor $1 não é uma distância válida.', |
| 761 | + 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas', |
| 762 | + 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui', |
| 763 | + 'semanticmaps_notfound' => 'não encontrado', |
| 764 | + 'semanticmaps_paramdesc_format' => 'O serviço de cartografia usado para gerar o mapa', |
| 765 | + 'semanticmaps_paramdesc_geoservice' => 'O serviço de geocódigos usado para transformar endereços em coordenadas', |
| 766 | + 'semanticmaps_paramdesc_height' => 'A altura do mapa, em pixels (por omissão, $1)', |
| 767 | + 'semanticmaps_paramdesc_width' => 'A largura do mapa, em pixels (por omissão, $1)', |
| 768 | + 'semanticmaps_paramdesc_zoom' => 'O nível de aproximação do mapa', |
| 769 | + 'semanticmaps_paramdesc_centre' => 'As coordenadas do centro do mapa', |
| 770 | + 'semanticmaps_paramdesc_controls' => 'Os controles colocados no mapa', |
| 771 | + 'semanticmaps_paramdesc_types' => 'Os tipos de mapa disponíveis no mapa', |
| 772 | + 'semanticmaps_paramdesc_type' => 'O tipo do mapa, por omissão', |
| 773 | + 'semanticmaps_paramdesc_overlays' => 'As sobreposições disponíveis no mapa', |
| 774 | + 'semanticmaps_paramdesc_autozoom' => 'Possibilitar a aproximação e afastamento usando a roda de deslizamento do rato', |
| 775 | + 'semanticmaps_paramdesc_layers' => 'As camadas disponíveis no mapa', |
| 776 | +); |
| 777 | + |
| 778 | +/** Brazilian Portuguese (Português do Brasil) |
| 779 | + * @author Eduardo.mps |
| 780 | + * @author Luckas Blade |
| 781 | + */ |
| 782 | +$messages['pt-br'] = array( |
| 783 | + 'semanticmaps_desc' => 'Provê a possibilidade de ver e editar dados de coordenadas armazenados através da extensão Semantic MediaWiki. ([http://wiki.bn2vs.com/wiki/Semantic_Maps demonstração]). |
| 784 | +Serviços de mapeamento disponíveis: $1', |
| 785 | + 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas', |
| 786 | + 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui', |
| 787 | + 'semanticmaps_notfound' => 'Não encontrado', |
| 788 | +); |
| 789 | + |
| 790 | +/** Romanian (Română) |
| 791 | + * @author Firilacroco |
| 792 | + */ |
| 793 | +$messages['ro'] = array( |
| 794 | + 'semanticmaps_enteraddresshere' => 'Introduceți adresa aici', |
| 795 | + 'semanticmaps_notfound' => 'nu a fost găsit', |
| 796 | +); |
| 797 | + |
| 798 | +/** Tarandíne (Tarandíne) |
| 799 | + * @author Joetaras |
| 800 | + */ |
| 801 | +$messages['roa-tara'] = array( |
| 802 | + 'semanticmaps_desc' => "Dè l'abbilità a fà vedè e cangià le coordinate reggistrate cu l'estenzione Semandiche de MediaUicchi ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 803 | +Disponibbile le servizie de mappe: $1", |
| 804 | + 'semanticmaps_lookupcoordinates' => 'Ingroce le coordinate', |
| 805 | + 'semanticmaps_enteraddresshere' => "Scaffe l'indirizze aqquà", |
| 806 | + 'semanticmaps_notfound' => 'no acchiate', |
| 807 | +); |
| 808 | + |
| 809 | +/** Russian (Русский) |
| 810 | + * @author Eugene Mednikov |
| 811 | + * @author Lockal |
| 812 | + * @author Александр Сигачёв |
| 813 | + */ |
| 814 | +$messages['ru'] = array( |
| 815 | + 'semanticmaps_desc' => 'Предоставляет возможность просмотра и редактирования данных о координатах, хранящихся посредством расширения Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps демонстрация]). |
| 816 | +Доступные службы карт: $1', |
| 817 | + 'semanticmaps-unrecognizeddistance' => 'Значение $1 не является допустимым расстоянием.', |
| 818 | + 'semanticmaps_lookupcoordinates' => 'Найти координаты', |
| 819 | + 'semanticmaps_enteraddresshere' => 'Введите адрес', |
| 820 | + 'semanticmaps_notfound' => 'не найдено', |
| 821 | + 'semanticmaps_paramdesc_format' => 'Картографическая служба, используемая для создания карт', |
| 822 | + 'semanticmaps_paramdesc_geoservice' => 'Служба геокодирования используется для преобразования адреса в координаты', |
| 823 | + 'semanticmaps_paramdesc_height' => 'Высота карты в пикселях (по умолчанию $1)', |
| 824 | + 'semanticmaps_paramdesc_width' => 'Ширина карты в пикселях (по умолчанию $1)', |
| 825 | + 'semanticmaps_paramdesc_zoom' => 'Масштаб карты', |
| 826 | + 'semanticmaps_paramdesc_centre' => 'Координаты центра карты', |
| 827 | + 'semanticmaps_paramdesc_controls' => 'Элементы управления на карте', |
| 828 | + 'semanticmaps_paramdesc_types' => 'Типы карты, доступные на карте', |
| 829 | + 'semanticmaps_paramdesc_type' => 'Тип карты по умолчанию', |
| 830 | + 'semanticmaps_paramdesc_overlays' => 'Доступные наложения', |
| 831 | + 'semanticmaps_paramdesc_autozoom' => 'Если включено увеличение и уменьшение масштаб с помощью колеса прокрутки мыши', |
| 832 | + 'semanticmaps_paramdesc_layers' => 'Доступные на карте слои', |
| 833 | +); |
| 834 | + |
| 835 | +/** Slovak (Slovenčina) |
| 836 | + * @author Helix84 |
| 837 | + */ |
| 838 | +$messages['sk'] = array( |
| 839 | + 'semanticmaps_desc' => 'Poskytuje schopnosť zobrazovať a upravovať údaje súradníc uložené prostredníctvom rozšírenia Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 840 | +Dostupné mapové služby: $1', |
| 841 | + 'semanticmaps_lookupcoordinates' => 'Vyhľadať súradnice', |
| 842 | + 'semanticmaps_enteraddresshere' => 'Sem zadajte emailovú adresu', |
| 843 | + 'semanticmaps_notfound' => 'nenájdené', |
| 844 | + 'semanticmaps_paramdesc_format' => 'Služba použitá na tvorbu mapy', |
| 845 | + 'semanticmaps_paramdesc_geoservice' => 'Služba použitá na vyhľadanie súradníc na základe adresy', |
| 846 | + 'semanticmaps_paramdesc_height' => 'Výška mapy v pixloch (predvolené je $1)', |
| 847 | + 'semanticmaps_paramdesc_width' => 'Šírka mapy v pixloch (predvolené je $1)', |
| 848 | + 'semanticmaps_paramdesc_zoom' => 'Úroveň priblíženia mapy', |
| 849 | + 'semanticmaps_paramdesc_centre' => 'Súradnice stredu mapy', |
| 850 | + 'semanticmaps_paramdesc_controls' => 'Používateľské ovládacie prvky umiestnené na mape', |
| 851 | + 'semanticmaps_paramdesc_types' => 'Typy máp dostupné na mape', |
| 852 | + 'semanticmaps_paramdesc_type' => 'Predvolený typ mapy na mape', |
| 853 | + 'semanticmaps_paramdesc_overlays' => 'Vrstvy dostupné na mape', |
| 854 | + 'semanticmaps_paramdesc_autozoom' => 'Či je povolené približovanie a odďaľovanie mapy kolieskom myši', |
| 855 | + 'semanticmaps_paramdesc_layers' => 'Dostupné vrstvy mapy', |
| 856 | +); |
| 857 | + |
| 858 | +/** Serbian Cyrillic ekavian (Српски (ћирилица)) |
| 859 | + * @author Михајло Анђелковић |
| 860 | + */ |
| 861 | +$messages['sr-ec'] = array( |
| 862 | + 'semanticmaps-unrecognizeddistance' => 'Вредност $1 није исправно растојање.', |
| 863 | + 'semanticmaps_enteraddresshere' => 'Унеси адресу овде', |
| 864 | + 'semanticmaps_notfound' => 'није нађено', |
| 865 | + 'semanticmaps_paramdesc_height' => 'Висина мапе у пикселима (подразумевано је $1)', |
| 866 | + 'semanticmaps_paramdesc_width' => 'Ширина мапе у пикселима (подразумевано је $1)', |
| 867 | + 'semanticmaps_paramdesc_zoom' => 'Ниво увећања мапе', |
| 868 | + 'semanticmaps_paramdesc_centre' => 'Координате центра мапе', |
| 869 | +); |
| 870 | + |
| 871 | +/** Serbian Latin ekavian (Srpski (latinica)) |
| 872 | + * @author Michaello |
| 873 | + */ |
| 874 | +$messages['sr-el'] = array( |
| 875 | + 'semanticmaps-unrecognizeddistance' => 'Vrednost $1 nije ispravno rastojanje.', |
| 876 | + 'semanticmaps_enteraddresshere' => 'Unesi adresu ovde', |
| 877 | + 'semanticmaps_notfound' => 'nije nađeno', |
| 878 | + 'semanticmaps_paramdesc_height' => 'Visina mape u pikselima (podrazumevano je $1)', |
| 879 | + 'semanticmaps_paramdesc_width' => 'Širina mape u pikselima (podrazumevano je $1)', |
| 880 | + 'semanticmaps_paramdesc_zoom' => 'Nivo uvećanja mape', |
| 881 | + 'semanticmaps_paramdesc_centre' => 'Koordinate centra mape', |
| 882 | +); |
| 883 | + |
| 884 | +/** Swedish (Svenska) |
| 885 | + * @author Boivie |
| 886 | + * @author Najami |
| 887 | + * @author Per |
| 888 | + */ |
| 889 | +$messages['sv'] = array( |
| 890 | + 'semanticmaps_desc' => 'Ger möjligheten att titta på och ändra koordinatdata sparad genom Semantic MediaWiki-utvidgningen ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 891 | + |
| 892 | +Tillgängliga karttjänster: $1', |
| 893 | + 'semanticmaps_lookupcoordinates' => 'Kolla upp koordinater', |
| 894 | + 'semanticmaps_enteraddresshere' => 'Skriv in adress här', |
| 895 | + 'semanticmaps_notfound' => 'hittades inte', |
| 896 | + 'semanticmaps_paramdesc_height' => 'Höjden på kartan i pixlar (standard är $1)', |
| 897 | + 'semanticmaps_paramdesc_width' => 'Bredden på kartan i pixlar (standard är $1)', |
| 898 | + 'semanticmaps_paramdesc_zoom' => 'Zoomnivån för kartan', |
| 899 | + 'semanticmaps_paramdesc_centre' => 'Koordinaterna för kartans mittpunkt', |
| 900 | + 'semanticmaps_paramdesc_type' => 'Standard karttyp för kartan', |
| 901 | + 'semanticmaps_paramdesc_layers' => 'Lagren tillgängliga för kartan', |
| 902 | +); |
| 903 | + |
| 904 | +/** Telugu (తెలుగు) |
| 905 | + * @author Veeven |
| 906 | + */ |
| 907 | +$messages['te'] = array( |
| 908 | + 'semanticmaps_notfound' => 'కనబడలేదు', |
| 909 | +); |
| 910 | + |
| 911 | +/** Tagalog (Tagalog) |
| 912 | + * @author AnakngAraw |
| 913 | + */ |
| 914 | +$messages['tl'] = array( |
| 915 | + 'semanticmaps_desc' => 'Nagbibigay ng kakayahang makita at baguhin ang dato ng tugmaang nakatabi sa pamamagitan ng dugtong na Semantikong MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps pagpapakita]). |
| 916 | +Makukuhang mga palingkurang pangmapa: $1', |
| 917 | + 'semanticmaps-unrecognizeddistance' => 'Hindi isang tanggap na layo ang halagang $1.', |
| 918 | + 'semanticmaps_lookupcoordinates' => "Hanapin ang mga tugmaang-pampook (''coordinate'')", |
| 919 | + 'semanticmaps_enteraddresshere' => 'Ipasok ang adres dito', |
| 920 | + 'semanticmaps_notfound' => 'hindi natagpuan', |
| 921 | + 'semanticmaps_paramdesc_format' => 'Ang palingkurang pangpagmamapa na ginamit sa paglikha ng mapa', |
| 922 | + 'semanticmaps_paramdesc_geoservice' => 'Ang paglingkurang pang-geokodigo na ginagamit upang maging mga tugmaang-pampook ang mga direksyon', |
| 923 | + 'semanticmaps_paramdesc_height' => 'Ang taas ng mapa, sa piksels ($1 ang likas na nakatakda)', |
| 924 | + 'semanticmaps_paramdesc_width' => 'Ang lapad ng mapa, sa piksels ($1 ang likas na nakatakda)', |
| 925 | + 'semanticmaps_paramdesc_zoom' => 'Ang antas ng paglapit-tutok ng mapa', |
| 926 | + 'semanticmaps_paramdesc_centre' => 'Ang mga tugmaang-pampook ng gitna ng mga mapa', |
| 927 | + 'semanticmaps_paramdesc_controls' => 'Ang mga pangtaban ng tagagamit na inilagay sa ibabaw ng mapa', |
| 928 | + 'semanticmaps_paramdesc_types' => 'Ang mga uri ng mapang makukuha na nasa ibabaw ng mapa', |
| 929 | + 'semanticmaps_paramdesc_type' => 'Ang likas na nakatakdang uri ng mapa na para sa mapa', |
| 930 | + 'semanticmaps_paramdesc_overlays' => 'Ang makukuhang mga patong na nasa ibabaw ng mapa', |
| 931 | + 'semanticmaps_paramdesc_autozoom' => 'Kapag pinagana ang pagtutok-lapit at paglayo sa pamamagitan ng pang-ikid ng maws', |
| 932 | + 'semanticmaps_paramdesc_layers' => 'Ang makukuhang mga patong na nasa ibabaw ng mapa', |
| 933 | +); |
| 934 | + |
| 935 | +/** Turkish (Türkçe) |
| 936 | + * @author Vito Genovese |
| 937 | + */ |
| 938 | +$messages['tr'] = array( |
| 939 | + 'semanticmaps_lookupcoordinates' => 'Koordinat ara', |
| 940 | + 'semanticmaps_enteraddresshere' => 'Adresi buraya girin', |
| 941 | + 'semanticmaps_notfound' => 'bulunamadı', |
| 942 | + 'semanticmaps_paramdesc_zoom' => 'Haritanın yakınlaşma seviyesi', |
| 943 | + 'semanticmaps_paramdesc_layers' => 'Haritada mevcut olan katmanlar', |
| 944 | +); |
| 945 | + |
| 946 | +/** Veps (Vepsan kel') |
| 947 | + * @author Игорь Бродский |
| 948 | + */ |
| 949 | +$messages['vep'] = array( |
| 950 | + 'semanticmaps_notfound' => 'ei voi löuta', |
| 951 | +); |
| 952 | + |
| 953 | +/** Vietnamese (Tiếng Việt) |
| 954 | + * @author Minh Nguyen |
| 955 | + * @author Vinhtantran |
| 956 | + */ |
| 957 | +$messages['vi'] = array( |
| 958 | + 'semanticmaps_desc' => 'Cung cấp khả năng xem và sửa đổi dữ liệu tọa độ được lưu bởi phần mở rộng Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps thử xem]). |
| 959 | +Các dịch vụ bản đồ có sẵn: $1', |
| 960 | + 'semanticmaps_lookupcoordinates' => 'Tra tọa độ', |
| 961 | + 'semanticmaps_enteraddresshere' => 'Nhập địa chỉ vào đây', |
| 962 | + 'semanticmaps_notfound' => 'không tìm thấy', |
| 963 | +); |
| 964 | + |
| 965 | +/** Volapük (Volapük) |
| 966 | + * @author Smeira |
| 967 | + */ |
| 968 | +$messages['vo'] = array( |
| 969 | + 'semanticmaps_lookupcoordinates' => 'Tuvön koordinatis', |
| 970 | +); |
| 971 | + |
| 972 | +/** Simplified Chinese (中文(简体)) |
| 973 | + * @author Gzdavidwong |
| 974 | + */ |
| 975 | +$messages['zh-hans'] = array( |
| 976 | + 'semanticmaps_lookupcoordinates' => '查找坐标', |
| 977 | +); |
| 978 | + |
| 979 | +/** Traditional Chinese (中文(繁體)) |
| 980 | + * @author Gzdavidwong |
| 981 | + * @author Sheepy |
| 982 | + * @author Wrightbus |
| 983 | + */ |
| 984 | +$messages['zh-hant'] = array( |
| 985 | + 'semanticmaps_lookupcoordinates' => '尋找座標', |
| 986 | +); |
| 987 | + |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/SemanticMaps.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 988 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/SemanticMaps.php |
— | — | @@ -0,0 +1,118 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Initialization file for the Semantic Maps extension. |
| 6 | + * Extension documentation: http://mapping.referata.com/wiki/Semantic_Maps |
| 7 | + * |
| 8 | + * @file SemanticMaps.php |
| 9 | + * @ingroup SemanticMaps |
| 10 | + * |
| 11 | + * @author Jeroen De Dauw |
| 12 | + */ |
| 13 | + |
| 14 | +/** |
| 15 | + * This documenation group collects source code files belonging to Semantic Maps. |
| 16 | + * |
| 17 | + * Please do not use this group name for other code. If you have an extension to |
| 18 | + * Semantic Maps, please use your own group defenition. |
| 19 | + * |
| 20 | + * @defgroup SemanticMaps Semantic Maps |
| 21 | + */ |
| 22 | + |
| 23 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 24 | + die( 'Not an entry point.' ); |
| 25 | +} |
| 26 | + |
| 27 | +// Show a warning if Maps is not loaded. |
| 28 | +if ( ! defined( 'Maps_VERSION' ) ) { |
| 29 | + echo '<b>Warning:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Semantic Maps">Semantic Maps</a>. '; |
| 30 | +} |
| 31 | + |
| 32 | +// Show a warning if Semantic MediaWiki is not loaded. |
| 33 | +if ( ! defined( 'SMW_VERSION' ) ) { |
| 34 | + echo '<b>Warning:</b> You need to have <a href="http://semantic-mediawiki.org/wiki/Semantic_MediaWiki">Semantic MediaWiki</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Semantic Maps">Semantic Maps</a>.'; |
| 35 | +} |
| 36 | + |
| 37 | +// Only initialize the extension when all dependencies are present. |
| 38 | +if ( defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' ) ) { |
| 39 | + define( 'SM_VERSION', '0.6.4' ); |
| 40 | + |
| 41 | + $useExtensionPath = version_compare( $wgVersion, '1.16', '>=' ) && isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath; |
| 42 | + $smgScriptPath = ( $useExtensionPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps'; |
| 43 | + $smgDir = dirname( __FILE__ ) . '/'; |
| 44 | + unset( $useExtensionPath ); |
| 45 | + |
| 46 | + $smgStyleVersion = $wgStyleVersion . '-' . SM_VERSION; |
| 47 | + |
| 48 | + // Include the settings file. |
| 49 | + require_once( $smgDir . 'SM_Settings.php' ); |
| 50 | + |
| 51 | + $wgExtensionFunctions[] = 'smfSetup'; |
| 52 | + |
| 53 | + $wgHooks['AdminLinks'][] = 'smfAddToAdminLinks'; |
| 54 | + |
| 55 | + $wgExtensionMessagesFiles['SemanticMaps'] = $smgDir . 'SemanticMaps.i18n.php'; |
| 56 | + |
| 57 | + // Include the GeoCoords related functionality. |
| 58 | + require_once( $smgDir . '/GeoCoords/SM_GeoCoords.php' ); |
| 59 | +} |
| 60 | + |
| 61 | +/** |
| 62 | + * 'Initialization' function for the Semantic Maps extension. |
| 63 | + * The only work done here is creating the extension credits for |
| 64 | + * Semantic Maps. The actuall work in done via the Maps hooks. |
| 65 | + * |
| 66 | + * @since 0.1 |
| 67 | + * |
| 68 | + * @return true |
| 69 | + */ |
| 70 | +function smfSetup() { |
| 71 | + global $wgExtensionCredits, $wgLang, $wgOut, $egMapsServices, $smgScriptPath; |
| 72 | + |
| 73 | + // Creation of a list of internationalized service names. |
| 74 | + $services = array(); |
| 75 | + foreach ( array_keys( $egMapsServices ) as $name ) $services[] = wfMsg( 'maps_' . $name ); |
| 76 | + $services_list = $wgLang->listToText( $services ); |
| 77 | + |
| 78 | + // This function has been deprecated in 1.16, but needed for earlier versions. |
| 79 | + // It's present in 1.16 as a stub, but lets check if it exists in case it gets removed at some point. |
| 80 | + if ( function_exists( 'wfLoadExtensionMessages' ) ) { |
| 81 | + wfLoadExtensionMessages( 'SemanticMaps' ); |
| 82 | + } |
| 83 | + |
| 84 | + $wgExtensionCredits['other'][] = array( |
| 85 | + 'path' => __FILE__, |
| 86 | + 'name' => wfMsg( 'semanticmaps_name' ), |
| 87 | + 'version' => SM_VERSION, |
| 88 | + 'author' => array( |
| 89 | + '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', |
| 90 | + '[http://www.mediawiki.org/wiki/User:Yaron_Koren Yaron Koren]', |
| 91 | + '[http://www.ohloh.net/p/semanticmaps/contributors others]' |
| 92 | + ), |
| 93 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Maps', |
| 94 | + 'description' => wfMsgExt( 'semanticmaps_desc', 'parsemag', $services_list ), |
| 95 | + ); |
| 96 | + |
| 97 | + return true; |
| 98 | +} |
| 99 | + |
| 100 | +/** |
| 101 | + * Adds a link to Admin Links page. |
| 102 | + * |
| 103 | + * @since 0.2 |
| 104 | + * |
| 105 | + * @return true |
| 106 | + */ |
| 107 | +function smfAddToAdminLinks( &$admin_links_tree ) { |
| 108 | + $displaying_data_section = $admin_links_tree->getSection( wfMsg( 'smw_adminlinks_displayingdata' ) ); |
| 109 | + |
| 110 | + // Escape if SMW hasn't added links. |
| 111 | + if ( is_null( $displaying_data_section ) ) return true; |
| 112 | + |
| 113 | + $smw_docu_row = $displaying_data_section->getRow( 'smw' ); |
| 114 | + |
| 115 | + $sm_docu_label = wfMsg( 'adminlinks_documentation', wfMsg( 'semanticmaps_name' ) ); |
| 116 | + $smw_docu_row->addItem( AlItem::newFromExternalLink( "http://www.mediawiki.org/wiki/Extension:Semantic_Maps", $sm_docu_label ) ); |
| 117 | + |
| 118 | + return true; |
| 119 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/SemanticMaps.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 120 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/README |
— | — | @@ -0,0 +1,25 @@ |
| 2 | +== About ==
|
| 3 | +
|
| 4 | +Semantic Maps is an extension that adds semantic capabilities to the Maps extension. This
|
| 5 | +includes the ability to add, edit, aggregate and visualize coordinate data stored through
|
| 6 | +the Semantic MediaWiki extension.
|
| 7 | +
|
| 8 | +Since Semantic Maps uses the Maps API, you can use multiple mapping services. These include
|
| 9 | +Google Maps (with Google Earth support), Yahoo! Maps, OpenLayers and OpenStreetMap.
|
| 10 | +
|
| 11 | +Both Semantic Maps and Maps are based on Semantic Google Maps and Semantic Layers, and are
|
| 12 | +meant to replace these extensions. Having Semantic MediaWiki and Maps installed is a
|
| 13 | +prerequisite for the Semantic Maps extension; the code will not work without it.
|
| 14 | +
|
| 15 | +Notes on installing Semantic Maps are found in the file INSTALL.
|
| 16 | +
|
| 17 | +
|
| 18 | +== Contributing ==
|
| 19 | +
|
| 20 | +If you have bug reports or requests, please add them to the Talk page [0]. You can also
|
| 21 | +send them to Jeroen De Dauw, jeroendedauw -at- gmail.com, and Yaron Koren, at yaron57 -at-
|
| 22 | +gmail.com.
|
| 23 | +
|
| 24 | +[0] http://www.mediawiki.org/w/index.php?title=Extension_talk:Semantic_Maps
|
| 25 | +
|
| 26 | +For more info, see http://mapping.referata.com/wiki/Mapping_on_MediaWiki |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Features/FormInputs/SM_FormInput.php |
— | — | @@ -0,0 +1,278 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Abstract class that provides the common functionality for all map form inputs |
| 6 | + * |
| 7 | + * @file SM_FormInput.php |
| 8 | + * @ingroup SemanticMaps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +abstract class SMFormInput { |
| 18 | + |
| 19 | + /** |
| 20 | + * Determine if geocoding will be enabled and load the required dependencies. |
| 21 | + */ |
| 22 | + protected abstract function manageGeocoding(); |
| 23 | + |
| 24 | + /** |
| 25 | + * Ensures all dependencies for the used map are loaded, and increases that map service's count |
| 26 | + */ |
| 27 | + protected abstract function addFormDependencies(); |
| 28 | + |
| 29 | + protected $mService; |
| 30 | + |
| 31 | + /** |
| 32 | + * @var string |
| 33 | + */ |
| 34 | + protected $mapName; |
| 35 | + |
| 36 | + /** |
| 37 | + * @var array |
| 38 | + */ |
| 39 | + protected $markerCoords; |
| 40 | + |
| 41 | + protected $earthZoom; |
| 42 | + |
| 43 | + protected $showAddresFunction; |
| 44 | + |
| 45 | + protected $enableGeocoding = false; |
| 46 | + |
| 47 | + protected $mErrorList; |
| 48 | + |
| 49 | + private $coordinates; |
| 50 | + |
| 51 | + public function __construct( MapsMappingService $service ) { |
| 52 | + $this->mService = $service; |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * Validates and corrects the provided map properties, and the sets them as class fields. |
| 57 | + * |
| 58 | + * @param array $mapProperties |
| 59 | + * |
| 60 | + * @return boolean Indicates whether the map should be shown or not. |
| 61 | + */ |
| 62 | + protected final function setMapProperties( array $mapProperties ) { |
| 63 | + global $egMapsServices; |
| 64 | + |
| 65 | + /* |
| 66 | + * Assembliy of the allowed parameters and their information. |
| 67 | + * The main parameters (the ones that are shared by everything) are overidden |
| 68 | + * by the feature parameters (the ones specific to a feature). The result is then |
| 69 | + * again overidden by the service parameters (the ones specific to the service), |
| 70 | + * and finally by the specific parameters (the ones specific to a service-feature combination). |
| 71 | + */ |
| 72 | + $parameterInfo = array_merge_recursive( MapsMapper::getCommonParameters(), SMFormInputs::$parameters ); |
| 73 | + $parameterInfo = array_merge_recursive( $parameterInfo, $this->mService->getParameterInfo() ); |
| 74 | + $parameterInfo = array_merge_recursive( $parameterInfo, $this->specificParameters ); |
| 75 | + |
| 76 | + $manager = new ValidatorManager(); |
| 77 | + |
| 78 | + $showMap = $manager->manageParsedParameters( $mapProperties, $parameterInfo ); |
| 79 | + |
| 80 | + if ( $showMap ) { |
| 81 | + $parameters = $manager->getParameters( false ); |
| 82 | + |
| 83 | + foreach ( $parameters as $paramName => $paramValue ) { |
| 84 | + if ( !property_exists( __CLASS__, $paramName ) ) { |
| 85 | + $this-> { $paramName } = $paramValue; |
| 86 | + } |
| 87 | + else { |
| 88 | + // If this happens in any way, it could be a big vunerability, so throw an exception. |
| 89 | + throw new Exception( 'Attempt to override a class field during map property assignment. Field name: ' . $paramName ); |
| 90 | + } |
| 91 | + } |
| 92 | + } |
| 93 | + |
| 94 | + $this->mErrorList = $manager->getErrorList(); |
| 95 | + |
| 96 | + return $showMap; |
| 97 | + } |
| 98 | + |
| 99 | + /** |
| 100 | + * This function is a hook for Semantic Forms, and returns the HTML needed in |
| 101 | + * the form to handle coordinate data. |
| 102 | + * |
| 103 | + * @return array |
| 104 | + * |
| 105 | + * TODO: Use function args for sf stuffz |
| 106 | + */ |
| 107 | + public final function formInputHTML( $coordinates, $input_name, $is_mandatory, $is_disabled, $field_args ) { |
| 108 | + global $sfgTabIndex; |
| 109 | + |
| 110 | + $this->coordinates = $coordinates; |
| 111 | + |
| 112 | + $this->setMapSettings(); |
| 113 | + |
| 114 | + $showInput = $this->setMapProperties( $field_args ); |
| 115 | + |
| 116 | + if ( !$showInput ) { |
| 117 | + return array( $this->errorList ); |
| 118 | + } |
| 119 | + |
| 120 | + $this->doMapServiceLoad(); |
| 121 | + |
| 122 | + $this->manageGeocoding(); |
| 123 | + |
| 124 | + $this->setCoordinates(); |
| 125 | + $this->setCentre(); |
| 126 | + $this->setZoom(); |
| 127 | + |
| 128 | + // Create html element names. |
| 129 | + $this->geocodeFieldName = $this->elementNamePrefix . '_geocode_' . $this->elementNr . '_' . $sfgTabIndex; |
| 130 | + $this->coordsFieldName = $this->elementNamePrefix . '_coords_' . $this->elementNr . '_' . $sfgTabIndex; |
| 131 | + $this->infoFieldName = $this->elementNamePrefix . '_info_' . $this->elementNr . '_' . $sfgTabIndex; |
| 132 | + |
| 133 | + // Create the non specific form HTML. |
| 134 | + $this->output .= Html::input( |
| 135 | + $input_name, |
| 136 | + $this->markerCoords ? MapsCoordinateParser::formatCoordinates( $this->markerCoords ) : '', |
| 137 | + 'text', |
| 138 | + array( |
| 139 | + 'size' => 42, |
| 140 | + 'tabindex' => $sfgTabIndex, |
| 141 | + 'id' => $this->coordsFieldName |
| 142 | + ) |
| 143 | + ); |
| 144 | + |
| 145 | + $this->output .= Html::element( |
| 146 | + 'span', |
| 147 | + array( |
| 148 | + 'class' => 'error_message', |
| 149 | + 'id' => $this->infoFieldName |
| 150 | + ) |
| 151 | + ); |
| 152 | + |
| 153 | + if ( $this->enableGeocoding ) $this->addGeocodingField(); |
| 154 | + |
| 155 | + if ( $this->markerCoords === false ) { |
| 156 | + $this->markerCoords = array( |
| 157 | + 'lat' => 'null', |
| 158 | + 'lon' => 'null' |
| 159 | + ); |
| 160 | + $this->centreLat = 'null'; |
| 161 | + $this->centreLon = 'null'; |
| 162 | + } |
| 163 | + |
| 164 | + $this->addSpecificMapHTML(); |
| 165 | + |
| 166 | + return array( $this->output . $this->mErrorList, '' ); |
| 167 | + } |
| 168 | + |
| 169 | + private function addGeocodingField() { |
| 170 | + global $sfgTabIndex, $wgOut, $smgAddedFormJs; |
| 171 | + $sfgTabIndex++; |
| 172 | + |
| 173 | + if ( !$smgAddedFormJs ) { |
| 174 | + $smgAddedFormJs = true; |
| 175 | + |
| 176 | + $n = Xml::escapeJsString( wfMsgForContent( 'maps-abb-north' ) ); |
| 177 | + $e = Xml::escapeJsString( wfMsgForContent( 'maps-abb-east' ) ); |
| 178 | + $s = Xml::escapeJsString( wfMsgForContent( 'maps-abb-south' ) ); |
| 179 | + $w = Xml::escapeJsString( wfMsgForContent( 'maps-abb-west' ) ); |
| 180 | + $deg = Xml::escapeJsString( Maps_GEO_DEG ); |
| 181 | + |
| 182 | + $wgOut->addInlineScript( |
| 183 | + <<<EOT |
| 184 | +function convertLatToDMS (val) { |
| 185 | + return Math.abs(val) + "$deg " + ( val < 0 ? "$s" : "$n" ); |
| 186 | +} |
| 187 | +function convertLngToDMS (val) { |
| 188 | + return Math.abs(val) + "$deg " + ( val < 0 ? "$w" : "$e" ); |
| 189 | +} |
| 190 | +EOT |
| 191 | + ); |
| 192 | + } |
| 193 | + |
| 194 | + $adress_field = SMFormInput::getDynamicInput( |
| 195 | + $this->geocodeFieldName, |
| 196 | + wfMsg( 'semanticmaps_enteraddresshere' ), |
| 197 | + 'size="30" name="geocode" style="color: #707070" tabindex="' . htmlspecialchars( $sfgTabIndex ) . '"' |
| 198 | + ); |
| 199 | + |
| 200 | + $notFoundText = Xml::escapeJsString( wfMsg( 'semanticmaps_notfound' ) ); |
| 201 | + $mapName = Xml::escapeJsString( $this->mapName ); |
| 202 | + $geoFieldName = Xml::escapeJsString( $this->geocodeFieldName ); |
| 203 | + $coordFieldName = Xml::escapeJsString( $this->coordsFieldName ); |
| 204 | + |
| 205 | + $this->output .= '<p>' . $adress_field . |
| 206 | + Html::input( |
| 207 | + 'geosubmit', |
| 208 | + wfMsg( 'semanticmaps_lookupcoordinates' ), |
| 209 | + 'submit', |
| 210 | + array( |
| 211 | + 'onClick' => "$this->showAddresFunction( document.forms['createbox'].$geoFieldName.value, '$mapName', '$coordFieldName', '$notFoundText'); return false" |
| 212 | + ) |
| 213 | + ) . |
| 214 | + '</p>'; |
| 215 | + } |
| 216 | + |
| 217 | + /** |
| 218 | + * Sets the zoom so the whole map is visible in case there is no maker yet, |
| 219 | + * and sets it to the default when there is a marker but no zoom parameter. |
| 220 | + */ |
| 221 | + private function setZoom() { |
| 222 | + if ( empty( $this->coordinates ) ) { |
| 223 | + $this->zoom = $this->earthZoom; |
| 224 | + } else if ( $this->zoom == 'null' ) { |
| 225 | + $this->zoom = $this->defaultZoom; |
| 226 | + } |
| 227 | + } |
| 228 | + |
| 229 | + /** |
| 230 | + * Sets the $this->markerCoords value, which are the coordinates for the marker. |
| 231 | + */ |
| 232 | + private function setCoordinates() { |
| 233 | + if ( empty( $this->coordinates ) ) { |
| 234 | + // If no coordinates exist yet, no marker should be displayed. |
| 235 | + $this->markerCoords = false; |
| 236 | + } |
| 237 | + else { |
| 238 | + $this->markerCoords = MapsCoordinateParser::parseCoordinates( $this->coordinates ); |
| 239 | + } |
| 240 | + } |
| 241 | + |
| 242 | + /** |
| 243 | + * Sets the $centreLat and $centreLon fields. |
| 244 | + * Note: this needs to be done AFTRE the maker coordinates are set. |
| 245 | + */ |
| 246 | + private function setCentre() { |
| 247 | + if ( empty( $this->centre ) ) { |
| 248 | + if ( isset( $this->coordinates ) ) { |
| 249 | + $this->centreLat = $this->markerCoords['lat']; |
| 250 | + $this->centreLon = $this->markerCoords['lon']; |
| 251 | + } |
| 252 | + else { |
| 253 | + $this->centreLat = '0'; |
| 254 | + $this->centreLon = '0'; |
| 255 | + } |
| 256 | + } |
| 257 | + else { |
| 258 | + // Geocode and convert if required. |
| 259 | + $centre = MapsGeocoder::attemptToGeocode( $this->centre, $this->geoservice, $this->serviceName ); |
| 260 | + |
| 261 | + $this->centreLat = Xml::escapeJsString( $centre['lat'] ); |
| 262 | + $this->centreLon = Xml::escapeJsString( $centre['lon'] ); |
| 263 | + } |
| 264 | + } |
| 265 | + |
| 266 | + /** |
| 267 | + * Returns html for an html input field with a default value that will automatically dissapear when |
| 268 | + * the user clicks in it, and reappers when the focus on the field is lost and it's still empty. |
| 269 | + * |
| 270 | + * @param string $id |
| 271 | + * @param string $value |
| 272 | + * @param string $args |
| 273 | + * |
| 274 | + * @return html |
| 275 | + */ |
| 276 | + private static function getDynamicInput( $id, $value, $args = '' ) { |
| 277 | + return '<input id="' . $id . '" ' . $args . ' value="' . $value . '" onfocus="if (this.value==\'' . $value . '\') {this.value=\'\';}" onblur="if (this.value==\'\') {this.value=\'' . $value . '\';}" />'; |
| 278 | + } |
| 279 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Features/FormInputs/SM_FormInput.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 280 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Features/FormInputs/SM_FormInputs.php |
— | — | @@ -0,0 +1,138 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Initialization file for form input functionality in the Maps extension |
| 6 | + * |
| 7 | + * @file SM_FormInputs.php |
| 8 | + * @ingroup SemanticMaps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +$wgAutoloadClasses['SMFormInputs'] = __FILE__; |
| 18 | + |
| 19 | +$wgHooks['MappingFeatureLoad'][] = 'SMFormInputs::initialize'; |
| 20 | + |
| 21 | +final class SMFormInputs { |
| 22 | + |
| 23 | + public static $parameters = array(); |
| 24 | + |
| 25 | + public static function initialize() { |
| 26 | + global $smgDir, $wgAutoloadClasses, $egMapsServices, $sfgFormPrinter; |
| 27 | + |
| 28 | + // This code should not get called when SF is not loaded, but let's have this |
| 29 | + // check to not run into problems when people mess up the settings. |
| 30 | + if ( !defined( 'SF_VERSION' ) ) return true; |
| 31 | + |
| 32 | + $wgAutoloadClasses['SMFormInput'] = dirname( __FILE__ ) . '/SM_FormInput.php'; |
| 33 | + |
| 34 | + $hasFormInputs = false; |
| 35 | + |
| 36 | + self::initializeParams(); |
| 37 | + |
| 38 | + foreach ( $egMapsServices as $service ) { |
| 39 | + // Check if the service has a form input. |
| 40 | + $FIClass = $service->getFeature( 'fi' ); |
| 41 | + |
| 42 | + // If the service has no FI, skipt it and continue with the next one. |
| 43 | + if ( $FIClass === false ) continue; |
| 44 | + |
| 45 | + // At least one form input will be enabled when this point is reached. |
| 46 | + $hasFormInputs = true; |
| 47 | + |
| 48 | + // Add the result form input type for the service name. |
| 49 | + self::initFormHook( $service->getName(), $service->getName() ); |
| 50 | + |
| 51 | + // Loop through the service alliases, and add them as form input types. |
| 52 | + foreach ( $service->getAliases() as $alias ) self::initFormHook( $alias, $service->getName() ); |
| 53 | + } |
| 54 | + |
| 55 | + // Add the 'map' form input type if there are mapping services that have FI's loaded. |
| 56 | + if ( $hasFormInputs ) self::initFormHook( 'map' ); |
| 57 | + |
| 58 | + return true; |
| 59 | + } |
| 60 | + |
| 61 | + private static function initializeParams() { |
| 62 | + global $egMapsAvailableServices, $egMapsDefaultServices, $egMapsAvailableGeoServices, $egMapsDefaultGeoService; |
| 63 | + global $smgFIWidth, $smgFIHeight; |
| 64 | + |
| 65 | + self::$parameters = array( |
| 66 | + 'width' => array( |
| 67 | + 'default' => $smgFIWidth |
| 68 | + ), |
| 69 | + 'height' => array( |
| 70 | + 'default' => $smgFIHeight |
| 71 | + ), |
| 72 | + 'centre' => array( |
| 73 | + 'aliases' => array( 'center' ), |
| 74 | + ), |
| 75 | + 'geoservice' => array( |
| 76 | + 'criteria' => array( |
| 77 | + 'in_array' => $egMapsAvailableGeoServices |
| 78 | + ), |
| 79 | + 'default' => $egMapsDefaultGeoService |
| 80 | + ), |
| 81 | + 'service_name' => array(), |
| 82 | + 'part_of_multiple' => array(), |
| 83 | + 'possible_values' => array( |
| 84 | + 'type' => array( 'string', 'array' ), |
| 85 | + ), |
| 86 | + 'is_list' => array(), |
| 87 | + 'semantic_property' => array(), |
| 88 | + 'value_labels' => array(), |
| 89 | + ); |
| 90 | + } |
| 91 | + |
| 92 | + /** |
| 93 | + * Adds a mapping service's form hook. |
| 94 | + * |
| 95 | + * @param string $inputName The name of the form input. |
| 96 | + * @param strig $mainName |
| 97 | + */ |
| 98 | + private static function initFormHook( $inputName, $mainName = '' ) { |
| 99 | + global $wgAutoloadClasses, $sfgFormPrinter, $smgDir; |
| 100 | + |
| 101 | + // Add the form input hook for the service. |
| 102 | + $field_args = array(); |
| 103 | + if ( strlen( $mainName ) > 0 ) $field_args['service_name'] = $mainName; |
| 104 | + $sfgFormPrinter->setInputTypeHook( $inputName, 'smfSelectFormInputHTML', $field_args ); |
| 105 | + } |
| 106 | + |
| 107 | +} |
| 108 | + |
| 109 | +/** |
| 110 | + * Calls the relevant form input class depending on the provided service. |
| 111 | + * |
| 112 | + * @param string $coordinates |
| 113 | + * @param string $input_name |
| 114 | + * @param boolean $is_mandatory |
| 115 | + * @param boolean $is_disabled |
| 116 | + * @param array $field_args |
| 117 | + * |
| 118 | + * @return array |
| 119 | + */ |
| 120 | +function smfSelectFormInputHTML( $coordinates, $input_name, $is_mandatory, $is_disabled, array $field_args ) { |
| 121 | + global $egMapsServices; |
| 122 | + |
| 123 | + // Get the service name from the field_args, and set it to null if it doesn't exist. |
| 124 | + if ( array_key_exists( 'service_name', $field_args ) ) { |
| 125 | + $serviceName = $field_args['service_name']; |
| 126 | + } |
| 127 | + else { |
| 128 | + $serviceName = null; |
| 129 | + } |
| 130 | + |
| 131 | + // Ensure the service is valid and create a new instance of the handling form input class. |
| 132 | + $serviceName = MapsMapper::getValidService( $serviceName, 'fi' ); |
| 133 | + $FIClass = $egMapsServices[$serviceName]->getFeature( 'fi' ); |
| 134 | + |
| 135 | + $formInput = new $FIClass( $egMapsServices[$serviceName] ); |
| 136 | + |
| 137 | + // Get and return the form input HTML from the hook corresponding with the provided service. |
| 138 | + return $formInput->formInputHTML( $coordinates, $input_name, $is_mandatory, $is_disabled, $field_args ); |
| 139 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Features/FormInputs/SM_FormInputs.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 140 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Features/QueryPrinters/SM_QueryPrinters.php |
— | — | @@ -0,0 +1,180 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Initialization file for query printer functionality in the Semantic Maps extension |
| 6 | + * |
| 7 | + * @file SM_QueryPrinters.php |
| 8 | + * @ingroup SemanticMaps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +$wgAutoloadClasses['SMQueryPrinters'] = __FILE__; |
| 18 | + |
| 19 | +$wgHooks['MappingFeatureLoad'][] = 'SMQueryPrinters::initialize'; |
| 20 | + |
| 21 | +final class SMQueryPrinters { |
| 22 | + |
| 23 | + public static $parameters = array(); |
| 24 | + |
| 25 | + /** |
| 26 | + * Initialization function for Maps query printer functionality. |
| 27 | + */ |
| 28 | + public static function initialize() { |
| 29 | + global $smgDir, $wgAutoloadClasses, $egMapsServices; |
| 30 | + |
| 31 | + $wgAutoloadClasses['SMMapper'] = dirname( __FILE__ ) . '/SM_Mapper.php'; |
| 32 | + $wgAutoloadClasses['SMMapPrinter'] = dirname( __FILE__ ) . '/SM_MapPrinter.php'; |
| 33 | + |
| 34 | + self::initializeParams(); |
| 35 | + |
| 36 | + $hasQueryPrinters = false; |
| 37 | + |
| 38 | + foreach ( $egMapsServices as $service ) { |
| 39 | + // Check if the service has a query printer. |
| 40 | + $QPClass = $service->getFeature( 'qp' ); |
| 41 | + |
| 42 | + // If the service has no QP, skipt it and continue with the next one. |
| 43 | + if ( $QPClass === false ) continue; |
| 44 | + |
| 45 | + // At least one query printer will be enabled when this point is reached. |
| 46 | + $hasQueryPrinters = true; |
| 47 | + |
| 48 | + // Initiate the format. |
| 49 | + $aliases = $service->getAliases(); |
| 50 | + self::initFormat( $service->getName(), $QPClass, $aliases ); |
| 51 | + } |
| 52 | + |
| 53 | + // Add the 'map' result format if there are mapping services that have QP's loaded. |
| 54 | + if ( $hasQueryPrinters ) self::initFormat( 'map', 'SMMapper' ); |
| 55 | + |
| 56 | + return true; |
| 57 | + } |
| 58 | + |
| 59 | + private static function initializeParams() { |
| 60 | + global $egMapsDefaultServices, $egMapsAvailableGeoServices, $egMapsDefaultGeoService, $egMapsMapWidth, $egMapsMapHeight; |
| 61 | + global $smgQPForceShow, $smgQPShowTitle, $smgQPTemplate; |
| 62 | + |
| 63 | + self::$parameters = array( |
| 64 | + 'width' => array( |
| 65 | + 'default' => $egMapsMapWidth |
| 66 | + ), |
| 67 | + 'height' => array( |
| 68 | + 'default' => $egMapsMapHeight |
| 69 | + ), |
| 70 | + 'geoservice' => array( |
| 71 | + 'criteria' => array( |
| 72 | + 'in_array' => $egMapsAvailableGeoServices |
| 73 | + ), |
| 74 | + 'default' => $egMapsDefaultGeoService |
| 75 | + ), |
| 76 | + 'format' => array( |
| 77 | + 'required' => true, |
| 78 | + 'default' => $egMapsDefaultServices['qp'] |
| 79 | + ), |
| 80 | + 'centre' => array( |
| 81 | + 'aliases' => array( 'center' ), |
| 82 | + ), |
| 83 | + 'forceshow' => array( |
| 84 | + 'type' => 'boolean', |
| 85 | + 'aliases' => array( 'force show' ), |
| 86 | + 'default' => $smgQPForceShow, |
| 87 | + 'output-type' => 'boolean' |
| 88 | + ), |
| 89 | + 'template' => array( |
| 90 | + 'criteria' => array( |
| 91 | + 'not_empty' => array() |
| 92 | + ), |
| 93 | + 'default' => $smgQPTemplate, |
| 94 | + ), |
| 95 | + 'showtitle' => array( |
| 96 | + 'type' => 'boolean', |
| 97 | + 'aliases' => array( 'show title' ), |
| 98 | + 'default' => $smgQPShowTitle, |
| 99 | + 'output-type' => 'boolean' |
| 100 | + ), |
| 101 | + 'icon' => array( |
| 102 | + 'criteria' => array( |
| 103 | + 'not_empty' => array() |
| 104 | + ) |
| 105 | + ), |
| 106 | + // SMW #Ask: parameters |
| 107 | + 'limit' => array( |
| 108 | + 'type' => 'integer', |
| 109 | + 'criteria' => array( |
| 110 | + 'in_range' => array( 0 ) |
| 111 | + ) |
| 112 | + ), |
| 113 | + 'offset' => array( |
| 114 | + 'type' => 'integer' |
| 115 | + ), |
| 116 | + 'sort' => array(), |
| 117 | + 'order' => array( |
| 118 | + 'criteria' => array( |
| 119 | + 'in_array' => array( 'ascending', 'asc', 'descending', 'desc', 'reverse' ) |
| 120 | + ) |
| 121 | + ), |
| 122 | + 'headers' => array( |
| 123 | + 'criteria' => array( |
| 124 | + 'in_array' => array( 'show', 'hide' ) |
| 125 | + ) |
| 126 | + ), |
| 127 | + 'mainlabel' => array(), |
| 128 | + 'link' => array( |
| 129 | + 'criteria' => array( |
| 130 | + 'in_array' => array( 'none', 'subject', 'all' ) |
| 131 | + ) |
| 132 | + ), |
| 133 | + 'default' => array(), |
| 134 | + 'intro' => array(), |
| 135 | + 'outro' => array(), |
| 136 | + 'searchlabel' => array(), |
| 137 | + 'distance' => array(), |
| 138 | + ); |
| 139 | + } |
| 140 | + |
| 141 | + /** |
| 142 | + * Add the result format for a mapping service or alias. |
| 143 | + * |
| 144 | + * @param string $format |
| 145 | + * @param string $formatClass |
| 146 | + * @param array $aliases |
| 147 | + */ |
| 148 | + private static function initFormat( $format, $formatClass, array $aliases = array() ) { |
| 149 | + global $wgAutoloadClasses, $smgDir, $smwgResultAliases; |
| 150 | + |
| 151 | + // Add the QP to SMW. |
| 152 | + self::addFormatQP( $format, $formatClass ); |
| 153 | + |
| 154 | + // If SMW supports aliasing, add the aliases to $smwgResultAliases. |
| 155 | + if ( isset( $smwgResultAliases ) ) { |
| 156 | + $smwgResultAliases[$format] = $aliases; |
| 157 | + } |
| 158 | + else { // If SMW does not support aliasing, add every alias as a format. |
| 159 | + foreach ( $aliases as $alias ) self::addFormatQP( $alias, $formatClass ); |
| 160 | + } |
| 161 | + } |
| 162 | + |
| 163 | + /** |
| 164 | + * Adds a QP to SMW's $smwgResultFormats array or SMWQueryProcessor |
| 165 | + * depending on if SMW supports $smwgResultFormats. |
| 166 | + * |
| 167 | + * @param string $format |
| 168 | + * @param string $class |
| 169 | + */ |
| 170 | + private static function addFormatQP( $format, $class ) { |
| 171 | + global $smwgResultFormats; |
| 172 | + |
| 173 | + if ( isset( $smwgResultFormats ) ) { |
| 174 | + $smwgResultFormats[$format] = $class; |
| 175 | + } |
| 176 | + else { |
| 177 | + SMWQueryProcessor::$formats[$format] = $class; |
| 178 | + } |
| 179 | + } |
| 180 | + |
| 181 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Features/QueryPrinters/SM_QueryPrinters.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 182 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Features/QueryPrinters/SM_MapPrinter.php |
— | — | @@ -0,0 +1,380 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * File holding abstract class SMMapPrinter. |
| 6 | + * |
| 7 | + * @file SM_MapPrinter.php |
| 8 | + * @ingroup SemanticMaps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + * @author Robert Buzink |
| 12 | + * @author Yaron Koren |
| 13 | + */ |
| 14 | + |
| 15 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 16 | + die( 'Not an entry point.' ); |
| 17 | +} |
| 18 | + |
| 19 | +/** |
| 20 | + * Abstract class that provides the common functionality for all map query printers. |
| 21 | + * |
| 22 | + * @ingroup SemanticMaps |
| 23 | + * |
| 24 | + * @author Jeroen De Dauw |
| 25 | + * @author Robert Buzink |
| 26 | + * @author Yaron Koren |
| 27 | + * |
| 28 | + * The adaptor pattern could be used to prevent this. |
| 29 | + */ |
| 30 | +abstract class SMMapPrinter extends SMWResultPrinter { |
| 31 | + |
| 32 | + /** |
| 33 | + * Sets the map service specific element name. |
| 34 | + */ |
| 35 | + protected abstract function setQueryPrinterSettings(); |
| 36 | + |
| 37 | + protected abstract function getServiceName(); |
| 38 | + |
| 39 | + /** |
| 40 | + * Gets the query result. |
| 41 | + */ |
| 42 | + protected abstract function addSpecificMapHTML(); |
| 43 | + |
| 44 | + protected $mService; |
| 45 | + |
| 46 | + protected $mLocations = array(); |
| 47 | + |
| 48 | + protected $defaultZoom; |
| 49 | + |
| 50 | + protected $centreLat; |
| 51 | + protected $centreLon; |
| 52 | + |
| 53 | + protected $output = ''; |
| 54 | + protected $mErrorList; |
| 55 | + |
| 56 | + protected $mMapFeature; |
| 57 | + |
| 58 | + protected $featureParameters = array(); |
| 59 | + protected $specificParameters = array(); |
| 60 | + |
| 61 | + public function __construct( $format, $inline, /* MapsMappingService */ $service = null ) { |
| 62 | + // TODO: this is a hack since I can't find a way to pass along the service object here when the QP is created in SMW. |
| 63 | + if ( $service == null ) { |
| 64 | + global $egMapsServices; |
| 65 | + $service = $egMapsServices[$this->getServiceName()]; |
| 66 | + } |
| 67 | + |
| 68 | + $this->mService = $service; |
| 69 | + } |
| 70 | + |
| 71 | + /** |
| 72 | + * Builds up and returns the HTML for the map, with the queried coordinate data on it. |
| 73 | + * |
| 74 | + * @param unknown_type $res |
| 75 | + * @param unknown_type $outputmode |
| 76 | + * |
| 77 | + * @return array |
| 78 | + */ |
| 79 | + public final function getResultText( $res, $outputmode ) { |
| 80 | + $this->setQueryPrinterSettings(); |
| 81 | + |
| 82 | + $this->featureParameters = SMQueryPrinters::$parameters; |
| 83 | + |
| 84 | + if ( self::manageMapProperties( $this->m_params ) ) { |
| 85 | + $this->formatResultData( $res, $outputmode ); |
| 86 | + |
| 87 | + // Only create a map when there is at least one result. |
| 88 | + if ( count( $this->mLocations ) > 0 || $this->forceshow ) { |
| 89 | + $this->setZoom(); |
| 90 | + |
| 91 | + $this->setCentre(); |
| 92 | + |
| 93 | + $this->addSpecificMapHTML(); |
| 94 | + |
| 95 | + $dependencies = $this->mService->getDependencyHtml(); |
| 96 | + $hash = md5( $dependencies ); |
| 97 | + SMWOutputs::requireHeadItem( $hash, $dependencies ); |
| 98 | + } |
| 99 | + else { |
| 100 | + // TODO: add warning when level high enough and append to error list? |
| 101 | + } |
| 102 | + } |
| 103 | + |
| 104 | + return array( $this->output . $this->mErrorList, 'noparse' => true, 'isHTML' => true ); |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * Validates and corrects the provided map properties, and the sets them as class fields. |
| 109 | + * |
| 110 | + * @param array $mapProperties |
| 111 | + * |
| 112 | + * @return boolean Indicates whether the map should be shown or not. |
| 113 | + */ |
| 114 | + protected final function manageMapProperties( array $mapProperties ) { |
| 115 | + global $egMapsServices; |
| 116 | + |
| 117 | + /* |
| 118 | + * Assembliy of the allowed parameters and their information. |
| 119 | + * The main parameters (the ones that are shared by everything) are overidden |
| 120 | + * by the feature parameters (the ones specific to a feature). The result is then |
| 121 | + * again overidden by the service parameters (the ones specific to the service), |
| 122 | + * and finally by the specific parameters (the ones specific to a service-feature combination). |
| 123 | + */ |
| 124 | + $parameterInfo = array_merge_recursive( MapsMapper::getCommonParameters(), $this->featureParameters ); |
| 125 | + $parameterInfo = array_merge_recursive( $parameterInfo, $this->mService->getParameterInfo() ); |
| 126 | + $parameterInfo = array_merge_recursive( $parameterInfo, $this->specificParameters ); |
| 127 | + |
| 128 | + $manager = new ValidatorManager(); |
| 129 | + |
| 130 | + $showMap = $manager->manageParsedParameters( $mapProperties, $parameterInfo ); |
| 131 | + |
| 132 | + if ( $showMap ) { |
| 133 | + $this->setMapProperties( $manager->getParameters( false ) ); |
| 134 | + } |
| 135 | + |
| 136 | + $this->mErrorList = $manager->getErrorList(); |
| 137 | + |
| 138 | + return $showMap; |
| 139 | + } |
| 140 | + |
| 141 | + /** |
| 142 | + * Sets the map properties as class fields. |
| 143 | + * |
| 144 | + * @param array $mapProperties |
| 145 | + */ |
| 146 | + private function setMapProperties( array $mapProperties ) { |
| 147 | + foreach ( $mapProperties as $paramName => $paramValue ) { |
| 148 | + if ( !property_exists( __CLASS__, $paramName ) ) { |
| 149 | + $this-> { $paramName } = $paramValue; |
| 150 | + } |
| 151 | + else { |
| 152 | + throw new Exception( 'Attempt to override a class field during map propertie assignment. Field name: ' . $paramName ); |
| 153 | + } |
| 154 | + } |
| 155 | + } |
| 156 | + |
| 157 | + public final function getResult( $results, $params, $outputmode ) { |
| 158 | + // Skip checks, results with 0 entries are normal. |
| 159 | + $this->readParameters( $params, $outputmode ); |
| 160 | + |
| 161 | + return $this->getResultText( $results, SMW_OUTPUT_HTML ); |
| 162 | + } |
| 163 | + |
| 164 | + private function formatResultData( $res, $outputmode ) { |
| 165 | + while ( ( $row = $res->getNext() ) !== false ) { |
| 166 | + $this->addResultRow( $outputmode, $row ); |
| 167 | + } |
| 168 | + } |
| 169 | + |
| 170 | + /** |
| 171 | + * This function will loop through all properties (fields) of one record (row), |
| 172 | + * and add the location data, title, label and icon to the m_locations array. |
| 173 | + * |
| 174 | + * @param unknown_type $outputmode |
| 175 | + * @param array $row The record you want to add data from |
| 176 | + */ |
| 177 | + private function addResultRow( $outputmode, array $row ) { |
| 178 | + global $wgUser, $smgUseSpatialExtensions; |
| 179 | + |
| 180 | + $skin = $wgUser->getSkin(); |
| 181 | + |
| 182 | + $title = ''; |
| 183 | + $titleForTemplate = ''; |
| 184 | + $text = ''; |
| 185 | + $lat = ''; |
| 186 | + $lon = ''; |
| 187 | + |
| 188 | + $coords = array(); |
| 189 | + $label = array(); |
| 190 | + |
| 191 | + // Loop throught all fields of the record. |
| 192 | + foreach ( $row as $i => $field ) { |
| 193 | + $pr = $field->getPrintRequest(); |
| 194 | + |
| 195 | + // Loop throught all the parts of the field value. |
| 196 | + while ( ( $object = $field->getNextObject() ) !== false ) { |
| 197 | + if ( $object->getTypeID() == '_wpg' && $i == 0 ) { |
| 198 | + if ( $this->showtitle ) $title = $object->getLongText( $outputmode, $skin ); |
| 199 | + if ( $this->template ) $titleForTemplate = $object->getLongText( $outputmode, NULL ); |
| 200 | + } |
| 201 | + |
| 202 | + if ( $object->getTypeID() != '_geo' && $i != 0 ) { |
| 203 | + if ( $this->template ) { |
| 204 | + if ( $object instanceof SMWWikiPageValue ) { |
| 205 | + $label[] = $object->getTitle()->getPrefixedText(); |
| 206 | + } else { |
| 207 | + $label[] = $object->getLongText( $outputmode, $skin ); |
| 208 | + } |
| 209 | + } |
| 210 | + else { |
| 211 | + $text .= $pr->getHTMLText( $skin ) . ': ' . $object->getLongText( $outputmode, $skin ) . '<br />'; |
| 212 | + } |
| 213 | + } |
| 214 | + |
| 215 | + if ( $pr->getMode() == SMWPrintRequest::PRINT_PROP && $pr->getTypeID() == '_geo' ) { |
| 216 | + $coords[] = $object->getDBkeys(); |
| 217 | + } |
| 218 | + } |
| 219 | + } |
| 220 | + |
| 221 | + foreach ( $coords as $coord ) { |
| 222 | + if ( count( $coord ) >= 2 ) { |
| 223 | + if ( $smgUseSpatialExtensions ) { |
| 224 | + // TODO |
| 225 | + } |
| 226 | + else { |
| 227 | + list( $lat, $lon ) = $coord; |
| 228 | + } |
| 229 | + |
| 230 | + if ( $lat != '' && $lon != '' ) { |
| 231 | + $icon = $this->getLocationIcon( $row ); |
| 232 | + |
| 233 | + if ( $this->template ) { |
| 234 | + global $wgParser; |
| 235 | + |
| 236 | + $segments = array_merge( |
| 237 | + array( $this->template, 'title=' . $titleForTemplate, 'latitude=' . $lat, 'longitude=' . $lon ), |
| 238 | + $label |
| 239 | + ); |
| 240 | + |
| 241 | + $text = preg_replace( '/\n+/m', '<br />', $wgParser->recursiveTagParse( '{{' . implode( '|', $segments ) . '}}' ) ); |
| 242 | + } |
| 243 | + |
| 244 | + $this->mLocations[] = array( |
| 245 | + Xml::escapeJsString( $lat ), |
| 246 | + Xml::escapeJsString( $lon ), |
| 247 | + Xml::escapeJsString( $title ), |
| 248 | + Xml::escapeJsString( $text ), |
| 249 | + Xml::escapeJsString( $icon ) |
| 250 | + ); |
| 251 | + } |
| 252 | + } |
| 253 | + } |
| 254 | + } |
| 255 | + |
| 256 | + /** |
| 257 | + * Get the icon for a row. |
| 258 | + * |
| 259 | + * @param array $row |
| 260 | + * |
| 261 | + * @return string |
| 262 | + */ |
| 263 | + private function getLocationIcon( array $row ) { |
| 264 | + $icon = ''; |
| 265 | + $legend_labels = array(); |
| 266 | + |
| 267 | + // Look for display_options field, which can be set by Semantic Compound Queries |
| 268 | + // the location of this field changed in SMW 1.5 |
| 269 | + $display_location = method_exists( $row[0], 'getResultSubject' ) ? $display_location = $row[0]->getResultSubject() : $row[0]; |
| 270 | + |
| 271 | + if ( property_exists( $display_location, 'display_options' ) && is_array( $display_location->display_options ) ) { |
| 272 | + $display_options = $display_location->display_options; |
| 273 | + if ( array_key_exists( 'icon', $display_options ) ) { |
| 274 | + $icon = $display_options['icon']; |
| 275 | + |
| 276 | + // This is somewhat of a hack - if a legend label has been set, we're getting it for every point, instead of just once per icon |
| 277 | + if ( array_key_exists( 'legend label', $display_options ) ) { |
| 278 | + |
| 279 | + $legend_label = $display_options['legend label']; |
| 280 | + |
| 281 | + if ( ! array_key_exists( $icon, $legend_labels ) ) { |
| 282 | + $legend_labels[$icon] = $legend_label; |
| 283 | + } |
| 284 | + } |
| 285 | + } |
| 286 | + } // Icon can be set even for regular, non-compound queries If it is, though, we have to translate the name into a URL here |
| 287 | + elseif ( $this->icon != '' ) { |
| 288 | + $icon_image_page = new ImagePage( Title::newFromText( $this->icon ) ); |
| 289 | + $icon = $icon_image_page->getDisplayedFile()->getURL(); |
| 290 | + } |
| 291 | + |
| 292 | + return $icon; |
| 293 | + } |
| 294 | + |
| 295 | + /** |
| 296 | + * Sets the zoom level to the provided value, or when not set, to the default. |
| 297 | + */ |
| 298 | + private function setZoom() { |
| 299 | + if ( $this->zoom == '' ) { |
| 300 | + if ( count( $this->mLocations ) > 1 ) { |
| 301 | + $this->zoom = 'null'; |
| 302 | + } |
| 303 | + else { |
| 304 | + $this->zoom = $this->defaultZoom; |
| 305 | + } |
| 306 | + } |
| 307 | + } |
| 308 | + |
| 309 | + /** |
| 310 | + * Sets the $centre_lat and $centre_lon fields. |
| 311 | + * Note: this needs to be done AFTRE the maker coordinates are set. |
| 312 | + */ |
| 313 | + private function setCentre() { |
| 314 | + // If a centre value is set, use it. |
| 315 | + if ( $this->centre != '' ) { |
| 316 | + // Geocode and convert if required. |
| 317 | + $centre = MapsGeocoder::attemptToGeocode( $this->centre, $this->geoservice, $this->mService->getName() ); |
| 318 | + |
| 319 | + if ( $centre ) { |
| 320 | + $this->centreLat = $centre['lat']; |
| 321 | + $this->centreLon = $centre['lon']; |
| 322 | + } |
| 323 | + else { |
| 324 | + $this->setCentreDefault(); |
| 325 | + } |
| 326 | + } |
| 327 | + else { |
| 328 | + $this->setCentreDefault(); |
| 329 | + } |
| 330 | + } |
| 331 | + |
| 332 | + /** |
| 333 | + * Figures out the default value for the centre. |
| 334 | + */ |
| 335 | + private function setCentreDefault() { |
| 336 | + if ( count( $this->mLocations ) > 1 ) { |
| 337 | + // If centre is not set, and there are multiple points, set the values to null, to be auto determined by the JS of the mapping API. |
| 338 | + $this->centreLat = 'null'; |
| 339 | + $this->centreLon = 'null'; |
| 340 | + } |
| 341 | + elseif ( count( $this->mLocations ) == 1 ) { |
| 342 | + // If centre is not set and there is exactelly one marker, use it's coordinates. |
| 343 | + $this->centreLat = Xml::escapeJsString( $this->mLocations[0][0] ); |
| 344 | + $this->centreLon = Xml::escapeJsString( $this->mLocations[0][1] ); |
| 345 | + } |
| 346 | + else { |
| 347 | + // If centre is not set and there are no results, centre on the default coordinates. |
| 348 | + global $egMapsMapLat, $egMapsMapLon; |
| 349 | + |
| 350 | + $this->centreLat = $egMapsMapLat; |
| 351 | + $this->centreLon = $egMapsMapLon; |
| 352 | + } |
| 353 | + } |
| 354 | + |
| 355 | + /** |
| 356 | + * Returns the internationalized name of the mapping service. |
| 357 | + * |
| 358 | + * @return string |
| 359 | + */ |
| 360 | + public final function getName() { |
| 361 | + return wfMsg( 'maps_' . $this->mService->getName() ); |
| 362 | + } |
| 363 | + |
| 364 | + /** |
| 365 | + * Returns a list of parameter information, for usage by Special:Ask and others. |
| 366 | + * |
| 367 | + * @return array |
| 368 | + */ |
| 369 | + public function getParameters() { |
| 370 | + global $egMapsMapWidth, $egMapsMapHeight; |
| 371 | + |
| 372 | + $params = parent::exportFormatParameters(); |
| 373 | + |
| 374 | + $params[] = array( 'name' => 'zoom', 'type' => 'int', 'description' => wfMsg( 'semanticmaps_paramdesc_zoom' ) ); |
| 375 | + $params[] = array( 'name' => 'width', 'type' => 'int', 'description' => wfMsgExt( 'semanticmaps_paramdesc_width', 'parsemag', $egMapsMapWidth ) ); |
| 376 | + $params[] = array( 'name' => 'height', 'type' => 'int', 'description' => wfMsgExt( 'semanticmaps_paramdesc_height', 'parsemag', $egMapsMapHeight ) ); |
| 377 | + |
| 378 | + return $params; |
| 379 | + } |
| 380 | + |
| 381 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Features/QueryPrinters/SM_MapPrinter.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 382 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_4/Features/QueryPrinters/SM_Mapper.php |
— | — | @@ -0,0 +1,65 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * General map query printer class |
| 6 | + * |
| 7 | + * @file SM_Mapper.php |
| 8 | + * @ingroup SemanticMaps |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +final class SMMapper { |
| 18 | + |
| 19 | + private $queryPrinter; |
| 20 | + |
| 21 | + public function __construct( $format, $inline ) { |
| 22 | + global $egMapsDefaultServices, $egMapsServices; |
| 23 | + |
| 24 | + // TODO: allow service parameter to override the default |
| 25 | + // Note: if this is allowed, then the getParameters should only return the base parameters. |
| 26 | + if ( $format == 'map' ) $format = $egMapsDefaultServices['qp']; |
| 27 | + |
| 28 | + $service = $egMapsServices[MapsMapper::getValidService( $format, 'qp' )]; |
| 29 | + $QPClass = $service->getFeature( 'qp' ); |
| 30 | + |
| 31 | + $this->queryPrinter = new $QPClass( $format, $inline, $service ); |
| 32 | + } |
| 33 | + |
| 34 | + public static function getAliases() { |
| 35 | + return $this->queryPrinter->getAliases(); |
| 36 | + } |
| 37 | + |
| 38 | + public static function setAliases() { |
| 39 | + return $this->queryPrinter->setAliases(); |
| 40 | + } |
| 41 | + |
| 42 | + public function getName() { |
| 43 | + return wfMsg( 'maps_map' ); |
| 44 | + } |
| 45 | + |
| 46 | + public function getQueryMode( $context ) { |
| 47 | + return $this->queryPrinter->getQueryMode( $context ); |
| 48 | + } |
| 49 | + |
| 50 | + public function getResult( $results, $params, $outputmode ) { |
| 51 | + return $this->queryPrinter->getResult( $results, $params, $outputmode ); |
| 52 | + } |
| 53 | + |
| 54 | + protected function getResultText( $res, $outputmode ) { |
| 55 | + return $this->queryPrinter->getResultText( $res, $outputmode ); |
| 56 | + } |
| 57 | + |
| 58 | + public function getParameters() { |
| 59 | + return $this->queryPrinter->getParameters(); |
| 60 | + } |
| 61 | + |
| 62 | + public function getMimeType( $res ) { |
| 63 | + return $this->queryPrinter->getMimeType( $res ); |
| 64 | + } |
| 65 | + |
| 66 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_4/Features/QueryPrinters/SM_Mapper.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 67 | + native |