Index: tags/extensions/SemanticMaps/REL_0_5/YahooMaps/SM_YahooMapsFunctions.js |
— | — | @@ -0,0 +1,54 @@ |
| 2 | + /**
|
| 3 | + * Javascript functions for Yahoo! Maps functionallity 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 spesific functionallity 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, height) {
|
| 16 | + var map = createYahooMap(document.getElementById(mapName), new YGeoPoint(lat, lon), zoom, type, types, controls, scrollWheelZoom, [getYMarkerData(marker_lat, marker_lon, '', '', '')], height);
|
| 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 spesific functionallity 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 | +} |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/YahooMaps/SM_YahooMaps.php |
— | — | @@ -0,0 +1,24 @@ |
| 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 | +$egMapsServices['yahoomaps']['qp'] = array('class' => 'SMYahooMapsQP', 'file' => 'SemanticMaps/YahooMaps/SM_YahooMapsQP.php', 'local' => false);
|
| 25 | +$egMapsServices['yahoomaps']['fi'] = array('class' => 'SMYahooMapsFormInput', 'file' => 'SemanticMaps/YahooMaps/SM_YahooMapsFormInput.php', 'local' => false); |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/YahooMaps/SM_YahooMapsQP.php |
— | — | @@ -0,0 +1,105 @@ |
| 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 | + public $serviceName = MapsYahooMaps::SERVICE_NAME;
|
| 19 | +
|
| 20 | + /**
|
| 21 | + * @see SMMapPrinter::setQueryPrinterSettings()
|
| 22 | + *
|
| 23 | + */
|
| 24 | + protected function setQueryPrinterSettings() {
|
| 25 | + global $egMapsYahooMapsZoom, $egMapsYahooMapsPrefix;
|
| 26 | +
|
| 27 | + $this->elementNamePrefix = $egMapsYahooMapsPrefix;
|
| 28 | +
|
| 29 | + $this->defaultZoom = $egMapsYahooMapsZoom;
|
| 30 | +
|
| 31 | + $this->spesificParameters = array(
|
| 32 | + 'zoom' => array(
|
| 33 | + 'default' => '',
|
| 34 | + )
|
| 35 | + );
|
| 36 | + }
|
| 37 | +
|
| 38 | + /**
|
| 39 | + * @see SMMapPrinter::doMapServiceLoad()
|
| 40 | + *
|
| 41 | + */
|
| 42 | + protected function doMapServiceLoad() {
|
| 43 | + global $egYahooMapsOnThisPage;
|
| 44 | +
|
| 45 | + MapsYahooMaps::addYMapDependencies($this->output);
|
| 46 | + $egYahooMapsOnThisPage++;
|
| 47 | +
|
| 48 | + $this->elementNr = $egYahooMapsOnThisPage;
|
| 49 | + }
|
| 50 | +
|
| 51 | + /**
|
| 52 | + * @see SMMapPrinter::addSpecificMapHTML()
|
| 53 | + *
|
| 54 | + */
|
| 55 | + protected function addSpecificMapHTML() {
|
| 56 | + global $wgJsMimeType;
|
| 57 | +
|
| 58 | + $this->type = MapsYahooMaps::getYMapType($this->type, true);
|
| 59 | + $this->controls = MapsMapper::createJSItemsString($this->controls);
|
| 60 | +
|
| 61 | + $this->autozoom = MapsYahooMaps::getAutozoomJSValue($this->autozoom);
|
| 62 | +
|
| 63 | + $markerItems = array();
|
| 64 | +
|
| 65 | + foreach ($this->m_locations as $location) {
|
| 66 | + // Create a string containing the marker JS
|
| 67 | + list($lat, $lon, $title, $label, $icon) = $location;
|
| 68 | +
|
| 69 | + $title = str_replace("'", "\'", $title);
|
| 70 | + $label = str_replace("'", "\'", $label);
|
| 71 | +
|
| 72 | + $markerItems[] = "getYMarkerData($lat, $lon, '$title', '$label', '$icon')";
|
| 73 | + }
|
| 74 | +
|
| 75 | + $markersString = implode(',', $markerItems);
|
| 76 | +
|
| 77 | + $typesString = MapsYahooMaps::createTypesString($this->types);
|
| 78 | +
|
| 79 | + $this->output .= "
|
| 80 | + <div id='$this->mapName' style='width: {$this->width}px; height: {$this->height}px;'></div>
|
| 81 | +
|
| 82 | + <script type='$wgJsMimeType'>/*<![CDATA[*/
|
| 83 | + addOnloadHook(
|
| 84 | + initializeYahooMap('$this->mapName', $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, [$markersString], $this->height)
|
| 85 | + );
|
| 86 | + /*]]>*/</script>";
|
| 87 | +
|
| 88 | + }
|
| 89 | +
|
| 90 | + /**
|
| 91 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the spesific ones to the list.
|
| 92 | + */
|
| 93 | + public function getParameters() {
|
| 94 | + $params = parent::getParameters();
|
| 95 | +
|
| 96 | + $allowedTypes = MapsYahooMaps::getTypeNames();
|
| 97 | +
|
| 98 | + $params[] = array('name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg('semanticmaps_paramdesc_controls'), 'values' => MapsYahooMaps::getControlNames());
|
| 99 | + $params[] = array('name' => 'types', 'type' => 'enum-list', 'description' => wfMsg('semanticmaps_paramdesc_types'), 'values' => $allowedTypes);
|
| 100 | + $params[] = array('name' => 'type', 'type' => 'enumeration', 'description' => wfMsg('semanticmaps_paramdesc_type'), 'values' => $allowedTypes);
|
| 101 | + $params[] = array('name' => 'autozoom', 'type' => 'enumeration', 'description' => wfMsg('semanticmaps_paramdesc_autozoom'), 'values' => array('on', 'off'));
|
| 102 | +
|
| 103 | + return $params;
|
| 104 | + }
|
| 105 | +
|
| 106 | +} |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/YahooMaps/SM_YahooMapsFormInput.php |
— | — | @@ -0,0 +1,100 @@ |
| 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 | + public $serviceName = MapsYahooMaps::SERVICE_NAME; |
| 20 | +
|
| 21 | + /** |
| 22 | + * @see MapsMapFeature::setMapSettings() |
| 23 | + * |
| 24 | + */ |
| 25 | + protected function setMapSettings() { |
| 26 | + global $egMapsYahooMapsZoom, $egMapsYahooMapsPrefix; |
| 27 | + |
| 28 | + $this->elementNamePrefix = $egMapsYahooMapsPrefix; |
| 29 | + $this->showAddresFunction = 'showYAddress'; |
| 30 | + |
| 31 | + $this->earthZoom = 17; |
| 32 | + |
| 33 | + $this->defaultZoom = $egMapsYahooMapsZoom; |
| 34 | + } |
| 35 | + |
| 36 | + /** |
| 37 | + * @see MapsMapFeature::addFormDependencies() |
| 38 | + * |
| 39 | + */ |
| 40 | + protected function addFormDependencies() { |
| 41 | + global $wgJsMimeType; |
| 42 | + global $smgScriptPath, $smgYahooFormsOnThisPage, $smgStyleVersion; |
| 43 | + |
| 44 | + MapsYahooMaps::addYMapDependencies($this->output); |
| 45 | + |
| 46 | + if (empty($smgYahooFormsOnThisPage)) { |
| 47 | + $smgYahooFormsOnThisPage = 0; |
| 48 | + $this->output .= "<script type='$wgJsMimeType' src='$smgScriptPath/YahooMaps/SM_YahooMapsFunctions.js?$smgStyleVersion'></script>"; |
| 49 | + } |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * @see MapsMapFeature::doMapServiceLoad() |
| 54 | + * |
| 55 | + */ |
| 56 | + protected function doMapServiceLoad() { |
| 57 | + global $egYahooMapsOnThisPage, $smgYahooFormsOnThisPage; |
| 58 | + |
| 59 | + self::addFormDependencies(); |
| 60 | + |
| 61 | + $egYahooMapsOnThisPage++; |
| 62 | + $smgYahooFormsOnThisPage++; |
| 63 | + |
| 64 | + $this->elementNr = $egYahooMapsOnThisPage; |
| 65 | + } |
| 66 | + |
| 67 | + /** |
| 68 | + * @see MapsMapFeature::addSpecificMapHTML() |
| 69 | + * |
| 70 | + */ |
| 71 | + protected function addSpecificMapHTML() { |
| 72 | + global $wgJsMimeType; |
| 73 | + |
| 74 | + $type = MapsYahooMaps::getYMapType($this->type, true); |
| 75 | + |
| 76 | + $this->autozoom = MapsYahooMaps::getAutozoomJSValue($this->autozoom); |
| 77 | + |
| 78 | + $this->controls = MapsMapper::createJSItemsString($this->controls); |
| 79 | + |
| 80 | + $typesString = MapsYahooMaps::createTypesString($this->types); |
| 81 | + |
| 82 | + $this->output .=" |
| 83 | + <div id='".$this->mapName."' style='width: {$this->width}px; height: {$this->height}px;'></div> |
| 84 | + |
| 85 | + <script type='$wgJsMimeType'>/*<![CDATA[*/ |
| 86 | + addOnloadHook(makeFormInputYahooMap('$this->mapName', '$this->coordsFieldName', $this->centre_lat, $this->centre_lon, $this->zoom, $type, [$typesString], [$this->controls], $this->autozoom, $this->marker_lat, $this->centre_lon, $this->height)); |
| 87 | + /*]]>*/</script>"; |
| 88 | + }
|
| 89 | +
|
| 90 | + /** |
| 91 | + * @see SMFormInput::manageGeocoding() |
| 92 | + * |
| 93 | + */
|
| 94 | + protected function manageGeocoding() { |
| 95 | + global $egYahooMapsKey; |
| 96 | + $this->enableGeocoding = strlen(trim($egYahooMapsKey)) > 0; |
| 97 | + if ($this->enableGeocoding) MapsYahooMaps::addYMapDependencies($this->output);
|
| 98 | + } |
| 99 | +
|
| 100 | + |
| 101 | +} |
Index: tags/extensions/SemanticMaps/REL_0_5/OpenLayers/SM_OpenLayersFunctions.js |
— | — | @@ -0,0 +1,93 @@ |
| 2 | + /**
|
| 3 | + * Javascript functions for OpenLayers functionallity 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 spesific functionallity for the Open Layers form input of Semantic Maps
|
| 13 | + * TODO: Refactor as much code as possible to non specific functions
|
| 14 | + */
|
| 15 | +function makeFormInputOpenLayer(mapName, locationFieldName, lat, lon, zoom, marker_lat, marker_lon, layers, controls, height) {
|
| 16 | + var markers = Array();
|
| 17 | +
|
| 18 | + // Show a starting marker only if marker coordinates are provided
|
| 19 | + if (marker_lat != null && marker_lon != null) {
|
| 20 | + markers.push(getOLMarkerData(marker_lon, marker_lat, '', ''));
|
| 21 | + }
|
| 22 | +
|
| 23 | + // Click event handler for updating the location of the marker
|
| 24 | + // TODO / FIXME: This will probably cause problems when used for multiple maps on one page.
|
| 25 | + OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
|
| 26 | + defaultHandlerOptions: {
|
| 27 | + 'single': true,
|
| 28 | + 'double': false,
|
| 29 | + 'pixelTolerance': 0,
|
| 30 | + 'stopSingle': false,
|
| 31 | + 'stopDouble': false
|
| 32 | + },
|
| 33 | +
|
| 34 | + initialize: function(options) {
|
| 35 | + this.handlerOptions = OpenLayers.Util.extend(
|
| 36 | + {}, this.defaultHandlerOptions
|
| 37 | + );
|
| 38 | + OpenLayers.Control.prototype.initialize.apply(
|
| 39 | + this, arguments
|
| 40 | + );
|
| 41 | + this.handler = new OpenLayers.Handler.Click(
|
| 42 | + this, {
|
| 43 | + 'click': this.trigger
|
| 44 | + }, this.handlerOptions
|
| 45 | + );
|
| 46 | + },
|
| 47 | +
|
| 48 | + trigger: function(e) {
|
| 49 | + replaceMarker(mapName, map.getLonLatFromViewPortPx(e.xy));
|
| 50 | + document.getElementById(locationFieldName).value = convertLatToDMS(map.getLonLatFromViewPortPx(e.xy).lat)+', '+convertLngToDMS(map.getLonLatFromViewPortPx(e.xy).lon);
|
| 51 | + }
|
| 52 | +
|
| 53 | + });
|
| 54 | +
|
| 55 | + var clickHanler = new OpenLayers.Control.Click();
|
| 56 | + controls.push(clickHanler);
|
| 57 | +
|
| 58 | + var map = initOpenLayer(mapName, lon, lat, zoom, layers, controls, markers, height);
|
| 59 | +
|
| 60 | + // Make the map variable available for other functions
|
| 61 | + if (!window.OLMaps) window.OLMaps = new Object;
|
| 62 | + eval("window.OLMaps." + mapName + " = map;");
|
| 63 | +}
|
| 64 | +
|
| 65 | +/**
|
| 66 | + * Remove all markers from an OL map (that's in window.OLMaps), and place a new one.
|
| 67 | + *
|
| 68 | + * @param mapName Name of the map as in OLMaps[mapName].
|
| 69 | + * @param newLocation The location for the new marker.
|
| 70 | + * @return
|
| 71 | + */
|
| 72 | +function replaceMarker(mapName, newLocation) {
|
| 73 | + var map = OLMaps[mapName];
|
| 74 | + var markerLayer = map.getLayer('markerLayer');
|
| 75 | +
|
| 76 | + removeMarkers(markerLayer);
|
| 77 | + markerLayer.addMarker(getOLMarker(markerLayer, getOLMarkerData(newLocation.lon, newLocation.lat, '', ''), map.getProjectionObject()));
|
| 78 | +
|
| 79 | + map.panTo(newLocation);
|
| 80 | +}
|
| 81 | +
|
| 82 | +/**
|
| 83 | + * Removes all markers from a marker layer.
|
| 84 | + *
|
| 85 | + * @param markerLayer The layer to remove all markers from.
|
| 86 | + * @return
|
| 87 | + */
|
| 88 | +function removeMarkers(markerLayer) {
|
| 89 | + var markerCollection = markerLayer.markers;
|
| 90 | +
|
| 91 | + for (i in markerCollection) {
|
| 92 | + markerLayer.removeMarker(markerCollection[i]);
|
| 93 | + }
|
| 94 | +} |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/OpenLayers/SM_OpenLayers.php |
— | — | @@ -0,0 +1,24 @@ |
| 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 | +$egMapsServices['openlayers']['qp'] = array('class' => 'SMOpenLayersQP', 'file' => 'SemanticMaps/OpenLayers/SM_OpenLayersQP.php', 'local' => false);
|
| 25 | +$egMapsServices['openlayers']['fi'] = array('class' => 'SMOpenLayersFormInput', 'file' => 'SemanticMaps/OpenLayers/SM_OpenLayersFormInput.php', 'local' => false); |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/OpenLayers/SM_OpenLayersQP.php |
— | — | @@ -0,0 +1,95 @@ |
| 2 | +<?php
|
| 3 | +
|
| 4 | +/**
|
| 5 | + * A query printer for maps using the Open Layers API
|
| 6 | + *
|
| 7 | + * @file SM_OpenLayersQP.php
|
| 8 | + * @ingroup SMOpenLayers
|
| 9 | + *
|
| 10 | + * @author Jeroen De Dauw
|
| 11 | + */
|
| 12 | +
|
| 13 | +if( !defined( 'MEDIAWIKI' ) ) {
|
| 14 | + die( 'Not an entry point.' );
|
| 15 | +}
|
| 16 | +
|
| 17 | +final class SMOpenLayersQP extends SMMapPrinter {
|
| 18 | +
|
| 19 | + public $serviceName = MapsOpenLayers::SERVICE_NAME;
|
| 20 | +
|
| 21 | + /**
|
| 22 | + * @see SMMapPrinter::setQueryPrinterSettings()
|
| 23 | + *
|
| 24 | + */
|
| 25 | + protected function setQueryPrinterSettings() {
|
| 26 | + global $egMapsOpenLayersZoom, $egMapsOpenLayersPrefix;
|
| 27 | +
|
| 28 | + $this->elementNamePrefix = $egMapsOpenLayersPrefix;
|
| 29 | + $this->defaultZoom = $egMapsOpenLayersZoom;
|
| 30 | +
|
| 31 | + $this->spesificParameters = array(
|
| 32 | + 'zoom' => array(
|
| 33 | + 'default' => '',
|
| 34 | + )
|
| 35 | + );
|
| 36 | + }
|
| 37 | +
|
| 38 | + /**
|
| 39 | + * @see SMMapPrinter::doMapServiceLoad()
|
| 40 | + *
|
| 41 | + */
|
| 42 | + protected function doMapServiceLoad() {
|
| 43 | + global $egOpenLayersOnThisPage;
|
| 44 | +
|
| 45 | + MapsOpenLayers::addOLDependencies($this->output);
|
| 46 | + $egOpenLayersOnThisPage++;
|
| 47 | +
|
| 48 | + $this->elementNr = $egOpenLayersOnThisPage;
|
| 49 | + }
|
| 50 | +
|
| 51 | + /**
|
| 52 | + * @see SMMapPrinter::addSpecificMapHTML()
|
| 53 | + *
|
| 54 | + */
|
| 55 | + protected function addSpecificMapHTML() {
|
| 56 | + global $wgJsMimeType;
|
| 57 | +
|
| 58 | + $this->controls = MapsMapper::createJSItemsString($this->controls);
|
| 59 | +
|
| 60 | + $layerItems = MapsOpenLayers::createLayersStringAndLoadDependencies($this->output, $this->layers);
|
| 61 | +
|
| 62 | + $markerItems = array();
|
| 63 | +
|
| 64 | + foreach ($this->m_locations as $location) {
|
| 65 | + // Create a string containing the marker JS
|
| 66 | + list($lat, $lon, $title, $label, $icon) = $location;
|
| 67 | +
|
| 68 | + $title = str_replace("'", "\'", $title);
|
| 69 | + $label = str_replace("'", "\'", $label);
|
| 70 | +
|
| 71 | + $markerItems[] = "getOLMarkerData($lon, $lat, '$title', '$label', '$icon')";
|
| 72 | + }
|
| 73 | +
|
| 74 | + $markersString = implode(',', $markerItems);
|
| 75 | +
|
| 76 | + $this->output .= "<div id='$this->mapName' style='width: {$this->width}px; height: {$this->height}px; background-color: #cccccc;'></div>
|
| 77 | + <script type='$wgJsMimeType'> /*<![CDATA[*/
|
| 78 | + addOnloadHook(
|
| 79 | + initOpenLayer('$this->mapName', $this->centre_lon, $this->centre_lat, $this->zoom, [$layerItems], [$this->controls], [$markersString], $this->height)
|
| 80 | + );
|
| 81 | + /*]]>*/ </script>";
|
| 82 | + }
|
| 83 | +
|
| 84 | + /**
|
| 85 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the spesific ones to the list.
|
| 86 | + */
|
| 87 | + public function getParameters() {
|
| 88 | + $params = parent::getParameters();
|
| 89 | +
|
| 90 | + $params[] = array('name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg('semanticmaps_paramdesc_controls'), 'values' => MapsOpenLayers::getControlNames());
|
| 91 | + $params[] = array('name' => 'layers', 'type' => 'enum-list', 'description' => wfMsg('semanticmaps_paramdesc_layers'), 'values' => MapsOpenLayers::getLayerNames());
|
| 92 | +
|
| 93 | + return $params;
|
| 94 | + }
|
| 95 | +
|
| 96 | +}
|
Index: tags/extensions/SemanticMaps/REL_0_5/OpenLayers/SM_OpenLayersFormInput.php |
— | — | @@ -0,0 +1,92 @@ |
| 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 | + public $serviceName = MapsOpenLayers::SERVICE_NAME; |
| 20 | + |
| 21 | + /** |
| 22 | + * @see MapsMapFeature::setMapSettings() |
| 23 | + * |
| 24 | + */ |
| 25 | + protected function setMapSettings() { |
| 26 | + global $egMapsOpenLayersZoom, $egMapsOpenLayersPrefix; |
| 27 | + |
| 28 | + $this->elementNamePrefix = $egMapsOpenLayersPrefix; |
| 29 | + |
| 30 | + $this->earthZoom = 1; |
| 31 | + |
| 32 | + $this->defaultZoom = $egMapsOpenLayersZoom; |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * @see MapsMapFeature::addFormDependencies() |
| 37 | + * |
| 38 | + */ |
| 39 | + protected function addFormDependencies() { |
| 40 | + global $wgJsMimeType; |
| 41 | + global $smgScriptPath, $smgOLFormsOnThisPage, $smgStyleVersion; |
| 42 | + |
| 43 | + MapsOpenLayers::addOLDependencies($this->output); |
| 44 | + |
| 45 | + if (empty($smgOLFormsOnThisPage)) { |
| 46 | + $smgOLFormsOnThisPage = 0; |
| 47 | + $this->output .= "<script type='$wgJsMimeType' src='$smgScriptPath/OpenLayers/SM_OpenLayersFunctions.js?$smgStyleVersion'></script>"; |
| 48 | + } |
| 49 | + } |
| 50 | + |
| 51 | + /** |
| 52 | + * @see MapsMapFeature::doMapServiceLoad() |
| 53 | + * |
| 54 | + */ |
| 55 | + protected function doMapServiceLoad() { |
| 56 | + global $egOpenLayersOnThisPage, $smgOLFormsOnThisPage; |
| 57 | + |
| 58 | + self::addFormDependencies(); |
| 59 | + |
| 60 | + $egOpenLayersOnThisPage++; |
| 61 | + $smgOLFormsOnThisPage++; |
| 62 | + |
| 63 | + $this->elementNr = $egOpenLayersOnThisPage; |
| 64 | + } |
| 65 | +
|
| 66 | + /** |
| 67 | + * @see MapsMapFeature::addSpecificMapHTML() |
| 68 | + * |
| 69 | + */
|
| 70 | + protected function addSpecificMapHTML() { |
| 71 | + global $wgJsMimeType; |
| 72 | + |
| 73 | + $this->controls = MapsMapper::createJSItemsString($this->controls); |
| 74 | + |
| 75 | + $layerItems = MapsOpenLayers::createLayersStringAndLoadDependencies($this->output, $this->layers); |
| 76 | + |
| 77 | + $this->output .=" |
| 78 | + <div id='".$this->mapName."' style='width: {$this->width}px; height: {$this->height}px; background-color: #cccccc;'></div> |
| 79 | + |
| 80 | + <script type='$wgJsMimeType'>/*<![CDATA[*/ |
| 81 | + addOnloadHook(makeFormInputOpenLayer('".$this->mapName."', '".$this->coordsFieldName."', ".$this->centre_lat.", ".$this->centre_lon.", ".$this->zoom.", ".$this->marker_lat.", ".$this->marker_lon.", [$layerItems], [$this->controls], $this->height)); |
| 82 | + /*]]>*/</script>";
|
| 83 | + } |
| 84 | + |
| 85 | + /** |
| 86 | + * @see SMFormInput::manageGeocoding() |
| 87 | + * |
| 88 | + */ |
| 89 | + protected function manageGeocoding() { |
| 90 | + $this->enableGeocoding = false; |
| 91 | + } |
| 92 | + |
| 93 | +} |
Index: tags/extensions/SemanticMaps/REL_0_5/SM_Settings.php |
— | — | @@ -0,0 +1,63 @@ |
| 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 | +
|
| 25 | +# Map features configuration
|
| 26 | +# (named) Array of String. This array contains the available features for Maps.
|
| 27 | +# The array element name contains an abbriviation, used for code references,
|
| 28 | +# and in the service data arrays, the value is the human readible version for displaying purpouses.
|
| 29 | +$egMapsAvailableFeatures['qp'] = array(
|
| 30 | + 'name' => 'Query Printer',
|
| 31 | + 'class' => 'SMQueryPrinters',
|
| 32 | + 'file' => 'SemanticMaps/QueryPrinters/SM_QueryPrinters.php',
|
| 33 | + 'local' => false
|
| 34 | + );
|
| 35 | +
|
| 36 | +$egMapsAvailableFeatures['fi'] = array(
|
| 37 | + 'name' => 'Form input',
|
| 38 | + 'class' => 'SMFormInputs',
|
| 39 | + 'file' => 'SemanticMaps/FormInputs/SM_FormInputs.php',
|
| 40 | + 'local' => false
|
| 41 | + );
|
| 42 | +
|
| 43 | +
|
| 44 | +
|
| 45 | +
|
| 46 | +
|
| 47 | +# Mapping services configuration
|
| 48 | +
|
| 49 | +# Include the mapping services that should be loaded into Semantic Maps.
|
| 50 | +# Commenting or removing a mapping service will cause Semantic Maps to completely ignore it, and so improve performance.
|
| 51 | +include_once $smgIP . '/GoogleMaps/SM_GoogleMaps.php'; // Google Maps
|
| 52 | +include_once $smgIP . '/OpenLayers/SM_OpenLayers.php'; // OpenLayers
|
| 53 | +include_once $smgIP . '/YahooMaps/SM_YahooMaps.php'; // Yahoo! Maps
|
| 54 | +include_once $smgIP . '/OpenStreetMap/SM_OSM.php'; // OpenLayers optimized for OSM
|
| 55 | +
|
| 56 | +
|
| 57 | +
|
| 58 | +
|
| 59 | +
|
| 60 | +# Array of String. The default mapping service for each feature, which will be used when no valid service is provided by the user.
|
| 61 | +# Each service needs to be enabled, if not, the first one from the available services will be taken.
|
| 62 | +# Note: The default service needs to be available for the feature you set it for, since it's used as a fallback mechanism.
|
| 63 | +$egMapsDefaultServices['qp'] = 'googlemaps';
|
| 64 | +$egMapsDefaultServices['fi'] = 'googlemaps';
|
Index: tags/extensions/SemanticMaps/REL_0_5/FormInputs/SM_FormInput.php |
— | — | @@ -0,0 +1,172 @@ |
| 2 | +<?php
|
| 3 | +
|
| 4 | +/**
|
| 5 | + * Abstract class that provides the common functionallity 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 extends MapsMapFeature {
|
| 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 $marker_lat;
|
| 30 | + protected $marker_lon;
|
| 31 | +
|
| 32 | + protected $earthZoom;
|
| 33 | +
|
| 34 | + protected $showAddresFunction;
|
| 35 | +
|
| 36 | + protected $enableGeocoding = false;
|
| 37 | +
|
| 38 | + private $startingCoords ='';
|
| 39 | +
|
| 40 | + private $coordinates;
|
| 41 | +
|
| 42 | + /**
|
| 43 | + * This function is a hook for Semantic Forms, and returns the HTML needed in
|
| 44 | + * the form to handle coordinate data.
|
| 45 | + */
|
| 46 | + public final function formInputHTML($coordinates, $input_name, $is_mandatory, $is_disabled, $field_args) {
|
| 47 | + global $sfgTabIndex;
|
| 48 | + // TODO: Use function args for sf stuffz
|
| 49 | +
|
| 50 | + $this->coordinates = $coordinates;
|
| 51 | +
|
| 52 | + $this->setMapSettings();
|
| 53 | +
|
| 54 | + $this->featureParameters = SMFormInputs::$parameters;
|
| 55 | +
|
| 56 | + $this->doMapServiceLoad();
|
| 57 | +
|
| 58 | + $this->manageGeocoding();
|
| 59 | +
|
| 60 | + if (parent::manageMapProperties($field_args, __CLASS__)) {
|
| 61 | + $this->setCoordinates();
|
| 62 | + $this->setCentre();
|
| 63 | + $this->setZoom();
|
| 64 | +
|
| 65 | + // Create html element names
|
| 66 | + $this->setMapName();
|
| 67 | + $this->mapName .= '_'.$sfgTabIndex;
|
| 68 | + $this->geocodeFieldName = $this->elementNamePrefix.'_geocode_'.$this->elementNr.'_'.$sfgTabIndex;
|
| 69 | + $this->coordsFieldName = $this->elementNamePrefix.'_coords_'.$this->elementNr.'_'.$sfgTabIndex;
|
| 70 | + $this->infoFieldName = $this->elementNamePrefix.'_info_'.$this->elementNr.'_'.$sfgTabIndex;
|
| 71 | +
|
| 72 | + // Create the non specific form HTML
|
| 73 | + $this->output .= "
|
| 74 | + <input id='".$this->coordsFieldName."' name='$input_name' type='text' value='$this->startingCoords' size='40' tabindex='$sfgTabIndex'>
|
| 75 | + <span id='".$this->infoFieldName."' class='error_message'></span>";
|
| 76 | +
|
| 77 | + if ($this->enableGeocoding) $this->addGeocodingField();
|
| 78 | +
|
| 79 | + $this->addSpecificMapHTML();
|
| 80 | + }
|
| 81 | +
|
| 82 | + return array($this->output . $this->errorList, '');
|
| 83 | + }
|
| 84 | +
|
| 85 | + private function addGeocodingField() {
|
| 86 | + global $sfgTabIndex;
|
| 87 | + $sfgTabIndex++;
|
| 88 | +
|
| 89 | + // Retrieve language valuess
|
| 90 | + $enter_address_here_text = wfMsg('semanticmaps_enteraddresshere');
|
| 91 | + $lookup_coordinates_text = wfMsg('semanticmaps_lookupcoordinates');
|
| 92 | + $not_found_text = wfMsg('semanticmaps_notfound');
|
| 93 | +
|
| 94 | + $adress_field = SMFormInput::getDynamicInput($this->geocodeFieldName, $enter_address_here_text, 'size="30" name="geocode" style="color: #707070" tabindex="'.$sfgTabIndex.'"');
|
| 95 | + $this->output .= "
|
| 96 | + <p>
|
| 97 | + $adress_field
|
| 98 | + <input type='submit' onClick=\"$this->showAddresFunction(document.forms['createbox'].$this->geocodeFieldName.value, '$this->mapName', '$this->coordsFieldName', '$not_found_text'); return false\" value='$lookup_coordinates_text' />
|
| 99 | + </p>";
|
| 100 | + }
|
| 101 | +
|
| 102 | + /**
|
| 103 | + * Sets the zoom so the whole map is visible in case there is no maker yet,
|
| 104 | + * and sets it to the default when there is a marker but no zoom parameter.
|
| 105 | + */
|
| 106 | + private function setZoom() {
|
| 107 | + if (empty($this->coordinates)) {
|
| 108 | + $this->zoom = $this->earthZoom;
|
| 109 | + } else if (strlen($this->zoom) < 1) {
|
| 110 | + $this->zoom = $this->defaultZoom;
|
| 111 | + }
|
| 112 | + }
|
| 113 | +
|
| 114 | + /**
|
| 115 | + * Sets the $marler_lon and $marler_lat fields and when set, the starting coordinates
|
| 116 | + *
|
| 117 | + */
|
| 118 | + private function setCoordinates() {
|
| 119 | + if (empty($this->coordinates)) {
|
| 120 | + // If no coordinates exist yet, no marker should be displayed
|
| 121 | + $this->marker_lat = 'null';
|
| 122 | + $this->marker_lon = 'null';
|
| 123 | + }
|
| 124 | + else {
|
| 125 | + $marker = MapsUtils::getLatLon($this->coordinates);
|
| 126 | + $this->marker_lat = $marker['lat'];
|
| 127 | + $this->marker_lon = $marker['lon'];
|
| 128 | + $this->startingCoords = MapsUtils::latDecimal2Degree($this->marker_lat) . ', ' . MapsUtils::lonDecimal2Degree($this->marker_lon);
|
| 129 | + }
|
| 130 | + }
|
| 131 | +
|
| 132 | + /**
|
| 133 | + * Sets the $centre_lat and $centre_lon fields.
|
| 134 | + * Note: this needs to be done AFTRE the maker coordinates are set.
|
| 135 | + *
|
| 136 | + */
|
| 137 | + private function setCentre() {
|
| 138 | + if (empty($this->centre)) {
|
| 139 | + if (isset($this->coordinates)) {
|
| 140 | + $this->centre_lat = $this->marker_lat;
|
| 141 | + $this->centre_lon = $this->marker_lon;
|
| 142 | + }
|
| 143 | + else {
|
| 144 | + $this->centre_lat = '0';
|
| 145 | + $this->centre_lon = '0';
|
| 146 | + }
|
| 147 | + }
|
| 148 | + else {
|
| 149 | + // Geocode and convert if required.
|
| 150 | + $centre = MapsGeocodeUtils::attemptToGeocode($this->centre, $this->geoservice, $this->serviceName);
|
| 151 | + $centre = MapsUtils::getLatLon($centre);
|
| 152 | +
|
| 153 | + $this->centre_lat = $centre['lat'];
|
| 154 | + $this->centre_lon = $centre['lon'];
|
| 155 | + }
|
| 156 | + }
|
| 157 | +
|
| 158 | + /**
|
| 159 | + * Returns html for an html input field with a default value that will automatically dissapear when
|
| 160 | + * the user clicks in it, and reappers when the focus on the field is lost and it's still empty.
|
| 161 | + *
|
| 162 | + * @author Jeroen De Dauw
|
| 163 | + *
|
| 164 | + * @param string $id
|
| 165 | + * @param string $value
|
| 166 | + * @param string $args
|
| 167 | + * @return html
|
| 168 | + */
|
| 169 | + private static function getDynamicInput($id, $value, $args='') {
|
| 170 | + return '<input id="'.$id.'" '.$args.' value="'.$value.'" onfocus="if (this.value==\''.$value.'\') {this.value=\'\';}" onblur="if (this.value==\'\') {this.value=\''.$value.'\';}" />';
|
| 171 | + }
|
| 172 | +}
|
| 173 | +
|
Index: tags/extensions/SemanticMaps/REL_0_5/FormInputs/SM_FormInputs.php |
— | — | @@ -0,0 +1,140 @@ |
| 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 | +final class SMFormInputs {
|
| 18 | +
|
| 19 | + public static $parameters = array();
|
| 20 | +
|
| 21 | + public static function initialize() {
|
| 22 | + global $smgIP, $wgAutoloadClasses, $egMapsServices, $sfgFormPrinter;
|
| 23 | +
|
| 24 | + // This feature can only be enbled when Semantic Forms is loaded.
|
| 25 | + if (isset($sfgFormPrinter)) {
|
| 26 | + $hasFormInputs = false;
|
| 27 | +
|
| 28 | + $wgAutoloadClasses['SMFormInput'] = $smgIP . '/FormInputs/SM_FormInput.php';
|
| 29 | +
|
| 30 | + self::initializeParams();
|
| 31 | +
|
| 32 | + foreach($egMapsServices as $serviceName => $serviceData) {
|
| 33 | + // Check if the service has a form input
|
| 34 | + $hasFI = array_key_exists('fi', $serviceData);
|
| 35 | +
|
| 36 | + // If the service has no FI, skipt it and continue with the next one.
|
| 37 | + if (!$hasFI) continue;
|
| 38 | +
|
| 39 | + // At least one form input will be enabled when this point is reached.
|
| 40 | + $hasFormInputs = true;
|
| 41 | +
|
| 42 | + // Add the result form input type for the service name.
|
| 43 | + self::initFormHook($serviceName, $serviceData['fi'], $serviceName);
|
| 44 | +
|
| 45 | + // Loop through the service alliases, and add them as form input types.
|
| 46 | + foreach ($serviceData['aliases'] as $alias) self::initFormHook($alias, $serviceData['fi'], $serviceName);
|
| 47 | + }
|
| 48 | +
|
| 49 | + // Add the 'map' form input type if there are mapping services that have FI's loaded.
|
| 50 | + if ($hasFormInputs) self::initFormHook('map');
|
| 51 | +
|
| 52 | + }
|
| 53 | + }
|
| 54 | +
|
| 55 | + private static function initializeParams() {
|
| 56 | + global $egMapsAvailableServices, $egMapsDefaultServices, $egMapsDefaultCentre, $egMapsAvailableGeoServices, $egMapsDefaultGeoService;
|
| 57 | +
|
| 58 | + self::$parameters = array(
|
| 59 | + 'centre' => array(
|
| 60 | + 'aliases' => array('center'),
|
| 61 | + 'default' => $egMapsDefaultCentre
|
| 62 | + ),
|
| 63 | + 'service' => array(
|
| 64 | + 'criteria' => array(
|
| 65 | + 'in_array' => $egMapsAvailableServices
|
| 66 | + ),
|
| 67 | + 'default' => $egMapsDefaultServices['fi']
|
| 68 | + ),
|
| 69 | + 'geoservice' => array(
|
| 70 | + 'criteria' => array(
|
| 71 | + 'in_array' => array_keys($egMapsAvailableGeoServices)
|
| 72 | + ),
|
| 73 | + 'default' => $egMapsDefaultGeoService
|
| 74 | + ),
|
| 75 | + 'service_name' => array(),
|
| 76 | + 'part_of_multiple' => array(),
|
| 77 | + 'possible_values' => array(),
|
| 78 | + 'is_list' => array(),
|
| 79 | + 'semantic_property' => array(),
|
| 80 | + 'value_labels' => array(),
|
| 81 | + );
|
| 82 | + }
|
| 83 | +
|
| 84 | + /**
|
| 85 | + * Adds a mapping service's form hook.
|
| 86 | + *
|
| 87 | + * @param string $inputName The name of the form input.
|
| 88 | + * @param array $fi
|
| 89 | + * @param strig $mainName
|
| 90 | + */
|
| 91 | + private static function initFormHook($inputName, array $fi = null, $mainName = '') {
|
| 92 | + global $wgAutoloadClasses, $sfgFormPrinter, $smgIP;
|
| 93 | +
|
| 94 | + if (isset($fi)) {
|
| 95 | + if (! array_key_exists($fi['class'], $wgAutoloadClasses)) {
|
| 96 | + $file = $fi['local'] ? $smgIP . '/' . $fi['file'] : $fi['file'];
|
| 97 | + $wgAutoloadClasses[$fi['class']] = $file;
|
| 98 | + }
|
| 99 | + }
|
| 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 unknown_type $coordinates
|
| 113 | + * @param unknown_type $input_name
|
| 114 | + * @param unknown_type $is_mandatory
|
| 115 | + * @param unknown_type $is_disabled
|
| 116 | + * @param array $field_args
|
| 117 | + *
|
| 118 | + * @return unknown
|
| 119 | + */
|
| 120 | +function smfSelectFormInputHTML($coordinates, $input_name, $is_mandatory, $is_disabled, array $field_args) {
|
| 121 | + global $egMapsServices;
|
| 122 | +
|
| 123 | + // If service_name is set, use this value, and ignore any given service parameters.
|
| 124 | + // This will prevent ..input type=googlemaps|service=yahoo.. from showing up as a Yahoo! Maps map.
|
| 125 | + if (array_key_exists('service_name', $field_args)) {
|
| 126 | + $service_name = $field_args['service_name'];
|
| 127 | + }
|
| 128 | + elseif (array_key_exists('service', $field_args)) {
|
| 129 | + $service_name = $field_args['service'];
|
| 130 | + }
|
| 131 | + else{
|
| 132 | + $service_name = null;
|
| 133 | + }
|
| 134 | +
|
| 135 | + $service_name = MapsMapper::getValidService($service_name, 'fi');
|
| 136 | + $formInput = new $egMapsServices[$service_name]['fi']['class']();
|
| 137 | +
|
| 138 | + // Get and return the form input HTML from the hook corresponding with the provided service
|
| 139 | + return $formInput->formInputHTML($coordinates, $input_name, $is_mandatory, $is_disabled, $field_args);
|
| 140 | +
|
| 141 | +} |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/INSTALL |
— | — | @@ -0,0 +1,16 @@ |
| 2 | +[[Semantic Maps 0.5]]
|
| 3 | +
|
| 4 | +Make sure you have Semantic MediaWiki and Maps successfully installed before
|
| 5 | +proceeding with the installation. Once you have downloaded the code, place
|
| 6 | +the 'SemanticMaps' directory within your MediaWiki 'extensions' directory.
|
| 7 | +Then add the following code to your LocalSettings.php file after the lines
|
| 8 | +that install Maps:
|
| 9 | +
|
| 10 | +# Semantic Maps
|
| 11 | +require_once( "$IP/extensions/SemanticMaps/SemanticMaps.php" );
|
| 12 | +
|
| 13 | +The inclusion of extensions should happen in this order: Semantic MediaWiki,
|
| 14 | +Semantic Forms (if you use it), Semantic Maps. Maps should proceed Semantic
|
| 15 | +Maps. See the installation instructions of Maps for info about the API keys.
|
| 16 | +
|
| 17 | +More information can be found at http://www.mediawiki.org/wiki/Extension:Semantic_Maps#Download_and_installation |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/OpenStreetMap/SM_OSMFunctions.js |
— | — | @@ -0,0 +1,91 @@ |
| 2 | + /**
|
| 3 | + * Javascript functions for OpenStreetMap functionallity in Semantic Maps
|
| 4 | + *
|
| 5 | + * @file SM_OSMFunctions.js
|
| 6 | + * @ingroup SMOSM
|
| 7 | + *
|
| 8 | + * @author Jeroen De Dauw
|
| 9 | + */
|
| 10 | +
|
| 11 | +/**
|
| 12 | + * This function holds spesific functionallity for the OpenStreetMap form input of Semantic Maps
|
| 13 | + */
|
| 14 | +function makeOSMFormInput(mapName, locationFieldName, mapParams) {
|
| 15 | + var markers = Array();
|
| 16 | +
|
| 17 | + // Show a starting marker only if marker coordinates are provided
|
| 18 | + if (mapParams.lat != null && mapParams.lon != null) {
|
| 19 | + mapParams.markers = [(getOSMMarkerData(mapParams.lon, mapParams.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 | + replaceMarker(mapName, map.getLonLatFromViewPortPx(e.xy));
|
| 49 | + document.getElementById(locationFieldName).value = convertLatToDMS(map.getLonLatFromViewPortPx(e.xy).lat)+', '+convertLngToDMS(map.getLonLatFromViewPortPx(e.xy).lon);
|
| 50 | + }
|
| 51 | +
|
| 52 | + });
|
| 53 | +
|
| 54 | + var clickHanler = new OpenLayers.Control.Click();
|
| 55 | + mapParams.initializedContols = [clickHanler];
|
| 56 | +
|
| 57 | + var map = new slippymap_map(mapName, mapParams);
|
| 58 | +
|
| 59 | + // Make the map variable available for other functions
|
| 60 | + eval("window.slippymaps." + mapName + " = map;");
|
| 61 | +}
|
| 62 | +
|
| 63 | +/**
|
| 64 | + * Remove all markers from an OSM map (that's in window.OSMMaps), and place a new one.
|
| 65 | + *
|
| 66 | + * @param mapName Name of the map as in OSMMaps[mapName].
|
| 67 | + * @param newLocation The location for the new marker.
|
| 68 | + * @return
|
| 69 | + */
|
| 70 | +function replaceMarker(mapName, newLocation) {
|
| 71 | + var map = OSMMaps[mapName];
|
| 72 | + var markerLayer = map.getLayer('markerLayer');
|
| 73 | +
|
| 74 | + removeOSMMarkers(markerLayer);
|
| 75 | + markerLayer.addMarker(getOSMMarker(markerLayer, getOSMMarkerData(newLocation.lon, newLocation.lat, '', ''), map.getProjectionObject()));
|
| 76 | +
|
| 77 | + map.panTo(newLocation);
|
| 78 | +}
|
| 79 | +
|
| 80 | +/**
|
| 81 | + * Removes all markers from a marker layer.
|
| 82 | + *
|
| 83 | + * @param markerLayer The layer to remove all markers from.
|
| 84 | + * @return
|
| 85 | + */
|
| 86 | +function removeOSMMarkers(markerLayer) {
|
| 87 | + var markerCollection = markerLayer.markers;
|
| 88 | +
|
| 89 | + for (i in markerCollection) {
|
| 90 | + markerLayer.removeMarker(markerCollection[i]);
|
| 91 | + }
|
| 92 | +} |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/OpenStreetMap/SM_OSM.php |
— | — | @@ -0,0 +1,24 @@ |
| 2 | +<?php
|
| 3 | +
|
| 4 | +/**
|
| 5 | + * This groupe contains all OpenStreetMap related files of the Semantic Maps extension.
|
| 6 | + *
|
| 7 | + * @defgroup SMOSM OpenStreetMap
|
| 8 | + * @ingroup SemanticMaps
|
| 9 | + */
|
| 10 | +
|
| 11 | +/**
|
| 12 | + * This file holds the general information for the OpenStreetMap service.
|
| 13 | + *
|
| 14 | + * @file SM_OSM.php
|
| 15 | + * @ingroup SMOSM
|
| 16 | + *
|
| 17 | + * @author Jeroen De Dauw
|
| 18 | + */
|
| 19 | +
|
| 20 | +if( !defined( 'MEDIAWIKI' ) ) {
|
| 21 | + die( 'Not an entry point.' );
|
| 22 | +}
|
| 23 | +
|
| 24 | +$egMapsServices['osm']['qp'] = array('class' => 'SMOSMQP', 'file' => 'SemanticMaps/OpenStreetMap/SM_OSMQP.php', 'local' => false);
|
| 25 | +//$egMapsServices['osm']['fi'] = array('class' => 'SMOSMFormInput', 'file' => 'SemanticMaps/OpenStreetMap/SM_OSMFormInput.php', 'local' => false); |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/OpenStreetMap/SM_OSMQP.php |
— | — | @@ -0,0 +1,106 @@ |
| 2 | +<?php
|
| 3 | +
|
| 4 | +/**
|
| 5 | + * A query printer for maps using the Open Layers API optimized for OSM
|
| 6 | + *
|
| 7 | + * @file SM_OSMQP.php
|
| 8 | + * @ingroup SMOSM
|
| 9 | + *
|
| 10 | + * @author Jeroen De Dauw
|
| 11 | + */
|
| 12 | +
|
| 13 | +if( !defined( 'MEDIAWIKI' ) ) {
|
| 14 | + die( 'Not an entry point.' );
|
| 15 | +}
|
| 16 | +
|
| 17 | +final class SMOSMQP extends SMMapPrinter {
|
| 18 | +
|
| 19 | + public $serviceName = MapsOSM::SERVICE_NAME;
|
| 20 | +
|
| 21 | + /**
|
| 22 | + * @see SMMapPrinter::setQueryPrinterSettings()
|
| 23 | + *
|
| 24 | + */
|
| 25 | + protected function setQueryPrinterSettings() {
|
| 26 | + global $egMapsOSMZoom, $egMapsOSMPrefix;
|
| 27 | +
|
| 28 | + $this->elementNamePrefix = $egMapsOSMPrefix;
|
| 29 | + $this->defaultZoom = $egMapsOSMZoom;
|
| 30 | +
|
| 31 | + $this->spesificParameters = array(
|
| 32 | + 'zoom' => array(
|
| 33 | + 'default' => '',
|
| 34 | + )
|
| 35 | + );
|
| 36 | + }
|
| 37 | +
|
| 38 | + /**
|
| 39 | + * @see SMMapPrinter::doMapServiceLoad()
|
| 40 | + *
|
| 41 | + */
|
| 42 | + protected function doMapServiceLoad() {
|
| 43 | + global $egOSMMapsOnThisPage;
|
| 44 | +
|
| 45 | + MapsOSM::addOSMDependencies($this->output);
|
| 46 | + $egOSMMapsOnThisPage++;
|
| 47 | +
|
| 48 | + $this->elementNr = $egOSMMapsOnThisPage;
|
| 49 | + }
|
| 50 | +
|
| 51 | + /**
|
| 52 | + * @see SMMapPrinter::addSpecificMapHTML()
|
| 53 | + *
|
| 54 | + */
|
| 55 | + protected function addSpecificMapHTML() {
|
| 56 | + global $wgJsMimeType;
|
| 57 | +
|
| 58 | + $markerItems = array();
|
| 59 | +
|
| 60 | + foreach ($this->m_locations as $location) {
|
| 61 | + // Create a string containing the marker JS
|
| 62 | + list($lat, $lon, $title, $label, $icon) = $location;
|
| 63 | +
|
| 64 | + $title = str_replace("'", "\'", $title);
|
| 65 | + $label = str_replace("'", "\'", $label);
|
| 66 | +
|
| 67 | + $markerItems[] = "getOSMMarkerData($lon, $lat, '$title', '$label', '$icon')";
|
| 68 | + }
|
| 69 | +
|
| 70 | + $markersString = implode(',', $markerItems);
|
| 71 | +
|
| 72 | + $controlItems = MapsMapper::createJSItemsString($this->controls);
|
| 73 | +
|
| 74 | + $this->output .= <<<EOT
|
| 75 | + <script type='$wgJsMimeType'>slippymaps['$this->mapName'] = new slippymap_map('$this->mapName', {
|
| 76 | + mode: 'osm-wm',
|
| 77 | + layer: 'osm-like',
|
| 78 | + locale: '$this->lang',
|
| 79 | + lat: $this->centre_lat,
|
| 80 | + lon: $this->centre_lon,
|
| 81 | + zoom: $this->zoom,
|
| 82 | + width: $this->width,
|
| 83 | + height: $this->height,
|
| 84 | + markers: [$markersString],
|
| 85 | + controls: [$controlItems]
|
| 86 | + });</script>
|
| 87 | +
|
| 88 | + <!-- map div -->
|
| 89 | + <div id='$this->mapName' class='map' style='width:{$this->width}px; height:{$this->height}px;'>
|
| 90 | + <script type='$wgJsMimeType'>slippymaps['$this->mapName'].init();</script>
|
| 91 | + <!-- /map div -->
|
| 92 | + </div>
|
| 93 | +EOT;
|
| 94 | + }
|
| 95 | +
|
| 96 | + /**
|
| 97 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the spesific ones to the list.
|
| 98 | + */
|
| 99 | + public function getParameters() {
|
| 100 | + $params = parent::getParameters();
|
| 101 | +
|
| 102 | + $params[] = array('name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg('semanticmaps_paramdesc_controls'), 'values' => MapsOSM::getControlNames());
|
| 103 | +
|
| 104 | + return $params;
|
| 105 | + }
|
| 106 | +
|
| 107 | +}
|
Index: tags/extensions/SemanticMaps/REL_0_5/OpenStreetMap/SM_OSMFormInput.php |
— | — | @@ -0,0 +1,111 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Form input hook that adds an OSM map format to Semantic Forms |
| 6 | + *
|
| 7 | + * @file SM_OSMFormInput.php
|
| 8 | + * @ingroup SMOSM
|
| 9 | + *
|
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +// TODO: the js for this form input does not work yet. Requires fixing before the FI can be enabled. |
| 18 | + |
| 19 | +final class SMOSMFormInput extends SMFormInput {
|
| 20 | + |
| 21 | + public $serviceName = MapsOSM::SERVICE_NAME; |
| 22 | + |
| 23 | + /** |
| 24 | + * @see MapsMapFeature::setMapSettings() |
| 25 | + * |
| 26 | + */ |
| 27 | + protected function setMapSettings() { |
| 28 | + global $egMapsOSMZoom, $egMapsOSMPrefix; |
| 29 | + |
| 30 | + $this->elementNamePrefix = $egMapsOSMPrefix; |
| 31 | + |
| 32 | + $this->earthZoom = 1; |
| 33 | + |
| 34 | + $this->defaultZoom = $egMapsOSMZoom; |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * @see MapsMapFeature::addFormDependencies() |
| 39 | + * |
| 40 | + */ |
| 41 | + protected function addFormDependencies() { |
| 42 | + global $wgJsMimeType; |
| 43 | + global $smgScriptPath, $smgOSMFormsOnThisPage, $smgStyleVersion; |
| 44 | + |
| 45 | + MapsOSM::addOSMDependencies($this->output); |
| 46 | + |
| 47 | + if (empty($smgOSMFormsOnThisPage)) { |
| 48 | + $smgOSMFormsOnThisPage = 0; |
| 49 | + $this->output .= "<script type='$wgJsMimeType' src='$smgScriptPath/OpenStreetMap/SM_OSMFunctions.js?$smgStyleVersion'></script>"; |
| 50 | + } |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * @see MapsMapFeature::doMapServiceLoad() |
| 55 | + * |
| 56 | + */ |
| 57 | + protected function doMapServiceLoad() { |
| 58 | + global $egOSMMapsOnThisPage, $smgOSMFormsOnThisPage; |
| 59 | + |
| 60 | + self::addFormDependencies(); |
| 61 | + |
| 62 | + $egOSMMapsOnThisPage++; |
| 63 | + $smgOSMFormsOnThisPage++; |
| 64 | + |
| 65 | + $this->elementNr = $egOSMMapsOnThisPage; |
| 66 | + } |
| 67 | +
|
| 68 | + /** |
| 69 | + * @see MapsMapFeature::addSpecificMapHTML() |
| 70 | + * |
| 71 | + */
|
| 72 | + protected function addSpecificMapHTML() { |
| 73 | + global $wgJsMimeType; |
| 74 | + |
| 75 | + $controlItems = MapsMapper::createJSItemsString($this->controls); |
| 76 | + |
| 77 | + $this->output .= <<<EOT |
| 78 | + <script type='$wgJsMimeType'> |
| 79 | + makeOSMFormInput( |
| 80 | + '$this->mapName', |
| 81 | + '$this->coordsFieldName', |
| 82 | + { |
| 83 | + mode: 'osm-wm', |
| 84 | + layer: 'osm-like', |
| 85 | + locale: '$this->lang', |
| 86 | + lat: $this->centre_lat, |
| 87 | + lon: $this->centre_lon, |
| 88 | + zoom: $this->zoom, |
| 89 | + width: $this->width, |
| 90 | + height: $this->height, |
| 91 | + controls: [$controlItems], |
| 92 | + } |
| 93 | + ); |
| 94 | + |
| 95 | + |
| 96 | + </script> |
| 97 | + |
| 98 | + <div id='$this->mapName' class='map' style='width:{$this->width}px; height:{$this->height}px;'> |
| 99 | + <script type='$wgJsMimeType'>slippymaps['$this->mapName'].init();</script> |
| 100 | + </div> |
| 101 | +EOT; |
| 102 | + } |
| 103 | + |
| 104 | + /** |
| 105 | + * @see SMFormInput::manageGeocoding() |
| 106 | + * |
| 107 | + */ |
| 108 | + protected function manageGeocoding() { |
| 109 | + $this->enableGeocoding = false; |
| 110 | + } |
| 111 | + |
| 112 | +} |
Index: tags/extensions/SemanticMaps/REL_0_5/RELEASE-NOTES |
— | — | @@ -0,0 +1,169 @@ |
| 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.5 ===
|
| 11 | +(2009-12-17)
|
| 12 | +
|
| 13 | +==== New features ====
|
| 14 | +
|
| 15 | +* Added a result format for the OL optimized for OSM service.
|
| 16 | +
|
| 17 | +* Added support for the new Special:Ask page's parameter handling to the query printers.
|
| 18 | +
|
| 19 | +==== Refactoring ====
|
| 20 | +
|
| 21 | +* Moved the geographical coordinate data type handling from SMW to SM.
|
| 22 | +
|
| 23 | +* Added checks for extension dependencies that need to be present for Semantic Maps to be initialized.
|
| 24 | +
|
| 25 | +==== Bug fixes ====
|
| 26 | +
|
| 27 | +* Fixed issue with the form input registration. The main service names where getting changed into the default mapping service.
|
| 28 | +
|
| 29 | +===Semantic Maps 0.4.2===
|
| 30 | +(2009-11-15)
|
| 31 | +
|
| 32 | +Changes in 0.4.2 discussed on the authors blog:
|
| 33 | +
|
| 34 | +* [http://blog.bn2vs.com/2009/11/16/maps-and-semantic-maps-0-4-2/ Maps and Semantic Maps 0.4.2 released]
|
| 35 | +* [http://blog.bn2vs.com/2009/11/12/new-in-maps-0-4-2/ New in Maps 0.4.2]
|
| 36 | +
|
| 37 | +==== Bug fixes ====
|
| 38 | +
|
| 39 | +* 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.
|
| 40 | +
|
| 41 | +===Semantic Maps 0.4.1===
|
| 42 | +(2009-11-10)
|
| 43 | +
|
| 44 | +====New features====
|
| 45 | +
|
| 46 | +* Added smart geocoding to the QP's centre parameter.
|
| 47 | +
|
| 48 | +* Added smart geocoding to the FI's centre parameter.
|
| 49 | +
|
| 50 | +==== Bug fixes ====
|
| 51 | +
|
| 52 | +* Fixed bug in the Yahoo! Maps form input, caused by not adapting a renamed variable.
|
| 53 | +
|
| 54 | +* Fixed bug in the form scripts caused by wrongly encoded JavaScript file of Maps.
|
| 55 | +
|
| 56 | +===Semantic Maps 0.4===
|
| 57 | +(2009-11-03)
|
| 58 | +
|
| 59 | +Changes in 0.4 discussed on the authors blog:
|
| 60 | +
|
| 61 | +* [http://blog.bn2vs.com/2009/11/03/finally-maps-and-semantic-maps-0-4/ Finally! Maps and Semantic Maps 0.4!]
|
| 62 | +
|
| 63 | +====Bug fixes====
|
| 64 | +
|
| 65 | +* 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].
|
| 66 | +
|
| 67 | +* Fixed problem that caused the SM result formats to not get displayed on Special:Ask.
|
| 68 | +
|
| 69 | +===Semantic Maps 0.3.4===
|
| 70 | +(2009-09-12)
|
| 71 | +
|
| 72 | +Changes in 0.3.4 discussed on the authors blog:
|
| 73 | +
|
| 74 | +* [http://blog.bn2vs.com/2009/09/12/maps-and-semantic-maps-0-3-4-released/ Maps and Semantic Maps 0.3.4 released]
|
| 75 | +
|
| 76 | +====Bug fixes====
|
| 77 | +
|
| 78 | +* Fixed bug causing error for people who do not have Semantic Forms installed and enabled, presumably introduced in 0.3.
|
| 79 | +
|
| 80 | +* 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.
|
| 81 | +
|
| 82 | +====Refactoring====
|
| 83 | +
|
| 84 | +* Restructured the extension to work with the new feature hook system of Maps.
|
| 85 | +
|
| 86 | +===Semantic Maps 0.3.3===
|
| 87 | +(2009-08-15)
|
| 88 | +
|
| 89 | +Changes in 0.3.3 discussed on the authors blog:
|
| 90 | +
|
| 91 | +* [http://blog.bn2vs.com/2009/08/25/maps-and-semantic-maps-0-3-3/ Maps and Semantic Maps 0.3.3]
|
| 92 | +
|
| 93 | +====Bug fixes====
|
| 94 | +
|
| 95 | +* Fixed error caused by the 'map' format on the Special:Ask page
|
| 96 | +
|
| 97 | +===Semantic Maps 0.3.2===
|
| 98 | +(2009-08-18)
|
| 99 | +
|
| 100 | +====Bug fixes====
|
| 101 | +
|
| 102 | +* Fixed logic error that caused maps to have a wrong centre and zoom when a query only returned one result.
|
| 103 | +
|
| 104 | +* Fixed an issue with the centre parameter in queries. In some cases it would not be processed correctly and cause PHP notices.
|
| 105 | +
|
| 106 | +===Semantic Maps 0.3.1===
|
| 107 | +(2009-08-18)
|
| 108 | +
|
| 109 | +====Bug fixes====
|
| 110 | +
|
| 111 | +* Fixed script design flaw that caused errors when using the 'map' format in a query.
|
| 112 | +
|
| 113 | +===Semantic Maps 0.3===
|
| 114 | +(2009-08-14)
|
| 115 | +
|
| 116 | +Changes in 0.3 discussed on the authors blog:
|
| 117 | +
|
| 118 | +* [http://blog.bn2vs.com/2009/08/13/final-changes-for-maps-and-sm-0-3/ Final changes for Maps and SM 0.3]
|
| 119 | +
|
| 120 | +* [http://blog.bn2vs.com/2009/08/07/new-features-in-maps-and-sm-0-3/ New features in Maps and SM 0.3]
|
| 121 | +
|
| 122 | +* [http://blog.bn2vs.com/2009/08/05/structural-changes-for-maps-and-sm-0-3/ Structural changes for Maps and SM 0.3]
|
| 123 | +
|
| 124 | +====New functionality====
|
| 125 | +
|
| 126 | +* Yahoo! Maps and OpenLayers now handle the "icon=" parameter that can come from Semantic Compound Queries, as Google Maps already did.
|
| 127 | +
|
| 128 | +====Refactoring====
|
| 129 | +
|
| 130 | +* Restructured the Query Printer classes (JavaScript based logic).
|
| 131 | +
|
| 132 | +* Made form input classes weakly typed, so they fully work with the new aliasing system.
|
| 133 | +
|
| 134 | +* Integrated the new hook system of Maps.
|
| 135 | +
|
| 136 | +* Made the form input class inherit from MapsMapFeature.
|
| 137 | +
|
| 138 | +====Bug fixes====
|
| 139 | +
|
| 140 | +* Mapping formats get added only once, as opossed to multiple times in version 0.2.2.
|
| 141 | +
|
| 142 | +* Added "elementNamePrefix" to the map names and fields of form inputs to prevent JavaScript errors.
|
| 143 | +
|
| 144 | +* When a query returns no results, nothing will be displayed, instead of an empty map.
|
| 145 | +
|
| 146 | +* The Google Maps form input now zooms in correctly when a user looks up an address.
|
| 147 | +
|
| 148 | +===Semantic Maps 0.2===
|
| 149 | +(2009-07-29)
|
| 150 | +
|
| 151 | +====New functionality====
|
| 152 | +
|
| 153 | +* Added a hook for [[Extension:Admin_Links|Admin Links]].
|
| 154 | +
|
| 155 | +* Added multi geocoder integration with form inputs.
|
| 156 | +
|
| 157 | +* Added support for the Yahoo! Geocoder (in form inputs).
|
| 158 | +
|
| 159 | +====Refactoring====
|
| 160 | +
|
| 161 | +* Restructured the Form Input classes.
|
| 162 | +
|
| 163 | +====Bug fixes====
|
| 164 | +
|
| 165 | +* Fixed issue that occurred when a custom centre is set for a Yahoo! Maps map, causing the map to not display their markers correctly.
|
| 166 | +
|
| 167 | +===Semantic Maps 0.1===
|
| 168 | +(2009-07-21)
|
| 169 | +
|
| 170 | +* Initial release, featuring both result formats and form inputs for Google Maps (+ Google Earth), Yahoo! Maps and OpenLayers.
|
Index: tags/extensions/SemanticMaps/REL_0_5/SM_GeoCoordsValue.php |
— | — | @@ -0,0 +1,335 @@ |
| 2 | +<?php
|
| 3 | +/**
|
| 4 | + * File holding the SMGeoCoordsValue class.
|
| 5 | + *
|
| 6 | + * @file SM_GeoCoordsValue.php
|
| 7 | + * @ingroup SMWDataValues
|
| 8 | + *
|
| 9 | + * @author Markus Krötzsch
|
| 10 | + * @author Jeroen De Dauw
|
| 11 | + */
|
| 12 | +
|
| 13 | +/// Unicode symbols for coordinate minutes and seconds;
|
| 14 | +/// may not display in every font ...
|
| 15 | +define('SM_GEO_MIN','′');
|
| 16 | +define('SM_GEO_SEC','″');
|
| 17 | +
|
| 18 | +/**
|
| 19 | + * Implementation of datavalues that are geographic coordinates.
|
| 20 | + *
|
| 21 | + * @author Markus Krötzsch
|
| 22 | + * @author Jeroen De Dauw
|
| 23 | + *
|
| 24 | + * @ingroup SemanticMaps
|
| 25 | + */
|
| 26 | +class SMGeoCoordsValue extends SMWDataValue {
|
| 27 | +
|
| 28 | + protected $m_N = false; // cache for localised direction labels
|
| 29 | + protected $m_E = false; // cache for localised direction labels
|
| 30 | + protected $m_W = false; // cache for localised direction labels
|
| 31 | + protected $m_S = false; // cache for localised direction labels
|
| 32 | +
|
| 33 | + protected $m_wikivalue;
|
| 34 | + protected $m_lat; // decimal latitude of current value
|
| 35 | + protected $m_long; // decimal longitude of current value
|
| 36 | + protected $m_latparts; // latitude array of four entries: degrees, minutes, seconds, direction
|
| 37 | + protected $m_longparts; // longitude array of four entries: degrees, minutes, seconds, direction
|
| 38 | + // Note: signs are used as e.g. on Google maps, i.e. S and W are negative numbers.
|
| 39 | +
|
| 40 | + protected function parseUserValue($value) {
|
| 41 | + $this->m_lat = false;
|
| 42 | + $this->m_long = false;
|
| 43 | + $this->m_latparts = false;
|
| 44 | + $this->m_longparts = false;
|
| 45 | + $this->m_wikivalue = $value;
|
| 46 | +
|
| 47 | + // first normalise some typical symbols
|
| 48 | + $this->initDirectionLabels();
|
| 49 | + $value = str_replace(array(' ', $this->m_N, $this->m_E, $this->m_W, $this->m_S, ),
|
| 50 | + array(' ','N','E','W','S'),$value);
|
| 51 | + $value = str_replace(array('°', '°'), '°', $value);
|
| 52 | + $value = str_replace(array('´', '´'),'´',$value);
|
| 53 | + $value = str_replace(array('″', '″', "''", '"', '´´', SM_GEO_MIN . SM_GEO_MIN),SM_GEO_SEC,$value);
|
| 54 | + $value = str_replace(array('′', '′', "'", '´'),SM_GEO_MIN,$value);
|
| 55 | + // now split the string
|
| 56 | + $parts = preg_split('/\s*(°|' . SM_GEO_MIN . '|' . SM_GEO_SEC . '|N|E|W|S|;)\s*/u',str_replace(', ', ';', $value) . ';', -1, PREG_SPLIT_DELIM_CAPTURE);
|
| 57 | + $curnum = false;
|
| 58 | + $angles = array(false, false, false); // temporary values for deg, min, sec
|
| 59 | + foreach ($parts as $part) {
|
| 60 | + switch ($part) {
|
| 61 | + case '°':
|
| 62 | + if ( ($angles[0] !== false) && ($this->m_lat === false) ) { // work off values found earlier
|
| 63 | + $this->setAngleValues('N',$angles);
|
| 64 | + } // else: we do not accept interchange of order (lat must be first), so there are just too many °s
|
| 65 | + if ( $curnum !== false ) {
|
| 66 | + $angles[0] = $curnum;
|
| 67 | + $curnum = false;
|
| 68 | + } else {
|
| 69 | + $this->addError(wfMsgForContent('semanticmaps_lonely_unit', $part));
|
| 70 | + }
|
| 71 | + break;
|
| 72 | + case SM_GEO_MIN:
|
| 73 | + if ( ($curnum !== false) && ($angles[1] === false) ) {
|
| 74 | + $angles[1] = $curnum;
|
| 75 | + if ($angles[0] === false) $angles[0] = 0;
|
| 76 | + $curnum = false;
|
| 77 | + } else {
|
| 78 | + $this->addError(wfMsgForContent('semanticmaps_lonely_unit', $part));
|
| 79 | + }
|
| 80 | + break;
|
| 81 | + case SM_GEO_SEC:
|
| 82 | + if ( ($curnum !== false) && ($angles[2] === false) ) {
|
| 83 | + $angles[2] = $curnum;
|
| 84 | + if ($angles[0] === false) $angles[0] = 0;
|
| 85 | + if ($angles[1] === false) $angles[1] = 0;
|
| 86 | + $curnum = false;
|
| 87 | + } else {
|
| 88 | + $this->addError(wfMsgForContent('semanticmaps_lonely_unit', $part));
|
| 89 | + }
|
| 90 | + break;
|
| 91 | + case 'N': case 'S': // interpret findings as latitude
|
| 92 | + if ( $curnum !== false ) { // work off number without °
|
| 93 | + if ($angles[0] !== false) { // "12° 34" as coordinate, complain
|
| 94 | + $this->addError(wfMsgForContent('semanticmaps_bad_latlong'));
|
| 95 | + break;
|
| 96 | + } else {
|
| 97 | + $angles[0] = $curnum;
|
| 98 | + $curnum = false;
|
| 99 | + }
|
| 100 | + }
|
| 101 | + if (($this->m_lat === false) && ($angles[0] !== false)) {
|
| 102 | + $this->setAngleValues($part,$angles);
|
| 103 | + } else {
|
| 104 | + $this->addError(wfMsgForContent('semanticmaps_bad_latlong'));
|
| 105 | + }
|
| 106 | + break;
|
| 107 | + case 'E': case 'W': // interpret findings as longitude
|
| 108 | + if ( $curnum !== false ) { // work off number without °
|
| 109 | + if ($angles[0] !== false) { // "12° 34" as coordinate, complain
|
| 110 | + $this->addError(wfMsgForContent('semanticmaps_bad_latlong'));
|
| 111 | + break;
|
| 112 | + } else {
|
| 113 | + $angles[0] = $curnum;
|
| 114 | + $curnum = false;
|
| 115 | + }
|
| 116 | + }
|
| 117 | + if (($this->m_long === false) && ($angles[0] !== false)) {
|
| 118 | + $this->setAngleValues($part,$angles);
|
| 119 | + } else {
|
| 120 | + $this->addError(wfMsgForContent('semanticmaps_bad_latlong'));
|
| 121 | + }
|
| 122 | + break;
|
| 123 | + case ';': // interpret findings as latitude
|
| 124 | + if ( $curnum !== false ) { // work off number without °
|
| 125 | + if ($angles[0] !== false) { // "12° 34" as coordinate, complain
|
| 126 | + $this->addError(wfMsgForContent('semanticmaps_bad_latlong'));
|
| 127 | + break;
|
| 128 | + } else {
|
| 129 | + $angles[0] = $curnum;
|
| 130 | + $curnum = false;
|
| 131 | + }
|
| 132 | + }
|
| 133 | + if (($this->m_lat === false) && ($angles[0] !== false)) {
|
| 134 | + $this->setAngleValues('N',$angles);
|
| 135 | + } // else: ignore ";" without complaining
|
| 136 | + break;
|
| 137 | + case '': break; // ignore
|
| 138 | + default: // should be a number (if not, errors appear elsewhere)
|
| 139 | + // no kiloseps in coordinates, use as decsep as a convenience to some users (Bug 11808):
|
| 140 | + $curnum = str_replace(wfMsgForContent('semanticmaps_kiloseparator'), wfMsgForContent('semanticmaps_decseparator'), $part);
|
| 141 | + break;
|
| 142 | + }
|
| 143 | + }
|
| 144 | +
|
| 145 | + if ( ($this->m_lat !== false) && ($this->m_long === false) && ($angles[0] !== false) ) { // no final E or W?
|
| 146 | + $this->setAngleValues('E',$angles);
|
| 147 | + }
|
| 148 | + if ( ($angles[0] !== false)||($curnum !== false)) { // unprocessed chunk, error
|
| 149 | +
|
| 150 | + }
|
| 151 | +
|
| 152 | + if ($this->m_caption === false) {
|
| 153 | + $this->m_caption = $value;
|
| 154 | + }
|
| 155 | + return true;
|
| 156 | + }
|
| 157 | +
|
| 158 | + protected function parseDBkeys($args) {
|
| 159 | + $this->m_lat = false;
|
| 160 | + $this->m_long = false;
|
| 161 | + $this->m_latparts = false;
|
| 162 | + $this->m_longparts = false;
|
| 163 | +
|
| 164 | + list($this->m_lat, $this->m_long) = explode(',', $args[0]);
|
| 165 | + $this->m_caption = $this->formatAngleValues(true) . ', ' . $this->formatAngleValues(false); // this is our output text
|
| 166 | + $this->m_wikivalue = $this->m_caption;
|
| 167 | + }
|
| 168 | +
|
| 169 | + public function getShortWikiText($linked = NULL) {
|
| 170 | + if ($this->isValid() && ($linked !== NULL) && ($linked !== false)) {
|
| 171 | + SMWOutputs::requireHeadItem(SMW_HEADER_TOOLTIP);
|
| 172 | + return '<span class="smwttinline">' . $this->m_caption . '<span class="smwttcontent">' .
|
| 173 | + wfMsgForContent('semanticmaps_label_latitude') . ' ' . $this->formatAngleValues(true) . '<br />' .
|
| 174 | + wfMsgForContent('semanticmaps_label_longitude') . ' ' . $this->formatAngleValues(false) .
|
| 175 | + '</span></span>';
|
| 176 | + } else {
|
| 177 | + return $this->m_caption;
|
| 178 | + }
|
| 179 | + }
|
| 180 | +
|
| 181 | + public function getShortHTMLText($linker = NULL) {
|
| 182 | + return $this->getShortWikiText($linker); // should be save (based on xsdvalue)
|
| 183 | + }
|
| 184 | +
|
| 185 | + public function getLongWikiText($linked = NULL) {
|
| 186 | + if (!$this->isValid()) {
|
| 187 | + return $this->getErrorText();
|
| 188 | + } else {
|
| 189 | + return $this->formatAngleValues(true) . ', ' . $this->formatAngleValues(false);
|
| 190 | + }
|
| 191 | + }
|
| 192 | +
|
| 193 | + public function getLongHTMLText($linker = NULL) {
|
| 194 | + return $this->getLongWikiText($linker);
|
| 195 | + }
|
| 196 | +
|
| 197 | + public function getDBkeys() {
|
| 198 | + $this->unstub();
|
| 199 | + return array($this->m_lat . ',' . $this->m_long);
|
| 200 | + }
|
| 201 | +
|
| 202 | + public function getWikiValue(){
|
| 203 | + $this->unstub();
|
| 204 | + return $this->m_wikivalue;
|
| 205 | + }
|
| 206 | +
|
| 207 | + public function getExportData() {
|
| 208 | + if ($this->isValid()) {
|
| 209 | + $lit = new SMWExpLiteral($this->formatAngleValues(true, false) . ', ' . $this->formatAngleValues(false, false), $this, 'http://www.w3.org/2001/XMLSchema#string');
|
| 210 | + return new SMWExpData($lit);
|
| 211 | + } else {
|
| 212 | + return NULL;
|
| 213 | + }
|
| 214 | + }
|
| 215 | +
|
| 216 | + /**
|
| 217 | + * Get and cache localised direction labels. Just for convenience.
|
| 218 | + */
|
| 219 | + protected function initDirectionLabels() {
|
| 220 | + $this->m_N = wfMsgForContent('semanticmaps_abb_north');
|
| 221 | + $this->m_E = wfMsgForContent('semanticmaps_abb_east');
|
| 222 | + $this->m_W = wfMsgForContent('semanticmaps_abb_west');
|
| 223 | + $this->m_S = wfMsgForContent('semanticmaps_abb_south');
|
| 224 | + }
|
| 225 | +
|
| 226 | + /**
|
| 227 | + * Helper function: read a possibly incomplete array of angles for one coordinate.
|
| 228 | + * The direction is one of N, E, W, S, and $angles is an array of three values,
|
| 229 | + * each possibly false if unset.
|
| 230 | + */
|
| 231 | + protected function setAngleValues($direction, &$angles) {
|
| 232 | + $numvalue = SMWDataValueFactory::newTypeIDValue('_num');
|
| 233 | + $res = 0;
|
| 234 | + $factor = 1;
|
| 235 | + for ($i=0; $i<3; $i++) {
|
| 236 | + if ($angles[$i] !== false) {
|
| 237 | + $numvalue->setUserValue($angles[$i]);
|
| 238 | + if ($numvalue->isValid() && ($numvalue->getUnit() == '')) {
|
| 239 | + $res += $numvalue->getNumericValue() / $factor;
|
| 240 | + } else {
|
| 241 | + $this->addError(wfMsgForContent('smw_nofloat', $angles[$i]));
|
| 242 | + }
|
| 243 | + }
|
| 244 | + $factor = $factor * 60;
|
| 245 | + }
|
| 246 | + switch ($direction) {
|
| 247 | + case 'N': $this->m_lat = $res; break;
|
| 248 | + case 'S': $this->m_lat = -1 * $res; break;
|
| 249 | + case 'E': $this->m_long = $res; break;
|
| 250 | + case 'W': $this->m_long = -1 * $res; break;
|
| 251 | + }
|
| 252 | + if ( (($direction == 'E') || ($direction == 'W')) &&
|
| 253 | + (($this->m_long > 180) || ($this->m_long <= -180)) ) { // bring values back into [180, -180)
|
| 254 | + $this->m_long += ($this->m_long<0)?(round(abs($this->m_long)/360)*360):(round($this->m_long/360)*-360);
|
| 255 | + }
|
| 256 | + ///TODO: also make such a normalisation for lat ...
|
| 257 | + $angles = array(false, false, false);
|
| 258 | + }
|
| 259 | +
|
| 260 | + /**
|
| 261 | + * Return array with four entries for deg, min, sec, direction,
|
| 262 | + * that corresponds to the current latitude or longitude.
|
| 263 | + */
|
| 264 | + protected function getAngleValues($lat = true) {
|
| 265 | + if ($lat) {
|
| 266 | + if ($this->m_latparts !== false) {
|
| 267 | + return $this->m_latparts;
|
| 268 | + }
|
| 269 | + $num = abs($this->m_lat);
|
| 270 | + $d = ($this->m_lat<0)?'S':'N';
|
| 271 | + } else {
|
| 272 | + if ($this->m_longparts !== false) {
|
| 273 | + return $this->m_longparts;
|
| 274 | + }
|
| 275 | + $num = abs($this->m_long);
|
| 276 | + $d = ($this->m_long<0)?'W':'E';
|
| 277 | + }
|
| 278 | + $result = array(0,0,0,$d);
|
| 279 | + $result[0] = floor($num);
|
| 280 | + $num = ($num-$result[0]) * 60;
|
| 281 | + $result[1] = floor($num);
|
| 282 | + $result[2] = ($num-$result[1]) * 60;
|
| 283 | + if ( abs($result[2]) < 0.001 ) { // limit precission, avoid conversion generated junk and EXP notation in coords
|
| 284 | + $result[2] = 0;
|
| 285 | + }
|
| 286 | + if ($lat) {
|
| 287 | + $this->m_latparts = $result;
|
| 288 | + } else {
|
| 289 | + $this->m_longparts = $result;
|
| 290 | + }
|
| 291 | + return $result;
|
| 292 | + }
|
| 293 | +
|
| 294 | + /**
|
| 295 | + * Format the current latitude or longitude. The parameter $content states
|
| 296 | + * whether the result is for content printout. Alternatively, a language-
|
| 297 | + * independent result is generated.
|
| 298 | + */
|
| 299 | + protected function formatAngleValues($lat = true, $content = true) {
|
| 300 | + $values = $this->getAngleValues($lat);
|
| 301 | + if ($content) {
|
| 302 | + $this->initDirectionLabels();
|
| 303 | + $result = smwfNumberFormat($values[0]) . '°' . smwfNumberFormat($values[1]) . SM_GEO_MIN .
|
| 304 | + smwfNumberFormat($values[2]) . SM_GEO_SEC;
|
| 305 | + switch ($values[3]) {
|
| 306 | + case 'N': return $result . $this->m_N;
|
| 307 | + case 'E': return $result . $this->m_E;
|
| 308 | + case 'W': return $result . $this->m_W;
|
| 309 | + case 'S': return $result . $this->m_S;
|
| 310 | + }
|
| 311 | + } else {
|
| 312 | + return smwfNumberFormat($values[0]) . '°' . smwfNumberFormat($values[1]) . SM_GEO_MIN .
|
| 313 | + smwfNumberFormat($values[2]) . SM_GEO_SEC . $values[3];
|
| 314 | + }
|
| 315 | + }
|
| 316 | +
|
| 317 | + protected function getServiceLinkParams() {
|
| 318 | + // Create links to mapping services based on a wiki-editable message. The parameters
|
| 319 | + // available to the message are:
|
| 320 | + // $1: latitude integer degrees, $2: longitude integer degrees
|
| 321 | + // $3: latitude integer minutes, $4: longitude integer minutes
|
| 322 | + // $5: latitude integer seconds, $6: longitude integer seconds,
|
| 323 | + // $7: latitude direction string (N or S), $8: longitude direction string (W or E)
|
| 324 | + // $9: latitude in decimal degrees, $10: longitude in decimal degrees
|
| 325 | + // $11: sign (- if south) for latitude, $12: sign (- if west) for longitude
|
| 326 | + $latvals = $this->getAngleValues(true);
|
| 327 | + $longvals = $this->getAngleValues(false);
|
| 328 | + return array($latvals[0], $longvals[0],
|
| 329 | + $latvals[1], $longvals[1],
|
| 330 | + round($latvals[2]), round($longvals[2]),
|
| 331 | + $latvals[3], $longvals[3],
|
| 332 | + abs($this->m_lat), abs($this->m_long),
|
| 333 | + $latvals[3]=='S'?'-':'', $longvals[3]=='W'?'-':'');
|
| 334 | + }
|
| 335 | +
|
| 336 | +}
|
Index: tags/extensions/SemanticMaps/REL_0_5/SMUtilityFunctions.js |
— | — | @@ -0,0 +1,19 @@ |
| 2 | + /**
|
| 3 | + * Javascript utility functions for Semantic Maps.
|
| 4 | + *
|
| 5 | + * @file SMUtilityFunctions.js
|
| 6 | + * @ingroup SemanticMaps
|
| 7 | + *
|
| 8 | + * @author Robert Buzink
|
| 9 | + * @author Yaron Koren
|
| 10 | + * @author Jeroen De Dauw
|
| 11 | + */
|
| 12 | +
|
| 13 | +function convertLatToDMS (val) {
|
| 14 | + return Math.abs(val) + "° " + ( val < 0 ? "S" : "N" );
|
| 15 | +}
|
| 16 | +
|
| 17 | +function convertLngToDMS (val) {
|
| 18 | + return Math.abs(val) + "° " + ( val < 0 ? "W" : "E" );
|
| 19 | +
|
| 20 | +} |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/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_5/SemanticMaps.i18n.php |
— | — | @@ -0,0 +1,906 @@ |
| 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 | +
|
| 19 | +$messages['en'] = array(
|
| 20 | + // General
|
| 21 | + 'semanticmaps_name' => 'Semantic Maps',
|
| 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 | +
|
| 25 | + // Geo coord data type
|
| 26 | + 'semanticmaps_lonely_unit' => 'No number found before the symbol "$1".', // $1 is something like °
|
| 27 | + 'semanticmaps_bad_latlong' => 'Latitude and longitude must be given only once, and with valid coordinates.',
|
| 28 | + 'semanticmaps_abb_north' => 'N',
|
| 29 | + 'semanticmaps_abb_east' => 'E',
|
| 30 | + 'semanticmaps_abb_south' => 'S',
|
| 31 | + 'semanticmaps_abb_west' => 'W',
|
| 32 | + 'semanticmaps_label_latitude' => 'Latitude:',
|
| 33 | + 'semanticmaps_label_longitude' => 'Longitude:',
|
| 34 | +
|
| 35 | + // Forms
|
| 36 | + 'semanticmaps_lookupcoordinates' => 'Look up coordinates',
|
| 37 | + 'semanticmaps_enteraddresshere' => 'Enter address here',
|
| 38 | + 'semanticmaps_notfound' => 'not found',
|
| 39 | +
|
| 40 | + // Parameter descriptions
|
| 41 | + 'semanticmaps_paramdesc_format' => 'The mapping service used to generate the map',
|
| 42 | + 'semanticmaps_paramdesc_geoservice' => 'The geocoding service used to turn addresses into coordinates',
|
| 43 | + 'semanticmaps_paramdesc_height' => 'The height of the map, in pixels (default is $1)',
|
| 44 | + 'semanticmaps_paramdesc_width' => 'The width of the map, in pixels (default is $1)',
|
| 45 | + 'semanticmaps_paramdesc_zoom' => 'The zoom level of the map',
|
| 46 | + 'semanticmaps_paramdesc_centre' => 'The coordinates of the maps\' centre',
|
| 47 | + 'semanticmaps_paramdesc_controls' => 'The user controls placed on the map',
|
| 48 | + 'semanticmaps_paramdesc_types' => 'The map types available on the map',
|
| 49 | + 'semanticmaps_paramdesc_type' => 'The default map type for the map',
|
| 50 | + 'semanticmaps_paramdesc_overlays' => 'The overlays available on the map',
|
| 51 | + 'semanticmaps_paramdesc_autozoom' => 'If zoom in and out by using the mouse scroll wheel is enabled',
|
| 52 | + 'semanticmaps_paramdesc_layers' => 'The layers available on the map',
|
| 53 | +);
|
| 54 | +
|
| 55 | +/** Message documentation (Message documentation)
|
| 56 | + * @author Fryed-peach
|
| 57 | + * @author Purodha
|
| 58 | + * @author Raymond
|
| 59 | + */
|
| 60 | +$messages['qqq'] = array(
|
| 61 | + 'semanticmaps_desc' => '{{desc}}
|
| 62 | +
|
| 63 | +* $1: a list of available map services',
|
| 64 | + 'semanticmaps_label_latitude' => '{{Identical|Latitude}}',
|
| 65 | + 'semanticmaps_label_longitude' => '{{Identical|Longitude}}',
|
| 66 | + '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.',
|
| 67 | +);
|
| 68 | +
|
| 69 | +/** Afrikaans (Afrikaans)
|
| 70 | + * @author Naudefj
|
| 71 | + */
|
| 72 | +$messages['af'] = array(
|
| 73 | + '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]).
|
| 74 | +Beskikbare kaartdienste: $1',
|
| 75 | + 'semanticmaps_lonely_unit' => 'Daar is nie \'n getal voor die "$1"-simbool nie.',
|
| 76 | + 'semanticmaps_bad_latlong' => 'Lengte en breedte moet slegs een keer gegee word, en moet geldige koördinate wees.',
|
| 77 | + 'semanticmaps_abb_north' => 'N',
|
| 78 | + 'semanticmaps_abb_east' => 'O',
|
| 79 | + 'semanticmaps_abb_south' => 'S',
|
| 80 | + 'semanticmaps_abb_west' => 'W',
|
| 81 | + 'semanticmaps_label_latitude' => 'Breedte:',
|
| 82 | + 'semanticmaps_label_longitude' => 'Lengte:',
|
| 83 | + 'semanticmaps_lookupcoordinates' => 'Soek koördinate op',
|
| 84 | + 'semanticmaps_enteraddresshere' => 'Voer adres hier in',
|
| 85 | + 'semanticmaps_notfound' => 'nie gevind nie',
|
| 86 | + 'semanticmaps_paramdesc_format' => 'Die kaartdiens wat die kaart lewer',
|
| 87 | + 'semanticmaps_paramdesc_geoservice' => 'Die geokoderingsdiens gebruik om adresse na koördinate om te skakel',
|
| 88 | + 'semanticmaps_paramdesc_height' => 'Die hoogte van die kaart in spikkels (standaard is $1)',
|
| 89 | + 'semanticmaps_paramdesc_width' => 'Die breedte van die kaart in spikkels (standaard is $1)',
|
| 90 | + 'semanticmaps_paramdesc_zoom' => 'Die zoom-vlak van die kaart',
|
| 91 | + 'semanticmaps_paramdesc_centre' => 'Die koördinate van die middel van die kaart',
|
| 92 | + 'semanticmaps_paramdesc_controls' => 'Die gebruikerskontroles op die kaart geplaas',
|
| 93 | + 'semanticmaps_paramdesc_types' => 'Die kaarttipes beskikbaar op die kaart',
|
| 94 | + 'semanticmaps_paramdesc_type' => 'Die standaard kaarttipe vir die kaart',
|
| 95 | + 'semanticmaps_paramdesc_overlays' => 'Die oorleggings beskikbaar op die kaart',
|
| 96 | + 'semanticmaps_paramdesc_autozoom' => 'Of in- en uit-zoom met die muis se wiel moontlik is',
|
| 97 | + 'semanticmaps_paramdesc_layers' => 'Die lae beskikbaar op die kaart',
|
| 98 | +);
|
| 99 | +
|
| 100 | +/** Arabic (العربية)
|
| 101 | + * @author Meno25
|
| 102 | + * @author OsamaK
|
| 103 | + */
|
| 104 | +$messages['ar'] = array(
|
| 105 | + 'semanticmaps_name' => 'خرائط دلالية',
|
| 106 | + 'semanticmaps_desc' => 'يقدم إمكانية عرض وتعديل بيانات التنسيق التي خزنها امتداد سيمانتيك ميدياويكي ([http://wiki.bn2vs.com/wiki/Semantic_Maps تجربة]).
|
| 107 | +خدمات الخرائط المتوفرة: $1',
|
| 108 | + 'semanticmaps_lookupcoordinates' => 'ابحث عن الإحداثيات',
|
| 109 | + 'semanticmaps_enteraddresshere' => 'أدخل العنوان هنا',
|
| 110 | + 'semanticmaps_notfound' => 'لم يوجد',
|
| 111 | +);
|
| 112 | +
|
| 113 | +/** Egyptian Spoken Arabic (مصرى)
|
| 114 | + * @author Ghaly
|
| 115 | + * @author Meno25
|
| 116 | + */
|
| 117 | +$messages['arz'] = array(
|
| 118 | + 'semanticmaps_lookupcoordinates' => 'ابحث عن الإحداثيات',
|
| 119 | + 'semanticmaps_enteraddresshere' => 'أدخل العنوان هنا',
|
| 120 | +);
|
| 121 | +
|
| 122 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
|
| 123 | + * @author EugeneZelenko
|
| 124 | + * @author Jim-by
|
| 125 | + */
|
| 126 | +$messages['be-tarask'] = array(
|
| 127 | + 'semanticmaps_name' => 'Сэмантычныя мапы',
|
| 128 | + 'semanticmaps_desc' => 'Забясьпечвае магчымасьць прагляду і рэдагаваньня зьвестак пра каардынаты, якія захоўваюцца з дапамогай пашырэньня Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps дэманстрацыя]). Даступныя сэрвісы мапаў: $1',
|
| 129 | + 'semanticmaps_lonely_unit' => 'Лік перад сымбалем «$1» ня знойдзены.',
|
| 130 | + 'semanticmaps_bad_latlong' => 'Даўгата і шырата павінны падавацца толькі аднойчы і са слушнымі каардынатамі.',
|
| 131 | + 'semanticmaps_abb_north' => 'Пн.',
|
| 132 | + 'semanticmaps_abb_east' => 'У.',
|
| 133 | + 'semanticmaps_abb_south' => 'Пд.',
|
| 134 | + 'semanticmaps_abb_west' => 'З.',
|
| 135 | + 'semanticmaps_label_latitude' => 'Шырата:',
|
| 136 | + 'semanticmaps_label_longitude' => 'Даўгата:',
|
| 137 | + 'semanticmaps_lookupcoordinates' => 'Пошук каардынатаў',
|
| 138 | + 'semanticmaps_enteraddresshere' => 'Увядзіце тут адрас',
|
| 139 | + 'semanticmaps_notfound' => 'ня знойдзена',
|
| 140 | + 'semanticmaps_paramdesc_format' => 'Картаграфічны сэрвіс, які выкарыстоўваецца для стварэньня мапаў',
|
| 141 | + 'semanticmaps_paramdesc_geoservice' => 'Сэрвіс геаграфічнага кадаваньня, які выкарыстоўваецца для пераўтварэньня адрасоў ў каардынаты',
|
| 142 | + 'semanticmaps_paramdesc_height' => 'Вышыня мапы ў піксэлях (па змоўчваньні $1)',
|
| 143 | + 'semanticmaps_paramdesc_width' => 'Шырыня мапы ў піксэлях (па змоўчваньні $1)',
|
| 144 | + 'semanticmaps_paramdesc_zoom' => 'Маштаб мапы',
|
| 145 | + 'semanticmaps_paramdesc_centre' => 'Каардынаты цэнтру мапы',
|
| 146 | + 'semanticmaps_paramdesc_controls' => 'Элемэнты кіраваньня на мапе',
|
| 147 | + 'semanticmaps_paramdesc_types' => 'Тыпы мапы даступныя на мапе',
|
| 148 | + 'semanticmaps_paramdesc_type' => 'Тып мапы па змоўчваньні',
|
| 149 | + 'semanticmaps_paramdesc_overlays' => 'Даступныя слаі на мапе',
|
| 150 | + 'semanticmaps_paramdesc_autozoom' => 'Калі ўключана зьмяншэньне ці павялічэньне маштабу праз кола пракруткі мышы',
|
| 151 | + 'semanticmaps_paramdesc_layers' => 'Даступныя слаі на мапе',
|
| 152 | +);
|
| 153 | +
|
| 154 | +/** Breton (Brezhoneg)
|
| 155 | + * @author Fulup
|
| 156 | + */
|
| 157 | +$messages['br'] = array(
|
| 158 | + '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',
|
| 159 | + 'semanticmaps_lookupcoordinates' => 'Istimañ an daveennoù',
|
| 160 | + 'semanticmaps_enteraddresshere' => "Merkit ar chomlec'h amañ",
|
| 161 | + 'semanticmaps_notfound' => "N'eo ket bet kavet",
|
| 162 | +);
|
| 163 | +
|
| 164 | +/** Bosnian (Bosanski)
|
| 165 | + * @author CERminator
|
| 166 | + */
|
| 167 | +$messages['bs'] = array(
|
| 168 | + '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]).
|
| 169 | +Dostupne usluge mapa: $1',
|
| 170 | + 'semanticmaps_lonely_unit' => 'Nije pronađen broj ispred simbola "$1".',
|
| 171 | + 'semanticmaps_bad_latlong' => 'Geografska širina i dužina moraju biti navedene samo jednom i sa valjanim koordinatama.',
|
| 172 | + 'semanticmaps_abb_north' => 'S',
|
| 173 | + 'semanticmaps_abb_east' => 'I',
|
| 174 | + 'semanticmaps_abb_south' => 'J',
|
| 175 | + 'semanticmaps_abb_west' => 'Z',
|
| 176 | + 'semanticmaps_label_latitude' => 'Geografska širina:',
|
| 177 | + 'semanticmaps_label_longitude' => 'Geografska dužina:',
|
| 178 | + 'semanticmaps_lookupcoordinates' => 'Nađi koordinate',
|
| 179 | + 'semanticmaps_enteraddresshere' => 'Unesite adresu ovdje',
|
| 180 | + 'semanticmaps_notfound' => 'nije pronađeno',
|
| 181 | + 'semanticmaps_paramdesc_height' => 'Visina mape, u pikselima (pretpostavljeno je $1)',
|
| 182 | + 'semanticmaps_paramdesc_width' => 'Širina mape, u pikselima (pretpostavljeno je $1)',
|
| 183 | + 'semanticmaps_paramdesc_zoom' => 'Nivo zumiranja mape',
|
| 184 | + 'semanticmaps_paramdesc_types' => 'Tipovi karti dostupnih na mapi',
|
| 185 | + 'semanticmaps_paramdesc_layers' => 'Slojevi dostupni na mapi',
|
| 186 | +);
|
| 187 | +
|
| 188 | +/** Catalan (Català)
|
| 189 | + * @author Paucabot
|
| 190 | + */
|
| 191 | +$messages['ca'] = array(
|
| 192 | + 'semanticmaps_notfound' => "no s'ha trobat",
|
| 193 | +);
|
| 194 | +
|
| 195 | +/** German (Deutsch)
|
| 196 | + * @author DaSch
|
| 197 | + * @author Pill
|
| 198 | + * @author Umherirrender
|
| 199 | + */
|
| 200 | +$messages['de'] = array(
|
| 201 | + '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]).
|
| 202 | +Unterstützte Kartendienste: $1',
|
| 203 | + 'semanticmaps_abb_north' => 'N',
|
| 204 | + 'semanticmaps_abb_east' => 'O',
|
| 205 | + 'semanticmaps_abb_south' => 'S',
|
| 206 | + 'semanticmaps_abb_west' => 'W',
|
| 207 | + 'semanticmaps_label_latitude' => 'Breitengrad:',
|
| 208 | + 'semanticmaps_label_longitude' => 'Längengrad:',
|
| 209 | + 'semanticmaps_lookupcoordinates' => 'Koordinaten nachschlagen',
|
| 210 | + 'semanticmaps_enteraddresshere' => 'Adresse hier eingeben',
|
| 211 | + 'semanticmaps_notfound' => 'nicht gefunden',
|
| 212 | +);
|
| 213 | +
|
| 214 | +/** Lower Sorbian (Dolnoserbski)
|
| 215 | + * @author Michawiki
|
| 216 | + */
|
| 217 | +$messages['dsb'] = array(
|
| 218 | + '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]).
|
| 219 | +K dispoziciji stojece kórtowe słužby: $1.',
|
| 220 | + 'semanticmaps_lonely_unit' => 'Pśed symbolom "$1" žedna licba namakana.',
|
| 221 | + 'semanticmaps_bad_latlong' => 'Šyrina a dlinina musytej se jano jaden raz pódaś, a z płaśiwymi koordinatami.',
|
| 222 | + 'semanticmaps_abb_north' => 'PP',
|
| 223 | + 'semanticmaps_abb_east' => 'PZ',
|
| 224 | + 'semanticmaps_abb_south' => 'PD',
|
| 225 | + 'semanticmaps_abb_west' => 'PW',
|
| 226 | + 'semanticmaps_label_latitude' => 'Šyrina:',
|
| 227 | + 'semanticmaps_label_longitude' => 'Dlinina:',
|
| 228 | + 'semanticmaps_lookupcoordinates' => 'Za koordinatami póglědaś',
|
| 229 | + 'semanticmaps_enteraddresshere' => 'Zapódaj how adresu',
|
| 230 | + 'semanticmaps_notfound' => 'njenamakany',
|
| 231 | + 'semanticmaps_paramdesc_format' => 'Kartěrowańska słužba, kótaraž se wužywa, aby napórała kórtu',
|
| 232 | + 'semanticmaps_paramdesc_geoservice' => 'Geokoděrowańska słužba, kótaraž se wužywa, aby pśetwóriła adrese do koordinatow',
|
| 233 | + 'semanticmaps_paramdesc_height' => 'Wusokosć kórty, w pikselach (standard jo $1)',
|
| 234 | + 'semanticmaps_paramdesc_width' => 'Šyrokosć kórty, w pikselach (standard jo $1)',
|
| 235 | + 'semanticmaps_paramdesc_zoom' => 'Skalěrowański schóźeńk kórty',
|
| 236 | + 'semanticmaps_paramdesc_centre' => 'Koordinaty srjejźišća kórty',
|
| 237 | + 'semanticmaps_paramdesc_controls' => 'Wužywarske elementy na kórśe',
|
| 238 | + 'semanticmaps_paramdesc_types' => 'Kórtowe typy, kótarež stoje za kórtu k dispoziciji',
|
| 239 | + 'semanticmaps_paramdesc_type' => 'Standardny kórtowy typ za kórtu',
|
| 240 | + 'semanticmaps_paramdesc_overlays' => 'Pśewarstowanja, kótarež stoje za kórtu k dispoziciji',
|
| 241 | + 'semanticmaps_paramdesc_autozoom' => 'Jolic pówětšenje a pómjeńšenje z pomocu kólaska myški jo zmóžnjone',
|
| 242 | + 'semanticmaps_paramdesc_layers' => 'Warsty, kótarež stoje za kórtu k dispoziciji',
|
| 243 | +);
|
| 244 | +
|
| 245 | +/** Greek (Ελληνικά)
|
| 246 | + * @author ZaDiak
|
| 247 | + */
|
| 248 | +$messages['el'] = array(
|
| 249 | + 'semanticmaps_lookupcoordinates' => 'Επιθεώρηση συντεταγμένων',
|
| 250 | + 'semanticmaps_enteraddresshere' => 'Εισαγωγή διεύθυνσης εδώ',
|
| 251 | + 'semanticmaps_notfound' => 'δεν βρέθηκε',
|
| 252 | +);
|
| 253 | +
|
| 254 | +/** Esperanto (Esperanto)
|
| 255 | + * @author Yekrats
|
| 256 | + */
|
| 257 | +$messages['eo'] = array(
|
| 258 | + 'semanticmaps_lookupcoordinates' => 'Rigardi koordinatojn',
|
| 259 | +);
|
| 260 | +
|
| 261 | +/** Spanish (Español)
|
| 262 | + * @author Crazymadlover
|
| 263 | + * @author Imre
|
| 264 | + * @author Locos epraix
|
| 265 | + */
|
| 266 | +$messages['es'] = array(
|
| 267 | + '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]).
|
| 268 | +Servicios de mapas disponibles: $1',
|
| 269 | + 'semanticmaps_lookupcoordinates' => 'Busque las coordenadas',
|
| 270 | + 'semanticmaps_enteraddresshere' => 'Ingresar dirección aquí',
|
| 271 | + 'semanticmaps_notfound' => 'no encontrado',
|
| 272 | +);
|
| 273 | +
|
| 274 | +/** Basque (Euskara)
|
| 275 | + * @author An13sa
|
| 276 | + */
|
| 277 | +$messages['eu'] = array(
|
| 278 | + 'semanticmaps_lookupcoordinates' => 'Koordenatuak bilatu',
|
| 279 | +);
|
| 280 | +
|
| 281 | +/** Finnish (Suomi)
|
| 282 | + * @author Str4nd
|
| 283 | + */
|
| 284 | +$messages['fi'] = array(
|
| 285 | + 'semanticmaps_notfound' => 'ei löytynyt',
|
| 286 | +);
|
| 287 | +
|
| 288 | +/** French (Français)
|
| 289 | + * @author Crochet.david
|
| 290 | + * @author Grondin
|
| 291 | + * @author IAlex
|
| 292 | + * @author Jean-Frédéric
|
| 293 | + * @author PieRRoMaN
|
| 294 | + */
|
| 295 | +$messages['fr'] = array(
|
| 296 | + 'semanticmaps_desc' => "Permet de voir et modifier les données de coordonnées stockées à travers l'extension Semantic MediaWiki. Services de cartes disponibles : $1. [http://www.mediawiki.org/wiki/Extension:Semantic_Maps Documentation]. [http://wiki.bn2vs.com/wiki/Semantic_Maps Démo]",
|
| 297 | + 'semanticmaps_lonely_unit' => 'Aucun nombre trouvé devant le symbole « $1 ».',
|
| 298 | + 'semanticmaps_bad_latlong' => "La latitude et la longitude ne doivent être données qu'une fois, et avec des coordonnées valides.",
|
| 299 | + 'semanticmaps_abb_north' => 'N',
|
| 300 | + 'semanticmaps_abb_east' => 'E',
|
| 301 | + 'semanticmaps_abb_south' => 'S',
|
| 302 | + 'semanticmaps_abb_west' => 'O',
|
| 303 | + 'semanticmaps_label_latitude' => 'Latitude :',
|
| 304 | + 'semanticmaps_label_longitude' => 'Longitude :',
|
| 305 | + 'semanticmaps_lookupcoordinates' => 'Estimer les coordonnées',
|
| 306 | + 'semanticmaps_enteraddresshere' => 'Entrez ici l’adresse',
|
| 307 | + 'semanticmaps_notfound' => 'pas trouvé',
|
| 308 | + 'semanticmaps_paramdesc_format' => 'Le service de cartographie utilisé pour générer la carte',
|
| 309 | + 'semanticmaps_paramdesc_geoservice' => 'Le service de géocodage utilisé pour transformer les adresses en coordonnées',
|
| 310 | + 'semanticmaps_paramdesc_height' => 'La hauteur de la carte, en pixels ($1 par défaut)',
|
| 311 | + 'semanticmaps_paramdesc_width' => 'La largeur de la carte, en pixels ($1 par défaut)',
|
| 312 | + 'semanticmaps_paramdesc_zoom' => "Le niveau d'agrandissement de la carte",
|
| 313 | + 'semanticmaps_paramdesc_centre' => 'Les coordonnées du centre de la carte',
|
| 314 | + 'semanticmaps_paramdesc_controls' => 'Les contrôles utilisateurs placés sur la carte',
|
| 315 | + 'semanticmaps_paramdesc_types' => 'Les types de cartes disponibles sur la carte',
|
| 316 | + 'semanticmaps_paramdesc_type' => 'Le type de carte par défaut pour la carte',
|
| 317 | + 'semanticmaps_paramdesc_overlays' => 'Les revêtements disponibles sur la carte',
|
| 318 | + 'semanticmaps_paramdesc_autozoom' => 'Si le zoom avant et arrière en utilisant la molette de la souris est activé',
|
| 319 | + 'semanticmaps_paramdesc_layers' => 'Les revêtements disponibles sur la carte',
|
| 320 | +);
|
| 321 | +
|
| 322 | +/** Galician (Galego)
|
| 323 | + * @author Toliño
|
| 324 | + */
|
| 325 | +$messages['gl'] = array(
|
| 326 | + '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]).
|
| 327 | +Servizos de mapa dispoñibles: $1',
|
| 328 | + 'semanticmaps_lonely_unit' => 'Non se atopou ningún número antes do símbolo "$1".',
|
| 329 | + 'semanticmaps_bad_latlong' => 'A latitude e mais a lonxitude só se deben proporcionar unha vez, e con coordenadas válidas.',
|
| 330 | + 'semanticmaps_abb_north' => 'N',
|
| 331 | + 'semanticmaps_abb_east' => 'L',
|
| 332 | + 'semanticmaps_abb_south' => 'S',
|
| 333 | + 'semanticmaps_abb_west' => 'O',
|
| 334 | + 'semanticmaps_label_latitude' => 'Latitude:',
|
| 335 | + 'semanticmaps_label_longitude' => 'Lonxitude:',
|
| 336 | + 'semanticmaps_lookupcoordinates' => 'Ver as coordenadas',
|
| 337 | + 'semanticmaps_enteraddresshere' => 'Introduza o enderezo aquí',
|
| 338 | + 'semanticmaps_notfound' => 'non se atopou',
|
| 339 | + 'semanticmaps_paramdesc_format' => 'O servizo de cartografía utilizado para xerar o mapa',
|
| 340 | + 'semanticmaps_paramdesc_geoservice' => 'O servizo de xeocodificación usado para transformar enderezos en coordenadas',
|
| 341 | + 'semanticmaps_paramdesc_height' => 'A altura do mapa, en píxeles (por defecto, $1)',
|
| 342 | + 'semanticmaps_paramdesc_width' => 'O largo do mapa, en píxeles (por defecto, $1)',
|
| 343 | + 'semanticmaps_paramdesc_zoom' => 'O nivel de zoom do mapa',
|
| 344 | + 'semanticmaps_paramdesc_centre' => 'As coordenadas do centro do mapa',
|
| 345 | + 'semanticmaps_paramdesc_controls' => 'Os controis de usuario situados no mapa',
|
| 346 | + 'semanticmaps_paramdesc_types' => 'Os tipos de mapa dispoñibles no mapa',
|
| 347 | + 'semanticmaps_paramdesc_type' => 'O tipo de mapa por defecto para o mapa',
|
| 348 | + 'semanticmaps_paramdesc_overlays' => 'As sobreposicións dispoñibles no mapa',
|
| 349 | + 'semanticmaps_paramdesc_autozoom' => 'Activa o achegamento e afastamento coa roda do rato',
|
| 350 | + 'semanticmaps_paramdesc_layers' => 'As capas dispoñibles no mapa',
|
| 351 | +);
|
| 352 | +
|
| 353 | +/** Swiss German (Alemannisch)
|
| 354 | + * @author Als-Holder
|
| 355 | + */
|
| 356 | +$messages['gsw'] = array(
|
| 357 | + '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]',
|
| 358 | + 'semanticmaps_lonely_unit' => 'Kei Nummere gfunde vor em Zeiche „$1“.',
|
| 359 | + 'semanticmaps_bad_latlong' => 'D Lengi un d Breiti derfe nume eimol yygee wäre, un mit giltige Koordinate.',
|
| 360 | + 'semanticmaps_abb_north' => 'N',
|
| 361 | + 'semanticmaps_abb_east' => 'O',
|
| 362 | + 'semanticmaps_abb_south' => 'S',
|
| 363 | + 'semanticmaps_abb_west' => 'W',
|
| 364 | + 'semanticmaps_label_latitude' => 'Breiti:',
|
| 365 | + 'semanticmaps_label_longitude' => 'Lengi:',
|
| 366 | + 'semanticmaps_lookupcoordinates' => 'Koordinate nooluege',
|
| 367 | + 'semanticmaps_enteraddresshere' => 'Doo Adräss yygee',
|
| 368 | + 'semanticmaps_notfound' => 'nit gfunde',
|
| 369 | + 'semanticmaps_paramdesc_format' => 'Dr Chartedienscht, wu brucht wäre soll zum Erzyyge vu dr Charte',
|
| 370 | + 'semanticmaps_paramdesc_geoservice' => 'Dr Geokodierigs-Service, wu brucht wäre soll zum umwandle vu Adrässe in Koordinate',
|
| 371 | + 'semanticmaps_paramdesc_height' => 'D Hechi vu dr Charte, in Pixel (Standard: $1)',
|
| 372 | + 'semanticmaps_paramdesc_width' => 'D Breiti vu dr Charte, in Pixel (Standard: $1)',
|
| 373 | + 'semanticmaps_paramdesc_zoom' => 'S Zoom-Level vu dr Charte',
|
| 374 | + 'semanticmaps_paramdesc_centre' => 'D Koordinate vum Mittelpunkt vu dr Charte',
|
| 375 | + 'semanticmaps_paramdesc_controls' => 'D Hilfsmittel, wu in d Charte yygfiegt sin',
|
| 376 | + 'semanticmaps_paramdesc_types' => 'D Chartetype, wu fir d Charte verfiegbar sin',
|
| 377 | + 'semanticmaps_paramdesc_type' => 'Dr Standard-Chartetyp fir d Charte',
|
| 378 | + 'semanticmaps_paramdesc_overlays' => 'D Overlays, wu fir d Charte verfiegbar sin',
|
| 379 | + 'semanticmaps_paramdesc_autozoom' => 'Eb mer e Charte cha vergreßere oder verchleinere mit em Muusrad',
|
| 380 | + 'semanticmaps_paramdesc_layers' => 'D Lage, wu fir Charte verfiegbar sin',
|
| 381 | +);
|
| 382 | +
|
| 383 | +/** Hebrew (עברית)
|
| 384 | + * @author Rotemliss
|
| 385 | + * @author YaronSh
|
| 386 | + */
|
| 387 | +$messages['he'] = array(
|
| 388 | + 'semanticmaps_desc' => 'הוספת האפשרות לצפייה ולעריכה בנתוני קואורדינטה המאוחסנים דרך הרחבת המדיה־ויקי הסמנטי ([http://wiki.bn2vs.com/wiki/Semantic_Maps הדגמה]).
|
| 389 | +שירותי מפה זמינים: $1',
|
| 390 | + 'semanticmaps_lookupcoordinates' => 'חיפוש קואורדינטות',
|
| 391 | + 'semanticmaps_enteraddresshere' => 'כתבו כתובת כאן',
|
| 392 | + 'semanticmaps_notfound' => 'לא נמצאה',
|
| 393 | +);
|
| 394 | +
|
| 395 | +/** Upper Sorbian (Hornjoserbsce)
|
| 396 | + * @author Michawiki
|
| 397 | + */
|
| 398 | +$messages['hsb'] = array(
|
| 399 | + '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',
|
| 400 | + 'semanticmaps_lonely_unit' => 'Před symbolom "$1" žana ličba namakana.',
|
| 401 | + 'semanticmaps_bad_latlong' => 'Šěrina a dołhosć dyrbitej so jenož jedyn raz podać a z płaćiwymi koordinatami.',
|
| 402 | + 'semanticmaps_abb_north' => 'S',
|
| 403 | + 'semanticmaps_abb_east' => 'W',
|
| 404 | + 'semanticmaps_abb_south' => 'J',
|
| 405 | + 'semanticmaps_abb_west' => 'Z',
|
| 406 | + 'semanticmaps_label_latitude' => 'Šěrina:',
|
| 407 | + 'semanticmaps_label_longitude' => 'Dołhosć:',
|
| 408 | + 'semanticmaps_lookupcoordinates' => 'Za koordinatami hladać',
|
| 409 | + 'semanticmaps_enteraddresshere' => 'Zapodaj tu adresu',
|
| 410 | + 'semanticmaps_notfound' => 'njenamakany',
|
| 411 | + 'semanticmaps_paramdesc_format' => 'Kartěrowanska słužba, kotraž so wužiwa, zo by kartu wutworiła',
|
| 412 | + 'semanticmaps_paramdesc_geoservice' => 'Geokodowanska słužba, kotraž so wužiwa, zo by adresy do koordinatow přetworiła',
|
| 413 | + 'semanticmaps_paramdesc_height' => 'Wysokosć karty, w pikselach (standard je $1)',
|
| 414 | + 'semanticmaps_paramdesc_width' => 'Šěrokosć karty, w pikselach (standard je $1)',
|
| 415 | + 'semanticmaps_paramdesc_zoom' => 'Skalowanski schodźenk karty',
|
| 416 | + 'semanticmaps_paramdesc_centre' => 'Koordinaty srjedźišća karty',
|
| 417 | + 'semanticmaps_paramdesc_controls' => 'Wužiwarske elementy na karće',
|
| 418 | + 'semanticmaps_paramdesc_types' => 'Kartowe typy, kotrež za kartu k dispoziciji steja',
|
| 419 | + 'semanticmaps_paramdesc_type' => 'Standardny kartowy typ za kartu',
|
| 420 | + 'semanticmaps_paramdesc_overlays' => 'Naworštowanja, kotrež za kartu k dispoziciji steja',
|
| 421 | + 'semanticmaps_paramdesc_autozoom' => 'Jeli powjetšenje a pomjenšenje z pomocu kolesko myški je zmóžnjene',
|
| 422 | + 'semanticmaps_paramdesc_layers' => 'Woršty, kotrež za kartu k dispoziciji steja',
|
| 423 | +);
|
| 424 | +
|
| 425 | +/** Hungarian (Magyar)
|
| 426 | + * @author Glanthor Reviol
|
| 427 | + */
|
| 428 | +$messages['hu'] = array(
|
| 429 | + '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]).
|
| 430 | +Elérhető térképszolgáltatók: $1',
|
| 431 | + 'semanticmaps_lookupcoordinates' => 'Koordináták felkeresése',
|
| 432 | + 'semanticmaps_enteraddresshere' => 'Add meg a címet itt',
|
| 433 | + 'semanticmaps_notfound' => 'nincs találat',
|
| 434 | +);
|
| 435 | +
|
| 436 | +/** Interlingua (Interlingua)
|
| 437 | + * @author McDutchie
|
| 438 | + */
|
| 439 | +$messages['ia'] = array(
|
| 440 | + 'semanticmaps_desc' => 'Permitte vider e modificar datos de coordinatas immagazinate per le extension Semantic MediaWiki
|
| 441 | +([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]).
|
| 442 | +Servicios de cartas disponibile: $1',
|
| 443 | + 'semanticmaps_lonely_unit' => 'Nulle numero trovate ante le symbolo "$1".',
|
| 444 | + 'semanticmaps_bad_latlong' => 'Latitude e longitude debe esser date solo un vice, e con valide coordinatas.',
|
| 445 | + 'semanticmaps_abb_north' => 'N',
|
| 446 | + 'semanticmaps_abb_east' => 'E',
|
| 447 | + 'semanticmaps_abb_south' => 'S',
|
| 448 | + 'semanticmaps_abb_west' => 'W',
|
| 449 | + 'semanticmaps_label_latitude' => 'Latitude:',
|
| 450 | + 'semanticmaps_label_longitude' => 'Longitude:',
|
| 451 | + 'semanticmaps_lookupcoordinates' => 'Cercar coordinatas',
|
| 452 | + 'semanticmaps_enteraddresshere' => 'Entra adresse hic',
|
| 453 | + 'semanticmaps_notfound' => 'non trovate',
|
| 454 | + 'semanticmaps_paramdesc_format' => 'Le servicio cartographic usate pro generar le carta',
|
| 455 | + 'semanticmaps_paramdesc_geoservice' => 'Le servicio de geocodification usate pro converter adresses in coordinatas',
|
| 456 | + 'semanticmaps_paramdesc_height' => 'Le altitude del carta, in pixeles (predefinition es $1)',
|
| 457 | + 'semanticmaps_paramdesc_width' => 'Le latitude del carta, in pixeles (predefinition es $1)',
|
| 458 | + 'semanticmaps_paramdesc_zoom' => 'Le nivello de zoom del carta',
|
| 459 | + 'semanticmaps_paramdesc_centre' => 'Le coordinatas del centro del carta',
|
| 460 | + 'semanticmaps_paramdesc_controls' => 'Le buttones de adjustamento placiate in le carta',
|
| 461 | + 'semanticmaps_paramdesc_types' => 'Le typos de carta disponibile in le carta',
|
| 462 | + 'semanticmaps_paramdesc_type' => 'Le typo de carta predefinite pro le carta',
|
| 463 | + 'semanticmaps_paramdesc_overlays' => 'Le superpositiones disponibile in le carta',
|
| 464 | + 'semanticmaps_paramdesc_autozoom' => 'Si le zoom avante e retro con le rota de rolamento del mouse es active',
|
| 465 | + 'semanticmaps_paramdesc_layers' => 'Le stratos disponibile in le carta',
|
| 466 | +);
|
| 467 | +
|
| 468 | +/** Indonesian (Bahasa Indonesia)
|
| 469 | + * @author Bennylin
|
| 470 | + * @author Farras
|
| 471 | + */
|
| 472 | +$messages['id'] = array(
|
| 473 | + 'semanticmaps_desc' => 'Memampukan penampilan dan penyuntingan data koordinat yang disimpan melalui pengaya MediaWiki Semantic ([http://wiki.bn2vs.com/wiki/Semantic_Maps demo]).
|
| 474 | +Layanan peta yang tersedia: $1',
|
| 475 | + 'semanticmaps_lonely_unit' => 'Tak ada angka yang ditemukan sebelum simbol "$1".',
|
| 476 | + 'semanticmaps_bad_latlong' => 'Lintang dan bujur harus diisi sekali, dan dengan koordinat yang benar.',
|
| 477 | + 'semanticmaps_abb_north' => 'U',
|
| 478 | + 'semanticmaps_abb_east' => 'T',
|
| 479 | + 'semanticmaps_abb_south' => 'S',
|
| 480 | + 'semanticmaps_abb_west' => 'B',
|
| 481 | + 'semanticmaps_label_latitude' => 'Lintang:',
|
| 482 | + 'semanticmaps_label_longitude' => 'Bujur:',
|
| 483 | + 'semanticmaps_lookupcoordinates' => 'Cari koordinat',
|
| 484 | + 'semanticmaps_enteraddresshere' => 'Masukkan alamat di sini',
|
| 485 | + 'semanticmaps_notfound' => 'tidak ditemukan',
|
| 486 | + 'semanticmaps_paramdesc_format' => 'Layanan pemetaan untuk membuat peta',
|
| 487 | + 'semanticmaps_paramdesc_geoservice' => 'Layanan kode geo untuk mengubah alamat menjadi koordinat',
|
| 488 | + 'semanticmaps_paramdesc_height' => 'Tinggi peta, dalam piksel (umumnya $1)',
|
| 489 | + 'semanticmaps_paramdesc_width' => 'Lebar peta, dalam piksel (umumnya $1)',
|
| 490 | + 'semanticmaps_paramdesc_zoom' => 'Tingkat zum peta',
|
| 491 | + 'semanticmaps_paramdesc_centre' => 'Koordinat bagian tengah peta',
|
| 492 | + 'semanticmaps_paramdesc_controls' => 'Kontrol pengguna yang diletakkan di peta',
|
| 493 | + 'semanticmaps_paramdesc_types' => 'Jenis peta tersedia di peta',
|
| 494 | + 'semanticmaps_paramdesc_type' => 'Jenis peta biasa untuk peta ini',
|
| 495 | + 'semanticmaps_paramdesc_overlays' => 'Lapisan yang tersedia di peta',
|
| 496 | + 'semanticmaps_paramdesc_autozoom' => 'Bila ingin zum dekat dan jauh menggunakan mouse, gunakan roda gulung',
|
| 497 | + 'semanticmaps_paramdesc_layers' => 'Lapisan tersedia di peta',
|
| 498 | +);
|
| 499 | +
|
| 500 | +/** Italian (Italiano)
|
| 501 | + * @author Darth Kule
|
| 502 | + */
|
| 503 | +$messages['it'] = array(
|
| 504 | + '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",
|
| 505 | + 'semanticmaps_lookupcoordinates' => 'Cerca coordinate',
|
| 506 | + 'semanticmaps_enteraddresshere' => 'Inserisci indirizzo qui',
|
| 507 | + 'semanticmaps_notfound' => 'non trovato',
|
| 508 | +);
|
| 509 | +
|
| 510 | +/** Japanese (日本語)
|
| 511 | + * @author Fryed-peach
|
| 512 | + * @author Mizusumashi
|
| 513 | + */
|
| 514 | +$messages['ja'] = array(
|
| 515 | + 'semanticmaps_desc' => 'Semantic MediaWiki 拡張機能を通して格納された座標データを表示・編集する機能を提供する ([http://wiki.bn2vs.com/wiki/Semantic_Maps 実演])。次の地図サービスに対応します:$1',
|
| 516 | + 'semanticmaps_lonely_unit' => '記号「$1」の前に数値がありません。',
|
| 517 | + 'semanticmaps_bad_latlong' => '緯度と経度は有効な座標値をもって、一回のみ指定されなければなりません。',
|
| 518 | + 'semanticmaps_abb_north' => '北',
|
| 519 | + 'semanticmaps_abb_east' => '東',
|
| 520 | + 'semanticmaps_abb_south' => '南',
|
| 521 | + 'semanticmaps_abb_west' => '西',
|
| 522 | + 'semanticmaps_label_latitude' => '緯度:',
|
| 523 | + 'semanticmaps_label_longitude' => '経度:',
|
| 524 | + 'semanticmaps_lookupcoordinates' => '座標を調べる',
|
| 525 | + 'semanticmaps_enteraddresshere' => '住所をここに入力します',
|
| 526 | + 'semanticmaps_notfound' => '見つかりません',
|
| 527 | + 'semanticmaps_paramdesc_format' => '地図の生成に利用されている地図サービス',
|
| 528 | + 'semanticmaps_paramdesc_geoservice' => '住所の座標への変換に利用されているジオコーディングサービス',
|
| 529 | + 'semanticmaps_paramdesc_height' => '地図の縦幅 (単位はピクセル、既定は$1)',
|
| 530 | + 'semanticmaps_paramdesc_width' => '地図の横幅 (単位はピクセル、既定は$1)',
|
| 531 | + 'semanticmaps_paramdesc_zoom' => '地図の拡大度',
|
| 532 | + 'semanticmaps_paramdesc_centre' => '地図の中心の座標',
|
| 533 | + 'semanticmaps_paramdesc_controls' => 'この地図上に設置するユーザーコントロール',
|
| 534 | + 'semanticmaps_paramdesc_types' => 'この地図で利用できる地図タイプ',
|
| 535 | + 'semanticmaps_paramdesc_type' => 'この地図のデフォルト地図タイプ',
|
| 536 | + 'semanticmaps_paramdesc_overlays' => 'この地図で利用できるオーバーレイ',
|
| 537 | + 'semanticmaps_paramdesc_autozoom' => 'マウスのスクロールホイールを使ったズームインやアウトを有効にするか',
|
| 538 | + 'semanticmaps_paramdesc_layers' => 'この地図で利用できるレイヤー',
|
| 539 | +);
|
| 540 | +
|
| 541 | +/** Khmer (ភាសាខ្មែរ)
|
| 542 | + * @author Thearith
|
| 543 | + */
|
| 544 | +$messages['km'] = array(
|
| 545 | + 'semanticmaps_lookupcoordinates' => 'ក្រឡេកមើលកូអរដោនេ',
|
| 546 | +);
|
| 547 | +
|
| 548 | +/** Ripoarisch (Ripoarisch)
|
| 549 | + * @author Purodha
|
| 550 | + */
|
| 551 | +$messages['ksh'] = array(
|
| 552 | + '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',
|
| 553 | + 'semanticmaps_lonely_unit' => 'De Nommer vür däm Zeijsche „$1“ fählt.',
|
| 554 | + 'semanticmaps_bad_latlong' => "De Längde und de Breedt dörve bloß eijmohl aanjejovve wääde, un met reeschtijje Ko'odinaate.",
|
| 555 | + 'semanticmaps_abb_north' => 'N',
|
| 556 | + 'semanticmaps_abb_east' => 'O',
|
| 557 | + 'semanticmaps_abb_south' => 'S',
|
| 558 | + 'semanticmaps_abb_west' => 'W',
|
| 559 | + 'semanticmaps_label_latitude' => 'Breedt om Jlobus:',
|
| 560 | + 'semanticmaps_label_longitude' => 'Längde om Jlobus:',
|
| 561 | + 'semanticmaps_lookupcoordinates' => 'Koordinate nohkike',
|
| 562 | + 'semanticmaps_enteraddresshere' => 'Donn hee de Address enjäve',
|
| 563 | + 'semanticmaps_notfound' => 'nit jefonge',
|
| 564 | + 'semanticmaps_paramdesc_format' => 'Dä Deens för Kaate ußzejävve, woh heh di Kaat vun kütt',
|
| 565 | + 'semanticmaps_paramdesc_geoservice' => "Dä Deens för Adräße en Ko'odinaate öm_ze_wandelle",
|
| 566 | + 'semanticmaps_paramdesc_height' => 'De Hühde vun heh dä Kaat en Pixelle — schtandattmääßesch {{PLURAL:$1|$1 Pixel|$1 Pixelle|nix}}',
|
| 567 | + 'semanticmaps_paramdesc_width' => 'De Breedt vun heh dä Kaat en Pixelle — schtandattmääßesch {{PLURAL:$1|$1 Pixel|$1 Pixelle|nix}}',
|
| 568 | + 'semanticmaps_paramdesc_zoom' => 'Wi doll dä Zoom fö heh di Kaat es',
|
| 569 | + 'semanticmaps_paramdesc_centre' => "De Ko'odinaate op de Ääd, vun de Medde vun heh dä Kaat",
|
| 570 | + 'semanticmaps_paramdesc_controls' => 'De Knöppe för de Bedeenung, di op di Kaat jemohlt wäääde',
|
| 571 | + 'semanticmaps_paramdesc_types' => 'De Kaate-Zoote di mer för heh di Kaat ußsöhke kann',
|
| 572 | + 'semanticmaps_paramdesc_type' => 'De Schtandatt Kaate-Zoot för heh di Kaat',
|
| 573 | + 'semanticmaps_paramdesc_overlays' => 'De zohsäzlijje Eijnzelheijte, di mer op di Kaat drop bränge kann',
|
| 574 | + 'semanticmaps_paramdesc_autozoom' => 'Falls et erin un eruß zoome met däm Kompjuter singe Muuß ierem Rättsche aanjeschalldt es, dann:',
|
| 575 | + 'semanticmaps_paramdesc_layers' => 'De Nivohs, di för di Kaat ze han sin',
|
| 576 | +);
|
| 577 | +
|
| 578 | +/** Luxembourgish (Lëtzebuergesch)
|
| 579 | + * @author Robby
|
| 580 | + */
|
| 581 | +$messages['lb'] = array(
|
| 582 | + 'semanticmaps_lookupcoordinates' => 'Koordinaten nokucken',
|
| 583 | + 'semanticmaps_enteraddresshere' => 'Adress hei aginn',
|
| 584 | + 'semanticmaps_notfound' => 'net fonnt',
|
| 585 | +);
|
| 586 | +
|
| 587 | +/** Macedonian (Македонски)
|
| 588 | + * @author Bjankuloski06
|
| 589 | + */
|
| 590 | +$messages['mk'] = array(
|
| 591 | + 'semanticmaps_desc' => 'Дава можност за гледање и уредување на податоци со координати складирани преку проширувањето Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps демо]).
|
| 592 | +Картографски служби на располагање: $1',
|
| 593 | + 'semanticmaps_lonely_unit' => 'Нема пронајдено број пред симболот „$1“.',
|
| 594 | + 'semanticmaps_bad_latlong' => 'Географската ширина и должина мора да се наведат само еднаш, и со важечки координати.',
|
| 595 | + 'semanticmaps_abb_north' => 'С',
|
| 596 | + 'semanticmaps_abb_east' => 'И',
|
| 597 | + 'semanticmaps_abb_south' => 'Ј',
|
| 598 | + 'semanticmaps_abb_west' => 'З',
|
| 599 | + 'semanticmaps_label_latitude' => 'Геог. ширина',
|
| 600 | + 'semanticmaps_label_longitude' => 'Геог. должина:',
|
| 601 | + 'semanticmaps_lookupcoordinates' => 'Побарај координати',
|
| 602 | + 'semanticmaps_enteraddresshere' => 'Внесете адреса тука',
|
| 603 | + 'semanticmaps_notfound' => 'не е најдено ништо',
|
| 604 | + 'semanticmaps_paramdesc_format' => 'Картографската служба со која се создава картата',
|
| 605 | + 'semanticmaps_paramdesc_geoservice' => 'Службата за геокодирање со која адресите се претвораат во координати',
|
| 606 | + 'semanticmaps_paramdesc_height' => 'Висината на картата во пиксели ($1 по основно)',
|
| 607 | + 'semanticmaps_paramdesc_width' => 'Ширината на картата во пиксели ($1 по основно)',
|
| 608 | + 'semanticmaps_paramdesc_zoom' => 'Размерот на картата',
|
| 609 | + 'semanticmaps_paramdesc_centre' => 'Координатите на средиштето на картата',
|
| 610 | + 'semanticmaps_paramdesc_controls' => 'Корисничките контроли за на картата',
|
| 611 | + 'semanticmaps_paramdesc_types' => 'Типови на карти, достапни за картата',
|
| 612 | + 'semanticmaps_paramdesc_type' => 'Основно зададениот тип на карта',
|
| 613 | + 'semanticmaps_paramdesc_overlays' => 'Достапните облоги за картата',
|
| 614 | + 'semanticmaps_paramdesc_autozoom' => 'Ако е овозможено приближување и оддалечување со тркалцето на глушецот',
|
| 615 | + 'semanticmaps_paramdesc_layers' => 'Слоевите достапни на картата',
|
| 616 | +);
|
| 617 | +
|
| 618 | +/** Dutch (Nederlands)
|
| 619 | + * @author Jeroen De Dauw
|
| 620 | + * @author Siebrand
|
| 621 | + */
|
| 622 | +$messages['nl'] = array(
|
| 623 | + '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]).
|
| 624 | +Beschikbare kaartdiensten: $1',
|
| 625 | + 'semanticmaps_lonely_unit' => 'Er is geen getal gevonden voor het symbool "$1".',
|
| 626 | + 'semanticmaps_bad_latlong' => 'Lengte en breedte hoeven maar een keer opgegeven te worden, en dienen geldige coördinaten te zijn.',
|
| 627 | + 'semanticmaps_abb_north' => 'N',
|
| 628 | + 'semanticmaps_abb_east' => 'O',
|
| 629 | + 'semanticmaps_abb_south' => 'Z',
|
| 630 | + 'semanticmaps_abb_west' => 'W',
|
| 631 | + 'semanticmaps_label_latitude' => 'Breedte:',
|
| 632 | + 'semanticmaps_label_longitude' => 'Lengte:',
|
| 633 | + 'semanticmaps_lookupcoordinates' => 'Coördinaten opzoeken',
|
| 634 | + 'semanticmaps_enteraddresshere' => 'Voer hier het adres in',
|
| 635 | + 'semanticmaps_notfound' => 'niet gevonden',
|
| 636 | + 'semanticmaps_paramdesc_format' => 'De kaartdienst die de kaart levert',
|
| 637 | + 'semanticmaps_paramdesc_geoservice' => 'De geocoderingsdienst die adressen in coördinaten converteert',
|
| 638 | + 'semanticmaps_paramdesc_height' => 'De hoogte van de kaart in pixels (standaard is $1)',
|
| 639 | + 'semanticmaps_paramdesc_width' => 'De breedte van de kaart in pixels (standaard is $1)',
|
| 640 | + 'semanticmaps_paramdesc_zoom' => 'Het zoomniveau van de kaart',
|
| 641 | + 'semanticmaps_paramdesc_centre' => 'De coördinaten van het midden van de kaart',
|
| 642 | + 'semanticmaps_paramdesc_controls' => 'De op de kaart te plaatsen hulpmiddelen',
|
| 643 | + 'semanticmaps_paramdesc_types' => 'De voor de kaart beschikbare kaarttypen',
|
| 644 | + 'semanticmaps_paramdesc_type' => 'Het standaard kaarttype voor de kaart',
|
| 645 | + 'semanticmaps_paramdesc_overlays' => 'De voor de kaart beschikbare overlays',
|
| 646 | + 'semanticmaps_paramdesc_autozoom' => 'Of in- en uitzoomen met het scrollwiel van de muis mogelijk is',
|
| 647 | + 'semanticmaps_paramdesc_layers' => 'De lagen die beschikbaar zijn voor de kaart',
|
| 648 | +);
|
| 649 | +
|
| 650 | +/** Norwegian Nynorsk (Norsk (nynorsk))
|
| 651 | + * @author Harald Khan
|
| 652 | + */
|
| 653 | +$messages['nn'] = array(
|
| 654 | + 'semanticmaps_lookupcoordinates' => 'Sjekk koordinatar',
|
| 655 | + 'semanticmaps_enteraddresshere' => 'Skriv inn adressa her',
|
| 656 | +);
|
| 657 | +
|
| 658 | +/** Norwegian (bokmål) (Norsk (bokmål))
|
| 659 | + * @author Jon Harald Søby
|
| 660 | + * @author Nghtwlkr
|
| 661 | + */
|
| 662 | +$messages['no'] = array(
|
| 663 | + 'semanticmaps_lookupcoordinates' => 'Sjekk koordinater',
|
| 664 | + 'semanticmaps_enteraddresshere' => 'Skriv inn adressen her',
|
| 665 | +);
|
| 666 | +
|
| 667 | +/** Occitan (Occitan)
|
| 668 | + * @author Cedric31
|
| 669 | + */
|
| 670 | +$messages['oc'] = array(
|
| 671 | + '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]",
|
| 672 | + 'semanticmaps_lookupcoordinates' => 'Estimar las coordenadas',
|
| 673 | + 'semanticmaps_enteraddresshere' => 'Picatz aicí l’adreça',
|
| 674 | + 'semanticmaps_notfound' => 'pas trobat',
|
| 675 | +);
|
| 676 | +
|
| 677 | +/** Polish (Polski)
|
| 678 | + * @author Derbeth
|
| 679 | + * @author Leinad
|
| 680 | + * @author Sp5uhe
|
| 681 | + */
|
| 682 | +$messages['pl'] = array(
|
| 683 | + '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]).
|
| 684 | +Dostępne serwisy mapowe: $1',
|
| 685 | + 'semanticmaps_lookupcoordinates' => 'Wyszukaj współrzędne',
|
| 686 | + 'semanticmaps_enteraddresshere' => 'Podaj adres',
|
| 687 | + 'semanticmaps_notfound' => 'nie odnaleziono',
|
| 688 | +);
|
| 689 | +
|
| 690 | +/** Piedmontese (Piemontèis)
|
| 691 | + * @author Borichèt
|
| 692 | + * @author Dragonòt
|
| 693 | + */
|
| 694 | +$messages['pms'] = array(
|
| 695 | + '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]).
|
| 696 | +Sërvissi ëd mapa disponìbij: $1',
|
| 697 | + 'semanticmaps_lonely_unit' => 'Pa gnun nùmer trovà prima dël sìmbol "$1".',
|
| 698 | + 'semanticmaps_bad_latlong' => 'Latitùdin e longitùdin a deuvo esse dàite mach na vira, e con coordinà bon-e.',
|
| 699 | + 'semanticmaps_abb_north' => 'N',
|
| 700 | + 'semanticmaps_abb_east' => 'E',
|
| 701 | + 'semanticmaps_abb_south' => 'S',
|
| 702 | + 'semanticmaps_abb_west' => 'W',
|
| 703 | + 'semanticmaps_label_latitude' => 'Latitùdin:',
|
| 704 | + 'semanticmaps_label_longitude' => 'Longitùdin:',
|
| 705 | + 'semanticmaps_lookupcoordinates' => 'Serca coordinà',
|
| 706 | + 'semanticmaps_enteraddresshere' => 'Ansëriss adrëssa sì',
|
| 707 | + 'semanticmaps_notfound' => 'pa trovà',
|
| 708 | + 'semanticmaps_paramdesc_format' => 'Ël servissi ëd cartografìa dovrà për generé la carta',
|
| 709 | + 'semanticmaps_paramdesc_geoservice' => "Ël servissi ëd geocodìfica dovrà për trasformé j'adrësse an coordinà",
|
| 710 | + 'semanticmaps_paramdesc_height' => "L'autëssa dla carta, an pontin (lë stàndard a l'é $1)",
|
| 711 | + 'semanticmaps_paramdesc_width' => "La larghëssa dla carta, an pontin (lë stàndard a l'é $1)",
|
| 712 | + 'semanticmaps_paramdesc_zoom' => "Ël livel d'angrandiment ëd la carta",
|
| 713 | + 'semanticmaps_paramdesc_centre' => 'Le coordinà dël sènter ëd la carta',
|
| 714 | + 'semanticmaps_paramdesc_controls' => 'Ij contròj utent piassà an sla carta',
|
| 715 | + 'semanticmaps_paramdesc_types' => 'Le sòrt ëd carte disponìbij an sla carta',
|
| 716 | + 'semanticmaps_paramdesc_type' => 'Ël tipo ëd carta stàndard për la carta',
|
| 717 | + 'semanticmaps_paramdesc_overlays' => 'Le dzor-posission disponìbij an sla carta',
|
| 718 | + 'semanticmaps_paramdesc_autozoom' => "Se l'angrandiment anans e andré an dovrand la roëtta dël rat a l'é abilità",
|
| 719 | + 'semanticmaps_paramdesc_layers' => 'Ij livej disponìbij an sla carta',
|
| 720 | +);
|
| 721 | +
|
| 722 | +/** Portuguese (Português)
|
| 723 | + * @author Hamilton Abreu
|
| 724 | + * @author Indech
|
| 725 | + * @author Malafaya
|
| 726 | + */
|
| 727 | +$messages['pt'] = array(
|
| 728 | + 'semanticmaps_desc' => 'Permite visualizar e editar dados de coordenadas, armazenados através da extensão Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps demonstração]).
|
| 729 | +Serviços de cartografia disponíveis: $1',
|
| 730 | + 'semanticmaps_lonely_unit' => 'Não foi encontrado um número antes do símbolo "$1".',
|
| 731 | + 'semanticmaps_bad_latlong' => 'Latitude e longitude têm de ser fornecidas uma só vez e com coordenadas válidas.',
|
| 732 | + 'semanticmaps_abb_north' => 'N',
|
| 733 | + 'semanticmaps_abb_east' => 'E',
|
| 734 | + 'semanticmaps_abb_south' => 'S',
|
| 735 | + 'semanticmaps_abb_west' => 'O',
|
| 736 | + 'semanticmaps_label_latitude' => 'Latitude:',
|
| 737 | + 'semanticmaps_label_longitude' => 'Longitude:',
|
| 738 | + 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas',
|
| 739 | + 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui',
|
| 740 | + 'semanticmaps_notfound' => 'não encontrado',
|
| 741 | + 'semanticmaps_paramdesc_format' => 'O serviço de cartografia usado para gerar o mapa',
|
| 742 | + 'semanticmaps_paramdesc_geoservice' => 'O serviço de geocódigos usado para transformar endereços em coordenadas',
|
| 743 | + 'semanticmaps_paramdesc_height' => 'A altura do mapa, em pixels (por omissão, $1)',
|
| 744 | + 'semanticmaps_paramdesc_width' => 'A largura do mapa, em pixels (por omissão, $1)',
|
| 745 | + 'semanticmaps_paramdesc_zoom' => 'O nível de aproximação do mapa',
|
| 746 | + 'semanticmaps_paramdesc_centre' => 'As coordenadas do centro do mapa',
|
| 747 | + 'semanticmaps_paramdesc_controls' => 'Os controles colocados no mapa',
|
| 748 | + 'semanticmaps_paramdesc_types' => 'Os tipos de mapa disponíveis no mapa',
|
| 749 | + 'semanticmaps_paramdesc_type' => 'O tipo do mapa, por omissão',
|
| 750 | + 'semanticmaps_paramdesc_overlays' => 'As sobreposições disponíveis no mapa',
|
| 751 | + 'semanticmaps_paramdesc_autozoom' => 'Possibilitar a aproximação e afastamento usando a roda de deslizamento do rato',
|
| 752 | + 'semanticmaps_paramdesc_layers' => 'As camadas disponíveis no mapa',
|
| 753 | +);
|
| 754 | +
|
| 755 | +/** Brazilian Portuguese (Português do Brasil)
|
| 756 | + * @author Eduardo.mps
|
| 757 | + */
|
| 758 | +$messages['pt-br'] = array(
|
| 759 | + '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]).
|
| 760 | +Serviços de mapeamento disponíveis: $1',
|
| 761 | + 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas',
|
| 762 | + 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui',
|
| 763 | + 'semanticmaps_notfound' => 'Não encontrado',
|
| 764 | +);
|
| 765 | +
|
| 766 | +/** Romanian (Română)
|
| 767 | + * @author Firilacroco
|
| 768 | + */
|
| 769 | +$messages['ro'] = array(
|
| 770 | + 'semanticmaps_notfound' => 'nu a fost găsit',
|
| 771 | +);
|
| 772 | +
|
| 773 | +/** Tarandíne (Tarandíne)
|
| 774 | + * @author Joetaras
|
| 775 | + */
|
| 776 | +$messages['roa-tara'] = array(
|
| 777 | + '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]).
|
| 778 | +Disponibbile le servizie de mappe: $1",
|
| 779 | + 'semanticmaps_lookupcoordinates' => 'Ingroce le coordinate',
|
| 780 | + 'semanticmaps_enteraddresshere' => "Scaffe l'indirizze aqquà",
|
| 781 | + 'semanticmaps_notfound' => 'no acchiate',
|
| 782 | +);
|
| 783 | +
|
| 784 | +/** Russian (Русский)
|
| 785 | + * @author Eugene Mednikov
|
| 786 | + * @author Lockal
|
| 787 | + * @author Александр Сигачёв
|
| 788 | + */
|
| 789 | +$messages['ru'] = array(
|
| 790 | + 'semanticmaps_desc' => 'Предоставляет возможность просмотра и редактирования данных о координатах, хранящихся посредством расширения Semantic MediaWiki ([http://wiki.bn2vs.com/wiki/Semantic_Maps демонстрация]).
|
| 791 | +Доступные службы карт: $1',
|
| 792 | + 'semanticmaps_lonely_unit' => 'Не найден номер перед символом «$1».',
|
| 793 | + 'semanticmaps_bad_latlong' => 'Широта и долгота должна быть указаны только один раз, значения координат должны быть корректными.',
|
| 794 | + 'semanticmaps_abb_north' => 'С',
|
| 795 | + 'semanticmaps_abb_east' => 'В',
|
| 796 | + 'semanticmaps_abb_south' => 'Ю',
|
| 797 | + 'semanticmaps_abb_west' => 'З',
|
| 798 | + 'semanticmaps_label_latitude' => 'Широта:',
|
| 799 | + 'semanticmaps_label_longitude' => 'Долгота:',
|
| 800 | + 'semanticmaps_lookupcoordinates' => 'Найти координаты',
|
| 801 | + 'semanticmaps_enteraddresshere' => 'Введите адрес',
|
| 802 | + 'semanticmaps_notfound' => 'не найдено',
|
| 803 | + 'semanticmaps_paramdesc_format' => 'Картографическая служба, используемая для создания карт',
|
| 804 | + 'semanticmaps_paramdesc_geoservice' => 'Служба геокодирования используется для преобразования адреса в координаты',
|
| 805 | + 'semanticmaps_paramdesc_height' => 'Высота карты в пикселях (по умолчанию $1)',
|
| 806 | + 'semanticmaps_paramdesc_width' => 'Ширина карты в пикселях (по умолчанию $1)',
|
| 807 | + 'semanticmaps_paramdesc_zoom' => 'Масштаб карты',
|
| 808 | + 'semanticmaps_paramdesc_centre' => 'Координаты центра карты',
|
| 809 | + 'semanticmaps_paramdesc_controls' => 'Элементы управления на карте',
|
| 810 | + 'semanticmaps_paramdesc_types' => 'Типы карты, доступные на карте',
|
| 811 | + 'semanticmaps_paramdesc_type' => 'Тип карты по умолчанию',
|
| 812 | + 'semanticmaps_paramdesc_overlays' => 'Доступные наложения',
|
| 813 | + 'semanticmaps_paramdesc_autozoom' => 'Если включено увеличение и уменьшение масштаб с помощью колеса прокрутки мыши',
|
| 814 | + 'semanticmaps_paramdesc_layers' => 'Доступные на карте слои',
|
| 815 | +);
|
| 816 | +
|
| 817 | +/** Slovak (Slovenčina)
|
| 818 | + * @author Helix84
|
| 819 | + */
|
| 820 | +$messages['sk'] = array(
|
| 821 | + '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]).
|
| 822 | +Dostupné mapové služby: $1',
|
| 823 | + 'semanticmaps_lookupcoordinates' => 'Vyhľadať súradnice',
|
| 824 | + 'semanticmaps_enteraddresshere' => 'Sem zadajte emailovú adresu',
|
| 825 | + 'semanticmaps_notfound' => 'nenájdené',
|
| 826 | +);
|
| 827 | +
|
| 828 | +/** Serbian Cyrillic ekavian (Српски (ћирилица))
|
| 829 | + * @author Михајло Анђелковић
|
| 830 | + */
|
| 831 | +$messages['sr-ec'] = array(
|
| 832 | + 'semanticmaps_enteraddresshere' => 'Унеси адресу овде',
|
| 833 | + 'semanticmaps_notfound' => 'није нађено',
|
| 834 | +);
|
| 835 | +
|
| 836 | +/** Serbian Latin ekavian (Srpski (latinica))
|
| 837 | + * @author Michaello
|
| 838 | + */
|
| 839 | +$messages['sr-el'] = array(
|
| 840 | + 'semanticmaps_enteraddresshere' => 'Unesi adresu ovde',
|
| 841 | + 'semanticmaps_notfound' => 'nije nađeno',
|
| 842 | +);
|
| 843 | +
|
| 844 | +/** Swedish (Svenska)
|
| 845 | + * @author Boivie
|
| 846 | + * @author Najami
|
| 847 | + */
|
| 848 | +$messages['sv'] = array(
|
| 849 | + 'semanticmaps_lookupcoordinates' => 'Kolla upp koordinater',
|
| 850 | + 'semanticmaps_enteraddresshere' => 'Skriv in adress här',
|
| 851 | +);
|
| 852 | +
|
| 853 | +/** Telugu (తెలుగు)
|
| 854 | + * @author Veeven
|
| 855 | + */
|
| 856 | +$messages['te'] = array(
|
| 857 | + 'semanticmaps_notfound' => 'కనబడలేదు',
|
| 858 | +);
|
| 859 | +
|
| 860 | +/** Tagalog (Tagalog)
|
| 861 | + * @author AnakngAraw
|
| 862 | + */
|
| 863 | +$messages['tl'] = array(
|
| 864 | + 'semanticmaps_lookupcoordinates' => "Hanapin ang mga tugmaang-pampook (''coordinate'')",
|
| 865 | + 'semanticmaps_enteraddresshere' => 'Ipasok ang adres dito',
|
| 866 | +);
|
| 867 | +
|
| 868 | +/** Veps (Vepsan kel')
|
| 869 | + * @author Игорь Бродский
|
| 870 | + */
|
| 871 | +$messages['vep'] = array(
|
| 872 | + 'semanticmaps_notfound' => 'ei voi löuta',
|
| 873 | +);
|
| 874 | +
|
| 875 | +/** Vietnamese (Tiếng Việt)
|
| 876 | + * @author Minh Nguyen
|
| 877 | + * @author Vinhtantran
|
| 878 | + */
|
| 879 | +$messages['vi'] = array(
|
| 880 | + '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]).
|
| 881 | +Các dịch vụ bản đồ có sẵn: $1',
|
| 882 | + 'semanticmaps_lookupcoordinates' => 'Tra tọa độ',
|
| 883 | + 'semanticmaps_enteraddresshere' => 'Nhập địa chỉ vào đây',
|
| 884 | + 'semanticmaps_notfound' => 'không tìm thấy',
|
| 885 | +);
|
| 886 | +
|
| 887 | +/** Volapük (Volapük)
|
| 888 | + * @author Smeira
|
| 889 | + */
|
| 890 | +$messages['vo'] = array(
|
| 891 | + 'semanticmaps_lookupcoordinates' => 'Tuvön koordinatis',
|
| 892 | +);
|
| 893 | +
|
| 894 | +/** Simplified Chinese (中文(简体))
|
| 895 | + * @author Gzdavidwong
|
| 896 | + */
|
| 897 | +$messages['zh-hans'] = array(
|
| 898 | + 'semanticmaps_lookupcoordinates' => '查找坐标',
|
| 899 | +);
|
| 900 | +
|
| 901 | +/** Traditional Chinese (中文(繁體))
|
| 902 | + * @author Wrightbus
|
| 903 | + */
|
| 904 | +$messages['zh-hant'] = array(
|
| 905 | + 'semanticmaps_lookupcoordinates' => '尋找座標',
|
| 906 | +);
|
| 907 | +
|
Index: tags/extensions/SemanticMaps/REL_0_5/SemanticMaps.php |
— | — | @@ -0,0 +1,113 @@ |
| 2 | +<?php
|
| 3 | +
|
| 4 | +/**
|
| 5 | + * Initialization file for the Semantic Maps extension.
|
| 6 | + * Extension documentation: http://www.mediawiki.org/wiki/Extension: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.5');
|
| 40 | +
|
| 41 | + $smgScriptPath = $wgScriptPath . '/extensions/SemanticMaps';
|
| 42 | + $smgIP = $IP . '/extensions/SemanticMaps';
|
| 43 | +
|
| 44 | + $smgStyleVersion = $wgStyleVersion . '-' . SM_VERSION;
|
| 45 | +
|
| 46 | + // Include the settings file.
|
| 47 | + require_once($smgIP . '/SM_Settings.php');
|
| 48 | +
|
| 49 | + $wgExtensionFunctions[] = 'smfSetup';
|
| 50 | +
|
| 51 | + $wgHooks['AdminLinks'][] = 'smfAddToAdminLinks';
|
| 52 | +
|
| 53 | + $wgExtensionMessagesFiles['SemanticMaps'] = $smgIP . '/SemanticMaps.i18n.php';
|
| 54 | +
|
| 55 | + // Registration of the Geographical Coordinate type.
|
| 56 | + $wgAutoloadClasses['SMGeoCoordsValue'] = $smgIP . '/SM_GeoCoordsValue.php';
|
| 57 | + $wgHooks['smwInitDatatypes'][] = 'smfInitGeoCoordsType';
|
| 58 | +}
|
| 59 | +
|
| 60 | +/**
|
| 61 | + * 'Initialization' function for the Semantic Maps extension.
|
| 62 | + * The only work done here is creating the extension credits for
|
| 63 | + * Semantic Maps. The actuall work in done via the Maps hooks.
|
| 64 | + */
|
| 65 | +function smfSetup() {
|
| 66 | + global $wgExtensionCredits, $wgLang, $wgOut, $egMapsServices, $smgScriptPath;
|
| 67 | +
|
| 68 | + // Creation of a list of internationalized service names.
|
| 69 | + $services = array();
|
| 70 | + foreach (array_keys($egMapsServices) as $name) $services[] = wfMsg('maps_'.$name);
|
| 71 | + $services_list = $wgLang->listToText($services);
|
| 72 | +
|
| 73 | + wfLoadExtensionMessages( 'SemanticMaps' );
|
| 74 | +
|
| 75 | + $wgExtensionCredits['other'][]= array(
|
| 76 | + 'path' => __FILE__,
|
| 77 | + 'name' => wfMsg('semanticmaps_name'),
|
| 78 | + 'version' => SM_VERSION,
|
| 79 | + 'author' => array('[http://bn2vs.com Jeroen De Dauw]', '[http://www.mediawiki.org/wiki/User:Yaron_Koren Yaron Koren]', 'others'),
|
| 80 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Maps',
|
| 81 | + 'description' => wfMsgExt( 'semanticmaps_desc', 'parsemag', $services_list ),
|
| 82 | + 'descriptionmsg' => wfMsgExt( 'semanticmaps_desc', 'parsemag', $services_list ),
|
| 83 | + );
|
| 84 | +
|
| 85 | + $wgOut->addScriptFile($smgScriptPath . '/SMUtilityFunctions.js');
|
| 86 | +
|
| 87 | + return true;
|
| 88 | +}
|
| 89 | +
|
| 90 | +/**
|
| 91 | + * Adds support for the geographical coordinate data type to Semantic MediaWiki.
|
| 92 | + */
|
| 93 | +function smfInitGeoCoordsType() {
|
| 94 | + SMWDataValueFactory::registerDatatype('_geo', 'SMGeoCoordsValue');
|
| 95 | + return true;
|
| 96 | +}
|
| 97 | +
|
| 98 | +/**
|
| 99 | + * Adds a link to Admin Links page.
|
| 100 | + */
|
| 101 | +function smfAddToAdminLinks(&$admin_links_tree) {
|
| 102 | + $displaying_data_section = $admin_links_tree->getSection(wfMsg('smw_adminlinks_displayingdata'));
|
| 103 | +
|
| 104 | + // Escape if SMW hasn't added links.
|
| 105 | + if (is_null($displaying_data_section)) return true;
|
| 106 | +
|
| 107 | + $smw_docu_row = $displaying_data_section->getRow('smw');
|
| 108 | +
|
| 109 | + $sm_docu_label = wfMsg('adminlinks_documentation', wfMsg('semanticmaps_name'));
|
| 110 | + $smw_docu_row->addItem(AlItem::newFromExternalLink("http://www.mediawiki.org/wiki/Extension:Semantic_Maps", $sm_docu_label));
|
| 111 | +
|
| 112 | + return true;
|
| 113 | +}
|
| 114 | +
|
Index: tags/extensions/SemanticMaps/REL_0_5/QueryPrinters/SM_QueryPrinters.php |
— | — | @@ -0,0 +1,117 @@ |
| 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 | +final class SMQueryPrinters {
|
| 18 | +
|
| 19 | + public static $parameters = array();
|
| 20 | +
|
| 21 | + /**
|
| 22 | + * Initialization function for Maps query printer functionality.
|
| 23 | + */
|
| 24 | + public static function initialize() {
|
| 25 | + global $smgIP, $wgAutoloadClasses, $egMapsServices;
|
| 26 | +
|
| 27 | + $wgAutoloadClasses['SMMapPrinter'] = $smgIP . '/QueryPrinters/SM_MapPrinter.php';
|
| 28 | +
|
| 29 | + self::initializeParams();
|
| 30 | +
|
| 31 | + $hasQueryPrinters = false;
|
| 32 | +
|
| 33 | + foreach($egMapsServices as $serviceName => $serviceData) {
|
| 34 | + // Check if the service has a query printer
|
| 35 | + $hasQP = array_key_exists('qp', $serviceData);
|
| 36 | +
|
| 37 | + // If the service has no QP, skipt it and continue with the next one.
|
| 38 | + if (!$hasQP) continue;
|
| 39 | +
|
| 40 | + // At least one query printer will be enabled when this point is reached.
|
| 41 | + $hasQueryPrinters = true;
|
| 42 | +
|
| 43 | + // Initiate the format.
|
| 44 | + self::initFormat($serviceName, $serviceData['qp'], $serviceData['aliases']);
|
| 45 | + }
|
| 46 | +
|
| 47 | + // Add the 'map' result format if there are mapping services that have QP's loaded.
|
| 48 | + if ($hasQueryPrinters) self::initFormat('map', array('class' => 'SMMapper', 'file' => 'QueryPrinters/SM_Mapper.php', 'local' => true), array());
|
| 49 | + }
|
| 50 | +
|
| 51 | + private static function initializeParams() {
|
| 52 | + global $egMapsDefaultServices, $egMapsDefaultCentre, $egMapsAvailableGeoServices, $egMapsDefaultGeoService;
|
| 53 | +
|
| 54 | + self::$parameters = array(
|
| 55 | + 'geoservice' => array(
|
| 56 | + 'criteria' => array(
|
| 57 | + 'in_array' => array_keys($egMapsAvailableGeoServices)
|
| 58 | + ),
|
| 59 | + 'default' => $egMapsDefaultGeoService
|
| 60 | + ),
|
| 61 | + 'format' => array(
|
| 62 | + 'default' => $egMapsDefaultServices['qp']
|
| 63 | + ),
|
| 64 | + 'centre' => array(
|
| 65 | + 'aliases' => array('center'),
|
| 66 | + 'default' => $egMapsDefaultCentre
|
| 67 | + ),
|
| 68 | + );
|
| 69 | + }
|
| 70 | +
|
| 71 | + /**
|
| 72 | + * Add the result format for a mapping service or alias.
|
| 73 | + *
|
| 74 | + * @param string $format
|
| 75 | + * @param array $qp
|
| 76 | + * @param array $aliases
|
| 77 | + */
|
| 78 | + private static function initFormat($format, array $qp, array $aliases) {
|
| 79 | + global $wgAutoloadClasses, $smgIP, $smwgResultAliases;
|
| 80 | +
|
| 81 | + // Load the QP class when it's not loaded yet
|
| 82 | + if (! array_key_exists($qp['class'], $wgAutoloadClasses)) {
|
| 83 | + $file = $qp['local'] ? $smgIP . '/' . $qp['file'] : $qp['file'];
|
| 84 | + $wgAutoloadClasses[$qp['class']] = $file;
|
| 85 | + }
|
| 86 | +
|
| 87 | + // Add the QP to SMW
|
| 88 | + self::addFormatQP($format, $qp['class']);
|
| 89 | +
|
| 90 | + // If SMW supports aliasing, add the aliases to $smwgResultAliases
|
| 91 | + if (isset($smwgResultAliases)) {
|
| 92 | + $smwgResultAliases[$format] = $aliases;
|
| 93 | + }
|
| 94 | + else { // If SMW does not support aliasing, add every alias as a format
|
| 95 | + foreach($aliases as $alias) self::addFormatQP($alias, $qp['class']);
|
| 96 | + }
|
| 97 | + }
|
| 98 | +
|
| 99 | + /**
|
| 100 | + * Adds a QP to SMW's $smwgResultFormats array or SMWQueryProcessor
|
| 101 | + * depending on if SMW supports $smwgResultFormats.
|
| 102 | + *
|
| 103 | + * @param string $format
|
| 104 | + * @param string $class
|
| 105 | + */
|
| 106 | + private static function addFormatQP($format, $class) {
|
| 107 | + global $smwgResultFormats;
|
| 108 | +
|
| 109 | + if (isset($smwgResultFormats)) {
|
| 110 | + $smwgResultFormats[$format] = $class;
|
| 111 | + }
|
| 112 | + else {
|
| 113 | + SMWQueryProcessor::$formats[$format] = $class;
|
| 114 | + }
|
| 115 | + }
|
| 116 | +
|
| 117 | +
|
| 118 | +} |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/QueryPrinters/SM_MapPrinter.php |
— | — | @@ -0,0 +1,324 @@ |
| 2 | +<?php
|
| 3 | +
|
| 4 | +/**
|
| 5 | + * Abstract class that provides the common functionallity for all map query printers
|
| 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 | +abstract class SMMapPrinter extends SMWResultPrinter {
|
| 20 | +
|
| 21 | + /*
|
| 22 | + * TODO:
|
| 23 | + * This class is borrowing an awefull lot code from MapsMapFeature, which
|
| 24 | + * ideally should be inherited. Since SMWResultPrinter already gets inherited,
|
| 25 | + * this is not possible. Finding a better solution to this code redundancy
|
| 26 | + * would be nice, cause now changes to MapsMapFeature need to be copied here.
|
| 27 | + */
|
| 28 | +
|
| 29 | + /**
|
| 30 | + * Sets the map service specific element name
|
| 31 | + */
|
| 32 | + protected abstract function setQueryPrinterSettings();
|
| 33 | +
|
| 34 | + /**
|
| 35 | + * Map service spesific map count and loading of dependencies
|
| 36 | + */
|
| 37 | + protected abstract function doMapServiceLoad();
|
| 38 | +
|
| 39 | + /**
|
| 40 | + * Gets the query result
|
| 41 | + */
|
| 42 | + protected abstract function addSpecificMapHTML();
|
| 43 | +
|
| 44 | + public $serviceName;
|
| 45 | +
|
| 46 | + protected $m_locations = array();
|
| 47 | +
|
| 48 | + protected $defaultZoom;
|
| 49 | + protected $elementNr;
|
| 50 | + protected $elementNamePrefix;
|
| 51 | +
|
| 52 | + protected $mapName;
|
| 53 | +
|
| 54 | + protected $centre_lat;
|
| 55 | + protected $centre_lon;
|
| 56 | +
|
| 57 | + protected $output = '';
|
| 58 | + protected $errorList;
|
| 59 | +
|
| 60 | + protected $mapFeature;
|
| 61 | +
|
| 62 | + protected $featureParameters = array();
|
| 63 | + protected $spesificParameters = array();
|
| 64 | +
|
| 65 | + /**
|
| 66 | + * Builds up and returns the HTML for the map, with the queried coordinate data on it.
|
| 67 | + *
|
| 68 | + * @param unknown_type $res
|
| 69 | + * @param unknown_type $outputmode
|
| 70 | + *
|
| 71 | + * @return array
|
| 72 | + */
|
| 73 | + public final function getResultText($res, $outputmode) {
|
| 74 | + $this->formatResultData($res, $outputmode);
|
| 75 | +
|
| 76 | + $this->setQueryPrinterSettings();
|
| 77 | +
|
| 78 | + $this->featureParameters = SMQueryPrinters::$parameters;
|
| 79 | +
|
| 80 | + if (self::manageMapProperties($this->m_params, __CLASS__)) {
|
| 81 | + // Only create a map when there is at least one result.
|
| 82 | + if (count($this->m_locations) > 0) {
|
| 83 | + $this->doMapServiceLoad();
|
| 84 | +
|
| 85 | + $this->setMapName();
|
| 86 | +
|
| 87 | + $this->setZoom();
|
| 88 | +
|
| 89 | + $this->setCentre();
|
| 90 | +
|
| 91 | + $this->addSpecificMapHTML();
|
| 92 | + }
|
| 93 | + else {
|
| 94 | + // TODO: add warning when level high enough and append to erro list.
|
| 95 | + }
|
| 96 | + }
|
| 97 | +
|
| 98 | + return array($this->output . $this->errorList, 'noparse' => 'true', 'isHTML' => 'true');
|
| 99 | + }
|
| 100 | +
|
| 101 | + /**
|
| 102 | + * Validates and corrects the provided map properties, and the sets them as class fields.
|
| 103 | + *
|
| 104 | + * @param array $mapProperties
|
| 105 | + * @param string $className
|
| 106 | + *
|
| 107 | + * @return boolean Indicates whether the map should be shown or not.
|
| 108 | + */
|
| 109 | + protected final function manageMapProperties(array $mapProperties, $className) {
|
| 110 | + global $egMapsServices;
|
| 111 | +
|
| 112 | + /*
|
| 113 | + * Assembliy of the allowed parameters and their information.
|
| 114 | + * The main parameters (the ones that are shared by everything) are overidden
|
| 115 | + * by the feature parameters (the ones spesific to a feature). The result is then
|
| 116 | + * again overidden by the service parameters (the ones spesific to the service),
|
| 117 | + * and finally by the spesific parameters (the ones spesific to a service-feature combination).
|
| 118 | + */
|
| 119 | + $parameterInfo = array_merge(MapsMapper::getMainParams(), $this->featureParameters);
|
| 120 | + $parameterInfo = array_merge($parameterInfo, $egMapsServices[$this->serviceName]['parameters']);
|
| 121 | + $parameterInfo = array_merge($parameterInfo, $this->spesificParameters);
|
| 122 | +
|
| 123 | + $manager = new ValidatorManager(); // TODO
|
| 124 | +
|
| 125 | + $result = $manager->manageMapparameters($mapProperties, $parameterInfo);
|
| 126 | +
|
| 127 | + $showMap = $result !== false;
|
| 128 | +
|
| 129 | + if ($showMap) $this->setMapProperties($result, $className);
|
| 130 | +
|
| 131 | + $this->errorList = $manager->getErrorList();
|
| 132 | +
|
| 133 | + return $showMap;
|
| 134 | + }
|
| 135 | +
|
| 136 | + /**
|
| 137 | + * Sets the map properties as class fields.
|
| 138 | + *
|
| 139 | + * @param array $mapProperties
|
| 140 | + * @param string $className
|
| 141 | + */
|
| 142 | + private function setMapProperties(array $mapProperties, $className) {
|
| 143 | + //var_dump($mapProperties); exit;
|
| 144 | + foreach($mapProperties as $paramName => $paramValue) {
|
| 145 | + if (! property_exists($className, $paramName)) {
|
| 146 | + $this->{$paramName} = $paramValue;
|
| 147 | + }
|
| 148 | + else {
|
| 149 | + throw new Exception('Attempt to override a class field during map propertie assignment. Field name: ' . $paramName);
|
| 150 | + }
|
| 151 | + }
|
| 152 | + }
|
| 153 | +
|
| 154 | + public final function getResult($results, $params, $outputmode) {
|
| 155 | + // Skip checks, results with 0 entries are normal
|
| 156 | + $this->readParameters($params, $outputmode);
|
| 157 | + return $this->getResultText($results, SMW_OUTPUT_HTML);
|
| 158 | + }
|
| 159 | +
|
| 160 | + private function formatResultData($res, $outputmode) {
|
| 161 | + while ( ($row = $res->getNext()) !== false ) {
|
| 162 | + $this->addResultRow($outputmode, $row);
|
| 163 | + }
|
| 164 | + }
|
| 165 | +
|
| 166 | + /**
|
| 167 | + * This function will loop through all properties (fields) of one record (row),
|
| 168 | + * and add the location data, title, label and icon to the m_locations array.
|
| 169 | + *
|
| 170 | + * @param unknown_type $outputmode
|
| 171 | + * @param unknown_type $row The record you want to add data from
|
| 172 | + */
|
| 173 | + private function addResultRow($outputmode, $row) {
|
| 174 | + global $wgUser;
|
| 175 | + $skin = $wgUser->getSkin();
|
| 176 | +
|
| 177 | + $title = '';
|
| 178 | + $text = '';
|
| 179 | + $lat = '';
|
| 180 | + $lon = '';
|
| 181 | +
|
| 182 | + $coords = array();
|
| 183 | +
|
| 184 | + // Loop throught all fields of the record
|
| 185 | + foreach ($row as $i => $field) {
|
| 186 | + $pr = $field->getPrintRequest();
|
| 187 | +
|
| 188 | + // Loop throught all the parts of the field value
|
| 189 | + while ( ($object = $field->getNextObject()) !== false ) {
|
| 190 | + if ($object->getTypeID() == '_wpg' && $i == 0) {
|
| 191 | + $title = $object->getLongText($outputmode, $skin);
|
| 192 | + }
|
| 193 | +
|
| 194 | + if ($object->getTypeID() != '_geo' && $i != 0) {
|
| 195 | + $text .= $pr->getHTMLText($skin) . ': ' . $object->getLongText($outputmode, $skin) . '<br />';
|
| 196 | + }
|
| 197 | +
|
| 198 | + if ($pr->getMode() == SMWPrintRequest::PRINT_PROP && $pr->getTypeID() == '_geo') {
|
| 199 | + $coords[] = explode(',', $object->getXSDValue());
|
| 200 | + }
|
| 201 | + }
|
| 202 | + }
|
| 203 | +
|
| 204 | + foreach ($coords as $coord) {
|
| 205 | + if (count($coord) == 2) {
|
| 206 | + list($lat, $lon) = $coord;
|
| 207 | +
|
| 208 | + if (strlen($lat) > 0 && strlen($lon) > 0) {
|
| 209 | + $icon = $this->getLocationIcon($row);
|
| 210 | + $this->m_locations[] = array($lat, $lon, $title, $text, $icon);
|
| 211 | + }
|
| 212 | +
|
| 213 | + }
|
| 214 | + }
|
| 215 | + }
|
| 216 | +
|
| 217 | + /**
|
| 218 | + * Get the icon for a row
|
| 219 | + *
|
| 220 | + * @param unknown_type $row
|
| 221 | + * @return unknown
|
| 222 | + */
|
| 223 | + private function getLocationIcon($row) {
|
| 224 | + $icon = '';
|
| 225 | + $legend_labels = array();
|
| 226 | +
|
| 227 | + // Look for display_options field, which can be set by Semantic Compound Queries
|
| 228 | + // the location of this field changed in SMW 1.5
|
| 229 | + if (method_exists($row[0], 'getResultSubject')) // SMW 1.5+
|
| 230 | + $display_location = $row[0]->getResultSubject();
|
| 231 | + else
|
| 232 | + $display_location = $row[0];
|
| 233 | + if (property_exists($display_location, 'display_options') && is_array($display_location->display_options)) {
|
| 234 | + $display_options = $display_location->display_options;
|
| 235 | + if (array_key_exists('icon', $display_options)) {
|
| 236 | + $icon = $display_options['icon'];
|
| 237 | +
|
| 238 | + // 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
|
| 239 | + if (array_key_exists('legend label', $display_options)) {
|
| 240 | +
|
| 241 | + $legend_label = $display_options['legend label'];
|
| 242 | +
|
| 243 | + if (! array_key_exists($icon, $legend_labels)) {
|
| 244 | + $legend_labels[$icon] = $legend_label;
|
| 245 | + }
|
| 246 | + }
|
| 247 | + }
|
| 248 | + // Icon can be set even for regular, non-compound queries If it is, though, we have to translate the name into a URL here
|
| 249 | + } elseif (array_key_exists('icon', $this->m_params)) {
|
| 250 | +
|
| 251 | + $icon_title = Title::newFromText($this->m_params['icon']);
|
| 252 | + $icon_image_page = new ImagePage($icon_title);
|
| 253 | + $icon = $icon_image_page->getDisplayedFile()->getURL();
|
| 254 | + }
|
| 255 | +
|
| 256 | + return $icon;
|
| 257 | + }
|
| 258 | +
|
| 259 | + /**
|
| 260 | + * Sets the zoom level to the provided value, or when not set, to the default.
|
| 261 | + *
|
| 262 | + */
|
| 263 | + private function setZoom() {
|
| 264 | + if (strlen($this->zoom) < 1) {
|
| 265 | + if (count($this->m_locations) > 1) {
|
| 266 | + $this->zoom = 'null';
|
| 267 | + }
|
| 268 | + else {
|
| 269 | + $this->zoom = $this->defaultZoom;
|
| 270 | + }
|
| 271 | + }
|
| 272 | + }
|
| 273 | +
|
| 274 | + /**
|
| 275 | + * Sets the $centre_lat and $centre_lon fields.
|
| 276 | + * Note: this needs to be done AFTRE the maker coordinates are set.
|
| 277 | + *
|
| 278 | + */
|
| 279 | + private function setCentre() {
|
| 280 | + // If a centre value is set, use it.
|
| 281 | + if (strlen($this->centre) > 0) {
|
| 282 | + // Geocode and convert if required.
|
| 283 | + $centre = MapsGeocodeUtils::attemptToGeocode($this->centre, $this->geoservice, $this->serviceName);
|
| 284 | + $centre = MapsUtils::getLatLon($centre);
|
| 285 | +
|
| 286 | + $this->centre_lat = $centre['lat'];
|
| 287 | + $this->centre_lon = $centre['lon'];
|
| 288 | + }
|
| 289 | + elseif (count($this->m_locations) > 1) {
|
| 290 | + // 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.
|
| 291 | + $this->centre_lat = 'null';
|
| 292 | + $this->centre_lon = 'null';
|
| 293 | + }
|
| 294 | + else {
|
| 295 | + // If centre is not set and there is exactelly one marker, use it's coordinates.
|
| 296 | + $this->centre_lat = $this->m_locations[0][0];
|
| 297 | + $this->centre_lon = $this->m_locations[0][1];
|
| 298 | + }
|
| 299 | + }
|
| 300 | +
|
| 301 | + /**
|
| 302 | + * Sets the $mapName field, using the $elementNamePrefix and $elementNr.
|
| 303 | + *
|
| 304 | + */
|
| 305 | + protected function setMapName() {
|
| 306 | + $this->mapName = $this->elementNamePrefix.'_'.$this->elementNr;
|
| 307 | + }
|
| 308 | +
|
| 309 | + public final function getName() {
|
| 310 | + return wfMsg('maps_' . $this->serviceName);
|
| 311 | + }
|
| 312 | +
|
| 313 | + public function getParameters() {
|
| 314 | + global $egMapsMapWidth, $egMapsMapHeight;
|
| 315 | +
|
| 316 | + $params = parent::exportFormatParameters();
|
| 317 | +
|
| 318 | + $params[] = array('name' => 'zoom', 'type' => 'int', 'description' => wfMsg('semanticmaps_paramdesc_zoom'));
|
| 319 | + $params[] = array('name' => 'width', 'type' => 'int', 'description' => wfMsgExt('semanticmaps_paramdesc_width', 'parsemag', $egMapsMapWidth));
|
| 320 | + $params[] = array('name' => 'height', 'type' => 'int', 'description' => wfMsgExt('semanticmaps_paramdesc_height', 'parsemag', $egMapsMapHeight));
|
| 321 | +
|
| 322 | + return $params;
|
| 323 | + }
|
| 324 | +
|
| 325 | +}
|
Index: tags/extensions/SemanticMaps/REL_0_5/QueryPrinters/SM_Mapper.php |
— | — | @@ -0,0 +1,55 @@ |
| 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 | + if ($format == 'map') $format = $egMapsDefaultServices['qp'];
|
| 26 | +
|
| 27 | + $service = MapsMapper::getValidService($format, 'qp');
|
| 28 | +
|
| 29 | + $this->queryPrinter = new $egMapsServices[$service]['qp']['class']($format, $inline);
|
| 30 | + }
|
| 31 | +
|
| 32 | + public static function getAliases() {
|
| 33 | + return $this->queryPrinter->getAliases();
|
| 34 | + }
|
| 35 | +
|
| 36 | + public static function setAliases() {
|
| 37 | + return $this->queryPrinter->setAliases();
|
| 38 | + }
|
| 39 | +
|
| 40 | + public function getName() {
|
| 41 | + return wfMsg('maps_map');
|
| 42 | + }
|
| 43 | +
|
| 44 | + public function getQueryMode($context) {
|
| 45 | + return $this->queryPrinter->getQueryMode($context);
|
| 46 | + }
|
| 47 | +
|
| 48 | + public function getResult($results, $params, $outputmode) {
|
| 49 | + return $this->queryPrinter->getResult($results, $params, $outputmode);
|
| 50 | + }
|
| 51 | +
|
| 52 | + protected function getResultText($res, $outputmode) {
|
| 53 | + return $this->queryPrinter->getResultText($res, $outputmode);
|
| 54 | + }
|
| 55 | +
|
| 56 | +}
|
Index: tags/extensions/SemanticMaps/REL_0_5/GoogleMaps/SM_GoogleMapsFunctions.js |
— | — | @@ -0,0 +1,66 @@ |
| 2 | + /**
|
| 3 | + * Javascript functions for Google Maps functionallity 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 spesific functionallity 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 | + mapOptions.size = new GSize(mapOptions.width, mapOptions.height);
|
| 19 | + var map = createGoogleMap(mapName, mapOptions, [getGMarkerData(marker_lat, marker_lon, '', '', '')]);
|
| 20 | +
|
| 21 | + // Show a starting marker only if marker coordinates are provided
|
| 22 | + if (marker_lat != null && marker_lon != null) {
|
| 23 | + map.addOverlay(new GMarker(new GLatLng(marker_lat, marker_lon)));
|
| 24 | + }
|
| 25 | +
|
| 26 | + // Click event handler for updating the location of the marker
|
| 27 | + GEvent.addListener(map, "click",
|
| 28 | + function(overlay, point) {
|
| 29 | + if (overlay) {
|
| 30 | + map.removeOverlay(overlay);
|
| 31 | + } else {
|
| 32 | + map.clearOverlays();
|
| 33 | + document.getElementById(locationFieldName).value = convertLatToDMS(point.y)+', '+convertLngToDMS(point.x);
|
| 34 | + map.addOverlay(new GMarker(point));
|
| 35 | + map.panTo(point);
|
| 36 | + }
|
| 37 | + }
|
| 38 | + );
|
| 39 | +
|
| 40 | + // Make the map variable available for other functions
|
| 41 | + if (!window.GMaps) window.GMaps = new Object;
|
| 42 | + eval("window.GMaps." + mapName + " = map;");
|
| 43 | + }
|
| 44 | +}
|
| 45 | +
|
| 46 | +/**
|
| 47 | + * This function holds spesific functionallity for the Google Maps form input of Semantic Maps
|
| 48 | + */
|
| 49 | +function showGAddress(address, mapName, outputElementName, notFoundFormat) {
|
| 50 | + var map = GMaps[mapName];
|
| 51 | + var geocoder = new GClientGeocoder();
|
| 52 | +
|
| 53 | + geocoder.getLatLng(address,
|
| 54 | + function(point) {
|
| 55 | + if (!point) {
|
| 56 | + window.alert(address + ' ' + notFoundFormat);
|
| 57 | + } else {
|
| 58 | + map.clearOverlays();
|
| 59 | + map.setCenter(point, 14);
|
| 60 | + var marker = new GMarker(point);
|
| 61 | + map.addOverlay(marker);
|
| 62 | + document.getElementById(outputElementName).value = convertLatToDMS(point.y) + ', ' + convertLngToDMS(point.x);
|
| 63 | + }
|
| 64 | + }
|
| 65 | + );
|
| 66 | +
|
| 67 | +} |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/GoogleMaps/SM_GoogleMaps.php |
— | — | @@ -0,0 +1,24 @@ |
| 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 | +$egMapsServices['googlemaps']['qp'] = array('class' => 'SMGoogleMapsQP', 'file' => 'SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php', 'local' => false);
|
| 25 | +$egMapsServices['googlemaps']['fi'] = array('class' => 'SMGoogleMapsFormInput', 'file' => 'SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php', 'local' => false); |
\ No newline at end of file |
Index: tags/extensions/SemanticMaps/REL_0_5/GoogleMaps/SM_GoogleMapsQP.php |
— | — | @@ -0,0 +1,140 @@ |
| 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 | + public $serviceName = MapsGoogleMaps::SERVICE_NAME;
|
| 21 | +
|
| 22 | + protected $spesificParameters;
|
| 23 | +
|
| 24 | + /**
|
| 25 | + * @see SMMapPrinter::setQueryPrinterSettings()
|
| 26 | + *
|
| 27 | + */
|
| 28 | + protected function setQueryPrinterSettings() {
|
| 29 | + global $egMapsGoogleMapsZoom, $egMapsGoogleMapsPrefix;
|
| 30 | +
|
| 31 | + $this->elementNamePrefix = $egMapsGoogleMapsPrefix;
|
| 32 | +
|
| 33 | + $this->defaultZoom = $egMapsGoogleMapsZoom;
|
| 34 | +
|
| 35 | + $this->spesificParameters = array(
|
| 36 | + 'zoom' => array(
|
| 37 | + 'default' => '',
|
| 38 | + ),
|
| 39 | + 'overlays' => array(
|
| 40 | + 'type' => 'list-string',
|
| 41 | + 'criteria' => array(
|
| 42 | + 'all_in_array' => MapsGoogleMaps::getOverlayNames()
|
| 43 | + ),
|
| 44 | + ),
|
| 45 | + );
|
| 46 | + }
|
| 47 | +
|
| 48 | + /**
|
| 49 | + * @see SMMapPrinter::doMapServiceLoad()
|
| 50 | + *
|
| 51 | + */
|
| 52 | + protected function doMapServiceLoad() {
|
| 53 | + global $egGoogleMapsOnThisPage;
|
| 54 | +
|
| 55 | + if (empty($egGoogleMapsOnThisPage)) {
|
| 56 | + $egGoogleMapsOnThisPage = 0;
|
| 57 | + MapsGoogleMaps::addGMapDependencies($this->output);
|
| 58 | + }
|
| 59 | +
|
| 60 | + $egGoogleMapsOnThisPage++;
|
| 61 | +
|
| 62 | + $this->elementNr = $egGoogleMapsOnThisPage;
|
| 63 | + }
|
| 64 | +
|
| 65 | + /**
|
| 66 | + * @see SMMapPrinter::getQueryResult()
|
| 67 | + *
|
| 68 | + */
|
| 69 | + protected function addSpecificMapHTML() {
|
| 70 | + global $wgJsMimeType;
|
| 71 | +
|
| 72 | + // Get the Google Maps names for the control and map types.
|
| 73 | + $this->type = MapsGoogleMaps::getGMapType($this->type, true);
|
| 74 | +
|
| 75 | + $this->controls = MapsMapper::createJSItemsString($this->controls);
|
| 76 | +
|
| 77 | + $onloadFunctions = MapsGoogleMaps::addOverlayOutput($this->output, $this->mapName, $this->overlays, $this->controls);
|
| 78 | +
|
| 79 | + $this->autozoom = MapsGoogleMaps::getAutozoomJSValue($this->autozoom);
|
| 80 | +
|
| 81 | + $markerItems = array();
|
| 82 | +
|
| 83 | + foreach ($this->m_locations as $location) {
|
| 84 | + list($lat, $lon, $title, $label, $icon) = $location;
|
| 85 | +
|
| 86 | + $title = str_replace("'", "\'", $title);
|
| 87 | + $label = str_replace("'", "\'", $label);
|
| 88 | +
|
| 89 | + $markerItems[] = "getGMarkerData($lat, $lon, '$title', '$label', '$icon')";
|
| 90 | + }
|
| 91 | +
|
| 92 | + // Create a string containing the marker JS
|
| 93 | + $markersString = implode(',', $markerItems);
|
| 94 | +
|
| 95 | + $typesString = MapsGoogleMaps::createTypesString($this->types);
|
| 96 | +
|
| 97 | + $this->output .= <<<END
|
| 98 | +<div id="$this->mapName" class="$this->class" style="$this->style" ></div>
|
| 99 | +<script type="$wgJsMimeType"> /*<![CDATA[*/
|
| 100 | +addOnloadHook(
|
| 101 | + initializeGoogleMap('$this->mapName',
|
| 102 | + {
|
| 103 | + width: $this->width,
|
| 104 | + height: $this->height,
|
| 105 | + lat: $this->centre_lat,
|
| 106 | + lon: $this->centre_lon,
|
| 107 | + zoom: $this->zoom,
|
| 108 | + type: $this->type,
|
| 109 | + types: [$typesString],
|
| 110 | + controls: [$this->controls],
|
| 111 | + scrollWheelZoom: $this->autozoom
|
| 112 | + },
|
| 113 | + [$markersString]
|
| 114 | + )
|
| 115 | +);
|
| 116 | +/*]]>*/ </script>
|
| 117 | +
|
| 118 | +END;
|
| 119 | +
|
| 120 | + $this->output .= $onloadFunctions;
|
| 121 | + }
|
| 122 | +
|
| 123 | + /**
|
| 124 | + * Returns type info, descriptions and allowed values for this QP's parameters after adding the spesific ones to the list.
|
| 125 | + */
|
| 126 | + public function getParameters() {
|
| 127 | + $params = parent::getParameters();
|
| 128 | +
|
| 129 | + $allowedTypes = MapsGoogleMaps::getTypeNames();
|
| 130 | +
|
| 131 | + $params[] = array('name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg('semanticmaps_paramdesc_controls'), 'values' => MapsGoogleMaps::getControlNames());
|
| 132 | + $params[] = array('name' => 'types', 'type' => 'enum-list', 'description' => wfMsg('semanticmaps_paramdesc_types'), 'values' => $allowedTypes);
|
| 133 | + $params[] = array('name' => 'type', 'type' => 'enumeration', 'description' => wfMsg('semanticmaps_paramdesc_type'), 'values' => $allowedTypes);
|
| 134 | + $params[] = array('name' => 'overlays', 'type' => 'enum-list', 'description' => wfMsg('semanticmaps_paramdesc_overlays'), 'values' => MapsGoogleMaps::getOverlayNames());
|
| 135 | + $params[] = array('name' => 'autozoom', 'type' => 'enumeration', 'description' => wfMsg('semanticmaps_paramdesc_autozoom'), 'values' => array('on', 'off'));
|
| 136 | +
|
| 137 | + return $params;
|
| 138 | + }
|
| 139 | +
|
| 140 | +}
|
| 141 | +
|
Index: tags/extensions/SemanticMaps/REL_0_5/GoogleMaps/SM_GoogleMapsFormInput.php |
— | — | @@ -0,0 +1,125 @@ |
| 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 | + public $serviceName = MapsGoogleMaps::SERVICE_NAME; |
| 22 | + |
| 23 | + /** |
| 24 | + * @see MapsMapFeature::setMapSettings() |
| 25 | + * |
| 26 | + */ |
| 27 | + protected function setMapSettings() { |
| 28 | + global $egMapsGoogleMapsZoom, $egMapsGoogleMapsPrefix; |
| 29 | + |
| 30 | + $this->elementNamePrefix = $egMapsGoogleMapsPrefix; |
| 31 | + $this->showAddresFunction = 'showGAddress'; |
| 32 | + |
| 33 | + $this->earthZoom = 1; |
| 34 | + |
| 35 | + $this->defaultZoom = $egMapsGoogleMapsZoom; |
| 36 | + } |
| 37 | + |
| 38 | + /** |
| 39 | + * (non-PHPdoc) |
| 40 | + * @see smw/extensions/SemanticMaps/FormInputs/SMFormInput#addFormDependencies() |
| 41 | + */ |
| 42 | + protected function addFormDependencies() { |
| 43 | + global $wgJsMimeType; |
| 44 | + global $smgScriptPath, $smgGoogleFormsOnThisPage, $smgStyleVersion; |
| 45 | + |
| 46 | + MapsGoogleMaps::addGMapDependencies($this->output); |
| 47 | + |
| 48 | + if (empty($smgGoogleFormsOnThisPage)) { |
| 49 | + $smgGoogleFormsOnThisPage = 0; |
| 50 | + $this->output .= "<script type='$wgJsMimeType' src='$smgScriptPath/GoogleMaps/SM_GoogleMapsFunctions.js?$smgStyleVersion'></script>"; |
| 51 | + } |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * @see MapsMapFeature::doMapServiceLoad() |
| 56 | + * |
| 57 | + */ |
| 58 | + protected function doMapServiceLoad() { |
| 59 | + global $egGoogleMapsOnThisPage, $smgGoogleFormsOnThisPage; |
| 60 | + |
| 61 | + self::addFormDependencies(); |
| 62 | + |
| 63 | + $egGoogleMapsOnThisPage++; |
| 64 | + $smgGoogleFormsOnThisPage++; |
| 65 | + |
| 66 | + $this->elementNr = $egGoogleMapsOnThisPage; |
| 67 | + } |
| 68 | + |
| 69 | + /** |
| 70 | + * @see MapsMapFeature::addSpecificFormInputHTML() |
| 71 | + * |
| 72 | + */ |
| 73 | + protected function addSpecificMapHTML() { |
| 74 | + global $wgJsMimeType; |
| 75 | + |
| 76 | + $this->autozoom = MapsGoogleMaps::getAutozoomJSValue($this->autozoom); |
| 77 | + |
| 78 | + $this->type = MapsGoogleMaps::getGMapType($this->type, true); |
| 79 | + |
| 80 | + $this->controls = MapsMapper::createJSItemsString($this->controls); |
| 81 | + |
| 82 | + // Remove the overlays control in case it's present. |
| 83 | + if (in_string('overlays', $this->controls)) { |
| 84 | + $this->controls = str_replace(",'overlays'", '', $this->controls); |
| 85 | + $this->controls = str_replace("'overlays',", '', $this->controls); |
| 86 | + } |
| 87 | + |
| 88 | + $typesString = MapsGoogleMaps::createTypesString($this->types); |
| 89 | + |
| 90 | + $this->output .= " |
| 91 | + <div id='".$this->mapName."' class='".$this->class."'></div> |
| 92 | + |
| 93 | + <script type='$wgJsMimeType'>/*<![CDATA[*/ |
| 94 | + addOnloadHook( |
| 95 | + makeGoogleMapFormInput( |
| 96 | + '$this->mapName', |
| 97 | + '$this->coordsFieldName', |
| 98 | + { |
| 99 | + width: $this->width, |
| 100 | + height: $this->height, |
| 101 | + lat: $this->centre_lat, |
| 102 | + lon: $this->centre_lon, |
| 103 | + zoom: $this->zoom, |
| 104 | + type: $this->type, |
| 105 | + types: [$typesString], |
| 106 | + controls: [$this->controls], |
| 107 | + scrollWheelZoom: $this->autozoom |
| 108 | + }, |
| 109 | + $this->marker_lat, |
| 110 | + $this->marker_lon |
| 111 | + ) |
| 112 | + ); |
| 113 | + /*]]>*/</script>"; |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * @see SMFormInput::manageGeocoding() |
| 118 | + * |
| 119 | + */ |
| 120 | + protected function manageGeocoding() { |
| 121 | + global $egGoogleMapsKey; |
| 122 | + $this->enableGeocoding = strlen(trim($egGoogleMapsKey)) > 0; |
| 123 | + if ($this->enableGeocoding) MapsGoogleMaps::addGMapDependencies($this->output); |
| 124 | + }
|
| 125 | + |
| 126 | +} |
Index: tags/extensions/SemanticMaps/REL_0_5/README |
— | — | @@ -0,0 +1,23 @@ |
| 2 | +== About ==
|
| 3 | +
|
| 4 | +Semantic Maps is an extension that adds semantic capabilities to the Maps extension, and
|
| 5 | +therefore provides the ability to add, view and edit coordinate data stored through the
|
| 6 | +Semantic MediaWiki extension.
|
| 7 | +
|
| 8 | +Due to it's unique structure, it allows you to use multiple mapping services to display
|
| 9 | +your coordinates. These include Google Maps, Yahoo! Maps, OpenLayers, and also allow you to
|
| 10 | +display maps with Google Earth, OpenStreetMaps, Bing maps and others. Modifying the mapping
|
| 11 | +service of a map is as easy as changing a single parameter! Examples of how to use Semantic
|
| 12 | +Maps can be found here.
|
| 13 | +
|
| 14 | +Both Semantic Maps and Maps are based on Semantic Google Maps and Semantic Layers, and are
|
| 15 | +meant to replace these extensions.
|
| 16 | +
|
| 17 | +Having Semantic MediaWiki and Maps installed is a prerequisite for the Semantic Maps extension;
|
| 18 | +the code will not work without it.
|
| 19 | +
|
| 20 | +Notes on installing Semantic Maps are found in the file INSTALL.
|
| 21 | +
|
| 22 | +== Contributors ==
|
| 23 | +
|
| 24 | +http://www.mediawiki.org/wiki/Extension:Semantic_Maps#Contributing_to_the_project
|