Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Services/YahooMaps/SM_YahooMapsFunctions.js |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 56 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Services/YahooMaps/SM_YahooMaps.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 41 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/Services/YahooMaps/SM_YahooMapsQP.php |
— | — | @@ -0,0 +1,104 @@ |
| 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->elementNamePrefix = $egMapsYahooMapsPrefix; |
| 29 | + |
| 30 | + $this->defaultZoom = $egMapsYahooMapsZoom; |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see SMMapPrinter::doMapServiceLoad() |
| 35 | + */ |
| 36 | + protected function doMapServiceLoad() { |
| 37 | + global $egYahooMapsOnThisPage; |
| 38 | + |
| 39 | + $egYahooMapsOnThisPage++; |
| 40 | + |
| 41 | + $this->elementNr = $egYahooMapsOnThisPage; |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * @see SMMapPrinter::addSpecificMapHTML() |
| 46 | + */ |
| 47 | + protected function addSpecificMapHTML() { |
| 48 | + // TODO: refactor up like done in maps with display point |
| 49 | + $markerItems = array(); |
| 50 | + |
| 51 | + foreach ( $this->mLocations as $location ) { |
| 52 | + // Create a string containing the marker JS. |
| 53 | + list( $lat, $lon, $title, $label, $icon ) = $location; |
| 54 | + |
| 55 | + $markerItems[] = "getYMarkerData($lat, $lon, '$title', '$label', '$icon')"; |
| 56 | + } |
| 57 | + |
| 58 | + $markersString = implode( ',', $markerItems ); |
| 59 | + |
| 60 | + $this->output .= Html::element( |
| 61 | + 'div', |
| 62 | + array( |
| 63 | + 'id' => $this->mapName, |
| 64 | + 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;", |
| 65 | + ), |
| 66 | + wfMsg( 'maps-loading-map' ) |
| 67 | + ); |
| 68 | + |
| 69 | + $this->mService->addDependency( Html::inlineScript( <<<EOT |
| 70 | +addOnloadHook( |
| 71 | + function() { |
| 72 | + initializeYahooMap( |
| 73 | + '$this->mapName', |
| 74 | + $this->centreLat, |
| 75 | + $this->centreLon, |
| 76 | + $this->zoom, |
| 77 | + $this->type, |
| 78 | + [$this->types], |
| 79 | + [$this->controls], |
| 80 | + $this->autozoom, |
| 81 | + [$markersString] |
| 82 | + ); |
| 83 | + } |
| 84 | +); |
| 85 | +EOT |
| 86 | + ) ); |
| 87 | + } |
| 88 | + |
| 89 | + /** |
| 90 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the specific ones to the list. |
| 91 | + */ |
| 92 | + public function getParameters() { |
| 93 | + $params = parent::getParameters(); |
| 94 | + |
| 95 | + $allowedTypes = MapsYahooMaps::getTypeNames(); |
| 96 | + |
| 97 | + $params[] = array( 'name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_controls' ), 'values' => MapsYahooMaps::getControlNames() ); |
| 98 | + $params[] = array( 'name' => 'types', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_types' ), 'values' => $allowedTypes ); |
| 99 | + $params[] = array( 'name' => 'type', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_type' ), 'values' => $allowedTypes ); |
| 100 | + $params[] = array( 'name' => 'autozoom', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_autozoom' ), 'values' => array( 'on', 'off' ) ); |
| 101 | + |
| 102 | + return $params; |
| 103 | + } |
| 104 | + |
| 105 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/Services/YahooMaps/SM_YahooMapsQP.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 106 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Services/YahooMaps/SM_YahooMapsFormInput.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 114 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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) { |
| 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); |
| 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 | +} |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/Services/OpenLayers/SM_OpenLayersFunctions.js |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 100 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Services/OpenLayers/SM_OpenLayers.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 41 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/Services/OpenLayers/SM_OpenLayersQP.php |
— | — | @@ -0,0 +1,100 @@ |
| 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, $egMapsOpenLayersPrefix; |
| 28 | + |
| 29 | + $this->elementNamePrefix = $egMapsOpenLayersPrefix; |
| 30 | + $this->defaultZoom = $egMapsOpenLayersZoom; |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see SMMapPrinter::doMapServiceLoad() |
| 35 | + */ |
| 36 | + protected function doMapServiceLoad() { |
| 37 | + global $egOpenLayersOnThisPage; |
| 38 | + |
| 39 | + $egOpenLayersOnThisPage++; |
| 40 | + |
| 41 | + $this->elementNr = $egOpenLayersOnThisPage; |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * @see SMMapPrinter::addSpecificMapHTML() |
| 46 | + */ |
| 47 | + protected function addSpecificMapHTML() { |
| 48 | + // TODO: refactor up like done in maps with display point |
| 49 | + $markerItems = array(); |
| 50 | + |
| 51 | + foreach ( $this->mLocations as $location ) { |
| 52 | + // Create a string containing the marker JS . |
| 53 | + list( $lat, $lon, $title, $label, $icon ) = $location; |
| 54 | + |
| 55 | + $markerItems[] = "getOLMarkerData($lon, $lat, '$title', '$label', '$icon')"; |
| 56 | + } |
| 57 | + |
| 58 | + $markersString = implode( ',', $markerItems ); |
| 59 | + |
| 60 | + $this->output .= Html::element( |
| 61 | + 'div', |
| 62 | + array( |
| 63 | + 'id' => $this->mapName, |
| 64 | + 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;", |
| 65 | + ), |
| 66 | + wfMsg( 'maps-loading-map' ) |
| 67 | + ); |
| 68 | + |
| 69 | + $layerItems = $this->mService->createLayersStringAndLoadDependencies( $this->layers ); |
| 70 | + |
| 71 | + $this->mService->addDependency( Html::inlineScript( <<<EOT |
| 72 | +addOnloadHook( |
| 73 | + function() { |
| 74 | + initOpenLayer( |
| 75 | + '$this->mapName', |
| 76 | + $this->centreLat, |
| 77 | + $this->centreLon, |
| 78 | + $this->zoom, |
| 79 | + [$layerItems], |
| 80 | + [$this->controls], |
| 81 | + [$markersString] |
| 82 | + ); |
| 83 | + } |
| 84 | +); |
| 85 | +EOT |
| 86 | + ) ); |
| 87 | + } |
| 88 | + |
| 89 | + /** |
| 90 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the specific ones to the list. |
| 91 | + */ |
| 92 | + public function getParameters() { |
| 93 | + $params = parent::getParameters(); |
| 94 | + |
| 95 | + $params[] = array( 'name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_controls' ), 'values' => MapsOpenLayers::getControlNames() ); |
| 96 | + $params[] = array( 'name' => 'layers', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_layers' ), 'values' => MapsOpenLayers::getLayerNames() ); |
| 97 | + |
| 98 | + return $params; |
| 99 | + } |
| 100 | + |
| 101 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/Services/OpenLayers/SM_OpenLayersQP.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 102 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/Services/OpenLayers/SM_OpenLayersFormInput.php |
— | — | @@ -0,0 +1,110 @@ |
| 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; |
| 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 | + $wgOut->addInlineScript( <<<EOT |
| 83 | +addOnloadHook( |
| 84 | + function() { |
| 85 | + makeFormInputOpenLayer( |
| 86 | + '$this->mapName', |
| 87 | + '$this->coordsFieldName', |
| 88 | + $this->centreLat, |
| 89 | + $this->centreLon, |
| 90 | + $this->zoom, |
| 91 | + {$this->markerCoords['lat']}, |
| 92 | + {$this->markerCoords['lon']}, |
| 93 | + [$layerItems], |
| 94 | + [$this->controls] |
| 95 | + ); |
| 96 | + } |
| 97 | +); |
| 98 | +EOT |
| 99 | + ); |
| 100 | + |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * @see SMFormInput::manageGeocoding() |
| 105 | + * TODO: find a geocoding service that can be used here |
| 106 | + */ |
| 107 | + protected function manageGeocoding() { |
| 108 | + $this->enableGeocoding = false; |
| 109 | + } |
| 110 | + |
| 111 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/Services/OpenLayers/SM_OpenLayersFormInput.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 112 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Services/GoogleMaps/SM_GoogleMapsFunctions.js |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 67 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Services/GoogleMaps/SM_GoogleMaps.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 41 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/Services/GoogleMaps/SM_GoogleMapsQP.php |
— | — | @@ -0,0 +1,119 @@ |
| 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, $egMapsGoogleMapsPrefix, $egMapsGMapOverlays; |
| 29 | + |
| 30 | + $this->elementNamePrefix = $egMapsGoogleMapsPrefix; |
| 31 | + |
| 32 | + $this->defaultZoom = $egMapsGoogleMapsZoom; |
| 33 | + |
| 34 | + $this->specificParameters = array( |
| 35 | + 'overlays' => array( |
| 36 | + 'type' => array( 'string', 'list' ), |
| 37 | + 'criteria' => array( |
| 38 | + 'is_google_overlay' => array() |
| 39 | + ), |
| 40 | + 'default' => $egMapsGMapOverlays, |
| 41 | + ), |
| 42 | + ); |
| 43 | + } |
| 44 | + |
| 45 | + /** |
| 46 | + * @see SMMapPrinter::doMapServiceLoad() |
| 47 | + */ |
| 48 | + protected function doMapServiceLoad() { |
| 49 | + global $egGoogleMapsOnThisPage; |
| 50 | + |
| 51 | + $egGoogleMapsOnThisPage++; |
| 52 | + |
| 53 | + $this->elementNr = $egGoogleMapsOnThisPage; |
| 54 | + } |
| 55 | + |
| 56 | + /** |
| 57 | + * @see SMMapPrinter::addSpecificMapHTML() |
| 58 | + */ |
| 59 | + protected function addSpecificMapHTML() { |
| 60 | + $this->mService->addOverlayOutput( $this->output, $this->mapName, $this->overlays, $this->controls ); |
| 61 | + |
| 62 | + // TODO: refactor up like done in maps with display point |
| 63 | + $markerItems = array(); |
| 64 | + |
| 65 | + foreach ( $this->mLocations as $location ) { |
| 66 | + list( $lat, $lon, $title, $label, $icon ) = $location; |
| 67 | + $markerItems[] = "getGMarkerData($lat, $lon, '$title', '$label', '$icon')"; |
| 68 | + } |
| 69 | + |
| 70 | + // Create a string containing the marker JS. |
| 71 | + $markersString = implode( ',', $markerItems ); |
| 72 | + |
| 73 | + $this->output .= Html::element( |
| 74 | + 'div', |
| 75 | + array( |
| 76 | + 'id' => $this->mapName, |
| 77 | + 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;", |
| 78 | + ), |
| 79 | + wfMsg( 'maps-loading-map' ) |
| 80 | + ); |
| 81 | + |
| 82 | + $this->mService->addDependency( Html::inlineScript( <<<EOT |
| 83 | +addOnloadHook( |
| 84 | + function() { |
| 85 | + initializeGoogleMap('$this->mapName', |
| 86 | + { |
| 87 | + lat: $this->centreLat, |
| 88 | + lon: $this->centreLon, |
| 89 | + zoom: $this->zoom, |
| 90 | + type: $this->type, |
| 91 | + types: [$this->types], |
| 92 | + controls: [$this->controls], |
| 93 | + scrollWheelZoom: $this->autozoom |
| 94 | + }, |
| 95 | + [$markersString] |
| 96 | + ); |
| 97 | + } |
| 98 | +); |
| 99 | +EOT |
| 100 | + ) ); |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the specific ones to the list. |
| 105 | + */ |
| 106 | + public function getParameters() { |
| 107 | + $params = parent::getParameters(); |
| 108 | + |
| 109 | + $allowedTypes = MapsGoogleMaps::getTypeNames(); |
| 110 | + |
| 111 | + $params[] = array( 'name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_controls' ), 'values' => MapsGoogleMaps::getControlNames() ); |
| 112 | + $params[] = array( 'name' => 'types', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_types' ), 'values' => $allowedTypes ); |
| 113 | + $params[] = array( 'name' => 'type', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_type' ), 'values' => $allowedTypes ); |
| 114 | + $params[] = array( 'name' => 'overlays', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_overlays' ), 'values' => MapsGoogleMaps::getOverlayNames() ); |
| 115 | + $params[] = array( 'name' => 'autozoom', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_autozoom' ), 'values' => array( 'on', 'off' ) ); |
| 116 | + |
| 117 | + return $params; |
| 118 | + } |
| 119 | + |
| 120 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/Services/GoogleMaps/SM_GoogleMapsQP.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 121 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/Services/GoogleMaps/SM_GoogleMapsFormInput.php |
— | — | @@ -0,0 +1,121 @@ |
| 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 | + }, |
| 104 | + {$this->markerCoords['lat']}, |
| 105 | + {$this->markerCoords['lon']} |
| 106 | + ); |
| 107 | + } |
| 108 | +); |
| 109 | +EOT |
| 110 | + ); |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * @see SMFormInput::manageGeocoding() |
| 115 | + */ |
| 116 | + protected function manageGeocoding() { |
| 117 | + global $egGoogleMapsKey, $wgParser; |
| 118 | + $this->enableGeocoding = $egGoogleMapsKey != ''; |
| 119 | + if ( $this->enableGeocoding ) $this->mService->addDependencies( $wgParser ); |
| 120 | + } |
| 121 | + |
| 122 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/Services/GoogleMaps/SM_GoogleMapsFormInput.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 123 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/GeoCoords/SM_GeoCoordsValue.php |
— | — | @@ -0,0 +1,316 @@ |
| 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 | + * @ingroup SemanticMaps |
| 25 | + */ |
| 26 | +class SMGeoCoordsValue extends SMWDataValue { |
| 27 | + |
| 28 | + protected $mCoordinateSet; |
| 29 | + protected $mWikivalue; |
| 30 | + |
| 31 | + /** |
| 32 | + * Adds support for the geographical coordinate data type to Semantic MediaWiki. |
| 33 | + * |
| 34 | + * TODO: i18n keys still need to be moved |
| 35 | + */ |
| 36 | + public static function initGeoCoordsType() { |
| 37 | + SMWDataValueFactory::registerDatatype( '_geo', __CLASS__, 'Geographic coordinate' ); |
| 38 | + return true; |
| 39 | + } |
| 40 | + |
| 41 | + /** |
| 42 | + * Defines the signature for geographical fields needed for the smw_coords table. |
| 43 | + * |
| 44 | + * @param array $fieldTypes The field types defined by SMW, passed by reference. |
| 45 | + */ |
| 46 | + public static function initGeoCoordsFieldTypes( array $fieldTypes ) { |
| 47 | + global $smgUseSpatialExtensions; |
| 48 | + |
| 49 | + // Only add the table when the SQL store is not a postgres database, and it has not been added by SMW itself. |
| 50 | + if ( $smgUseSpatialExtensions && !array_key_exists( 'c', $fieldTypes ) ) { |
| 51 | + $fieldTypes['c'] = 'Point NOT NULL'; |
| 52 | + } |
| 53 | + |
| 54 | + return true; |
| 55 | + } |
| 56 | + |
| 57 | + /** |
| 58 | + * Defines the layout for the smw_coords table which is used to store value of the GeoCoords type. |
| 59 | + * |
| 60 | + * @param array $propertyTables The property tables defined by SMW, passed by reference. |
| 61 | + */ |
| 62 | + public static function initGeoCoordsTable( array $propertyTables ) { |
| 63 | + global $smgUseSpatialExtensions; |
| 64 | + |
| 65 | + // No spatial extensions support for postgres yet, so just store as 2 float fields. |
| 66 | + $signature = $smgUseSpatialExtensions ? array( 'point' => 'c' ) : array( 'lat' => 'f', 'lon' => 'f' ); |
| 67 | + $indexes = $smgUseSpatialExtensions ? array( array( 'point', 'SPATIAL INDEX' ) ) : array_keys( $signature ); |
| 68 | + |
| 69 | + $propertyTables['smw_coords'] = new SMWSQLStore2Table( |
| 70 | + 'sm_coords', |
| 71 | + $signature, |
| 72 | + $indexes // These are the fields that should be indexed. |
| 73 | + ); |
| 74 | + |
| 75 | + return true; |
| 76 | + } |
| 77 | + |
| 78 | + /** |
| 79 | + * @see SMWDataValue::parseUserValue |
| 80 | + */ |
| 81 | + protected function parseUserValue( $value ) { |
| 82 | + $this->parseUserValueOrQuery( $value ); |
| 83 | + } |
| 84 | + |
| 85 | + /** |
| 86 | + * Overwrite SMWDataValue::getQueryDescription() to be able to process |
| 87 | + * comparators between all values. |
| 88 | + * |
| 89 | + * @param string $value |
| 90 | + * |
| 91 | + * @return SMWDescription |
| 92 | + */ |
| 93 | + public function getQueryDescription( $value ) { |
| 94 | + return $this->parseUserValueOrQuery( $value, true ); |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * Parses the value into the coordinates and any meta data provided, such as distance. |
| 99 | + */ |
| 100 | + protected function parseUserValueOrQuery( $value, $asQuery = false ) { |
| 101 | + $this->mWikivalue = $value; |
| 102 | + |
| 103 | + $comparator = SMW_CMP_EQ; |
| 104 | + |
| 105 | + if ( $value == '' ) { |
| 106 | + $this->addError( wfMsg( 'smw_novalues' ) ); |
| 107 | + } else { |
| 108 | + SMWDataValue::prepareValue( $value, $comparator ); |
| 109 | + |
| 110 | + $parts = explode( '(', $value ); |
| 111 | + |
| 112 | + $coordinates = trim( array_shift( $parts ) ); |
| 113 | + $distance = count( $parts ) > 0 ? trim( array_shift( $parts ) ) : false; |
| 114 | + |
| 115 | + if ( $distance !== false ) { |
| 116 | + $distance = substr( trim( $distance ), 0, -1 ); |
| 117 | + |
| 118 | + if ( !MapsDistanceParser::isDistance( $distance ) ) { |
| 119 | + $this->addError( wfMsgExt( 'semanticmaps-unrecognizeddistance', array( 'parsemag' ), $distance ) ); |
| 120 | + $distance = false; |
| 121 | + } |
| 122 | + } |
| 123 | + |
| 124 | + $parsedCoords = MapsCoordinateParser::parseCoordinates( $coordinates ); |
| 125 | + if ( $parsedCoords ) { |
| 126 | + $this->mCoordinateSet = $parsedCoords; |
| 127 | + |
| 128 | + if ( $this->m_caption === false && !$asQuery ) { |
| 129 | + global $smgQPCoodFormat, $smgQPCoodDirectional; |
| 130 | + $this->m_caption = MapsCoordinateParser::formatCoordinates( $parsedCoords, $smgQPCoodFormat, $smgQPCoodDirectional ); |
| 131 | + } |
| 132 | + } else { |
| 133 | + $this->addError( wfMsgExt( 'maps_unrecognized_coords', array( 'parsemag' ), $coordinates, 1 ) ); |
| 134 | + } |
| 135 | + } |
| 136 | + |
| 137 | + if ( $asQuery ) { |
| 138 | + $this->setUserValue( $value ); |
| 139 | + |
| 140 | + switch ( true ) { |
| 141 | + case !$this->isValid() : |
| 142 | + return new SMWThingDescription(); |
| 143 | + break; |
| 144 | + case $distance !== false : |
| 145 | + return new SMAreaValueDescription( $this, $comparator, $distance ); |
| 146 | + break; |
| 147 | + default : |
| 148 | + return new SMGeoCoordsValueDescription( $this, $comparator ); |
| 149 | + break; |
| 150 | + } |
| 151 | + } |
| 152 | + } |
| 153 | + |
| 154 | + /** |
| 155 | + * @see SMWDataValue::parseDBkeys |
| 156 | + */ |
| 157 | + protected function parseDBkeys( $args ) { |
| 158 | + global $smgUseSpatialExtensions, $smgQPCoodFormat, $smgQPCoodDirectional; |
| 159 | + |
| 160 | + if ( $smgUseSpatialExtensions ) { |
| 161 | + //die(__METHOD__); |
| 162 | + //var_dump($args);exit; |
| 163 | + } |
| 164 | + else { |
| 165 | + $this->mCoordinateSet['lat'] = $args[0]; |
| 166 | + $this->mCoordinateSet['lon'] = $args[1]; |
| 167 | + } |
| 168 | + |
| 169 | + $this->m_caption = MapsCoordinateParser::formatCoordinates( |
| 170 | + $this->mCoordinateSet, |
| 171 | + $smgQPCoodFormat, |
| 172 | + $smgQPCoodDirectional |
| 173 | + ); |
| 174 | + |
| 175 | + $this->mWikivalue = $this->m_caption; |
| 176 | + } |
| 177 | + |
| 178 | + /** |
| 179 | + * @see SMWDataValue::getDBkeys |
| 180 | + */ |
| 181 | + public function getDBkeys() { |
| 182 | + global $smgUseSpatialExtensions; |
| 183 | + |
| 184 | + $this->unstub(); |
| 185 | + |
| 186 | + if ( $smgUseSpatialExtensions ) { |
| 187 | + // TODO: test this |
| 188 | + $point = str_replace( ',', '.', " POINT({$this->mCoordinateSet['lat']} {$this->mCoordinateSet['lon']}) " ); |
| 189 | + |
| 190 | + $dbr = wfGetDB( DB_SLAVE ); |
| 191 | + $row = $dbr->selectRow( 'page', "GeomFromText('$point') AS geom", '' ); |
| 192 | + |
| 193 | + return array( $row->geom ); |
| 194 | + } |
| 195 | + else { |
| 196 | + return array( |
| 197 | + $this->mCoordinateSet['lat'], |
| 198 | + $this->mCoordinateSet['lon'] |
| 199 | + ); |
| 200 | + } |
| 201 | + } |
| 202 | + |
| 203 | + /** |
| 204 | + * @see SMWDataValue::getSignature |
| 205 | + */ |
| 206 | + public function getSignature() { |
| 207 | + global $smgUseSpatialExtensions; |
| 208 | + return $smgUseSpatialExtensions ? 'c' : 'ff'; |
| 209 | + } |
| 210 | + |
| 211 | + /** |
| 212 | + * @see SMWDataValue::getShortWikiText |
| 213 | + */ |
| 214 | + public function getShortWikiText( $linked = null ) { |
| 215 | + if ( $this->isValid() && ( $linked !== null ) && ( $linked !== false ) ) { |
| 216 | + SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
| 217 | + |
| 218 | + // TODO: fix lang keys so they include the space and coordinates. |
| 219 | + |
| 220 | + return '<span class="smwttinline">' . htmlspecialchars( $this->m_caption ) . '<span class="smwttcontent">' . |
| 221 | + htmlspecialchars ( wfMsgForContent( 'maps-latitude' ) . ' ' . $this->mCoordinateSet['lat'] ) . '<br />' . |
| 222 | + htmlspecialchars ( wfMsgForContent( 'maps-longitude' ) . ' ' . $this->mCoordinateSet['lon'] ) . |
| 223 | + '</span></span>'; |
| 224 | + } |
| 225 | + else { |
| 226 | + return htmlspecialchars( $this->m_caption ); |
| 227 | + } |
| 228 | + } |
| 229 | + |
| 230 | + /** |
| 231 | + * @see SMWDataValue::getShortHTMLText |
| 232 | + */ |
| 233 | + public function getShortHTMLText( $linker = null ) { |
| 234 | + return $this->getShortWikiText( $linker ); |
| 235 | + } |
| 236 | + |
| 237 | + /** |
| 238 | + * @see SMWDataValue::getLongWikiText |
| 239 | + */ |
| 240 | + public function getLongWikiText( $linked = null ) { |
| 241 | + if ( !$this->isValid() ) { |
| 242 | + return $this->getErrorText(); |
| 243 | + } |
| 244 | + else { |
| 245 | + global $smgQPCoodFormat, $smgQPCoodDirectional; |
| 246 | + return MapsCoordinateParser::formatCoordinates( $this->mCoordinateSet, $smgQPCoodFormat, $smgQPCoodDirectional ); |
| 247 | + } |
| 248 | + } |
| 249 | + |
| 250 | + /** |
| 251 | + * @see SMWDataValue::getLongHTMLText |
| 252 | + */ |
| 253 | + public function getLongHTMLText( $linker = null ) { |
| 254 | + return $this->getLongWikiText( $linker ); |
| 255 | + } |
| 256 | + |
| 257 | + /** |
| 258 | + * @see SMWDataValue::getWikiValue |
| 259 | + */ |
| 260 | + public function getWikiValue() { |
| 261 | + $this->unstub(); |
| 262 | + return $this->mWikivalue; |
| 263 | + } |
| 264 | + |
| 265 | + /** |
| 266 | + * @see SMWDataValue::getExportData |
| 267 | + */ |
| 268 | + public function getExportData() { |
| 269 | + if ( $this->isValid() ) { |
| 270 | + global $smgQPCoodFormat, $smgQPCoodDirectional; |
| 271 | + $lit = new SMWExpLiteral( |
| 272 | + MapsCoordinateParser::formatCoordinates( $this->mCoordinateSet, $smgQPCoodFormat, $smgQPCoodDirectional ), |
| 273 | + $this, |
| 274 | + 'http://www.w3.org/2001/XMLSchema#string' |
| 275 | + ); |
| 276 | + return new SMWExpData( $lit ); |
| 277 | + } else { |
| 278 | + return null; |
| 279 | + } |
| 280 | + } |
| 281 | + |
| 282 | + /** |
| 283 | + * Create links to mapping services based on a wiki-editable message. The parameters |
| 284 | + * available to the message are: |
| 285 | + * |
| 286 | + * @return array |
| 287 | + */ |
| 288 | + protected function getServiceLinkParams() { |
| 289 | + return array( ); // TODO |
| 290 | + } |
| 291 | + |
| 292 | + /** |
| 293 | + * @return array |
| 294 | + */ |
| 295 | + public function getCoordinateSet() { |
| 296 | + return $this->mCoordinateSet; |
| 297 | + } |
| 298 | + |
| 299 | + /** |
| 300 | + * @see SMWDataValue::getValueIndex |
| 301 | + * |
| 302 | + * @return integer |
| 303 | + */ |
| 304 | + public function getValueIndex() { |
| 305 | + return 0; |
| 306 | + } |
| 307 | + |
| 308 | + /** |
| 309 | + * @see SMWDataValue::getLabelIndex |
| 310 | + * |
| 311 | + * @return integer |
| 312 | + */ |
| 313 | + public function getLabelIndex() { |
| 314 | + return 0; |
| 315 | + } |
| 316 | + |
| 317 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/GeoCoords/SM_GeoCoordsValue.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 318 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/GeoCoords/SM_GeoCoords.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 31 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/GeoCoords/SM_GeoCoordsValueDescription.php |
— | — | @@ -0,0 +1,96 @@ |
| 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 | + * @ingroup SemanticMaps |
| 23 | + */ |
| 24 | +class SMGeoCoordsValueDescription extends SMWValueDescription { |
| 25 | + |
| 26 | + /** |
| 27 | + * @param SMGeoCoordsValue $dataValue |
| 28 | + */ |
| 29 | + public function __construct( SMGeoCoordsValue $dataValue, $comparator ) { |
| 30 | + parent::__construct( $dataValue, $comparator ); |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see SMWDescription::getQueryString |
| 35 | + * |
| 36 | + * @param Boolean $asvalue |
| 37 | + */ |
| 38 | + public function getQueryString( $asValue = false ) { |
| 39 | + if ( $this->m_datavalue !== null ) { |
| 40 | + $queryString = $this->m_datavalue->getWikiValue(); |
| 41 | + return $asValue ? $queryString : "[[$queryString]]"; |
| 42 | + } else { |
| 43 | + return $asValue ? '+' : ''; |
| 44 | + } |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * @see SMWDescription::getSQLCondition |
| 49 | + * |
| 50 | + * @param string $tableName |
| 51 | + * @param array $fieldNames |
| 52 | + * @param DatabaseBase or Database $dbs |
| 53 | + * |
| 54 | + * @return true |
| 55 | + */ |
| 56 | + public function getSQLCondition( $tableName, array $fieldNames, $dbs ) { |
| 57 | + global $smgUseSpatialExtensions; |
| 58 | + |
| 59 | + $dataValue = $this->getDatavalue(); |
| 60 | + |
| 61 | + // Only execute the query when the description's type is geographical coordinates, |
| 62 | + // the description is valid, and the near comparator is used. |
| 63 | + if ( $dataValue->getTypeID() != '_geo' || !$dataValue->isValid() ) return false; |
| 64 | + |
| 65 | + $comparator = false; |
| 66 | + |
| 67 | + switch ( $this->getComparator() ) { |
| 68 | + case SMW_CMP_EQ: $comparator = '='; break; |
| 69 | + case SMW_CMP_LEQ: $comparator = '<='; break; |
| 70 | + case SMW_CMP_GEQ: $comparator = '>='; break; |
| 71 | + case SMW_CMP_NEQ: $comparator = '!='; break; |
| 72 | + } |
| 73 | + |
| 74 | + if ( $comparator ) { |
| 75 | + $coordinates = $dataValue->getCoordinateSet(); |
| 76 | + |
| 77 | + $lat = $dbs->addQuotes( $coordinates['lat'] ); |
| 78 | + $lon = $dbs->addQuotes( $coordinates['lon'] ); |
| 79 | + |
| 80 | + $conditions = array(); |
| 81 | + |
| 82 | + if ( $smgUseSpatialExtensions ) { |
| 83 | + // TODO |
| 84 | + } |
| 85 | + else { |
| 86 | + $conditions[] = "{$tableName}.$fieldNames[0] $comparator $lat"; |
| 87 | + $conditions[] = "{$tableName}.$fieldNames[1] $comparator $lon"; |
| 88 | + } |
| 89 | + |
| 90 | + return implode( ' && ', $conditions ); |
| 91 | + } |
| 92 | + else { |
| 93 | + return false; |
| 94 | + } |
| 95 | + } |
| 96 | + |
| 97 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/GeoCoords/SM_GeoCoordsValueDescription.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 98 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/GeoCoords/SM_AreaValueDescription.php |
— | — | @@ -0,0 +1,168 @@ |
| 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 | + * @ingroup SemanticMaps |
| 27 | + */ |
| 28 | +class SMAreaValueDescription extends SMWValueDescription { |
| 29 | + protected $mBounds = false; |
| 30 | + |
| 31 | + public function __construct( SMGeoCoordsValue $dataValue, $comparator, $radius ) { |
| 32 | + parent::__construct( $dataValue, $comparator ); |
| 33 | + |
| 34 | + // Only if the MapsGeoFunctions class is loaded, we can create the bounding box. |
| 35 | + if ( self::geoFunctionsAreAvailable() ) { |
| 36 | + $this->calculateBounds( $dataValue, $radius ); |
| 37 | + } |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * Sets the mBounds fields to an array returned by SMAreaValueDescription::getBoundingBox. |
| 42 | + * |
| 43 | + * @param SMGeoCoordsValue $dataValue |
| 44 | + * @param string $radius |
| 45 | + */ |
| 46 | + protected function calculateBounds( SMGeoCoordsValue $dataValue, $radius ) { |
| 47 | + $this->mBounds = self::getBoundingBox( |
| 48 | + $dataValue->getCoordinateSet(), |
| 49 | + MapsDistanceParser::parseDistance( $radius ) |
| 50 | + ); |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * @see SMWDescription:getQueryString |
| 55 | + * |
| 56 | + * @param Boolean $asvalue |
| 57 | + */ |
| 58 | + public function getQueryString( $asValue = false ) { |
| 59 | + if ( $this->m_datavalue !== null ) { |
| 60 | + $queryString = $this->m_datavalue->getWikiValue(); |
| 61 | + return $asValue ? $queryString : "[[$queryString]]"; |
| 62 | + } else { |
| 63 | + return $asValue ? '+' : ''; |
| 64 | + } |
| 65 | + } |
| 66 | + |
| 67 | + /** |
| 68 | + * @see SMWDescription:prune |
| 69 | + */ |
| 70 | + public function prune( &$maxsize, &$maxdepth, &$log ) { |
| 71 | + if ( ( $maxsize < $this->getSize() ) || ( $maxdepth < $this->getDepth() ) ) { |
| 72 | + $log[] = $this->getQueryString(); |
| 73 | + $result = new SMWThingDescription(); |
| 74 | + $result->setPrintRequests( $this->getPrintRequests() ); |
| 75 | + return $result; |
| 76 | + } else { |
| 77 | + $maxsize = $maxsize - $this->getSize(); |
| 78 | + $maxdepth = $maxdepth - $this->getDepth(); |
| 79 | + return $this; |
| 80 | + } |
| 81 | + } |
| 82 | + |
| 83 | + /** |
| 84 | + * Returns the bounds of the area. |
| 85 | + */ |
| 86 | + public function getBounds() { |
| 87 | + return $this->mBounds; |
| 88 | + } |
| 89 | + |
| 90 | + /** |
| 91 | + * @see SMWDescription::getSQLCondition |
| 92 | + * |
| 93 | + * @param string $tableName |
| 94 | + * @param array $fieldNames |
| 95 | + * @param DatabaseBase or Database $dbs |
| 96 | + * |
| 97 | + * @return true |
| 98 | + */ |
| 99 | + public function getSQLCondition( $tableName, array $fieldNames, $dbs ) { |
| 100 | + global $smgUseSpatialExtensions; |
| 101 | + |
| 102 | + $dataValue = $this->getDatavalue(); |
| 103 | + |
| 104 | + // Only execute the query when the description's type is geographical coordinates, |
| 105 | + // the description is valid, and the near comparator is used. |
| 106 | + if ( $dataValue->getTypeID() != '_geo' |
| 107 | + || !$dataValue->isValid() |
| 108 | + || ( $this->getComparator() != SMW_CMP_EQ && $this->getComparator() != SMW_CMP_NEQ ) |
| 109 | + ) { |
| 110 | + return false; |
| 111 | + } |
| 112 | + |
| 113 | + $boundingBox = $this->getBounds(); |
| 114 | + |
| 115 | + $north = $dbs->addQuotes( $boundingBox['north'] ); |
| 116 | + $east = $dbs->addQuotes( $boundingBox['east'] ); |
| 117 | + $south = $dbs->addQuotes( $boundingBox['south'] ); |
| 118 | + $west = $dbs->addQuotes( $boundingBox['west'] ); |
| 119 | + |
| 120 | + $isEq = $this->getComparator() == SMW_CMP_EQ; |
| 121 | + |
| 122 | + $conditions = array(); |
| 123 | + |
| 124 | + if ( $smgUseSpatialExtensions ) { |
| 125 | + // TODO |
| 126 | + } |
| 127 | + else { |
| 128 | + $smallerThen = $isEq ? '<' : '>='; |
| 129 | + $biggerThen = $isEq ? '>' : '<='; |
| 130 | + $joinCond = $isEq ? '&&' : '||'; |
| 131 | + |
| 132 | + $conditions[] = "{$tableName}.$fieldNames[0] $smallerThen $north"; |
| 133 | + $conditions[] = "{$tableName}.$fieldNames[0] $biggerThen $south"; |
| 134 | + $conditions[] = "{$tableName}.$fieldNames[1] $smallerThen $east"; |
| 135 | + $conditions[] = "{$tableName}.$fieldNames[1] $biggerThen $west"; |
| 136 | + } |
| 137 | + |
| 138 | + return implode( " $joinCond ", $conditions ); |
| 139 | + } |
| 140 | + |
| 141 | + /** |
| 142 | + * Returns the lat and lon limits of a bounding box around a circle defined by the provided parameters. |
| 143 | + * |
| 144 | + * @param array $centerCoordinates Array containing non-directional float coordinates with lat and lon keys. |
| 145 | + * @param float $circleRadius The radidus of the circle to create a bounding box for, in m. |
| 146 | + * |
| 147 | + * @return An associative array containing the limits with keys north, east, south and west. |
| 148 | + */ |
| 149 | + protected static function getBoundingBox( array $centerCoordinates, $circleRadius ) { |
| 150 | + $north = MapsGeoFunctions::findDestination( $centerCoordinates, 0, $circleRadius ); |
| 151 | + $east = MapsGeoFunctions::findDestination( $centerCoordinates, 90, $circleRadius ); |
| 152 | + $south = MapsGeoFunctions::findDestination( $centerCoordinates, 180, $circleRadius ); |
| 153 | + $west = MapsGeoFunctions::findDestination( $centerCoordinates, 270, $circleRadius ); |
| 154 | + |
| 155 | + return array( |
| 156 | + 'north' => $north['lat'], |
| 157 | + 'east' => $east['lon'], |
| 158 | + 'south' => $south['lat'], |
| 159 | + 'west' => $west['lon'], |
| 160 | + ); |
| 161 | + } |
| 162 | + |
| 163 | + /** |
| 164 | + * Returns a boolean indicating if MapsGeoFunctions is available. |
| 165 | + */ |
| 166 | + protected static function geoFunctionsAreAvailable() { |
| 167 | + return class_exists( 'MapsGeoFunctions' ); |
| 168 | + } |
| 169 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/GeoCoords/SM_AreaValueDescription.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 170 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/SM_Settings.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 94 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/INSTALL |
— | — | @@ -0,0 +1,47 @@ |
| 2 | +[[Semantic Maps 0.6.3]]
|
| 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_3/RELEASE-NOTES |
— | — | @@ -0,0 +1,302 @@ |
| 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.3 ===
|
| 11 | +(2010-06-20)
|
| 12 | +
|
| 13 | +==== Bug fixes ====
|
| 14 | +
|
| 15 | +* Fixed issue that caused Yahoo! Maps and OpenLayers maps not to load on form pages.
|
| 16 | +
|
| 17 | +* Fixed php warning originating from Validator that occurred on form pages with maps.
|
| 18 | +
|
| 19 | +* Fixed issue that caused a fatal error when doing a query via special:ask with a mapping format, present since 0.6.
|
| 20 | +
|
| 21 | +=== Semantic Maps 0.6.2 ===
|
| 22 | +(2010-06-07)
|
| 23 | +
|
| 24 | +==== Bug fixes ====
|
| 25 | +
|
| 26 | +* Fixed fatal error that occurred when editing a page via a form with a map on it.
|
| 27 | +
|
| 28 | +=== Semantic Maps 0.6.1 ===
|
| 29 | +(2010-06-04)
|
| 30 | +
|
| 31 | +==== Bug fixes ====
|
| 32 | +
|
| 33 | +* Fixed serious bug that caused mapping parameters to get ignored in semantic queries and forms.
|
| 34 | +
|
| 35 | +* Fixed fatal error that occurred when not disabling the form input feature when Semantic Forms is not installed.
|
| 36 | +
|
| 37 | +* Fixed bug in map form inputs that stored 'west' coordinates as 'south' coordinates, effectively rendering the resulting coordinate set invalid.
|
| 38 | +
|
| 39 | +=== Semantic Maps 0.6 ===
|
| 40 | +(2010-05-31)
|
| 41 | +
|
| 42 | +==== New features ====
|
| 43 | +
|
| 44 | +* Added full support for both directional and non-directional coordinate notations in DMS, DD, DM and float notation.
|
| 45 | +
|
| 46 | +* Added native geographical proximity query support.
|
| 47 | +
|
| 48 | +* Added settings to specify the width and height of maps in forms.
|
| 49 | +
|
| 50 | +* Added settings to specify the format of coordinates as shown in query printouts.
|
| 51 | +
|
| 52 | +==== Refactoring ====
|
| 53 | +
|
| 54 | +* Rewrote map divs and added loading message for each map.
|
| 55 | +
|
| 56 | +* Rewrote individual map JS to be added to the page header.
|
| 57 | +
|
| 58 | +* Restructured the directory structure to make what the services and features are more clear.
|
| 59 | +
|
| 60 | +* Rewrote storage of coordinates to make the proximity query scalable.
|
| 61 | +
|
| 62 | +==== Bug fixes ====
|
| 63 | +
|
| 64 | +* Fixed conflict with prototype library that caused compatibility problems with the Halo extension.
|
| 65 | +
|
| 66 | +=== Semantic Maps 0.5.5 ===
|
| 67 | +(2010-03-20)
|
| 68 | +
|
| 69 | +==== Refactoring ====
|
| 70 | +
|
| 71 | +* Moved the geographical proximity query from Semantic MediaWiki over to Semantic Maps.
|
| 72 | +
|
| 73 | +* Stylized the code to conform to MediaWiki's spacing conventions.
|
| 74 | +
|
| 75 | +==== Bug fixes ====
|
| 76 | +
|
| 77 | +* Fixed issue causing properties of type Page to not show up in pop-ups when using the template parameter.
|
| 78 | +
|
| 79 | +* Fixed escaping issues that caused pop-ups to break when they contained '-signs.
|
| 80 | +
|
| 81 | +=== Semantic Maps 0.5.4 ===
|
| 82 | +(2010-03-01)
|
| 83 | +
|
| 84 | +==== Bug fixes ====
|
| 85 | +
|
| 86 | +* Fixed potential xss vectors.
|
| 87 | +
|
| 88 | +* Fixed minor JS error that was present for all maps except OSM.
|
| 89 | +
|
| 90 | +* Fixed i18n issue that caused geocoords not to be recognized on several foreign language wiki's.
|
| 91 | +
|
| 92 | +=== Semantic Maps 0.5.3 ===
|
| 93 | +(2010-02-01)
|
| 94 | +
|
| 95 | +==== Bug fixes ====
|
| 96 | +
|
| 97 | +* Fixed issue with the type and types parameters in the Yahoo! Maps form input.
|
| 98 | +
|
| 99 | +* Fixed OpenLayers form input projection bug, causing the the coordinates to be wrongly interpreted.
|
| 100 | +
|
| 101 | +* Fixed marker display for the OpenLayers form inputs.
|
| 102 | +
|
| 103 | +* Fixed issue causing a fatal error when executing a query on Special:Ask with the "map" format.
|
| 104 | +
|
| 105 | +=== Semantic Maps 0.5.2 ===
|
| 106 | +(2010-01-20)
|
| 107 | +
|
| 108 | +==== New features ====
|
| 109 | +
|
| 110 | +* Added support for template= parameter to the result printers.
|
| 111 | +
|
| 112 | +* Added support for showtitle= parameter to the result printers.
|
| 113 | +
|
| 114 | +* 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.
|
| 115 | +
|
| 116 | +==== Bug fixes ====
|
| 117 | +
|
| 118 | +* Added missing SMW #Ask: parameters to the parameter list of the Semantic Maps query printers.
|
| 119 | +
|
| 120 | +* Fixed issue with centre parameter for maps with no results (using forceshow=on).
|
| 121 | +
|
| 122 | +=== Semantic Maps 0.5.1 ===
|
| 123 | +(2009-12-25)
|
| 124 | +
|
| 125 | +==== New features ====
|
| 126 | +
|
| 127 | +* Added parameter support for the 'map' format on Special:Ask.
|
| 128 | +
|
| 129 | +* 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.
|
| 130 | +
|
| 131 | +==== Refactoring ====
|
| 132 | +
|
| 133 | +* Modified the parameter definitions to work with Validator 0.2.
|
| 134 | +
|
| 135 | +* Removed redundant (because of Validator 0.2) utility function calls from the mapping classes.
|
| 136 | +
|
| 137 | +* Ensured none of the form input classes get loaded when SF is not present.
|
| 138 | +
|
| 139 | +==== Bug fixes ====
|
| 140 | +
|
| 141 | +* Fixed issue with the query printers causing error messages to be shown for ask specific parameters.
|
| 142 | +
|
| 143 | +===Semantic Maps 0.5===
|
| 144 | +(2009-12-17)
|
| 145 | +
|
| 146 | +====New features====
|
| 147 | +
|
| 148 | +* Added a result format for the OL optimized for OSM service.
|
| 149 | +
|
| 150 | +* Added support for the new Special:Ask page's parameter handling to the query printers.
|
| 151 | +
|
| 152 | +==== Refactoring ====
|
| 153 | +
|
| 154 | +* Moved the geographical coordinate data type handling from SMW to SM.
|
| 155 | +
|
| 156 | +* Added checks for extension dependencies that need to be present for Semantic Maps to be initialized.
|
| 157 | +
|
| 158 | +==== Bug fixes ====
|
| 159 | +
|
| 160 | +* Fixed issue with the form input registration. The main service names where getting changed into the default mapping service.
|
| 161 | +
|
| 162 | +===Semantic Maps 0.4.2===
|
| 163 | +(2009-11-15)
|
| 164 | +
|
| 165 | +Changes in 0.4.2 discussed on the authors blog:
|
| 166 | +
|
| 167 | +* [http://blog.bn2vs.com/2009/11/16/maps-and-semantic-maps-0-4-2/ Maps and Semantic Maps 0.4.2 released]
|
| 168 | +* [http://blog.bn2vs.com/2009/11/12/new-in-maps-0-4-2/ New in Maps 0.4.2]
|
| 169 | +
|
| 170 | +==== Bug fixes ====
|
| 171 | +
|
| 172 | +* 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.
|
| 173 | +
|
| 174 | +===Semantic Maps 0.4.1===
|
| 175 | +(2009-11-10)
|
| 176 | +
|
| 177 | +====New features====
|
| 178 | +
|
| 179 | +* Added smart geocoding to the QP's centre parameter.
|
| 180 | +
|
| 181 | +* Added smart geocoding to the FI's centre parameter.
|
| 182 | +
|
| 183 | +==== Bug fixes ====
|
| 184 | +
|
| 185 | +* Fixed bug in the Yahoo! Maps form input, caused by not adapting a renamed variable.
|
| 186 | +
|
| 187 | +* Fixed bug in the form scripts caused by wrongly encoded JavaScript file of Maps.
|
| 188 | +
|
| 189 | +===Semantic Maps 0.4===
|
| 190 | +(2009-11-03)
|
| 191 | +
|
| 192 | +Changes in 0.4 discussed on the authors blog:
|
| 193 | +
|
| 194 | +* [http://blog.bn2vs.com/2009/11/03/finally-maps-and-semantic-maps-0-4/ Finally! Maps and Semantic Maps 0.4!]
|
| 195 | +
|
| 196 | +====Bug fixes====
|
| 197 | +
|
| 198 | +* 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].
|
| 199 | +
|
| 200 | +* Fixed problem that caused the SM result formats to not get displayed on Special:Ask.
|
| 201 | +
|
| 202 | +===Semantic Maps 0.3.4===
|
| 203 | +(2009-09-12)
|
| 204 | +
|
| 205 | +Changes in 0.3.4 discussed on the authors blog:
|
| 206 | +
|
| 207 | +* [http://blog.bn2vs.com/2009/09/12/maps-and-semantic-maps-0-3-4-released/ Maps and Semantic Maps 0.3.4 released]
|
| 208 | +
|
| 209 | +====Bug fixes====
|
| 210 | +
|
| 211 | +* Fixed bug causing error for people who do not have Semantic Forms installed and enabled, presumably introduced in 0.3.
|
| 212 | +
|
| 213 | +* 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.
|
| 214 | +
|
| 215 | +====Refactoring====
|
| 216 | +
|
| 217 | +* Restructured the extension to work with the new feature hook system of Maps.
|
| 218 | +
|
| 219 | +===Semantic Maps 0.3.3===
|
| 220 | +(2009-08-15)
|
| 221 | +
|
| 222 | +Changes in 0.3.3 discussed on the authors blog:
|
| 223 | +
|
| 224 | +* [http://blog.bn2vs.com/2009/08/25/maps-and-semantic-maps-0-3-3/ Maps and Semantic Maps 0.3.3]
|
| 225 | +
|
| 226 | +====Bug fixes====
|
| 227 | +
|
| 228 | +* Fixed error caused by the 'map' format on the Special:Ask page
|
| 229 | +
|
| 230 | +===Semantic Maps 0.3.2===
|
| 231 | +(2009-08-18)
|
| 232 | +
|
| 233 | +====Bug fixes====
|
| 234 | +
|
| 235 | +* Fixed logic error that caused maps to have a wrong centre and zoom when a query only returned one result.
|
| 236 | +
|
| 237 | +* Fixed an issue with the centre parameter in queries. In some cases it would not be processed correctly and cause PHP notices.
|
| 238 | +
|
| 239 | +===Semantic Maps 0.3.1===
|
| 240 | +(2009-08-18)
|
| 241 | +
|
| 242 | +====Bug fixes====
|
| 243 | +
|
| 244 | +* Fixed script design flaw that caused errors when using the 'map' format in a query.
|
| 245 | +
|
| 246 | +===Semantic Maps 0.3===
|
| 247 | +(2009-08-14)
|
| 248 | +
|
| 249 | +Changes in 0.3 discussed on the authors blog:
|
| 250 | +
|
| 251 | +* [http://blog.bn2vs.com/2009/08/13/final-changes-for-maps-and-sm-0-3/ Final changes for Maps and SM 0.3]
|
| 252 | +
|
| 253 | +* [http://blog.bn2vs.com/2009/08/07/new-features-in-maps-and-sm-0-3/ New features in Maps and SM 0.3]
|
| 254 | +
|
| 255 | +* [http://blog.bn2vs.com/2009/08/05/structural-changes-for-maps-and-sm-0-3/ Structural changes for Maps and SM 0.3]
|
| 256 | +
|
| 257 | +====New functionality====
|
| 258 | +
|
| 259 | +* Yahoo! Maps and OpenLayers now handle the "icon=" parameter that can come from Semantic Compound Queries, as Google Maps already did.
|
| 260 | +
|
| 261 | +====Refactoring====
|
| 262 | +
|
| 263 | +* Restructured the Query Printer classes (JavaScript based logic).
|
| 264 | +
|
| 265 | +* Made form input classes weakly typed, so they fully work with the new aliasing system.
|
| 266 | +
|
| 267 | +* Integrated the new hook system of Maps.
|
| 268 | +
|
| 269 | +* Made the form input class inherit from MapsMapFeature.
|
| 270 | +
|
| 271 | +====Bug fixes====
|
| 272 | +
|
| 273 | +* Mapping formats get added only once, as opossed to multiple times in version 0.2.2.
|
| 274 | +
|
| 275 | +* Added "elementNamePrefix" to the map names and fields of form inputs to prevent JavaScript errors.
|
| 276 | +
|
| 277 | +* When a query returns no results, nothing will be displayed, instead of an empty map.
|
| 278 | +
|
| 279 | +* The Google Maps form input now zooms in correctly when a user looks up an address.
|
| 280 | +
|
| 281 | +===Semantic Maps 0.2===
|
| 282 | +(2009-07-29)
|
| 283 | +
|
| 284 | +====New functionality====
|
| 285 | +
|
| 286 | +* Added a hook for [[Extension:Admin_Links|Admin Links]].
|
| 287 | +
|
| 288 | +* Added multi geocoder integration with form inputs.
|
| 289 | +
|
| 290 | +* Added support for the Yahoo! Geocoder (in form inputs).
|
| 291 | +
|
| 292 | +====Refactoring====
|
| 293 | +
|
| 294 | +* Restructured the Form Input classes.
|
| 295 | +
|
| 296 | +====Bug fixes====
|
| 297 | +
|
| 298 | +* Fixed issue that occurred when a custom centre is set for a Yahoo! Maps map, causing the map to not display their markers correctly.
|
| 299 | +
|
| 300 | +===Semantic Maps 0.1===
|
| 301 | +(2009-07-21)
|
| 302 | +
|
| 303 | +* 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_3/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_3/SemanticMaps.i18n.php |
— | — | @@ -0,0 +1,983 @@ |
| 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 | + */ |
| 183 | +$messages['bs'] = array( |
| 184 | + '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]). |
| 185 | +Dostupne usluge mapa: $1', |
| 186 | + 'semanticmaps_lookupcoordinates' => 'Nađi koordinate', |
| 187 | + 'semanticmaps_enteraddresshere' => 'Unesite adresu ovdje', |
| 188 | + 'semanticmaps_notfound' => 'nije pronađeno', |
| 189 | + 'semanticmaps_paramdesc_format' => 'Usluga kartiranja korištena za generiranje karte', |
| 190 | + 'semanticmaps_paramdesc_geoservice' => 'Usluga geokodiranja korištena za pretvaranje adresa u koordinate', |
| 191 | + 'semanticmaps_paramdesc_height' => 'Visina mape, u pikselima (pretpostavljeno je $1)', |
| 192 | + 'semanticmaps_paramdesc_width' => 'Širina mape, u pikselima (pretpostavljeno je $1)', |
| 193 | + 'semanticmaps_paramdesc_zoom' => 'Nivo zumiranja mape', |
| 194 | + 'semanticmaps_paramdesc_centre' => 'Koordinate centra karte', |
| 195 | + 'semanticmaps_paramdesc_controls' => 'Korisničke kontrole postavljene na kartu', |
| 196 | + 'semanticmaps_paramdesc_types' => 'Tipovi karti dostupnih na mapi', |
| 197 | + 'semanticmaps_paramdesc_type' => 'Pretpostavljeni tip karte za kartu', |
| 198 | + 'semanticmaps_paramdesc_overlays' => 'Slojevi dostupni na karti', |
| 199 | + 'semanticmaps_paramdesc_autozoom' => 'Ako je zumiranje i odaljavanje putem kotačića na mišu omogućeno', |
| 200 | + 'semanticmaps_paramdesc_layers' => 'Slojevi dostupni na mapi', |
| 201 | +); |
| 202 | + |
| 203 | +/** Catalan (Català) |
| 204 | + * @author Paucabot |
| 205 | + * @author Solde |
| 206 | + */ |
| 207 | +$messages['ca'] = array( |
| 208 | + 'semanticmaps_notfound' => "no s'ha trobat", |
| 209 | +); |
| 210 | + |
| 211 | +/** German (Deutsch) |
| 212 | + * @author DaSch |
| 213 | + * @author Imre |
| 214 | + * @author Pill |
| 215 | + * @author The Evil IP address |
| 216 | + * @author Umherirrender |
| 217 | + */ |
| 218 | +$messages['de'] = array( |
| 219 | + '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]). |
| 220 | +Unterstützte Kartendienste: $1', |
| 221 | + 'semanticmaps-unrecognizeddistance' => 'Der Wert $1 ist keine gültige Distanz.', |
| 222 | + 'semanticmaps_lookupcoordinates' => 'Koordinaten nachschlagen', |
| 223 | + 'semanticmaps_enteraddresshere' => 'Adresse hier eingeben', |
| 224 | + 'semanticmaps_notfound' => 'nicht gefunden', |
| 225 | + 'semanticmaps_paramdesc_format' => 'Der Kartographiedienst zum Generieren der Karte', |
| 226 | + 'semanticmaps_paramdesc_geoservice' => 'Der Geokodierungsdienst, um Adressen in Koordinaten umzuwandeln', |
| 227 | + 'semanticmaps_paramdesc_height' => 'Die Höhe der Karte in Pixeln (Standard ist $1)', |
| 228 | + 'semanticmaps_paramdesc_width' => 'Die Breite der Karte in Pixeln (Standard ist $1)', |
| 229 | + 'semanticmaps_paramdesc_zoom' => 'Die Vergrößerungsstufe der Karte', |
| 230 | + 'semanticmaps_paramdesc_centre' => 'Die Koordinaten der Kartenmitte', |
| 231 | + 'semanticmaps_paramdesc_controls' => 'Die Benutzerkontrollen, die sich auf der Karte befinden', |
| 232 | + 'semanticmaps_paramdesc_types' => 'Die verfügbaren Kartentypen für die Karte', |
| 233 | + 'semanticmaps_paramdesc_type' => 'Der Standard-Kartentyp für die Karte', |
| 234 | + 'semanticmaps_paramdesc_overlays' => 'Die auf der Karte verfügbaren Overlays', |
| 235 | + 'semanticmaps_paramdesc_autozoom' => 'Wenn Vergrößerung und Verkleinerung mit dem Maus-Scrollrad aktiviert ist', |
| 236 | + 'semanticmaps_paramdesc_layers' => 'Die auf der Karte verfügbaren Ebenen', |
| 237 | +); |
| 238 | + |
| 239 | +/** Lower Sorbian (Dolnoserbski) |
| 240 | + * @author Michawiki |
| 241 | + */ |
| 242 | +$messages['dsb'] = array( |
| 243 | + '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]). |
| 244 | +K dispoziciji stojece kórtowe słužby: $1.', |
| 245 | + 'semanticmaps-unrecognizeddistance' => 'Gódnota $1 njejo płaśiwa distanca.', |
| 246 | + 'semanticmaps_lookupcoordinates' => 'Za koordinatami póglědaś', |
| 247 | + 'semanticmaps_enteraddresshere' => 'Zapódaj how adresu', |
| 248 | + 'semanticmaps_notfound' => 'njenamakany', |
| 249 | + 'semanticmaps_paramdesc_format' => 'Kartěrowańska słužba, kótaraž se wužywa, aby napórała kórtu', |
| 250 | + 'semanticmaps_paramdesc_geoservice' => 'Geokoděrowańska słužba, kótaraž se wužywa, aby pśetwóriła adrese do koordinatow', |
| 251 | + 'semanticmaps_paramdesc_height' => 'Wusokosć kórty, w pikselach (standard jo $1)', |
| 252 | + 'semanticmaps_paramdesc_width' => 'Šyrokosć kórty, w pikselach (standard jo $1)', |
| 253 | + 'semanticmaps_paramdesc_zoom' => 'Skalěrowański schóźeńk kórty', |
| 254 | + 'semanticmaps_paramdesc_centre' => 'Koordinaty srjejźišća kórty', |
| 255 | + 'semanticmaps_paramdesc_controls' => 'Wužywarske elementy na kórśe', |
| 256 | + 'semanticmaps_paramdesc_types' => 'Kórtowe typy, kótarež stoje za kórtu k dispoziciji', |
| 257 | + 'semanticmaps_paramdesc_type' => 'Standardny kórtowy typ za kórtu', |
| 258 | + 'semanticmaps_paramdesc_overlays' => 'Pśewarstowanja, kótarež stoje za kórtu k dispoziciji', |
| 259 | + 'semanticmaps_paramdesc_autozoom' => 'Jolic pówětšenje a pómjeńšenje z pomocu kólaska myški jo zmóžnjone', |
| 260 | + 'semanticmaps_paramdesc_layers' => 'Warsty, kótarež stoje za kórtu k dispoziciji', |
| 261 | +); |
| 262 | + |
| 263 | +/** Greek (Ελληνικά) |
| 264 | + * @author ZaDiak |
| 265 | + */ |
| 266 | +$messages['el'] = array( |
| 267 | + 'semanticmaps_lookupcoordinates' => 'Επιθεώρηση συντεταγμένων', |
| 268 | + 'semanticmaps_enteraddresshere' => 'Εισαγωγή διεύθυνσης εδώ', |
| 269 | + 'semanticmaps_notfound' => 'δεν βρέθηκε', |
| 270 | +); |
| 271 | + |
| 272 | +/** Esperanto (Esperanto) |
| 273 | + * @author Yekrats |
| 274 | + */ |
| 275 | +$messages['eo'] = array( |
| 276 | + 'semanticmaps_lookupcoordinates' => 'Rigardi koordinatojn', |
| 277 | + 'semanticmaps_enteraddresshere' => 'Enigu adreson ĉi tie', |
| 278 | + 'semanticmaps_notfound' => 'ne trovita', |
| 279 | +); |
| 280 | + |
| 281 | +/** Spanish (Español) |
| 282 | + * @author Crazymadlover |
| 283 | + * @author Imre |
| 284 | + * @author Locos epraix |
| 285 | + * @author Translationista |
| 286 | + */ |
| 287 | +$messages['es'] = array( |
| 288 | + '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]). |
| 289 | +Servicios de mapas disponibles: $1', |
| 290 | + 'semanticmaps-unrecognizeddistance' => 'El valor $1 no esuna distancia válida.', |
| 291 | + 'semanticmaps_lookupcoordinates' => 'Busque las coordenadas', |
| 292 | + 'semanticmaps_enteraddresshere' => 'Ingresar dirección aquí', |
| 293 | + 'semanticmaps_notfound' => 'no encontrado', |
| 294 | + 'semanticmaps_paramdesc_format' => 'El servicio cartográfico usado para generar el mapa', |
| 295 | + 'semanticmaps_paramdesc_geoservice' => 'El servicio de geocodificación para convertir direcciones en coordenadas', |
| 296 | + 'semanticmaps_paramdesc_height' => 'Alto del mapa en píxeles (el predeterminado es $1)', |
| 297 | + 'semanticmaps_paramdesc_width' => 'Ancho del mapa en píxeles (el predeterminado es $1)', |
| 298 | + 'semanticmaps_paramdesc_zoom' => 'Nivel de acercamiento del mapa', |
| 299 | + 'semanticmaps_paramdesc_centre' => 'Las coordenadas del centro del mapa', |
| 300 | + 'semanticmaps_paramdesc_controls' => 'Los controles de usuario ubicados en el mapa', |
| 301 | + 'semanticmaps_paramdesc_types' => 'Los tipos de mapa disponibles en el mapa', |
| 302 | + 'semanticmaps_paramdesc_type' => 'El tipo de mapa predeterminado para el mapa', |
| 303 | + 'semanticmaps_paramdesc_overlays' => 'FUZZY!!! Las capas disponibles en el mapa', |
| 304 | + 'semanticmaps_paramdesc_autozoom' => 'En caso de que el acercamiento y alejamiento mediante la rueda del ratón esté habilitado', |
| 305 | + 'semanticmaps_paramdesc_layers' => 'Las capas disponibles en el mapa', |
| 306 | +); |
| 307 | + |
| 308 | +/** Basque (Euskara) |
| 309 | + * @author An13sa |
| 310 | + */ |
| 311 | +$messages['eu'] = array( |
| 312 | + 'semanticmaps_lookupcoordinates' => 'Koordenatuak bilatu', |
| 313 | +); |
| 314 | + |
| 315 | +/** Finnish (Suomi) |
| 316 | + * @author Crt |
| 317 | + * @author Str4nd |
| 318 | + */ |
| 319 | +$messages['fi'] = array( |
| 320 | + 'semanticmaps_enteraddresshere' => 'Kirjoita osoite tähän', |
| 321 | + 'semanticmaps_notfound' => 'ei löytynyt', |
| 322 | + 'semanticmaps_paramdesc_height' => 'Kartan korkeus pikseleinä (oletus on $1)', |
| 323 | + 'semanticmaps_paramdesc_width' => 'Kartan leveys pikseleinä (oletus on $1)', |
| 324 | + 'semanticmaps_paramdesc_zoom' => 'Kartan suurennostaso', |
| 325 | + 'semanticmaps_paramdesc_centre' => 'Kartan keskipisteen koordinaatit', |
| 326 | +); |
| 327 | + |
| 328 | +/** French (Français) |
| 329 | + * @author Crochet.david |
| 330 | + * @author Grondin |
| 331 | + * @author IAlex |
| 332 | + * @author Jean-Frédéric |
| 333 | + * @author PieRRoMaN |
| 334 | + * @author Urhixidur |
| 335 | + */ |
| 336 | +$messages['fr'] = array( |
| 337 | + '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.', |
| 338 | + 'semanticmaps-unrecognizeddistance' => "La valeur $1 n'est pas une distance valide", |
| 339 | + 'semanticmaps_lookupcoordinates' => 'Estimer les coordonnées', |
| 340 | + 'semanticmaps_enteraddresshere' => 'Entrez ici l’adresse', |
| 341 | + 'semanticmaps_notfound' => 'pas trouvé', |
| 342 | + 'semanticmaps_paramdesc_format' => 'Le service de cartographie utilisé pour générer la carte', |
| 343 | + 'semanticmaps_paramdesc_geoservice' => 'Le service de géocodage utilisé pour transformer les adresses en coordonnées', |
| 344 | + 'semanticmaps_paramdesc_height' => 'La hauteur de la carte, en pixels ($1 par défaut)', |
| 345 | + 'semanticmaps_paramdesc_width' => 'La largeur de la carte, en pixels ($1 par défaut)', |
| 346 | + 'semanticmaps_paramdesc_zoom' => 'Le niveau d’agrandissement de la carte', |
| 347 | + 'semanticmaps_paramdesc_centre' => 'Les coordonnées du centre de la carte', |
| 348 | + 'semanticmaps_paramdesc_controls' => 'Les contrôles utilisateurs placés sur la carte', |
| 349 | + 'semanticmaps_paramdesc_types' => 'Les types de cartes disponibles sur la carte', |
| 350 | + 'semanticmaps_paramdesc_type' => 'Le type de carte par défaut pour la carte', |
| 351 | + 'semanticmaps_paramdesc_overlays' => 'Les revêtements disponibles sur la carte', |
| 352 | + 'semanticmaps_paramdesc_autozoom' => 'Si le zoom avant et arrière en utilisant la molette de la souris est activé', |
| 353 | + 'semanticmaps_paramdesc_layers' => 'Les revêtements disponibles sur la carte', |
| 354 | +); |
| 355 | + |
| 356 | +/** Galician (Galego) |
| 357 | + * @author Toliño |
| 358 | + */ |
| 359 | +$messages['gl'] = array( |
| 360 | + '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]). |
| 361 | +Servizos de mapa dispoñibles: $1', |
| 362 | + 'semanticmaps-unrecognizeddistance' => 'O valor $1 non é unha distancia válida.', |
| 363 | + 'semanticmaps_lookupcoordinates' => 'Ver as coordenadas', |
| 364 | + 'semanticmaps_enteraddresshere' => 'Introduza o enderezo aquí', |
| 365 | + 'semanticmaps_notfound' => 'non se atopou', |
| 366 | + 'semanticmaps_paramdesc_format' => 'O servizo de cartografía utilizado para xerar o mapa', |
| 367 | + 'semanticmaps_paramdesc_geoservice' => 'O servizo de xeocodificación usado para transformar enderezos en coordenadas', |
| 368 | + 'semanticmaps_paramdesc_height' => 'A altura do mapa, en píxeles (por defecto, $1)', |
| 369 | + 'semanticmaps_paramdesc_width' => 'O largo do mapa, en píxeles (por defecto, $1)', |
| 370 | + 'semanticmaps_paramdesc_zoom' => 'O nivel de zoom do mapa', |
| 371 | + 'semanticmaps_paramdesc_centre' => 'As coordenadas do centro do mapa', |
| 372 | + 'semanticmaps_paramdesc_controls' => 'Os controis de usuario situados no mapa', |
| 373 | + 'semanticmaps_paramdesc_types' => 'Os tipos de mapa dispoñibles no mapa', |
| 374 | + 'semanticmaps_paramdesc_type' => 'O tipo de mapa por defecto para o mapa', |
| 375 | + 'semanticmaps_paramdesc_overlays' => 'As sobreposicións dispoñibles no mapa', |
| 376 | + 'semanticmaps_paramdesc_autozoom' => 'Activa o achegamento e afastamento coa roda do rato', |
| 377 | + 'semanticmaps_paramdesc_layers' => 'As capas dispoñibles no mapa', |
| 378 | +); |
| 379 | + |
| 380 | +/** Swiss German (Alemannisch) |
| 381 | + * @author Als-Holder |
| 382 | + */ |
| 383 | +$messages['gsw'] = array( |
| 384 | + '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]', |
| 385 | + 'semanticmaps-unrecognizeddistance' => 'Dr Wert $1 isch kei giltigi Dischtanz.', |
| 386 | + 'semanticmaps_lookupcoordinates' => 'Koordinate nooluege', |
| 387 | + 'semanticmaps_enteraddresshere' => 'Doo Adräss yygee', |
| 388 | + 'semanticmaps_notfound' => 'nit gfunde', |
| 389 | + 'semanticmaps_paramdesc_format' => 'Dr Chartedienscht, wu brucht wäre soll zum Erzyyge vu dr Charte', |
| 390 | + 'semanticmaps_paramdesc_geoservice' => 'Dr Geokodierigs-Service, wu brucht wäre soll zum umwandle vu Adrässe in Koordinate', |
| 391 | + 'semanticmaps_paramdesc_height' => 'D Hechi vu dr Charte, in Pixel (Standard: $1)', |
| 392 | + 'semanticmaps_paramdesc_width' => 'D Breiti vu dr Charte, in Pixel (Standard: $1)', |
| 393 | + 'semanticmaps_paramdesc_zoom' => 'S Zoom-Level vu dr Charte', |
| 394 | + 'semanticmaps_paramdesc_centre' => 'D Koordinate vum Mittelpunkt vu dr Charte', |
| 395 | + 'semanticmaps_paramdesc_controls' => 'D Hilfsmittel, wu in d Charte yygfiegt sin', |
| 396 | + 'semanticmaps_paramdesc_types' => 'D Chartetype, wu fir d Charte verfiegbar sin', |
| 397 | + 'semanticmaps_paramdesc_type' => 'Dr Standard-Chartetyp fir d Charte', |
| 398 | + 'semanticmaps_paramdesc_overlays' => 'D Overlays, wu fir d Charte verfiegbar sin', |
| 399 | + 'semanticmaps_paramdesc_autozoom' => 'Eb mer e Charte cha vergreßere oder verchleinere mit em Muusrad', |
| 400 | + 'semanticmaps_paramdesc_layers' => 'D Lage, wu fir Charte verfiegbar sin', |
| 401 | +); |
| 402 | + |
| 403 | +/** Hebrew (עברית) |
| 404 | + * @author Rotemliss |
| 405 | + * @author YaronSh |
| 406 | + */ |
| 407 | +$messages['he'] = array( |
| 408 | + 'semanticmaps_desc' => 'הוספת האפשרות לצפייה ולעריכה בנתוני קואורדינטה המאוחסנים דרך הרחבת המדיה־ויקי הסמנטי ([http://wiki.bn2vs.com/wiki/Semantic_Maps הדגמה]). |
| 409 | +שירותי מפה זמינים: $1', |
| 410 | + 'semanticmaps_lookupcoordinates' => 'חיפוש קואורדינטות', |
| 411 | + 'semanticmaps_enteraddresshere' => 'כתבו כתובת כאן', |
| 412 | + 'semanticmaps_notfound' => 'לא נמצאה', |
| 413 | + 'semanticmaps_paramdesc_format' => 'שירות המיפוי המשמש להכנת המפה', |
| 414 | + 'semanticmaps_paramdesc_height' => 'גובה המפה, בפיקסלים (ברירת המחדל היא $1)', |
| 415 | + 'semanticmaps_paramdesc_width' => 'רוחב המפה, בפיקסלים (ברירת המחדל היא $1)', |
| 416 | + 'semanticmaps_paramdesc_centre' => 'קואורדינטות מרכז המפה', |
| 417 | + 'semanticmaps_paramdesc_controls' => 'פקדי המשתמש ממוקמים על המפה', |
| 418 | + 'semanticmaps_paramdesc_types' => 'צורות המפה הזמינות על המפה', |
| 419 | + 'semanticmaps_paramdesc_type' => 'סוג ברירת המחדל של המפה עבור המפה', |
| 420 | + 'semanticmaps_paramdesc_layers' => 'השכבות הזמינות במפה', |
| 421 | +); |
| 422 | + |
| 423 | +/** Upper Sorbian (Hornjoserbsce) |
| 424 | + * @author Michawiki |
| 425 | + */ |
| 426 | +$messages['hsb'] = array( |
| 427 | + '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', |
| 428 | + 'semanticmaps-unrecognizeddistance' => 'Hódnota $1 płaćiwa distanca njeje.', |
| 429 | + 'semanticmaps_lookupcoordinates' => 'Za koordinatami hladać', |
| 430 | + 'semanticmaps_enteraddresshere' => 'Zapodaj tu adresu', |
| 431 | + 'semanticmaps_notfound' => 'njenamakany', |
| 432 | + 'semanticmaps_paramdesc_format' => 'Kartěrowanska słužba, kotraž so wužiwa, zo by kartu wutworiła', |
| 433 | + 'semanticmaps_paramdesc_geoservice' => 'Geokodowanska słužba, kotraž so wužiwa, zo by adresy do koordinatow přetworiła', |
| 434 | + 'semanticmaps_paramdesc_height' => 'Wysokosć karty, w pikselach (standard je $1)', |
| 435 | + 'semanticmaps_paramdesc_width' => 'Šěrokosć karty, w pikselach (standard je $1)', |
| 436 | + 'semanticmaps_paramdesc_zoom' => 'Skalowanski schodźenk karty', |
| 437 | + 'semanticmaps_paramdesc_centre' => 'Koordinaty srjedźišća karty', |
| 438 | + 'semanticmaps_paramdesc_controls' => 'Wužiwarske elementy na karće', |
| 439 | + 'semanticmaps_paramdesc_types' => 'Kartowe typy, kotrež za kartu k dispoziciji steja', |
| 440 | + 'semanticmaps_paramdesc_type' => 'Standardny kartowy typ za kartu', |
| 441 | + 'semanticmaps_paramdesc_overlays' => 'Naworštowanja, kotrež za kartu k dispoziciji steja', |
| 442 | + 'semanticmaps_paramdesc_autozoom' => 'Jeli powjetšenje a pomjenšenje z pomocu kolesko myški je zmóžnjene', |
| 443 | + 'semanticmaps_paramdesc_layers' => 'Woršty, kotrež za kartu k dispoziciji steja', |
| 444 | +); |
| 445 | + |
| 446 | +/** Hungarian (Magyar) |
| 447 | + * @author Glanthor Reviol |
| 448 | + */ |
| 449 | +$messages['hu'] = array( |
| 450 | + '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]). |
| 451 | +Elérhető térképszolgáltatók: $1', |
| 452 | + 'semanticmaps_lookupcoordinates' => 'Koordináták felkeresése', |
| 453 | + 'semanticmaps_enteraddresshere' => 'Add meg a címet itt', |
| 454 | + 'semanticmaps_notfound' => 'nincs találat', |
| 455 | + 'semanticmaps_paramdesc_height' => 'A térkép magassága, képpontban (alapértelmezetten $1)', |
| 456 | + 'semanticmaps_paramdesc_width' => 'A térkép szélessége, képpontban (alapértelmezetten $1)', |
| 457 | + 'semanticmaps_paramdesc_zoom' => 'A térkép nagyítása', |
| 458 | + 'semanticmaps_paramdesc_centre' => 'A térkép középpontjának koordinátái', |
| 459 | + 'semanticmaps_paramdesc_types' => 'A térképen elérhető térképtípusok', |
| 460 | + 'semanticmaps_paramdesc_type' => 'A térkép alapértelmezett térképtípusa', |
| 461 | + 'semanticmaps_paramdesc_layers' => 'A térképen elérhető rétegek', |
| 462 | +); |
| 463 | + |
| 464 | +/** Interlingua (Interlingua) |
| 465 | + * @author McDutchie |
| 466 | + */ |
| 467 | +$messages['ia'] = array( |
| 468 | + 'semanticmaps_desc' => 'Permitte vider e modificar datos de coordinatas immagazinate per le extension Semantic MediaWiki |
| 469 | +([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 470 | +Servicios cartographic disponibile: $1', |
| 471 | + 'semanticmaps-unrecognizeddistance' => 'Le valor $1 non es un distantia valide.', |
| 472 | + 'semanticmaps_lookupcoordinates' => 'Cercar coordinatas', |
| 473 | + 'semanticmaps_enteraddresshere' => 'Entra adresse hic', |
| 474 | + 'semanticmaps_notfound' => 'non trovate', |
| 475 | + 'semanticmaps_paramdesc_format' => 'Le servicio cartographic usate pro generar le carta', |
| 476 | + 'semanticmaps_paramdesc_geoservice' => 'Le servicio de geocodification usate pro converter adresses in coordinatas', |
| 477 | + 'semanticmaps_paramdesc_height' => 'Le altitude del carta, in pixeles (predefinition es $1)', |
| 478 | + 'semanticmaps_paramdesc_width' => 'Le latitude del carta, in pixeles (predefinition es $1)', |
| 479 | + 'semanticmaps_paramdesc_zoom' => 'Le nivello de zoom del carta', |
| 480 | + 'semanticmaps_paramdesc_centre' => 'Le coordinatas del centro del carta', |
| 481 | + 'semanticmaps_paramdesc_controls' => 'Le buttones de adjustamento placiate in le carta', |
| 482 | + 'semanticmaps_paramdesc_types' => 'Le typos de carta disponibile in le carta', |
| 483 | + 'semanticmaps_paramdesc_type' => 'Le typo de carta predefinite pro le carta', |
| 484 | + 'semanticmaps_paramdesc_overlays' => 'Le superpositiones disponibile in le carta', |
| 485 | + 'semanticmaps_paramdesc_autozoom' => 'Si le zoom avante e retro con le rota de rolamento del mouse es active', |
| 486 | + 'semanticmaps_paramdesc_layers' => 'Le stratos disponibile in le carta', |
| 487 | +); |
| 488 | + |
| 489 | +/** Indonesian (Bahasa Indonesia) |
| 490 | + * @author Bennylin |
| 491 | + * @author Farras |
| 492 | + */ |
| 493 | +$messages['id'] = array( |
| 494 | + 'semanticmaps_desc' => 'Memampukan penampilan dan penyuntingan data koordinat yang disimpan melalui pengaya MediaWiki Semantic ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 495 | +Layanan peta yang tersedia: $1', |
| 496 | + 'semanticmaps_lookupcoordinates' => 'Cari koordinat', |
| 497 | + 'semanticmaps_enteraddresshere' => 'Masukkan alamat di sini', |
| 498 | + 'semanticmaps_notfound' => 'tidak ditemukan', |
| 499 | + 'semanticmaps_paramdesc_format' => 'Layanan pemetaan untuk membuat peta', |
| 500 | + 'semanticmaps_paramdesc_geoservice' => 'Layanan kode geo untuk mengubah alamat menjadi koordinat', |
| 501 | + 'semanticmaps_paramdesc_height' => 'Tinggi peta, dalam piksel (umumnya $1)', |
| 502 | + 'semanticmaps_paramdesc_width' => 'Lebar peta, dalam piksel (umumnya $1)', |
| 503 | + 'semanticmaps_paramdesc_zoom' => 'Tingkat zum peta', |
| 504 | + 'semanticmaps_paramdesc_centre' => 'Koordinat bagian tengah peta', |
| 505 | + 'semanticmaps_paramdesc_controls' => 'Kontrol pengguna yang diletakkan di peta', |
| 506 | + 'semanticmaps_paramdesc_types' => 'Jenis peta tersedia di peta', |
| 507 | + 'semanticmaps_paramdesc_type' => 'Jenis peta biasa untuk peta ini', |
| 508 | + 'semanticmaps_paramdesc_overlays' => 'Lapisan yang tersedia di peta', |
| 509 | + 'semanticmaps_paramdesc_autozoom' => 'Bila ingin zum dekat dan jauh menggunakan mouse, gunakan roda gulung', |
| 510 | + 'semanticmaps_paramdesc_layers' => 'Lapisan tersedia di peta', |
| 511 | +); |
| 512 | + |
| 513 | +/** Italian (Italiano) |
| 514 | + * @author Civvì |
| 515 | + * @author Darth Kule |
| 516 | + * @author HalphaZ |
| 517 | + */ |
| 518 | +$messages['it'] = array( |
| 519 | + '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", |
| 520 | + 'semanticmaps-unrecognizeddistance' => 'Il valore $1 non è una distanza valida.', |
| 521 | + 'semanticmaps_lookupcoordinates' => 'Cerca coordinate', |
| 522 | + 'semanticmaps_enteraddresshere' => 'Inserisci indirizzo qui', |
| 523 | + 'semanticmaps_notfound' => 'non trovato', |
| 524 | + 'semanticmaps_paramdesc_format' => 'Il servizio di mapping utilizzato per generare la mappa', |
| 525 | + 'semanticmaps_paramdesc_geoservice' => 'Il servizio di geocoding utilizzato per trasformare gli indirizzi in coordinate', |
| 526 | + 'semanticmaps_paramdesc_height' => "L'altezza della mappa in pixel (il valore di default è $1)", |
| 527 | + 'semanticmaps_paramdesc_width' => 'La larghezza della mappa in pixel (il valore di default è $1)', |
| 528 | + 'semanticmaps_paramdesc_zoom' => 'Il livello di zoom della mappa', |
| 529 | + 'semanticmaps_paramdesc_centre' => 'Le coordinate del centro della mappa', |
| 530 | + 'semanticmaps_paramdesc_controls' => 'I controlli utente posizionati sulla mappa', |
| 531 | + 'semanticmaps_paramdesc_types' => 'I tipi di mappa disponibili sulla mappa', |
| 532 | + 'semanticmaps_paramdesc_type' => 'Il tipo mappa predefinito per la mappa', |
| 533 | + 'semanticmaps_paramdesc_overlays' => 'Gli overlay disponibili sulla mappa', |
| 534 | + 'semanticmaps_paramdesc_autozoom' => 'Se sono attivati lo zoom avanti e indietro utilizzando la rotellina del mouse', |
| 535 | + 'semanticmaps_paramdesc_layers' => 'Gli strati (layer) disponibili sulla mappa', |
| 536 | +); |
| 537 | + |
| 538 | +/** Japanese (日本語) |
| 539 | + * @author Fryed-peach |
| 540 | + * @author Mizusumashi |
| 541 | + * @author 青子守歌 |
| 542 | + */ |
| 543 | +$messages['ja'] = array( |
| 544 | + 'semanticmaps_desc' => 'Semantic MediaWiki 拡張機能を通して格納された座標データを表示・編集する機能を提供する ([http://wiki.bn2vs.com/wiki/Semantic_Maps 実演])。次の地図サービスに対応します:$1', |
| 545 | + 'semanticmaps-unrecognizeddistance' => '値$1は有効な距離ではありません。', |
| 546 | + 'semanticmaps_lookupcoordinates' => '座標を調べる', |
| 547 | + 'semanticmaps_enteraddresshere' => '住所をここに入力します', |
| 548 | + 'semanticmaps_notfound' => '見つかりません', |
| 549 | + 'semanticmaps_paramdesc_format' => '地図の生成に利用されている地図サービス', |
| 550 | + 'semanticmaps_paramdesc_geoservice' => '住所の座標への変換に利用されているジオコーディングサービス', |
| 551 | + 'semanticmaps_paramdesc_height' => '地図の縦幅 (単位はピクセル、既定は$1)', |
| 552 | + 'semanticmaps_paramdesc_width' => '地図の横幅 (単位はピクセル、既定は$1)', |
| 553 | + 'semanticmaps_paramdesc_zoom' => '地図の拡大度', |
| 554 | + 'semanticmaps_paramdesc_centre' => '地図の中心の座標', |
| 555 | + 'semanticmaps_paramdesc_controls' => 'この地図上に設置するユーザーコントロール', |
| 556 | + 'semanticmaps_paramdesc_types' => 'この地図で利用できる地図タイプ', |
| 557 | + 'semanticmaps_paramdesc_type' => 'この地図のデフォルト地図タイプ', |
| 558 | + 'semanticmaps_paramdesc_overlays' => 'この地図で利用できるオーバーレイ', |
| 559 | + 'semanticmaps_paramdesc_autozoom' => 'マウスのスクロールホイールを使ったズームインやアウトを有効にするか', |
| 560 | + 'semanticmaps_paramdesc_layers' => 'この地図で利用できるレイヤー', |
| 561 | +); |
| 562 | + |
| 563 | +/** Khmer (ភាសាខ្មែរ) |
| 564 | + * @author Thearith |
| 565 | + */ |
| 566 | +$messages['km'] = array( |
| 567 | + 'semanticmaps_lookupcoordinates' => 'ក្រឡេកមើលកូអរដោនេ', |
| 568 | +); |
| 569 | + |
| 570 | +/** Colognian (Ripoarisch) |
| 571 | + * @author Purodha |
| 572 | + */ |
| 573 | +$messages['ksh'] = array( |
| 574 | + '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', |
| 575 | + 'semanticmaps_lookupcoordinates' => 'Koordinate nohkike', |
| 576 | + 'semanticmaps_enteraddresshere' => 'Donn hee de Address enjäve', |
| 577 | + 'semanticmaps_notfound' => 'nit jefonge', |
| 578 | + 'semanticmaps_paramdesc_format' => 'Dä Deens för Kaate ußzejävve, woh heh di Kaat vun kütt', |
| 579 | + 'semanticmaps_paramdesc_geoservice' => "Dä Deens för Adräße en Ko'odinaate öm_ze_wandelle", |
| 580 | + 'semanticmaps_paramdesc_height' => 'De Hühde vun heh dä Kaat en Pixelle — schtandattmääßesch {{PLURAL:$1|$1 Pixel|$1 Pixelle|nix}}', |
| 581 | + 'semanticmaps_paramdesc_width' => 'De Breedt vun heh dä Kaat en Pixelle — schtandattmääßesch {{PLURAL:$1|$1 Pixel|$1 Pixelle|nix}}', |
| 582 | + 'semanticmaps_paramdesc_zoom' => 'Wi doll dä Zoom fö heh di Kaat es', |
| 583 | + 'semanticmaps_paramdesc_centre' => "De Ko'odinaate op de Ääd, vun de Medde vun heh dä Kaat", |
| 584 | + 'semanticmaps_paramdesc_controls' => 'De Knöppe för de Bedeenung, di op di Kaat jemohlt wäääde', |
| 585 | + 'semanticmaps_paramdesc_types' => 'De Kaate-Zoote di mer för heh di Kaat ußsöhke kann', |
| 586 | + 'semanticmaps_paramdesc_type' => 'De Schtandatt Kaate-Zoot för heh di Kaat', |
| 587 | + 'semanticmaps_paramdesc_overlays' => 'De zohsäzlijje Eijnzelheijte, di mer op di Kaat drop bränge kann', |
| 588 | + 'semanticmaps_paramdesc_autozoom' => 'Falls et erin un eruß zoome met däm Kompjuter singe Muuß ierem Rättsche aanjeschalldt es, dann:', |
| 589 | + 'semanticmaps_paramdesc_layers' => 'De Nivohs, di för di Kaat ze han sin', |
| 590 | +); |
| 591 | + |
| 592 | +/** Luxembourgish (Lëtzebuergesch) |
| 593 | + * @author Robby |
| 594 | + */ |
| 595 | +$messages['lb'] = array( |
| 596 | + 'semanticmaps_lookupcoordinates' => 'Koordinaten nokucken', |
| 597 | + 'semanticmaps_enteraddresshere' => 'Adress hei aginn', |
| 598 | + 'semanticmaps_notfound' => 'net fonnt', |
| 599 | + 'semanticmaps_paramdesc_format' => "De Kartographie-Service dee fir d'generéiere vun der Kaart benotzt gëtt", |
| 600 | + 'semanticmaps_paramdesc_height' => "D'Héicht vun der Kaart, a Pixelen (Standard ass $1)", |
| 601 | + 'semanticmaps_paramdesc_width' => "D'Breet vun der Kaart, a Pixelen (Standard ass $1)", |
| 602 | + 'semanticmaps_paramdesc_zoom' => 'DenNiveau vum Zoom vun der Kaart', |
| 603 | + 'semanticmaps_paramdesc_centre' => "D'Koordinate vum zentrum vun der Kaart", |
| 604 | + 'semanticmaps_paramdesc_controls' => "D'Benotzerkontrollen déi op der Kaart plazéiert sinn", |
| 605 | +); |
| 606 | + |
| 607 | +/** Macedonian (Македонски) |
| 608 | + * @author Bjankuloski06 |
| 609 | + */ |
| 610 | +$messages['mk'] = array( |
| 611 | + 'semanticmaps_desc' => 'Дава можност за гледање и уредување на податоци со координати складирани преку проширувањето Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps демо]). |
| 612 | +Картографски служби на располагање: $1', |
| 613 | + 'semanticmaps-unrecognizeddistance' => 'Вредноста $1 не претставува важечко растојание.', |
| 614 | + 'semanticmaps_lookupcoordinates' => 'Побарај координати', |
| 615 | + 'semanticmaps_enteraddresshere' => 'Внесете адреса тука', |
| 616 | + 'semanticmaps_notfound' => 'не е најдено ништо', |
| 617 | + 'semanticmaps_paramdesc_format' => 'Картографската служба со која се создава картата', |
| 618 | + 'semanticmaps_paramdesc_geoservice' => 'Службата за геокодирање со која адресите се претвораат во координати', |
| 619 | + 'semanticmaps_paramdesc_height' => 'Висината на картата во пиксели ($1 по основно)', |
| 620 | + 'semanticmaps_paramdesc_width' => 'Ширината на картата во пиксели ($1 по основно)', |
| 621 | + 'semanticmaps_paramdesc_zoom' => 'Размерот на картата', |
| 622 | + 'semanticmaps_paramdesc_centre' => 'Координатите на средиштето на картата', |
| 623 | + 'semanticmaps_paramdesc_controls' => 'Корисничките контроли за на картата', |
| 624 | + 'semanticmaps_paramdesc_types' => 'Типови на карти, достапни за картата', |
| 625 | + 'semanticmaps_paramdesc_type' => 'Основно зададениот тип на карта', |
| 626 | + 'semanticmaps_paramdesc_overlays' => 'Достапните облоги за картата', |
| 627 | + 'semanticmaps_paramdesc_autozoom' => 'Ако е овозможено приближување и оддалечување со тркалцето на глушецот', |
| 628 | + 'semanticmaps_paramdesc_layers' => 'Слоевите достапни на картата', |
| 629 | +); |
| 630 | + |
| 631 | +/** Dutch (Nederlands) |
| 632 | + * @author Jeroen De Dauw |
| 633 | + * @author Siebrand |
| 634 | + */ |
| 635 | +$messages['nl'] = array( |
| 636 | + '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]). |
| 637 | +Beschikbare kaartdiensten: $1', |
| 638 | + 'semanticmaps-unrecognizeddistance' => 'De waarde "$1" is geen geldige afstand.', |
| 639 | + 'semanticmaps_lookupcoordinates' => 'Coördinaten opzoeken', |
| 640 | + 'semanticmaps_enteraddresshere' => 'Voer hier het adres in', |
| 641 | + 'semanticmaps_notfound' => 'niet gevonden', |
| 642 | + 'semanticmaps_paramdesc_format' => 'De kaartdienst die de kaart levert', |
| 643 | + 'semanticmaps_paramdesc_geoservice' => 'De geocoderingsdienst die adressen in coördinaten converteert', |
| 644 | + 'semanticmaps_paramdesc_height' => 'De hoogte van de kaart in pixels (standaard is $1)', |
| 645 | + 'semanticmaps_paramdesc_width' => 'De breedte van de kaart in pixels (standaard is $1)', |
| 646 | + 'semanticmaps_paramdesc_zoom' => 'Het zoomniveau van de kaart', |
| 647 | + 'semanticmaps_paramdesc_centre' => 'De coördinaten van het midden van de kaart', |
| 648 | + 'semanticmaps_paramdesc_controls' => 'De op de kaart te plaatsen hulpmiddelen', |
| 649 | + 'semanticmaps_paramdesc_types' => 'De voor de kaart beschikbare kaarttypen', |
| 650 | + 'semanticmaps_paramdesc_type' => 'Het standaard kaarttype voor de kaart', |
| 651 | + 'semanticmaps_paramdesc_overlays' => 'De voor de kaart beschikbare overlays', |
| 652 | + 'semanticmaps_paramdesc_autozoom' => 'Of in- en uitzoomen met het scrollwiel van de muis mogelijk is', |
| 653 | + 'semanticmaps_paramdesc_layers' => 'De lagen die beschikbaar zijn voor de kaart', |
| 654 | +); |
| 655 | + |
| 656 | +/** Norwegian Nynorsk (Norsk (nynorsk)) |
| 657 | + * @author Harald Khan |
| 658 | + */ |
| 659 | +$messages['nn'] = array( |
| 660 | + 'semanticmaps_lookupcoordinates' => 'Sjekk koordinatar', |
| 661 | + 'semanticmaps_enteraddresshere' => 'Skriv inn adressa her', |
| 662 | +); |
| 663 | + |
| 664 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 665 | + * @author Jon Harald Søby |
| 666 | + * @author Nghtwlkr |
| 667 | + */ |
| 668 | +$messages['no'] = array( |
| 669 | + 'semanticmaps_desc' => 'Tilbyr muligheten til å se og endre koordinatdata lagret gjennom Semantic MediaWiki-utvidelsen ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 670 | +Tilgjengelige karttjenester: $1', |
| 671 | + 'semanticmaps_lookupcoordinates' => 'Sjekk koordinater', |
| 672 | + 'semanticmaps_enteraddresshere' => 'Skriv inn adressen her', |
| 673 | + 'semanticmaps_notfound' => 'ikke funnet', |
| 674 | + 'semanticmaps_paramdesc_format' => 'Karttjenesten brukt for å generere kart', |
| 675 | + 'semanticmaps_paramdesc_geoservice' => 'Geokodetjenesten brukt for å gjøre adresser om til koordinater', |
| 676 | + 'semanticmaps_paramdesc_height' => 'Høyden til kartet, i pixler (standard er $1)', |
| 677 | + 'semanticmaps_paramdesc_width' => 'Bredden til kartet, i pixler (standard er $1)', |
| 678 | + 'semanticmaps_paramdesc_zoom' => 'Zoomnivået til kartet', |
| 679 | + 'semanticmaps_paramdesc_centre' => 'Koordinatene til kartets senter', |
| 680 | + 'semanticmaps_paramdesc_controls' => 'Brukerkontrollene plassert på kartet', |
| 681 | + 'semanticmaps_paramdesc_types' => 'Karttypene tilgjengelig for kartet', |
| 682 | + 'semanticmaps_paramdesc_type' => 'Standard karttype for kartet', |
| 683 | + 'semanticmaps_paramdesc_overlays' => 'Overlag tilgjengelig for kartet', |
| 684 | + 'semanticmaps_paramdesc_autozoom' => 'Dersom zooming ved bruk av musehjulet er slått på', |
| 685 | + 'semanticmaps_paramdesc_layers' => 'Lagene tilgjengelig på kartet', |
| 686 | +); |
| 687 | + |
| 688 | +/** Occitan (Occitan) |
| 689 | + * @author Cedric31 |
| 690 | + */ |
| 691 | +$messages['oc'] = array( |
| 692 | + '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]", |
| 693 | + 'semanticmaps_lookupcoordinates' => 'Estimar las coordenadas', |
| 694 | + 'semanticmaps_enteraddresshere' => 'Picatz aicí l’adreça', |
| 695 | + 'semanticmaps_notfound' => 'pas trobat', |
| 696 | +); |
| 697 | + |
| 698 | +/** Polish (Polski) |
| 699 | + * @author Deejay1 |
| 700 | + * @author Derbeth |
| 701 | + * @author Leinad |
| 702 | + * @author Odder |
| 703 | + * @author Sp5uhe |
| 704 | + */ |
| 705 | +$messages['pl'] = array( |
| 706 | + '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]). |
| 707 | +Dostępne serwisy mapowe: $1', |
| 708 | + 'semanticmaps-unrecognizeddistance' => 'Wartość $1 nie jest poprawną odległością.', |
| 709 | + 'semanticmaps_lookupcoordinates' => 'Wyszukaj współrzędne', |
| 710 | + 'semanticmaps_enteraddresshere' => 'Podaj adres', |
| 711 | + 'semanticmaps_notfound' => 'nie odnaleziono', |
| 712 | + 'semanticmaps_paramdesc_height' => 'Wysokość mapy w pikselach (domyślnie $1)', |
| 713 | + 'semanticmaps_paramdesc_width' => 'Szerokość mapy w pikselach (domyślnie $1)', |
| 714 | + 'semanticmaps_paramdesc_layers' => 'Warstwy dostępne na mapie', |
| 715 | +); |
| 716 | + |
| 717 | +/** Piedmontese (Piemontèis) |
| 718 | + * @author Borichèt |
| 719 | + * @author Dragonòt |
| 720 | + */ |
| 721 | +$messages['pms'] = array( |
| 722 | + '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]). |
| 723 | +Sërvissi ëd mapa disponìbij: $1', |
| 724 | + 'semanticmaps-unrecognizeddistance' => "Ël valor $1 a l'é pa na distansa bon-a.", |
| 725 | + 'semanticmaps_lookupcoordinates' => 'Serca coordinà', |
| 726 | + 'semanticmaps_enteraddresshere' => 'Ansëriss adrëssa sì', |
| 727 | + 'semanticmaps_notfound' => 'pa trovà', |
| 728 | + 'semanticmaps_paramdesc_format' => 'Ël servissi ëd cartografìa dovrà për generé la carta', |
| 729 | + 'semanticmaps_paramdesc_geoservice' => "Ël servissi ëd geocodìfica dovrà për trasformé j'adrësse an coordinà", |
| 730 | + 'semanticmaps_paramdesc_height' => "L'autëssa dla carta, an pontin (lë stàndard a l'é $1)", |
| 731 | + 'semanticmaps_paramdesc_width' => "La larghëssa dla carta, an pontin (lë stàndard a l'é $1)", |
| 732 | + 'semanticmaps_paramdesc_zoom' => "Ël livel d'angrandiment ëd la carta", |
| 733 | + 'semanticmaps_paramdesc_centre' => 'Le coordinà dël sènter ëd la carta', |
| 734 | + 'semanticmaps_paramdesc_controls' => 'Ij contròj utent piassà an sla carta', |
| 735 | + 'semanticmaps_paramdesc_types' => 'Le sòrt ëd carte disponìbij an sla carta', |
| 736 | + 'semanticmaps_paramdesc_type' => 'Ël tipo ëd carta stàndard për la carta', |
| 737 | + 'semanticmaps_paramdesc_overlays' => 'Le dzor-posission disponìbij an sla carta', |
| 738 | + 'semanticmaps_paramdesc_autozoom' => "Se l'angrandiment anans e andré an dovrand la roëtta dël rat a l'é abilità", |
| 739 | + 'semanticmaps_paramdesc_layers' => 'Ij livej disponìbij an sla carta', |
| 740 | +); |
| 741 | + |
| 742 | +/** Pashto (پښتو) |
| 743 | + * @author Ahmed-Najib-Biabani-Ibrahimkhel |
| 744 | + */ |
| 745 | +$messages['ps'] = array( |
| 746 | + 'semanticmaps_notfound' => 'و نه موندل شو', |
| 747 | +); |
| 748 | + |
| 749 | +/** Portuguese (Português) |
| 750 | + * @author Hamilton Abreu |
| 751 | + * @author Indech |
| 752 | + * @author Malafaya |
| 753 | + */ |
| 754 | +$messages['pt'] = array( |
| 755 | + '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]). |
| 756 | +Serviços de cartografia disponíveis: $1', |
| 757 | + 'semanticmaps-unrecognizeddistance' => 'O valor $1 não é uma distância válida.', |
| 758 | + 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas', |
| 759 | + 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui', |
| 760 | + 'semanticmaps_notfound' => 'não encontrado', |
| 761 | + 'semanticmaps_paramdesc_format' => 'O serviço de cartografia usado para gerar o mapa', |
| 762 | + 'semanticmaps_paramdesc_geoservice' => 'O serviço de geocódigos usado para transformar endereços em coordenadas', |
| 763 | + 'semanticmaps_paramdesc_height' => 'A altura do mapa, em pixels (por omissão, $1)', |
| 764 | + 'semanticmaps_paramdesc_width' => 'A largura do mapa, em pixels (por omissão, $1)', |
| 765 | + 'semanticmaps_paramdesc_zoom' => 'O nível de aproximação do mapa', |
| 766 | + 'semanticmaps_paramdesc_centre' => 'As coordenadas do centro do mapa', |
| 767 | + 'semanticmaps_paramdesc_controls' => 'Os controles colocados no mapa', |
| 768 | + 'semanticmaps_paramdesc_types' => 'Os tipos de mapa disponíveis no mapa', |
| 769 | + 'semanticmaps_paramdesc_type' => 'O tipo do mapa, por omissão', |
| 770 | + 'semanticmaps_paramdesc_overlays' => 'As sobreposições disponíveis no mapa', |
| 771 | + 'semanticmaps_paramdesc_autozoom' => 'Possibilitar a aproximação e afastamento usando a roda de deslizamento do rato', |
| 772 | + 'semanticmaps_paramdesc_layers' => 'As camadas disponíveis no mapa', |
| 773 | +); |
| 774 | + |
| 775 | +/** Brazilian Portuguese (Português do Brasil) |
| 776 | + * @author Eduardo.mps |
| 777 | + * @author Luckas Blade |
| 778 | + */ |
| 779 | +$messages['pt-br'] = array( |
| 780 | + '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]). |
| 781 | +Serviços de mapeamento disponíveis: $1', |
| 782 | + 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas', |
| 783 | + 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui', |
| 784 | + 'semanticmaps_notfound' => 'Não encontrado', |
| 785 | +); |
| 786 | + |
| 787 | +/** Romanian (Română) |
| 788 | + * @author Firilacroco |
| 789 | + */ |
| 790 | +$messages['ro'] = array( |
| 791 | + 'semanticmaps_enteraddresshere' => 'Introduceți adresa aici', |
| 792 | + 'semanticmaps_notfound' => 'nu a fost găsit', |
| 793 | +); |
| 794 | + |
| 795 | +/** Tarandíne (Tarandíne) |
| 796 | + * @author Joetaras |
| 797 | + */ |
| 798 | +$messages['roa-tara'] = array( |
| 799 | + '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]). |
| 800 | +Disponibbile le servizie de mappe: $1", |
| 801 | + 'semanticmaps_lookupcoordinates' => 'Ingroce le coordinate', |
| 802 | + 'semanticmaps_enteraddresshere' => "Scaffe l'indirizze aqquà", |
| 803 | + 'semanticmaps_notfound' => 'no acchiate', |
| 804 | +); |
| 805 | + |
| 806 | +/** Russian (Русский) |
| 807 | + * @author Eugene Mednikov |
| 808 | + * @author Lockal |
| 809 | + * @author Александр Сигачёв |
| 810 | + */ |
| 811 | +$messages['ru'] = array( |
| 812 | + 'semanticmaps_desc' => 'Предоставляет возможность просмотра и редактирования данных о координатах, хранящихся посредством расширения Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps демонстрация]). |
| 813 | +Доступные службы карт: $1', |
| 814 | + 'semanticmaps-unrecognizeddistance' => 'Значение $1 не является допустимым расстоянием.', |
| 815 | + 'semanticmaps_lookupcoordinates' => 'Найти координаты', |
| 816 | + 'semanticmaps_enteraddresshere' => 'Введите адрес', |
| 817 | + 'semanticmaps_notfound' => 'не найдено', |
| 818 | + 'semanticmaps_paramdesc_format' => 'Картографическая служба, используемая для создания карт', |
| 819 | + 'semanticmaps_paramdesc_geoservice' => 'Служба геокодирования используется для преобразования адреса в координаты', |
| 820 | + 'semanticmaps_paramdesc_height' => 'Высота карты в пикселях (по умолчанию $1)', |
| 821 | + 'semanticmaps_paramdesc_width' => 'Ширина карты в пикселях (по умолчанию $1)', |
| 822 | + 'semanticmaps_paramdesc_zoom' => 'Масштаб карты', |
| 823 | + 'semanticmaps_paramdesc_centre' => 'Координаты центра карты', |
| 824 | + 'semanticmaps_paramdesc_controls' => 'Элементы управления на карте', |
| 825 | + 'semanticmaps_paramdesc_types' => 'Типы карты, доступные на карте', |
| 826 | + 'semanticmaps_paramdesc_type' => 'Тип карты по умолчанию', |
| 827 | + 'semanticmaps_paramdesc_overlays' => 'Доступные наложения', |
| 828 | + 'semanticmaps_paramdesc_autozoom' => 'Если включено увеличение и уменьшение масштаб с помощью колеса прокрутки мыши', |
| 829 | + 'semanticmaps_paramdesc_layers' => 'Доступные на карте слои', |
| 830 | +); |
| 831 | + |
| 832 | +/** Slovak (Slovenčina) |
| 833 | + * @author Helix84 |
| 834 | + */ |
| 835 | +$messages['sk'] = array( |
| 836 | + '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]). |
| 837 | +Dostupné mapové služby: $1', |
| 838 | + 'semanticmaps_lookupcoordinates' => 'Vyhľadať súradnice', |
| 839 | + 'semanticmaps_enteraddresshere' => 'Sem zadajte emailovú adresu', |
| 840 | + 'semanticmaps_notfound' => 'nenájdené', |
| 841 | + 'semanticmaps_paramdesc_format' => 'Služba použitá na tvorbu mapy', |
| 842 | + 'semanticmaps_paramdesc_geoservice' => 'Služba použitá na vyhľadanie súradníc na základe adresy', |
| 843 | + 'semanticmaps_paramdesc_height' => 'Výška mapy v pixloch (predvolené je $1)', |
| 844 | + 'semanticmaps_paramdesc_width' => 'Šírka mapy v pixloch (predvolené je $1)', |
| 845 | + 'semanticmaps_paramdesc_zoom' => 'Úroveň priblíženia mapy', |
| 846 | + 'semanticmaps_paramdesc_centre' => 'Súradnice stredu mapy', |
| 847 | + 'semanticmaps_paramdesc_controls' => 'Používateľské ovládacie prvky umiestnené na mape', |
| 848 | + 'semanticmaps_paramdesc_types' => 'Typy máp dostupné na mape', |
| 849 | + 'semanticmaps_paramdesc_type' => 'Predvolený typ mapy na mape', |
| 850 | + 'semanticmaps_paramdesc_overlays' => 'Vrstvy dostupné na mape', |
| 851 | + 'semanticmaps_paramdesc_autozoom' => 'Či je povolené približovanie a odďaľovanie mapy kolieskom myši', |
| 852 | + 'semanticmaps_paramdesc_layers' => 'Dostupné vrstvy mapy', |
| 853 | +); |
| 854 | + |
| 855 | +/** Serbian Cyrillic ekavian (Српски (ћирилица)) |
| 856 | + * @author Михајло Анђелковић |
| 857 | + */ |
| 858 | +$messages['sr-ec'] = array( |
| 859 | + 'semanticmaps-unrecognizeddistance' => 'Вредност $1 није исправно растојање.', |
| 860 | + 'semanticmaps_enteraddresshere' => 'Унеси адресу овде', |
| 861 | + 'semanticmaps_notfound' => 'није нађено', |
| 862 | + 'semanticmaps_paramdesc_height' => 'Висина мапе у пикселима (подразумевано је $1)', |
| 863 | + 'semanticmaps_paramdesc_width' => 'Ширина мапе у пикселима (подразумевано је $1)', |
| 864 | + 'semanticmaps_paramdesc_zoom' => 'Ниво увећања мапе', |
| 865 | + 'semanticmaps_paramdesc_centre' => 'Координате центра мапе', |
| 866 | +); |
| 867 | + |
| 868 | +/** Serbian Latin ekavian (Srpski (latinica)) |
| 869 | + * @author Michaello |
| 870 | + */ |
| 871 | +$messages['sr-el'] = array( |
| 872 | + 'semanticmaps-unrecognizeddistance' => 'Vrednost $1 nije ispravno rastojanje.', |
| 873 | + 'semanticmaps_enteraddresshere' => 'Unesi adresu ovde', |
| 874 | + 'semanticmaps_notfound' => 'nije nađeno', |
| 875 | + 'semanticmaps_paramdesc_height' => 'Visina mape u pikselima (podrazumevano je $1)', |
| 876 | + 'semanticmaps_paramdesc_width' => 'Širina mape u pikselima (podrazumevano je $1)', |
| 877 | + 'semanticmaps_paramdesc_zoom' => 'Nivo uvećanja mape', |
| 878 | + 'semanticmaps_paramdesc_centre' => 'Koordinate centra mape', |
| 879 | +); |
| 880 | + |
| 881 | +/** Swedish (Svenska) |
| 882 | + * @author Boivie |
| 883 | + * @author Najami |
| 884 | + * @author Per |
| 885 | + */ |
| 886 | +$messages['sv'] = array( |
| 887 | + 'semanticmaps_desc' => 'Ger möjligheten att titta på och ändra koordinatdata sparad genom Semantic MediaWiki-utvidgningen ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]). |
| 888 | + |
| 889 | +Tillgängliga karttjänster: $1', |
| 890 | + 'semanticmaps_lookupcoordinates' => 'Kolla upp koordinater', |
| 891 | + 'semanticmaps_enteraddresshere' => 'Skriv in adress här', |
| 892 | + 'semanticmaps_notfound' => 'hittades inte', |
| 893 | + 'semanticmaps_paramdesc_height' => 'Höjden på kartan i pixlar (standard är $1)', |
| 894 | + 'semanticmaps_paramdesc_width' => 'Bredden på kartan i pixlar (standard är $1)', |
| 895 | + 'semanticmaps_paramdesc_zoom' => 'Zoomnivån för kartan', |
| 896 | + 'semanticmaps_paramdesc_centre' => 'Koordinaterna för kartans mittpunkt', |
| 897 | + 'semanticmaps_paramdesc_type' => 'Standard karttyp för kartan', |
| 898 | + 'semanticmaps_paramdesc_layers' => 'Lagren tillgängliga för kartan', |
| 899 | +); |
| 900 | + |
| 901 | +/** Telugu (తెలుగు) |
| 902 | + * @author Veeven |
| 903 | + */ |
| 904 | +$messages['te'] = array( |
| 905 | + 'semanticmaps_notfound' => 'కనబడలేదు', |
| 906 | +); |
| 907 | + |
| 908 | +/** Tagalog (Tagalog) |
| 909 | + * @author AnakngAraw |
| 910 | + */ |
| 911 | +$messages['tl'] = array( |
| 912 | + '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]). |
| 913 | +Makukuhang mga palingkurang pangmapa: $1', |
| 914 | + 'semanticmaps-unrecognizeddistance' => 'Hindi isang tanggap na layo ang halagang $1.', |
| 915 | + 'semanticmaps_lookupcoordinates' => "Hanapin ang mga tugmaang-pampook (''coordinate'')", |
| 916 | + 'semanticmaps_enteraddresshere' => 'Ipasok ang adres dito', |
| 917 | + 'semanticmaps_notfound' => 'hindi natagpuan', |
| 918 | + 'semanticmaps_paramdesc_format' => 'Ang palingkurang pangpagmamapa na ginamit sa paglikha ng mapa', |
| 919 | + 'semanticmaps_paramdesc_geoservice' => 'Ang paglingkurang pang-geokodigo na ginagamit upang maging mga tugmaang-pampook ang mga direksyon', |
| 920 | + 'semanticmaps_paramdesc_height' => 'Ang taas ng mapa, sa piksels ($1 ang likas na nakatakda)', |
| 921 | + 'semanticmaps_paramdesc_width' => 'Ang lapad ng mapa, sa piksels ($1 ang likas na nakatakda)', |
| 922 | + 'semanticmaps_paramdesc_zoom' => 'Ang antas ng paglapit-tutok ng mapa', |
| 923 | + 'semanticmaps_paramdesc_centre' => 'Ang mga tugmaang-pampook ng gitna ng mga mapa', |
| 924 | + 'semanticmaps_paramdesc_controls' => 'Ang mga pangtaban ng tagagamit na inilagay sa ibabaw ng mapa', |
| 925 | + 'semanticmaps_paramdesc_types' => 'Ang mga uri ng mapang makukuha na nasa ibabaw ng mapa', |
| 926 | + 'semanticmaps_paramdesc_type' => 'Ang likas na nakatakdang uri ng mapa na para sa mapa', |
| 927 | + 'semanticmaps_paramdesc_overlays' => 'Ang makukuhang mga patong na nasa ibabaw ng mapa', |
| 928 | + 'semanticmaps_paramdesc_autozoom' => 'Kapag pinagana ang pagtutok-lapit at paglayo sa pamamagitan ng pang-ikid ng maws', |
| 929 | + 'semanticmaps_paramdesc_layers' => 'Ang makukuhang mga patong na nasa ibabaw ng mapa', |
| 930 | +); |
| 931 | + |
| 932 | +/** Turkish (Türkçe) |
| 933 | + * @author Vito Genovese |
| 934 | + */ |
| 935 | +$messages['tr'] = array( |
| 936 | + 'semanticmaps_lookupcoordinates' => 'Koordinat ara', |
| 937 | + 'semanticmaps_enteraddresshere' => 'Adresi buraya girin', |
| 938 | + 'semanticmaps_notfound' => 'bulunamadı', |
| 939 | + 'semanticmaps_paramdesc_zoom' => 'Haritanın yakınlaşma seviyesi', |
| 940 | + 'semanticmaps_paramdesc_layers' => 'Haritada mevcut olan katmanlar', |
| 941 | +); |
| 942 | + |
| 943 | +/** Veps (Vepsan kel') |
| 944 | + * @author Игорь Бродский |
| 945 | + */ |
| 946 | +$messages['vep'] = array( |
| 947 | + 'semanticmaps_notfound' => 'ei voi löuta', |
| 948 | +); |
| 949 | + |
| 950 | +/** Vietnamese (Tiếng Việt) |
| 951 | + * @author Minh Nguyen |
| 952 | + * @author Vinhtantran |
| 953 | + */ |
| 954 | +$messages['vi'] = array( |
| 955 | + '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]). |
| 956 | +Các dịch vụ bản đồ có sẵn: $1', |
| 957 | + 'semanticmaps_lookupcoordinates' => 'Tra tọa độ', |
| 958 | + 'semanticmaps_enteraddresshere' => 'Nhập địa chỉ vào đây', |
| 959 | + 'semanticmaps_notfound' => 'không tìm thấy', |
| 960 | +); |
| 961 | + |
| 962 | +/** Volapük (Volapük) |
| 963 | + * @author Smeira |
| 964 | + */ |
| 965 | +$messages['vo'] = array( |
| 966 | + 'semanticmaps_lookupcoordinates' => 'Tuvön koordinatis', |
| 967 | +); |
| 968 | + |
| 969 | +/** Simplified Chinese (中文(简体)) |
| 970 | + * @author Gzdavidwong |
| 971 | + */ |
| 972 | +$messages['zh-hans'] = array( |
| 973 | + 'semanticmaps_lookupcoordinates' => '查找坐标', |
| 974 | +); |
| 975 | + |
| 976 | +/** Traditional Chinese (中文(繁體)) |
| 977 | + * @author Gzdavidwong |
| 978 | + * @author Sheepy |
| 979 | + * @author Wrightbus |
| 980 | + */ |
| 981 | +$messages['zh-hant'] = array( |
| 982 | + 'semanticmaps_lookupcoordinates' => '尋找座標', |
| 983 | +); |
| 984 | + |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/SemanticMaps.i18n.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 985 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/SemanticMaps.php |
— | — | @@ -0,0 +1,108 @@ |
| 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.3' ); |
| 40 | + |
| 41 | + $smgScriptPath = ( isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps'; |
| 42 | + $smgDir = dirname( __FILE__ ) . '/'; |
| 43 | + |
| 44 | + $smgStyleVersion = $wgStyleVersion . '-' . SM_VERSION; |
| 45 | + |
| 46 | + // Include the settings file. |
| 47 | + require_once( $smgDir . 'SM_Settings.php' ); |
| 48 | + |
| 49 | + $wgExtensionFunctions[] = 'smfSetup'; |
| 50 | + |
| 51 | + $wgHooks['AdminLinks'][] = 'smfAddToAdminLinks'; |
| 52 | + |
| 53 | + $wgExtensionMessagesFiles['SemanticMaps'] = $smgDir . 'SemanticMaps.i18n.php'; |
| 54 | + |
| 55 | + // Include the GeoCoords related functionality. |
| 56 | + require_once( $smgDir . '/GeoCoords/SM_GeoCoords.php' ); |
| 57 | +} |
| 58 | + |
| 59 | +/** |
| 60 | + * 'Initialization' function for the Semantic Maps extension. |
| 61 | + * The only work done here is creating the extension credits for |
| 62 | + * Semantic Maps. The actuall work in done via the Maps hooks. |
| 63 | + */ |
| 64 | +function smfSetup() { |
| 65 | + global $wgExtensionCredits, $wgLang, $wgOut, $egMapsServices, $smgScriptPath; |
| 66 | + |
| 67 | + // Creation of a list of internationalized service names. |
| 68 | + $services = array(); |
| 69 | + foreach ( array_keys( $egMapsServices ) as $name ) $services[] = wfMsg( 'maps_' . $name ); |
| 70 | + $services_list = $wgLang->listToText( $services ); |
| 71 | + |
| 72 | + // This function has been deprecated in 1.16, but needed for earlier versions. |
| 73 | + // It's present in 1.16 as a stub, but lets check if it exists in case it gets removed at some point. |
| 74 | + if ( function_exists( 'wfLoadExtensionMessages' ) ) { |
| 75 | + wfLoadExtensionMessages( 'SemanticMaps' ); |
| 76 | + } |
| 77 | + |
| 78 | + $wgExtensionCredits['other'][] = array( |
| 79 | + 'path' => __FILE__, |
| 80 | + 'name' => wfMsg( 'semanticmaps_name' ), |
| 81 | + 'version' => SM_VERSION, |
| 82 | + 'author' => array( |
| 83 | + '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', |
| 84 | + '[http://www.mediawiki.org/wiki/User:Yaron_Koren Yaron Koren]', |
| 85 | + '[http://www.ohloh.net/p/semanticmaps/contributors others]' |
| 86 | + ), |
| 87 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Maps', |
| 88 | + 'description' => wfMsgExt( 'semanticmaps_desc', 'parsemag', $services_list ), |
| 89 | + ); |
| 90 | + |
| 91 | + return true; |
| 92 | +} |
| 93 | + |
| 94 | +/** |
| 95 | + * Adds a link to Admin Links page. |
| 96 | + */ |
| 97 | +function smfAddToAdminLinks( &$admin_links_tree ) { |
| 98 | + $displaying_data_section = $admin_links_tree->getSection( wfMsg( 'smw_adminlinks_displayingdata' ) ); |
| 99 | + |
| 100 | + // Escape if SMW hasn't added links. |
| 101 | + if ( is_null( $displaying_data_section ) ) return true; |
| 102 | + |
| 103 | + $smw_docu_row = $displaying_data_section->getRow( 'smw' ); |
| 104 | + |
| 105 | + $sm_docu_label = wfMsg( 'adminlinks_documentation', wfMsg( 'semanticmaps_name' ) ); |
| 106 | + $smw_docu_row->addItem( AlItem::newFromExternalLink( "http://www.mediawiki.org/wiki/Extension:Semantic_Maps", $sm_docu_label ) ); |
| 107 | + |
| 108 | + return true; |
| 109 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/SemanticMaps.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 110 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Features/FormInputs/SM_FormInput.php |
— | — | @@ -0,0 +1,276 @@ |
| 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 | + private $coordinates; |
| 48 | + |
| 49 | + public function __construct( MapsMappingService $service ) { |
| 50 | + $this->mService = $service; |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * Validates and corrects the provided map properties, and the sets them as class fields. |
| 55 | + * |
| 56 | + * @param array $mapProperties |
| 57 | + * |
| 58 | + * @return boolean Indicates whether the map should be shown or not. |
| 59 | + */ |
| 60 | + protected final function setMapProperties( array $mapProperties ) { |
| 61 | + global $egMapsServices; |
| 62 | + |
| 63 | + /* |
| 64 | + * Assembliy of the allowed parameters and their information. |
| 65 | + * The main parameters (the ones that are shared by everything) are overidden |
| 66 | + * by the feature parameters (the ones specific to a feature). The result is then |
| 67 | + * again overidden by the service parameters (the ones specific to the service), |
| 68 | + * and finally by the specific parameters (the ones specific to a service-feature combination). |
| 69 | + */ |
| 70 | + $parameterInfo = array_merge_recursive( MapsMapper::getCommonParameters(), SMFormInputs::$parameters ); |
| 71 | + $parameterInfo = array_merge_recursive( $parameterInfo, $this->mService->getParameterInfo() ); |
| 72 | + $parameterInfo = array_merge_recursive( $parameterInfo, $this->specificParameters ); |
| 73 | + |
| 74 | + $manager = new ValidatorManager(); |
| 75 | + |
| 76 | + $showMap = $manager->manageParsedParameters( $mapProperties, $parameterInfo ); |
| 77 | + |
| 78 | + if ( $showMap ) { |
| 79 | + $parameters = $manager->getParameters( false ); |
| 80 | + |
| 81 | + foreach ( $parameters as $paramName => $paramValue ) { |
| 82 | + if ( !property_exists( __CLASS__, $paramName ) ) { |
| 83 | + $this-> { $paramName } = $paramValue; |
| 84 | + } |
| 85 | + else { |
| 86 | + // If this happens in any way, it could be a big vunerability, so throw an exception. |
| 87 | + throw new Exception( 'Attempt to override a class field during map property assignment. Field name: ' . $paramName ); |
| 88 | + } |
| 89 | + } |
| 90 | + } |
| 91 | + |
| 92 | + $this->errorList = $manager->getErrorList(); |
| 93 | + |
| 94 | + return $showMap; |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * This function is a hook for Semantic Forms, and returns the HTML needed in |
| 99 | + * the form to handle coordinate data. |
| 100 | + * |
| 101 | + * @return array |
| 102 | + * |
| 103 | + * TODO: Use function args for sf stuffz |
| 104 | + */ |
| 105 | + public final function formInputHTML( $coordinates, $input_name, $is_mandatory, $is_disabled, $field_args ) { |
| 106 | + global $sfgTabIndex; |
| 107 | + |
| 108 | + $this->coordinates = $coordinates; |
| 109 | + |
| 110 | + $this->setMapSettings(); |
| 111 | + |
| 112 | + $showInput = $this->setMapProperties( $field_args ); |
| 113 | + |
| 114 | + if ( !$showInput ) { |
| 115 | + return array( $this->errorList ); |
| 116 | + } |
| 117 | + |
| 118 | + $this->doMapServiceLoad(); |
| 119 | + |
| 120 | + $this->manageGeocoding(); |
| 121 | + |
| 122 | + $this->setCoordinates(); |
| 123 | + $this->setCentre(); |
| 124 | + $this->setZoom(); |
| 125 | + |
| 126 | + // Create html element names. |
| 127 | + $this->geocodeFieldName = $this->elementNamePrefix . '_geocode_' . $this->elementNr . '_' . $sfgTabIndex; |
| 128 | + $this->coordsFieldName = $this->elementNamePrefix . '_coords_' . $this->elementNr . '_' . $sfgTabIndex; |
| 129 | + $this->infoFieldName = $this->elementNamePrefix . '_info_' . $this->elementNr . '_' . $sfgTabIndex; |
| 130 | + |
| 131 | + // Create the non specific form HTML. |
| 132 | + $this->output .= Html::input( |
| 133 | + $input_name, |
| 134 | + $this->markerCoords ? MapsCoordinateParser::formatCoordinates( $this->markerCoords ) : '', |
| 135 | + 'text', |
| 136 | + array( |
| 137 | + 'size' => 42, |
| 138 | + 'tabindex' => $sfgTabIndex, |
| 139 | + 'id' => $this->coordsFieldName |
| 140 | + ) |
| 141 | + ); |
| 142 | + |
| 143 | + $this->output .= Html::element( |
| 144 | + 'span', |
| 145 | + array( |
| 146 | + 'class' => 'error_message', |
| 147 | + 'id' => $this->infoFieldName |
| 148 | + ) |
| 149 | + ); |
| 150 | + |
| 151 | + if ( $this->enableGeocoding ) $this->addGeocodingField(); |
| 152 | + |
| 153 | + if ( $this->markerCoords === false ) { |
| 154 | + $this->markerCoords = array( |
| 155 | + 'lat' => 'null', |
| 156 | + 'lon' => 'null' |
| 157 | + ); |
| 158 | + $this->centreLat = 'null'; |
| 159 | + $this->centreLon = 'null'; |
| 160 | + } |
| 161 | + |
| 162 | + $this->addSpecificMapHTML(); |
| 163 | + |
| 164 | + return array( $this->output . $this->errorList, '' ); |
| 165 | + } |
| 166 | + |
| 167 | + private function addGeocodingField() { |
| 168 | + global $sfgTabIndex, $wgOut, $smgAddedFormJs; |
| 169 | + $sfgTabIndex++; |
| 170 | + |
| 171 | + if ( !$smgAddedFormJs ) { |
| 172 | + $smgAddedFormJs = true; |
| 173 | + |
| 174 | + $n = Xml::escapeJsString( wfMsgForContent( 'maps-abb-north' ) ); |
| 175 | + $e = Xml::escapeJsString( wfMsgForContent( 'maps-abb-east' ) ); |
| 176 | + $s = Xml::escapeJsString( wfMsgForContent( 'maps-abb-south' ) ); |
| 177 | + $w = Xml::escapeJsString( wfMsgForContent( 'maps-abb-west' ) ); |
| 178 | + $deg = Xml::escapeJsString( Maps_GEO_DEG ); |
| 179 | + |
| 180 | + $wgOut->addInlineScript( |
| 181 | + <<<EOT |
| 182 | +function convertLatToDMS (val) { |
| 183 | + return Math.abs(val) + "$deg " + ( val < 0 ? "$s" : "$n" ); |
| 184 | +} |
| 185 | +function convertLngToDMS (val) { |
| 186 | + return Math.abs(val) + "$deg " + ( val < 0 ? "$w" : "$e" ); |
| 187 | +} |
| 188 | +EOT |
| 189 | + ); |
| 190 | + } |
| 191 | + |
| 192 | + $adress_field = SMFormInput::getDynamicInput( |
| 193 | + $this->geocodeFieldName, |
| 194 | + wfMsg( 'semanticmaps_enteraddresshere' ), |
| 195 | + 'size="30" name="geocode" style="color: #707070" tabindex="' . htmlspecialchars( $sfgTabIndex ) . '"' |
| 196 | + ); |
| 197 | + |
| 198 | + $notFoundText = Xml::escapeJsString( wfMsg( 'semanticmaps_notfound' ) ); |
| 199 | + $mapName = Xml::escapeJsString( $this->mapName ); |
| 200 | + $geoFieldName = Xml::escapeJsString( $this->geocodeFieldName ); |
| 201 | + $coordFieldName = Xml::escapeJsString( $this->coordsFieldName ); |
| 202 | + |
| 203 | + $this->output .= '<p>' . $adress_field . |
| 204 | + Html::input( |
| 205 | + 'geosubmit', |
| 206 | + wfMsg( 'semanticmaps_lookupcoordinates' ), |
| 207 | + 'submit', |
| 208 | + array( |
| 209 | + 'onClick' => "$this->showAddresFunction( document.forms['createbox'].$geoFieldName.value, '$mapName', '$coordFieldName', '$notFoundText'); return false" |
| 210 | + ) |
| 211 | + ) . |
| 212 | + '</p>'; |
| 213 | + } |
| 214 | + |
| 215 | + /** |
| 216 | + * Sets the zoom so the whole map is visible in case there is no maker yet, |
| 217 | + * and sets it to the default when there is a marker but no zoom parameter. |
| 218 | + */ |
| 219 | + private function setZoom() { |
| 220 | + if ( empty( $this->coordinates ) ) { |
| 221 | + $this->zoom = $this->earthZoom; |
| 222 | + } else if ( $this->zoom == 'null' ) { |
| 223 | + $this->zoom = $this->defaultZoom; |
| 224 | + } |
| 225 | + } |
| 226 | + |
| 227 | + /** |
| 228 | + * Sets the $this->markerCoords value, which are the coordinates for the marker. |
| 229 | + */ |
| 230 | + private function setCoordinates() { |
| 231 | + if ( empty( $this->coordinates ) ) { |
| 232 | + // If no coordinates exist yet, no marker should be displayed. |
| 233 | + $this->markerCoords = false; |
| 234 | + } |
| 235 | + else { |
| 236 | + $this->markerCoords = MapsCoordinateParser::parseCoordinates( $this->coordinates ); |
| 237 | + } |
| 238 | + } |
| 239 | + |
| 240 | + /** |
| 241 | + * Sets the $centreLat and $centreLon fields. |
| 242 | + * Note: this needs to be done AFTRE the maker coordinates are set. |
| 243 | + */ |
| 244 | + private function setCentre() { |
| 245 | + if ( empty( $this->centre ) ) { |
| 246 | + if ( isset( $this->coordinates ) ) { |
| 247 | + $this->centreLat = $this->markerCoords['lat']; |
| 248 | + $this->centreLon = $this->markerCoords['lon']; |
| 249 | + } |
| 250 | + else { |
| 251 | + $this->centreLat = '0'; |
| 252 | + $this->centreLon = '0'; |
| 253 | + } |
| 254 | + } |
| 255 | + else { |
| 256 | + // Geocode and convert if required. |
| 257 | + $centre = MapsGeocoder::attemptToGeocode( $this->centre, $this->geoservice, $this->serviceName ); |
| 258 | + |
| 259 | + $this->centreLat = Xml::escapeJsString( $centre['lat'] ); |
| 260 | + $this->centreLon = Xml::escapeJsString( $centre['lon'] ); |
| 261 | + } |
| 262 | + } |
| 263 | + |
| 264 | + /** |
| 265 | + * Returns html for an html input field with a default value that will automatically dissapear when |
| 266 | + * the user clicks in it, and reappers when the focus on the field is lost and it's still empty. |
| 267 | + * |
| 268 | + * @param string $id |
| 269 | + * @param string $value |
| 270 | + * @param string $args |
| 271 | + * |
| 272 | + * @return html |
| 273 | + */ |
| 274 | + private static function getDynamicInput( $id, $value, $args = '' ) { |
| 275 | + return '<input id="' . $id . '" ' . $args . ' value="' . $value . '" onfocus="if (this.value==\'' . $value . '\') {this.value=\'\';}" onblur="if (this.value==\'\') {this.value=\'' . $value . '\';}" />'; |
| 276 | + } |
| 277 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/Features/FormInputs/SM_FormInput.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 278 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Features/FormInputs/SM_FormInputs.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 140 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Features/QueryPrinters/SM_QueryPrinters.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 182 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/Features/QueryPrinters/SM_MapPrinter.php |
— | — | @@ -0,0 +1,372 @@ |
| 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 | + /** |
| 38 | + * Map service specific map count and loading of dependencies. |
| 39 | + */ |
| 40 | + protected abstract function doMapServiceLoad(); |
| 41 | + |
| 42 | + protected abstract function getServiceName(); |
| 43 | + |
| 44 | + /** |
| 45 | + * Gets the query result. |
| 46 | + */ |
| 47 | + protected abstract function addSpecificMapHTML(); |
| 48 | + |
| 49 | + protected $mService; |
| 50 | + |
| 51 | + protected $mLocations = array(); |
| 52 | + |
| 53 | + protected $defaultZoom; |
| 54 | + |
| 55 | + protected $centreLat; |
| 56 | + protected $centreLon; |
| 57 | + |
| 58 | + protected $output = ''; |
| 59 | + protected $mErrorList; |
| 60 | + |
| 61 | + protected $mMapFeature; |
| 62 | + |
| 63 | + protected $featureParameters = array(); |
| 64 | + protected $specificParameters = array(); |
| 65 | + |
| 66 | + public function __construct( $format, $inline, /* MapsMappingService */ $service = null ) { |
| 67 | + // 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. |
| 68 | + if ( $service == null ) { |
| 69 | + global $egMapsServices; |
| 70 | + $service = $egMapsServices[$this->getServiceName()]; |
| 71 | + } |
| 72 | + |
| 73 | + $this->mService = $service; |
| 74 | + } |
| 75 | + |
| 76 | + /** |
| 77 | + * Builds up and returns the HTML for the map, with the queried coordinate data on it. |
| 78 | + * |
| 79 | + * @param unknown_type $res |
| 80 | + * @param unknown_type $outputmode |
| 81 | + * |
| 82 | + * @return array |
| 83 | + */ |
| 84 | + public final function getResultText( $res, $outputmode ) { |
| 85 | + $this->setQueryPrinterSettings(); |
| 86 | + |
| 87 | + $this->featureParameters = SMQueryPrinters::$parameters; |
| 88 | + |
| 89 | + if ( self::manageMapProperties( $this->m_params ) ) { |
| 90 | + $this->formatResultData( $res, $outputmode ); |
| 91 | + |
| 92 | + // Only create a map when there is at least one result. |
| 93 | + if ( count( $this->mLocations ) > 0 || $this->forceshow ) { |
| 94 | + $this->doMapServiceLoad(); |
| 95 | + |
| 96 | + $this->setMapName(); |
| 97 | + |
| 98 | + $this->setZoom(); |
| 99 | + |
| 100 | + $this->setCentre(); |
| 101 | + |
| 102 | + $this->addSpecificMapHTML(); |
| 103 | + |
| 104 | + $dependencies = $this->mService->getDependencyHtml(); |
| 105 | + $hash = md5( $dependencies ); |
| 106 | + SMWOutputs::requireHeadItem( $hash, $dependencies ); |
| 107 | + } |
| 108 | + else { |
| 109 | + // TODO: add warning when level high enough and append to error list? |
| 110 | + } |
| 111 | + } |
| 112 | + |
| 113 | + return array( $this->output . $this->mErrorList, 'noparse' => true, 'isHTML' => true ); |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * Validates and corrects the provided map properties, and the sets them as class fields. |
| 118 | + * |
| 119 | + * @param array $mapProperties |
| 120 | + * |
| 121 | + * @return boolean Indicates whether the map should be shown or not. |
| 122 | + */ |
| 123 | + protected final function manageMapProperties( array $mapProperties ) { |
| 124 | + global $egMapsServices; |
| 125 | + |
| 126 | + /* |
| 127 | + * Assembliy of the allowed parameters and their information. |
| 128 | + * The main parameters (the ones that are shared by everything) are overidden |
| 129 | + * by the feature parameters (the ones specific to a feature). The result is then |
| 130 | + * again overidden by the service parameters (the ones specific to the service), |
| 131 | + * and finally by the specific parameters (the ones specific to a service-feature combination). |
| 132 | + */ |
| 133 | + $parameterInfo = array_merge_recursive( MapsMapper::getCommonParameters(), $this->featureParameters ); |
| 134 | + $parameterInfo = array_merge_recursive( $parameterInfo, $this->mService->getParameterInfo() ); |
| 135 | + $parameterInfo = array_merge_recursive( $parameterInfo, $this->specificParameters ); |
| 136 | + |
| 137 | + $manager = new ValidatorManager(); |
| 138 | + |
| 139 | + $showMap = $manager->manageParsedParameters( $mapProperties, $parameterInfo ); |
| 140 | + |
| 141 | + if ( $showMap ) { |
| 142 | + $this->setMapProperties( $manager->getParameters( false ) ); |
| 143 | + } |
| 144 | + |
| 145 | + $this->mErrorList = $manager->getErrorList(); |
| 146 | + |
| 147 | + return $showMap; |
| 148 | + } |
| 149 | + |
| 150 | + /** |
| 151 | + * Sets the map properties as class fields. |
| 152 | + * |
| 153 | + * @param array $mapProperties |
| 154 | + */ |
| 155 | + private function setMapProperties( array $mapProperties ) { |
| 156 | + foreach ( $mapProperties as $paramName => $paramValue ) { |
| 157 | + if ( !property_exists( __CLASS__, $paramName ) ) { |
| 158 | + $this-> { $paramName } = $paramValue; |
| 159 | + } |
| 160 | + else { |
| 161 | + throw new Exception( 'Attempt to override a class field during map propertie assignment. Field name: ' . $paramName ); |
| 162 | + } |
| 163 | + } |
| 164 | + } |
| 165 | + |
| 166 | + public final function getResult( $results, $params, $outputmode ) { |
| 167 | + // Skip checks, results with 0 entries are normal. |
| 168 | + $this->readParameters( $params, $outputmode ); |
| 169 | + |
| 170 | + return $this->getResultText( $results, SMW_OUTPUT_HTML ); |
| 171 | + } |
| 172 | + |
| 173 | + private function formatResultData( $res, $outputmode ) { |
| 174 | + while ( ( $row = $res->getNext() ) !== false ) { |
| 175 | + $this->addResultRow( $outputmode, $row ); |
| 176 | + } |
| 177 | + } |
| 178 | + |
| 179 | + /** |
| 180 | + * This function will loop through all properties (fields) of one record (row), |
| 181 | + * and add the location data, title, label and icon to the m_locations array. |
| 182 | + * |
| 183 | + * @param unknown_type $outputmode |
| 184 | + * @param array $row The record you want to add data from |
| 185 | + */ |
| 186 | + private function addResultRow( $outputmode, array $row ) { |
| 187 | + global $wgUser, $smgUseSpatialExtensions; |
| 188 | + |
| 189 | + $skin = $wgUser->getSkin(); |
| 190 | + |
| 191 | + $title = ''; |
| 192 | + $titleForTemplate = ''; |
| 193 | + $text = ''; |
| 194 | + $lat = ''; |
| 195 | + $lon = ''; |
| 196 | + |
| 197 | + $coords = array(); |
| 198 | + $label = array(); |
| 199 | + |
| 200 | + // Loop throught all fields of the record. |
| 201 | + foreach ( $row as $i => $field ) { |
| 202 | + $pr = $field->getPrintRequest(); |
| 203 | + |
| 204 | + // Loop throught all the parts of the field value. |
| 205 | + while ( ( $object = $field->getNextObject() ) !== false ) { |
| 206 | + if ( $object->getTypeID() == '_wpg' && $i == 0 ) { |
| 207 | + if ( $this->showtitle ) $title = $object->getLongText( $outputmode, $skin ); |
| 208 | + if ( $this->template ) $titleForTemplate = $object->getLongText( $outputmode, NULL ); |
| 209 | + } |
| 210 | + |
| 211 | + if ( $object->getTypeID() != '_geo' && $i != 0 ) { |
| 212 | + if ( $this->template ) { |
| 213 | + if ( $object instanceof SMWWikiPageValue ) { |
| 214 | + $label[] = $object->getTitle()->getPrefixedText(); |
| 215 | + } else { |
| 216 | + $label[] = $object->getLongText( $outputmode, $skin ); |
| 217 | + } |
| 218 | + } |
| 219 | + else { |
| 220 | + $text .= $pr->getHTMLText( $skin ) . ': ' . $object->getLongText( $outputmode, $skin ) . '<br />'; |
| 221 | + } |
| 222 | + } |
| 223 | + |
| 224 | + if ( $pr->getMode() == SMWPrintRequest::PRINT_PROP && $pr->getTypeID() == '_geo' ) { |
| 225 | + $coords[] = $object->getDBkeys(); |
| 226 | + } |
| 227 | + } |
| 228 | + } |
| 229 | + |
| 230 | + foreach ( $coords as $coord ) { |
| 231 | + if ( count( $coord ) >= 2 ) { |
| 232 | + if ( $smgUseSpatialExtensions ) { |
| 233 | + // TODO |
| 234 | + } |
| 235 | + else { |
| 236 | + list( $lat, $lon ) = $coord; |
| 237 | + } |
| 238 | + |
| 239 | + if ( $lat != '' && $lon != '' ) { |
| 240 | + $icon = $this->getLocationIcon( $row ); |
| 241 | + |
| 242 | + if ( $this->template ) { |
| 243 | + global $wgParser; |
| 244 | + |
| 245 | + $segments = array_merge( |
| 246 | + array( $this->template, 'title=' . $titleForTemplate, 'latitude=' . $lat, 'longitude=' . $lon ), |
| 247 | + $label |
| 248 | + ); |
| 249 | + |
| 250 | + $text = preg_replace( '/\n+/m', '<br />', $wgParser->recursiveTagParse( '{{' . implode( '|', $segments ) . '}}' ) ); |
| 251 | + } |
| 252 | + |
| 253 | + $this->mLocations[] = array( |
| 254 | + Xml::escapeJsString( $lat ), |
| 255 | + Xml::escapeJsString( $lon ), |
| 256 | + Xml::escapeJsString( $title ), |
| 257 | + Xml::escapeJsString( $text ), |
| 258 | + Xml::escapeJsString( $icon ) |
| 259 | + ); |
| 260 | + } |
| 261 | + } |
| 262 | + } |
| 263 | + } |
| 264 | + |
| 265 | + /** |
| 266 | + * Get the icon for a row. |
| 267 | + * |
| 268 | + * @param array $row |
| 269 | + * |
| 270 | + * @return string |
| 271 | + */ |
| 272 | + private function getLocationIcon( array $row ) { |
| 273 | + $icon = ''; |
| 274 | + $legend_labels = array(); |
| 275 | + |
| 276 | + // Look for display_options field, which can be set by Semantic Compound Queries |
| 277 | + // the location of this field changed in SMW 1.5 |
| 278 | + $display_location = method_exists( $row[0], 'getResultSubject' ) ? $display_location = $row[0]->getResultSubject() : $row[0]; |
| 279 | + |
| 280 | + if ( property_exists( $display_location, 'display_options' ) && is_array( $display_location->display_options ) ) { |
| 281 | + $display_options = $display_location->display_options; |
| 282 | + if ( array_key_exists( 'icon', $display_options ) ) { |
| 283 | + $icon = $display_options['icon']; |
| 284 | + |
| 285 | + // 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 |
| 286 | + if ( array_key_exists( 'legend label', $display_options ) ) { |
| 287 | + |
| 288 | + $legend_label = $display_options['legend label']; |
| 289 | + |
| 290 | + if ( ! array_key_exists( $icon, $legend_labels ) ) { |
| 291 | + $legend_labels[$icon] = $legend_label; |
| 292 | + } |
| 293 | + } |
| 294 | + } |
| 295 | + } // Icon can be set even for regular, non-compound queries If it is, though, we have to translate the name into a URL here |
| 296 | + elseif ( $this->icon != '' ) { |
| 297 | + $icon_image_page = new ImagePage( Title::newFromText( $this->icon ) ); |
| 298 | + $icon = $icon_image_page->getDisplayedFile()->getURL(); |
| 299 | + } |
| 300 | + |
| 301 | + return $icon; |
| 302 | + } |
| 303 | + |
| 304 | + /** |
| 305 | + * Sets the zoom level to the provided value, or when not set, to the default. |
| 306 | + */ |
| 307 | + private function setZoom() { |
| 308 | + if ( strlen( $this->zoom ) < 1 ) { |
| 309 | + if ( count( $this->mLocations ) > 1 ) { |
| 310 | + $this->zoom = 'null'; |
| 311 | + } |
| 312 | + else { |
| 313 | + $this->zoom = $this->defaultZoom; |
| 314 | + } |
| 315 | + } |
| 316 | + } |
| 317 | + |
| 318 | + /** |
| 319 | + * Sets the $centre_lat and $centre_lon fields. |
| 320 | + * Note: this needs to be done AFTRE the maker coordinates are set. |
| 321 | + */ |
| 322 | + private function setCentre() { |
| 323 | + // If a centre value is set, use it. |
| 324 | + if ( strlen( $this->centre ) > 0 ) { |
| 325 | + // Geocode and convert if required. |
| 326 | + $centre = MapsGeocoder::attemptToGeocode( $this->centre, $this->geoservice, $this->serviceName ); |
| 327 | + |
| 328 | + $this->centreLat = $centre['lat']; |
| 329 | + $this->centreLon = $centre['lon']; |
| 330 | + } |
| 331 | + elseif ( count( $this->mLocations ) > 1 ) { |
| 332 | + // 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. |
| 333 | + $this->centreLat = 'null'; |
| 334 | + $this->centreLon = 'null'; |
| 335 | + } |
| 336 | + elseif ( count( $this->mLocations ) == 1 ) { |
| 337 | + // If centre is not set and there is exactelly one marker, use it's coordinates. |
| 338 | + $this->centreLat = Xml::escapeJsString( $this->mLocations[0][0] ); |
| 339 | + $this->centreLon = Xml::escapeJsString( $this->mLocations[0][1] ); |
| 340 | + } |
| 341 | + else { |
| 342 | + // If centre is not set and there are no results, centre on the default coordinates. |
| 343 | + global $egMapsMapLat, $egMapsMapLon; |
| 344 | + |
| 345 | + $this->centreLat = $egMapsMapLat; |
| 346 | + $this->centreLon = $egMapsMapLon; |
| 347 | + } |
| 348 | + } |
| 349 | + |
| 350 | + /** |
| 351 | + * Sets the $mapName field, using the $elementNamePrefix and $elementNr. |
| 352 | + */ |
| 353 | + protected function setMapName() { |
| 354 | + $this->mapName = $this->elementNamePrefix . '_' . $this->elementNr; |
| 355 | + } |
| 356 | + |
| 357 | + public final function getName() { |
| 358 | + return wfMsg( 'maps_' . $this->mService->getName() ); |
| 359 | + } |
| 360 | + |
| 361 | + public function getParameters() { |
| 362 | + global $egMapsMapWidth, $egMapsMapHeight; |
| 363 | + |
| 364 | + $params = parent::exportFormatParameters(); |
| 365 | + |
| 366 | + $params[] = array( 'name' => 'zoom', 'type' => 'int', 'description' => wfMsg( 'semanticmaps_paramdesc_zoom' ) ); |
| 367 | + $params[] = array( 'name' => 'width', 'type' => 'int', 'description' => wfMsgExt( 'semanticmaps_paramdesc_width', 'parsemag', $egMapsMapWidth ) ); |
| 368 | + $params[] = array( 'name' => 'height', 'type' => 'int', 'description' => wfMsgExt( 'semanticmaps_paramdesc_height', 'parsemag', $egMapsMapHeight ) ); |
| 369 | + |
| 370 | + return $params; |
| 371 | + } |
| 372 | + |
| 373 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticMaps/REL_0_6_3/Features/QueryPrinters/SM_MapPrinter.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 374 | + native |
Index: tags/extensions/SemanticMaps/REL_0_6_3/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_3/Features/QueryPrinters/SM_Mapper.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 67 | + native |