r84463 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84462‎ | r84463 | r84464 >
Date:16:57, 21 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Tag for version 0.7.6.
Modified paths:
  • /tags/extensions/SemanticMaps/REL_0_7_6 (added) (history)

Diff [purge]

Index: tags/extensions/SemanticMaps/REL_0_7_6/SM_Settings.php
@@ -0,0 +1,92 @@
 2+<?php
 3+
 4+/**
 5+ * File defining the settings for the Semantic Maps extension.
 6+ * More info can be found at http://www.mediawiki.org/wiki/Extension:Semantic_Maps#Settings
 7+ *
 8+ * NOTICE:
 9+ * Changing one of these settings can be done by copieng or cutting it,
 10+ * and placing it in LocalSettings.php, AFTER the inclusion of Semantic Maps.
 11+ *
 12+ * @file SM_Settings.php
 13+ * @ingroup SemanticMaps
 14+ *
 15+ * @author Jeroen De Dauw
 16+ */
 17+
 18+if ( !defined( 'MEDIAWIKI' ) ) {
 19+ die( 'Not an entry point.' );
 20+}
 21+
 22+
 23+
 24+# Features configuration
 25+
 26+ # (named) Array of String. This array contains the available features for Maps.
 27+ # Commenting out the inclusion of any feature will make Maps completely ignore it, and so improve performance.
 28+
 29+ # Query printers
 30+ include_once $smgDir . 'includes/queryprinters/SM_QueryPrinters.php';
 31+ # Form imputs
 32+ include_once $smgDir . 'includes/forminputs/SM_FormInputs.php';
 33+
 34+
 35+
 36+# Mapping services configuration
 37+
 38+ # Include the mapping services that should be loaded into Semantic Maps.
 39+ # Commenting or removing a mapping service will cause Semantic Maps to completely ignore it, and so improve performance.
 40+ # Google Maps API v2
 41+ include_once $smgDir . 'includes/services/GoogleMaps/SM_GoogleMaps.php';
 42+ # OpenLayers API
 43+ include_once $smgDir . 'includes/services/OpenLayers/SM_OpenLayers.php';
 44+ # Yahoo! Maps API
 45+ include_once $smgDir . 'includes/services/YahooMaps/SM_YahooMaps.php';
 46+
 47+ # Array of String. The default mapping service for each feature, which will be used when no valid service is provided by the user.
 48+ # Each service needs to be enabled, if not, the first one from the available services will be taken.
 49+ # Note: The default service needs to be available for the feature you set it for, since it's used as a fallback mechanism.
 50+ $egMapsDefaultServices['qp'] = $egMapsDefaultService;
 51+ $egMapsDefaultServices['fi'] = $egMapsDefaultService;
 52+
 53+
 54+
 55+# General
 56+
 57+ # Boolean. Indicates if spatial extensions should be used for coordinate storage.
 58+ # Spatial extensions significantly speed up querying, but are not present by default on postgres databases.
 59+ # If this value is false, coordinates will be stored in 2 float fields.
 60+ # You are unlikely to need to change this setting, so don't unless you know what you are doing!
 61+ $smgUseSpatialExtensions = false; // TODO: $wgDBtype != 'postgres';
 62+
 63+
 64+
 65+# Queries
 66+
 67+ # Boolean. The default value for the forceshow parameter. Will force a map to be shown even when there are no query results
 68+ # when set to true. This value will only be used when the user does not provide one.
 69+ $smgQPForceShow = false;
 70+
 71+ # Boolean. The default value for the showtitle parameter. Will hide the title in the marker pop-ups when set to true.
 72+ # This value will only be used when the user does not provide one.
 73+ $smgQPShowTitle = true;
 74+
 75+ # String or false. Allows you to define the content and it's layout of marker pop-ups via a template.
 76+ # This value will only be used when the user does not provide one.
 77+ $smgQPTemplate = false;
 78+
 79+ # Enum. The default output format of coordinates.
 80+ # Possible values: Maps_COORDS_FLOAT, Maps_COORDS_DMS, Maps_COORDS_DM, Maps_COORDS_DD
 81+ $smgQPCoodFormat = $egMapsCoordinateNotation;
 82+
 83+ # Boolean. Indicates if coordinates should be outputted in directional notation by default.
 84+ $smgQPCoodDirectional = $egMapsCoordinateDirectional;
 85+
 86+
 87+
 88+# Forms
 89+
 90+ # Integer or string. The default width and height of maps in forms created by using Semantic Forms.
 91+ # These values only be used when the user does not provide them.
 92+ $smgFIWidth = 665;
 93+ $smgFIHeight = $egMapsMapHeight;
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/SM_Settings.php
___________________________________________________________________
Added: svn:eol-style
194 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/INSTALL
@@ -0,0 +1,56 @@
 2+[[Semantic Maps 0.7.5]]
 3+
 4+You can find a wiki version of this document, which includes various helpfull links, at
 5+http://mapping.referata.com/wiki/Help:Installation#Semantic_Maps
 6+
 7+Make sure you have Semantic MediaWiki, Maps and Validator successfully installed
 8+before proceeding with the installation. Once you have downloaded the code,
 9+place the 'SemanticMaps' directory within your MediaWiki 'extensions' directory.
 10+Then add the following code to your LocalSettings.php file after the lines that install Maps:
 11+
 12+require_once( "$IP/extensions/SemanticMaps/SemanticMaps.php" );
 13+
 14+The placement of the inclusion of Maps and Semantic Maps needs to be at a certain position.
 15+Hold the following rules into account:
 16+* Maps needs to be included before Semantic Maps.
 17+* Semantic MediaWiki needs to be included before Maps.
 18+* Semantic Forms (if used) needs to be included before Maps (after SMW).
 19+
 20+An example of a typical inclusion order: ..., SMW, ..., SF, ..., Maps, SM, ...
 21+
 22+=== Installing 0.6 and above ===
 23+
 24+This applies only to people installing version 0.6 or later.
 25+
 26+Once You installed Semantic Maps, go to Special:SMWAdmin and run "database installation and upgrade".
 27+If you do not do this, geographic coordinates will not work properly, and you might encounters
 28+database errors on pages using them anyway.
 29+
 30+=== Upgrading to 0.6 and above ===
 31+
 32+This applies to everyone upgrading from the first Semantic Google Maps to Semantic Maps 0.5.5.
 33+
 34+Make sure you have upgraded SMW to version 1.5.1 or above before installing Semantic Maps 0.6!
 35+
 36+When upgrading to 0.6 from any previous version, you need to run the "database installation and upgrade"
 37+script in Special:SMWAdmin. Not doing this will result into fatal PHP errors. You will also need to run
 38+the "data repair and upgrade" script on the same page, which is required in order to store all
 39+coordinates so that Semantic Maps recognizes them. Not doing this will result into queries not
 40+returning any coordinates.
 41+
 42+=== Upgrading from Semantic Google Maps ===
 43+
 44+If you have Semantic Google Maps installed, and want to upgrade to Semantic Maps, these are the
 45+steps you need to follow:
 46+
 47+* Remove the SemanticGoogleMaps directory from your extension directory.
 48+* Remove (when you use it) Google Geocoder in a similar fashion.
 49+* Upload both Maps and Semantic Maps to your extension directory.
 50+* Make sure your API keys are in the right place
 51+ (the variable $wgGoogleMapsKey will need to be renamed, or copied, to $egGoogleMapsKey).
 52+* Change all #semantic_google_map parser functions with #display_point.
 53+* Add parameter names to the value of the #display_point calls.
 54+
 55+After doing all these steps, you should be done. Maps and Semantic Maps are designed to be
 56+backward compatible with SGM, so all SGM code ''should'' work on Semantic Maps. If you
 57+encounter some problem though, please let the extension developers know.
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/INSTALL
___________________________________________________________________
Added: svn:eol-style
158 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/RELEASE-NOTES
@@ -0,0 +1,429 @@
 2+For a documentation of all features, see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 3+
 4+== Semantic Maps change log ==
 5+
 6+This change log contains a list of completed to-do's (new features, bug fixes, refactoring) for every
 7+version of Semantic Maps. You can find the most upt-do-date version at
 8+http://www.mediawiki.org/wiki/Extension:Semantic_Maps/Version_history#Semantic_Maps_change_log
 9+
 10+
 11+
 12+=== Semantic Maps 0.7.6 ===
 13+(2011-03-21)
 14+
 15+* Improved map query parameter support in the Special:Ask GUI
 16+
 17+* Fixed fatal error occuring when running maintenance/refreshLinks.php
 18+
 19+=== Semantic Maps 0.7.5 ===
 20+(2011-02-16)
 21+
 22+Maintenance release matching Maps 0.7.5.
 23+
 24+=== Semantic Maps 0.7.4 ===
 25+(2011-01-20)
 26+
 27+Maintenance release matching Maps 0.7.4.
 28+
 29+=== Semantic Maps 0.7.3 ===
 30+(2010-11-30)
 31+
 32+==== new features ====
 33+
 34+* Added KML result format that allows the export of geographical data queried via SMW in the form of .kml files.
 35+
 36+=== Semantic Maps 0.7.2 ===
 37+(2010-10-28)
 38+
 39+==== Bug fixes ====
 40+
 41+* Fixed small layout issue in query pop-ups when property names are blank.
 42+
 43+=== Semantic Maps 0.7.1 ===
 44+(2010-10-20)
 45+
 46+==== New features ====
 47+
 48+* Image layers for OpenLayers maps, defined via pages in the Layer namespace.
 49+
 50+==== Bug fixes ====
 51+
 52+* Support for images without namespace prefix in the statispoints parameter in map ask queries.
 53+
 54+* Fixed several issue with the OpenLayers form input.
 55+
 56+* Fixed fatal error for Google Maps v2 options on Special:Ask.
 57+
 58+=== Semantic Maps 0.7 ===
 59+(2010-10-15)
 60+
 61+==== New features ====
 62+
 63+* Added 'locations' parameter to the map query printers that allows for displaying static locations
 64+ in addition to query results in queries. It behaves the same as the locations parameter in display_points.
 65+
 66+==== Bug fixes ====
 67+
 68+* Fixed compatibility with the MW 1.17 resource loader.
 69+
 70+==== Internal improvements ====
 71+
 72+* Use of Validator 0.4, allowing for more robust and consistent error reporting.
 73+
 74+* Restructured the directory structure of the extension to better match it's architecture.
 75+
 76+=== Semantic Maps 0.6.6 ===
 77+(2010-08-26)
 78+
 79+=== New features ===
 80+
 81+* Added support for 'semantic' extension type, added by SMW 1.5.2 and above.
 82+
 83+==== Refactoring ====
 84+
 85+* Use of the new MapsMappingServices class of the Maps extension instead of the globals.
 86+
 87+==== Bug fixes ====
 88+
 89+* Fixed issue that caused popup contents to be displayed incorrectly when using templates.
 90+
 91+* Fixed issue that lowercased template names provided with the template parameter in queries.
 92+
 93+=== Semantic Maps 0.6.5 ===
 94+(2010-07-27)
 95+
 96+==== New features ====
 97+
 98+* Added hook for default result formats based on queried data types (requires SMW 1.5.2 or above).
 99+
 100+==== Refactoring ====
 101+
 102+* Moved map id creation to the mapping service class for all features.
 103+
 104+* Moved marker js creation for query printers to the mapping service class for all features.
 105+
 106+* Moved default zoom level access method to the mapping service class for all features.
 107+
 108+* Cleaned up the way specific parameter info is handled.
 109+
 110+* Improved the structure of the geocoding functionality in form inputs.
 111+
 112+==== Bug fixes ====
 113+
 114+* Fixed the default zoom for form inputs and query printers.
 115+
 116+=== Semantic Maps 0.6.4 ===
 117+(2010-07-08)
 118+
 119+==== New features ====
 120+
 121+* Re-added service link support, which got removed in 0.6.
 122+
 123+==== Refactoring ====
 124+
 125+* Moved more functionality over from feature classes to service classes to prevent crazy code-flow and code duplication.
 126+
 127+==== Bug fixes ====
 128+
 129+* Fixed php notice that occurred in some queries, introduced in 0.6.3.
 130+
 131+* Fixed issue that caused result format maps not to load when a centre address was provided that could not be geocoded.
 132+
 133+=== Semantic Maps 0.6.3 ===
 134+(2010-06-20)
 135+
 136+==== Refactoring ====
 137+
 138+* Mayor refactoring of the mapping service handling, to make the code flow less messy and be able to do mapping service related things in a more consistent fashion.
 139+
 140+==== Bug fixes ====
 141+
 142+* Fixed issue that caused Yahoo! Maps and OpenLayers maps not to load on form pages.
 143+
 144+* Fixed php warning originating from Validator that occurred on form pages with maps.
 145+
 146+* Fixed issue that caused a fatal error when doing a query via special:ask with a mapping format, present since 0.6.
 147+
 148+=== Semantic Maps 0.6.2 ===
 149+(2010-06-07)
 150+
 151+==== Bug fixes ====
 152+
 153+* Fixed fatal error that occurred when editing a page via a form with a map on it.
 154+
 155+=== Semantic Maps 0.6.1 ===
 156+(2010-06-04)
 157+
 158+==== Bug fixes ====
 159+
 160+* Fixed serious bug that caused mapping parameters to get ignored in semantic queries and forms.
 161+
 162+* Fixed fatal error that occurred when not disabling the form input feature when Semantic Forms is not installed.
 163+
 164+* Fixed bug in map form inputs that stored 'west' coordinates as 'south' coordinates, effectively rendering the resulting coordinate set invalid.
 165+
 166+=== Semantic Maps 0.6 ===
 167+(2010-05-31)
 168+
 169+==== New features ====
 170+
 171+* Added full support for both directional and non-directional coordinate notations in DMS, DD, DM and float notation.
 172+
 173+* Added native geographical proximity query support.
 174+
 175+* Added settings to specify the width and height of maps in forms.
 176+
 177+* Added settings to specify the format of coordinates as shown in query printouts.
 178+
 179+==== Refactoring ====
 180+
 181+* Rewrote map divs and added loading message for each map.
 182+
 183+* Rewrote individual map JS to be added to the page header.
 184+
 185+* Restructured the directory structure to make what the services and features are more clear.
 186+
 187+* Rewrote storage of coordinates to make the proximity query scalable.
 188+
 189+==== Bug fixes ====
 190+
 191+* Fixed conflict with prototype library that caused compatibility problems with the Halo extension.
 192+
 193+=== Semantic Maps 0.5.5 ===
 194+(2010-03-20)
 195+
 196+==== Refactoring ====
 197+
 198+* Moved the geographical proximity query from Semantic MediaWiki over to Semantic Maps.
 199+
 200+* Stylized the code to conform to MediaWiki's spacing conventions.
 201+
 202+==== Bug fixes ====
 203+
 204+* Fixed issue causing properties of type Page to not show up in pop-ups when using the template parameter.
 205+
 206+* Fixed escaping issues that caused pop-ups to break when they contained '-signs.
 207+
 208+=== Semantic Maps 0.5.4 ===
 209+(2010-03-01)
 210+
 211+==== Bug fixes ====
 212+
 213+* Fixed potential xss vectors.
 214+
 215+* Fixed minor JS error that was present for all maps except OSM.
 216+
 217+* Fixed i18n issue that caused geocoords not to be recognized on several foreign language wiki's.
 218+
 219+=== Semantic Maps 0.5.3 ===
 220+(2010-02-01)
 221+
 222+==== Bug fixes ====
 223+
 224+* Fixed issue with the type and types parameters in the Yahoo! Maps form input.
 225+
 226+* Fixed OpenLayers form input projection bug, causing the the coordinates to be wrongly interpreted.
 227+
 228+* Fixed marker display for the OpenLayers form inputs.
 229+
 230+* Fixed issue causing a fatal error when executing a query on Special:Ask with the "map" format.
 231+
 232+=== Semantic Maps 0.5.2 ===
 233+(2010-01-20)
 234+
 235+==== New features ====
 236+
 237+* Added support for template= parameter to the result printers.
 238+
 239+* Added support for showtitle= parameter to the result printers.
 240+
 241+* Added icon parameter to the query printers, allowing you to set the icon for all markers that do not have a specific icon assigned via a compound query.
 242+
 243+==== Bug fixes ====
 244+
 245+* Added missing SMW #Ask: parameters to the parameter list of the Semantic Maps query printers.
 246+
 247+* Fixed issue with centre parameter for maps with no results (using forceshow=on).
 248+
 249+=== Semantic Maps 0.5.1 ===
 250+(2009-12-25)
 251+
 252+==== New features ====
 253+
 254+* Added parameter support for the 'map' format on Special:Ask.
 255+
 256+* Added forceshow parameter to the result formats to allow users to force showing a map, even when there are no geographical coordinate results from a query.
 257+
 258+==== Refactoring ====
 259+
 260+* Modified the parameter definitions to work with Validator 0.2.
 261+
 262+* Removed redundant (because of Validator 0.2) utility function calls from the mapping classes.
 263+
 264+* Ensured none of the form input classes get loaded when SF is not present.
 265+
 266+==== Bug fixes ====
 267+
 268+* Fixed issue with the query printers causing error messages to be shown for ask specific parameters.
 269+
 270+===Semantic Maps 0.5===
 271+(2009-12-17)
 272+
 273+====New features====
 274+
 275+* Added a result format for the OL optimized for OSM service.
 276+
 277+* Added support for the new Special:Ask page's parameter handling to the query printers.
 278+
 279+==== Refactoring ====
 280+
 281+* Moved the geographical coordinate data type handling from SMW to SM.
 282+
 283+* Added checks for extension dependencies that need to be present for Semantic Maps to be initialized.
 284+
 285+==== Bug fixes ====
 286+
 287+* Fixed issue with the form input registration. The main service names where getting changed into the default mapping service.
 288+
 289+===Semantic Maps 0.4.2===
 290+(2009-11-15)
 291+
 292+Changes in 0.4.2 discussed on the authors blog:
 293+
 294+* [http://blog.bn2vs.com/2009/11/16/maps-and-semantic-maps-0-4-2/ Maps and Semantic Maps 0.4.2 released]
 295+* [http://blog.bn2vs.com/2009/11/12/new-in-maps-0-4-2/ New in Maps 0.4.2]
 296+
 297+==== Bug fixes ====
 298+
 299+* 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.
 300+
 301+===Semantic Maps 0.4.1===
 302+(2009-11-10)
 303+
 304+====New features====
 305+
 306+* Added smart geocoding to the QP's centre parameter.
 307+
 308+* Added smart geocoding to the FI's centre parameter.
 309+
 310+==== Bug fixes ====
 311+
 312+* Fixed bug in the Yahoo! Maps form input, caused by not adapting a renamed variable.
 313+
 314+* Fixed bug in the form scripts caused by wrongly encoded JavaScript file of Maps.
 315+
 316+===Semantic Maps 0.4===
 317+(2009-11-03)
 318+
 319+Changes in 0.4 discussed on the authors blog:
 320+
 321+* [http://blog.bn2vs.com/2009/11/03/finally-maps-and-semantic-maps-0-4/ Finally! Maps and Semantic Maps 0.4!]
 322+
 323+====Bug fixes====
 324+
 325+* 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].
 326+
 327+* Fixed problem that caused the SM result formats to not get displayed on Special:Ask.
 328+
 329+===Semantic Maps 0.3.4===
 330+(2009-09-12)
 331+
 332+Changes in 0.3.4 discussed on the authors blog:
 333+
 334+* [http://blog.bn2vs.com/2009/09/12/maps-and-semantic-maps-0-3-4-released/ Maps and Semantic Maps 0.3.4 released]
 335+
 336+====Bug fixes====
 337+
 338+* Fixed bug causing error for people who do not have Semantic Forms installed and enabled, presumably introduced in 0.3.
 339+
 340+* 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.
 341+
 342+====Refactoring====
 343+
 344+* Restructured the extension to work with the new feature hook system of Maps.
 345+
 346+===Semantic Maps 0.3.3===
 347+(2009-08-15)
 348+
 349+Changes in 0.3.3 discussed on the authors blog:
 350+
 351+* [http://blog.bn2vs.com/2009/08/25/maps-and-semantic-maps-0-3-3/ Maps and Semantic Maps 0.3.3]
 352+
 353+====Bug fixes====
 354+
 355+* Fixed error caused by the 'map' format on the Special:Ask page
 356+
 357+===Semantic Maps 0.3.2===
 358+(2009-08-18)
 359+
 360+====Bug fixes====
 361+
 362+* Fixed logic error that caused maps to have a wrong centre and zoom when a query only returned one result.
 363+
 364+* Fixed an issue with the centre parameter in queries. In some cases it would not be processed correctly and cause PHP notices.
 365+
 366+===Semantic Maps 0.3.1===
 367+(2009-08-18)
 368+
 369+====Bug fixes====
 370+
 371+* Fixed script design flaw that caused errors when using the 'map' format in a query.
 372+
 373+===Semantic Maps 0.3===
 374+(2009-08-14)
 375+
 376+Changes in 0.3 discussed on the authors blog:
 377+
 378+* [http://blog.bn2vs.com/2009/08/13/final-changes-for-maps-and-sm-0-3/ Final changes for Maps and SM 0.3]
 379+
 380+* [http://blog.bn2vs.com/2009/08/07/new-features-in-maps-and-sm-0-3/ New features in Maps and SM 0.3]
 381+
 382+* [http://blog.bn2vs.com/2009/08/05/structural-changes-for-maps-and-sm-0-3/ Structural changes for Maps and SM 0.3]
 383+
 384+====New functionality====
 385+
 386+* Yahoo! Maps and OpenLayers now handle the "icon=" parameter that can come from Semantic Compound Queries, as Google Maps already did.
 387+
 388+====Refactoring====
 389+
 390+* Restructured the Query Printer classes (JavaScript based logic).
 391+
 392+* Made form input classes weakly typed, so they fully work with the new aliasing system.
 393+
 394+* Integrated the new hook system of Maps.
 395+
 396+* Made the form input class inherit from MapsMapFeature.
 397+
 398+====Bug fixes====
 399+
 400+* Mapping formats get added only once, as opossed to multiple times in version 0.2.2.
 401+
 402+* Added "elementNamePrefix" to the map names and fields of form inputs to prevent JavaScript errors.
 403+
 404+* When a query returns no results, nothing will be displayed, instead of an empty map.
 405+
 406+* The Google Maps form input now zooms in correctly when a user looks up an address.
 407+
 408+===Semantic Maps 0.2===
 409+(2009-07-29)
 410+
 411+====New functionality====
 412+
 413+* Added a hook for [[Extension:Admin_Links|Admin Links]].
 414+
 415+* Added multi geocoder integration with form inputs.
 416+
 417+* Added support for the Yahoo! Geocoder (in form inputs).
 418+
 419+====Refactoring====
 420+
 421+* Restructured the Form Input classes.
 422+
 423+====Bug fixes====
 424+
 425+* Fixed issue that occurred when a custom centre is set for a Yahoo! Maps map, causing the map to not display their markers correctly.
 426+
 427+===Semantic Maps 0.1===
 428+(2009-07-21)
 429+
 430+* Initial release, featuring both result formats and form inputs for Google Maps (+ Google Earth), Yahoo! Maps and OpenLayers.
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/RELEASE-NOTES
___________________________________________________________________
Added: svn:eol-style
1431 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/YahooMaps/SM_YahooMapsForms.js
@@ -0,0 +1,62 @@
 2+ /**
 3+ * Javascript functions for Yahoo! Maps functionality in Semantic Maps
 4+ *
 5+ * @file SM_YahooMapsFunctions.js
 6+ * @ingroup SMYahooMaps
 7+ *
 8+ * @author Jeroen De Dauw
 9+ */
 10+
 11+/**
 12+ * This function holds specific functionality for the Yahoo! Maps form input of Semantic Maps.
 13+ */
 14+function makeFormInputYahooMap( mapName, locationFieldName, lat, lon, zoom, type, types, controls, scrollWheelZoom, marker_lat, marker_lon ) {
 15+ var map = createYahooMap(
 16+ document.getElementById( mapName ),
 17+ new YGeoPoint( lat, lon ),
 18+ zoom,
 19+ type,
 20+ types,
 21+ controls,
 22+ scrollWheelZoom,
 23+ [ { "lat": marker_lat, "lon": marker_lon, "title": "", "label": "", "icon": "" } ]
 24+ );
 25+
 26+ // Show a starting marker only if marker coordinates are provided.
 27+ if ( marker_lat != null && marker_lon != null ) {
 28+ map.addOverlay( createYMarker( new YGeoPoint( marker_lat, marker_lon ) ) );
 29+ }
 30+
 31+ // Click event handler for updating the location of the marker.
 32+ YEvent.Capture(map, EventsList.MouseClick,
 33+ function(_e, point) {
 34+ var loc = new YGeoPoint(point.Lat, point.Lon)
 35+ map.removeMarkersAll();
 36+ document.getElementById(locationFieldName).value = convertLatToDMS(point.Lat)+', '+convertLngToDMS(point.Lon);
 37+ map.addMarker(loc);
 38+ map.panToLatLon(loc);
 39+ }
 40+ );
 41+
 42+ // Make the map variable available for other functions
 43+ if (!window.YMaps) window.YMaps = new Object;
 44+ eval("window.YMaps." + mapName + " = map;");
 45+}
 46+
 47+/**
 48+ * This function holds specific functionality for the Yahoo! Maps form input of Semantic Maps
 49+ * TODO: Refactor as much code as possible to non specific functions
 50+ */
 51+function showYAddress(address, mapName, outputElementName, notFoundFormat) {
 52+ var map = YMaps[mapName];
 53+
 54+ map.removeMarkersAll();
 55+ map.drawZoomAndCenter(address);
 56+
 57+ YEvent.Capture(map, EventsList.onEndGeoCode,
 58+ function(resultObj) {
 59+ map.addOverlay(new YMarker(resultObj.GeoPoint));
 60+ document.getElementById(outputElementName).value = convertLatToDMS(resultObj.GeoPoint.Lat) + ', ' + convertLngToDMS(resultObj.GeoPoint.Lon);
 61+ }
 62+ );
 63+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/YahooMaps/SM_YahooMapsForms.js
___________________________________________________________________
Added: svn:eol-style
164 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/YahooMaps/SM_YahooMaps.php
@@ -0,0 +1,37 @@
 2+<?php
 3+
 4+/**
 5+ * This groupe contains all Yahoo! Maps related files of the Semantic Maps extension.
 6+ *
 7+ * @defgroup SMYahooMaps Yahoo! Maps
 8+ * @ingroup SemanticMaps
 9+ */
 10+
 11+/**
 12+ * This file holds the general information for the Yahoo! Maps service.
 13+ *
 14+ * @file SM_YahooMaps.php
 15+ * @ingroup SMYahooMaps
 16+ *
 17+ * @author Jeroen De Dauw
 18+ */
 19+
 20+if ( !defined( 'MEDIAWIKI' ) ) {
 21+ die( 'Not an entry point.' );
 22+}
 23+
 24+$wgHooks['MappingServiceLoad'][] = 'smfInitYahooMaps';
 25+
 26+function smfInitYahooMaps() {
 27+ global $wgAutoloadClasses;
 28+
 29+ $wgAutoloadClasses['SMYahooMapsQP'] = dirname( __FILE__ ) . '/SM_YahooMapsQP.php';
 30+
 31+ // TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found.
 32+ if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMYahooMapsFormInput'] = dirname( __FILE__ ) . '/SM_YahooMapsFormInput.php';
 33+
 34+ MapsMappingServices::registerServiceFeature( 'yahoomaps', 'qp', 'SMYahooMapsQP' );
 35+ MapsMappingServices::registerServiceFeature( 'yahoomaps', 'fi', 'SMYahooMapsFormInput' );
 36+
 37+ return true;
 38+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/YahooMaps/SM_YahooMaps.php
___________________________________________________________________
Added: svn:eol-style
139 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/YahooMaps/SM_YahooMapsQP.php
@@ -0,0 +1,70 @@
 2+<?php
 3+
 4+/**
 5+ * A query printer for maps using the Yahoo Maps API.
 6+ *
 7+ * @file SM_YahooMapsQP.php
 8+ * @ingroup SMYahooMaps
 9+ *
 10+ * @author Jeroen De Dauw
 11+ */
 12+class SMYahooMapsQP extends SMMapPrinter {
 13+
 14+ /**
 15+ * @see SMMapPrinter::getServiceName
 16+ */
 17+ protected function getServiceName() {
 18+ return 'yahoomaps';
 19+ }
 20+
 21+ /**
 22+ * @see SMMapPrinter::addSpecificMapHTML
 23+ */
 24+ public function addSpecificMapHTML() {
 25+ $mapName = $this->service->getMapId();
 26+
 27+ $this->output .= Html::element(
 28+ 'div',
 29+ array(
 30+ 'id' => $mapName,
 31+ 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;",
 32+ ),
 33+ wfMsg( 'maps-loading-map' )
 34+ );
 35+
 36+ MapsMapper::addInlineScript( $this->service, <<<EOT
 37+ initializeYahooMap(
 38+ "$mapName",
 39+ $this->centreLat,
 40+ $this->centreLon,
 41+ $this->zoom,
 42+ $this->type,
 43+ [$this->types],
 44+ [$this->controls],
 45+ $this->autozoom,
 46+ $this->markerJs
 47+ );
 48+EOT
 49+ );
 50+ }
 51+
 52+ /**
 53+ * Returns type info, descriptions and allowed values for this QP's parameters after adding the
 54+ * specific ones to the list.
 55+ *
 56+ * @return array
 57+ */
 58+ public function getParameters() {
 59+ $params = parent::getParameters();
 60+
 61+ $allowedTypes = MapsYahooMaps::getTypeNames();
 62+
 63+ $params[] = array( 'name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_controls' ), 'values' => MapsYahooMaps::getControlNames() );
 64+ $params[] = array( 'name' => 'types', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_types' ), 'values' => $allowedTypes );
 65+ $params[] = array( 'name' => 'type', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_type' ), 'values' => $allowedTypes );
 66+ $params[] = array( 'name' => 'autozoom', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_autozoom' ), 'values' => array( 'on', 'off' ) );
 67+
 68+ return $params;
 69+ }
 70+
 71+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/YahooMaps/SM_YahooMapsQP.php
___________________________________________________________________
Added: svn:eol-style
172 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/YahooMaps/SM_YahooMapsFormInput.php
@@ -0,0 +1,89 @@
 2+<?php
 3+
 4+/**
 5+ * File holding the SMYahooMapsFormInput class.
 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+/**
 18+ * Class for Yahoo Maps! form inputs.
 19+ *
 20+ * @ingroup SMYahooMaps
 21+ *
 22+ * @author Jeroen De Dauw
 23+ */
 24+class SMYahooMapsFormInput extends SMFormInput {
 25+
 26+ /**
 27+ * @see SMFormInput::getEarthZoom
 28+ *
 29+ * @since 0.6.5
 30+ */
 31+ protected function getEarthZoom() {
 32+ return 17;
 33+ }
 34+
 35+ /**
 36+ * @see SMFormInput::getShowAddressFunction
 37+ *
 38+ * @since 0.6.5
 39+ */
 40+ protected function getShowAddressFunction() {
 41+ global $egYahooMapsKey;
 42+ return $egYahooMapsKey == '' ? false : 'showYAddress';
 43+ }
 44+
 45+ /**
 46+ * @see MapsMapFeature::addFormDependencies()
 47+ */
 48+ protected function addFormDependencies() {
 49+ global $wgOut;
 50+ global $smgScriptPath, $smgStyleVersion;
 51+
 52+ $this->service->addDependency( Html::linkedScript( "$smgScriptPath/includes/services/YahooMaps/SM_YahooMapsForms.js?$smgStyleVersion" ) );
 53+ $this->service->addDependencies( $wgOut );
 54+ }
 55+
 56+ /**
 57+ * @see MapsMapFeature::addSpecificMapHTML
 58+ */
 59+ public function addSpecificMapHTML() {
 60+ $mapName = $this->service->getMapId( false );
 61+
 62+ $this->output .= Html::element(
 63+ 'div',
 64+ array(
 65+ 'id' => $mapName,
 66+ 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;",
 67+ ),
 68+ wfMsg( 'maps-loading-map' )
 69+ );
 70+
 71+ MapsMapper::addInlineScript( $this->service, <<<EOT
 72+ makeFormInputYahooMap(
 73+ "$mapName",
 74+ "$this->coordsFieldName",
 75+ $this->centreLat,
 76+ $this->centreLon,
 77+ $this->zoom,
 78+ $this->type,
 79+ [$this->types],
 80+ [$this->controls],
 81+ $this->autozoom,
 82+ {$this->markerCoords['lat']},
 83+ {$this->markerCoords['lon']}
 84+ );
 85+EOT
 86+ );
 87+
 88+ }
 89+
 90+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/YahooMaps/SM_YahooMapsFormInput.php
___________________________________________________________________
Added: svn:eol-style
191 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/OpenLayers/SM_OpenLayersForms.js
@@ -0,0 +1,101 @@
 2+ /**
 3+ * Javascript functions for OpenLayers functionality in Semantic Maps
 4+ *
 5+ * @file SM_OpenLayersFunctions.js
 6+ * @ingroup SMOpenLayers
 7+ *
 8+ * @author Jeroen De Dauw
 9+ */
 10+
 11+/**
 12+ * This function holds specific functionality for the Open Layers form input of Semantic Maps.
 13+ */
 14+function makeFormInputOpenLayer( mapName, locationFieldName, lat, lon, zoom, marker_lat, marker_lon, layers, controls, height, langCode ) {
 15+ var markers = Array();
 16+
 17+ // Show a starting marker only if marker coordinates are provided.
 18+ if ( marker_lat != null && marker_lon != null ) {
 19+ markers.push( { "lat": marker_lat, "lon": marker_lon, "title": "", "label": "", "icon": "" } );
 20+ }
 21+
 22+ // Click event handler for updating the location of the marker
 23+ // TODO / FIXME: This will probably cause problems when used for multiple maps on one page.
 24+ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
 25+ defaultHandlerOptions: {
 26+ 'single': true,
 27+ 'double': false,
 28+ 'pixelTolerance': 0,
 29+ 'stopSingle': false,
 30+ 'stopDouble': false
 31+ },
 32+
 33+ initialize: function(options) {
 34+ this.handlerOptions = OpenLayers.Util.extend(
 35+ {}, this.defaultHandlerOptions
 36+ );
 37+ OpenLayers.Control.prototype.initialize.apply(
 38+ this, arguments
 39+ );
 40+ this.handler = new OpenLayers.Handler.Click(
 41+ this, {
 42+ 'click': this.trigger
 43+ }, this.handlerOptions
 44+ );
 45+ },
 46+
 47+ trigger: function(e) {
 48+ var lonlat = map.getLonLatFromViewPortPx(e.xy);
 49+
 50+ replaceMarker(mapName, lonlat);
 51+
 52+ var proj = new OpenLayers.Projection("EPSG:4326");
 53+ lonlat.transform(map.getProjectionObject(), proj);
 54+
 55+ document.getElementById(locationFieldName).value = convertLatToDMS(lonlat.lat)+', '+convertLngToDMS(lonlat.lon);
 56+ }
 57+
 58+ });
 59+
 60+ var clickHanler = new OpenLayers.Control.Click();
 61+ controls.push(clickHanler);
 62+
 63+ var map = initOpenLayer( mapName, lon, lat, zoom, layers, controls, markers, height, langCode );
 64+
 65+ // Make the map variable available for other functions
 66+ if (!window.OLMaps) window.OLMaps = new Object;
 67+ eval("window.OLMaps." + mapName + " = map;");
 68+}
 69+
 70+/**
 71+ * Remove all markers from an OL map (that's in window.OLMaps), and place a new one.
 72+ *
 73+ * @param mapName Name of the map as in OLMaps[mapName].
 74+ * @param newLocation The location for the new marker.
 75+ */
 76+function replaceMarker(mapName, newLocation) {
 77+ var map = OLMaps[mapName];
 78+ var markerLayer = map.getLayer('markerLayer');
 79+
 80+ removeMarkers(markerLayer);
 81+ markerLayer.addMarker(getOLMarker(
 82+ markerLayer,
 83+ { lonlat:newLocation, title: "", label:"", icon:"" },
 84+ map.getProjectionObject())
 85+ );
 86+
 87+ map.panTo(newLocation);
 88+}
 89+
 90+/**
 91+ * Removes all markers from a marker layer.
 92+ *
 93+ * @param markerLayer The layer to remove all markers from.
 94+ * @return
 95+ */
 96+function removeMarkers(markerLayer) {
 97+ var markerCollection = markerLayer.markers;
 98+
 99+ for (var i = 0; i < markerCollection.length; i++) {
 100+ markerLayer.removeMarker(markerCollection[i]);
 101+ }
 102+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/OpenLayers/SM_OpenLayersForms.js
___________________________________________________________________
Added: svn:eol-style
1103 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/OpenLayers/SM_OpenLayers.php
@@ -0,0 +1,37 @@
 2+<?php
 3+
 4+/**
 5+ * This groupe contains all OpenLayers related files of the Semantic Maps extension.
 6+ *
 7+ * @defgroup SMOpenLayers OpenLayers
 8+ * @ingroup SemanticMaps
 9+ */
 10+
 11+/**
 12+ * This file holds the general information for the OpenLayers service.
 13+ *
 14+ * @file SM_OpenLayers.php
 15+ * @ingroup SMOpenLayers
 16+ *
 17+ * @author Jeroen De Dauw
 18+ */
 19+
 20+if ( !defined( 'MEDIAWIKI' ) ) {
 21+ die( 'Not an entry point.' );
 22+}
 23+
 24+$wgHooks['MappingServiceLoad'][] = 'smfInitOpenLayers';
 25+
 26+function smfInitOpenLayers() {
 27+ global $wgAutoloadClasses;
 28+
 29+ $wgAutoloadClasses['SMOpenLayersQP'] = dirname( __FILE__ ) . '/SM_OpenLayersQP.php';
 30+
 31+ // TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found.
 32+ if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMOpenLayersFormInput'] = dirname( __FILE__ ) . '/SM_OpenLayersFormInput.php';
 33+
 34+ MapsMappingServices::registerServiceFeature( 'openlayers', 'qp', 'SMOpenLayersQP' );
 35+ MapsMappingServices::registerServiceFeature( 'openlayers', 'fi', 'SMOpenLayersFormInput' );
 36+
 37+ return true;
 38+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/OpenLayers/SM_OpenLayers.php
___________________________________________________________________
Added: svn:eol-style
139 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/OpenLayers/SM_OpenLayersQP.php
@@ -0,0 +1,69 @@
 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+class SMOpenLayersQP extends SMMapPrinter {
 13+
 14+ /**
 15+ * @see SMMapPrinter::getServiceName
 16+ */
 17+ protected function getServiceName() {
 18+ return 'openlayers';
 19+ }
 20+
 21+ /**
 22+ * @see SMMapPrinter::addSpecificMapHTML
 23+ */
 24+ public function addSpecificMapHTML() {
 25+ global $wgLang;
 26+
 27+ $mapName = $this->service->getMapId();
 28+
 29+ $this->output .= Html::element(
 30+ 'div',
 31+ array(
 32+ 'id' => $mapName,
 33+ 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;",
 34+ ),
 35+ wfMsg( 'maps-loading-map' )
 36+ );
 37+
 38+ $langCode = $wgLang->getCode();
 39+
 40+ MapsMapper::addInlineScript( $this->service, <<<EOT
 41+ initOpenLayer(
 42+ "$mapName",
 43+ $this->centreLat,
 44+ $this->centreLon,
 45+ $this->zoom,
 46+ {$this->layers},
 47+ [$this->controls],
 48+ $this->markerJs,
 49+ "$langCode"
 50+ );
 51+EOT
 52+ );
 53+ }
 54+
 55+ /**
 56+ * Returns type info, descriptions and allowed values for this QP's parameters after adding the
 57+ * specific ones to the list.
 58+ *
 59+ * @return array
 60+ */
 61+ public function getParameters() {
 62+ $params = parent::getParameters();
 63+
 64+ $params[] = array( 'name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_controls' ), 'values' => MapsOpenLayers::getControlNames() );
 65+ $params[] = array( 'name' => 'layers', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_layers' ), 'values' => MapsOpenLayers::getLayerNames() );
 66+
 67+ return $params;
 68+ }
 69+
 70+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/OpenLayers/SM_OpenLayersQP.php
___________________________________________________________________
Added: svn:eol-style
171 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/OpenLayers/SM_OpenLayersFormInput.php
@@ -0,0 +1,70 @@
 2+<?php
 3+
 4+/**
 5+ * Class for OpenLayers form inputs.
 6+ *
 7+ * @file SM_OpenLayersFormInput.php
 8+ * @ingroup SMOpenLayers
 9+ *
 10+ * @author Jeroen De Dauw
 11+ */
 12+class SMOpenLayersFormInput extends SMFormInput {
 13+
 14+ /**
 15+ * @see SMFormInput::getEarthZoom
 16+ *
 17+ * @since 0.6.5
 18+ */
 19+ protected function getEarthZoom() {
 20+ return 1;
 21+ }
 22+
 23+ /**
 24+ * @see MapsMapFeature::addFormDependencies()
 25+ */
 26+ protected function addFormDependencies() {
 27+ global $wgOut;
 28+ global $smgScriptPath, $smgStyleVersion;
 29+
 30+ $this->service->addDependency( Html::linkedScript( "$smgScriptPath/includes/services/OpenLayers/SM_OpenLayersForms.js?$smgStyleVersion" ) );
 31+ $this->service->addDependencies( $wgOut );
 32+ }
 33+
 34+ /**
 35+ * @see MapsMapFeature::addSpecificMapHTML
 36+ */
 37+ public function addSpecificMapHTML() {
 38+ global $wgLang;
 39+
 40+ $mapName = $this->service->getMapId( false );
 41+
 42+ $this->output .= Html::element(
 43+ 'div',
 44+ array(
 45+ 'id' => $mapName,
 46+ 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;",
 47+ ),
 48+ wfMsg( 'maps-loading-map' )
 49+ );
 50+
 51+ $langCode = $wgLang->getCode();
 52+
 53+ MapsMapper::addInlineScript( $this->service,<<<EOT
 54+ makeFormInputOpenLayer(
 55+ "$mapName",
 56+ "$this->coordsFieldName",
 57+ $this->centreLat,
 58+ $this->centreLon,
 59+ $this->zoom,
 60+ {$this->markerCoords['lat']},
 61+ {$this->markerCoords['lon']},
 62+ {$this->layers},
 63+ [$this->controls],
 64+ "$langCode"
 65+ );
 66+EOT
 67+ );
 68+
 69+ }
 70+
 71+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/OpenLayers/SM_OpenLayersFormInput.php
___________________________________________________________________
Added: svn:eol-style
172 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/GoogleMaps/SM_GoogleMaps.php
@@ -0,0 +1,37 @@
 2+<?php
 3+
 4+/**
 5+ * This groupe contains all Google Maps related files of the Semantic Maps extension.
 6+ *
 7+ * @defgroup SMGoogleMaps Google Maps
 8+ * @ingroup SemanticMaps
 9+ */
 10+
 11+/**
 12+ * This file holds the general information for the Google Maps service.
 13+ *
 14+ * @file SM_GoogleMaps.php
 15+ * @ingroup SMGoogleMaps
 16+ *
 17+ * @author Jeroen De Dauw
 18+ */
 19+
 20+if ( !defined( 'MEDIAWIKI' ) ) {
 21+ die( 'Not an entry point.' );
 22+}
 23+
 24+$wgHooks['MappingServiceLoad'][] = 'smfInitGoogleMaps';
 25+
 26+function smfInitGoogleMaps() {
 27+ global $wgAutoloadClasses;
 28+
 29+ $wgAutoloadClasses['SMGoogleMapsQP'] = dirname( __FILE__ ) . '/SM_GoogleMapsQP.php';
 30+
 31+ // TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found.
 32+ if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMGoogleMapsFormInput'] = dirname( __FILE__ ) . '/SM_GoogleMapsFormInput.php';
 33+
 34+ MapsMappingServices::registerServiceFeature( 'googlemaps2', 'qp', 'SMGoogleMapsQP' );
 35+ MapsMappingServices::registerServiceFeature( 'googlemaps2', 'fi', 'SMGoogleMapsFormInput' );
 36+
 37+ return true;
 38+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/GoogleMaps/SM_GoogleMaps.php
___________________________________________________________________
Added: svn:eol-style
139 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/GoogleMaps/SM_GoogleMapsQP.php
@@ -0,0 +1,82 @@
 2+<?php
 3+/**
 4+ * A query printer for maps using the Google Maps API.
 5+ *
 6+ * @file SM_GoogleMapsQP.php
 7+ * @ingroup SMGoogleMaps
 8+ *
 9+ * @author Robert Buzink
 10+ * @author Yaron Koren
 11+ * @author Jeroen De Dauw
 12+ */
 13+class SMGoogleMapsQP extends SMMapPrinter {
 14+
 15+ /**
 16+ * @see SMMapPrinter::getServiceName
 17+ */
 18+ protected function getServiceName() {
 19+ return 'googlemaps2';
 20+ }
 21+
 22+ /**
 23+ * @see SMMapPrinter::initSpecificParamInfo
 24+ */
 25+ protected function initSpecificParamInfo( array &$parameters ) {
 26+ }
 27+
 28+ /**
 29+ * @see SMMapPrinter::addSpecificMapHTML
 30+ */
 31+ public function addSpecificMapHTML() {
 32+ $mapName = $this->service->getMapId();
 33+
 34+ $this->service->addOverlayOutput( $this->output, $mapName, $this->overlays, $this->controls );
 35+
 36+ $this->output .= Html::element(
 37+ 'div',
 38+ array(
 39+ 'id' => $mapName,
 40+ 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;",
 41+ ),
 42+ wfMsg( 'maps-loading-map' )
 43+ );
 44+
 45+ MapsMapper::addInlineScript( $this->service, <<<EOT
 46+ initializeGoogleMap("$mapName",
 47+ {
 48+ lat: $this->centreLat,
 49+ lon: $this->centreLon,
 50+ zoom: $this->zoom,
 51+ type: $this->type,
 52+ types: [$this->types],
 53+ controls: [$this->controls],
 54+ scrollWheelZoom: $this->autozoom,
 55+ kml: [$this->kml]
 56+ },
 57+ $this->markerJs
 58+ );
 59+EOT
 60+ );
 61+ }
 62+
 63+ /**
 64+ * Returns type info, descriptions and allowed values for this QP's parameters after adding the
 65+ * specific ones to the list.
 66+ *
 67+ * @return array
 68+ */
 69+ public function getParameters() {
 70+ $params = parent::getParameters();
 71+
 72+ $allowedTypes = array_keys( MapsGoogleMaps::$mapTypes );
 73+
 74+ $params[] = array( 'name' => 'controls', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_controls' ), 'values' => MapsGoogleMaps::getControlNames() );
 75+ $params[] = array( 'name' => 'types', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_types' ), 'values' => $allowedTypes );
 76+ $params[] = array( 'name' => 'type', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_type' ), 'values' => $allowedTypes );
 77+ $params[] = array( 'name' => 'overlays', 'type' => 'enum-list', 'description' => wfMsg( 'semanticmaps_paramdesc_overlays' ), 'values' => MapsGoogleMaps::getOverlayNames() );
 78+ $params[] = array( 'name' => 'autozoom', 'type' => 'enumeration', 'description' => wfMsg( 'semanticmaps_paramdesc_autozoom' ), 'values' => array( 'on', 'off' ) );
 79+
 80+ return $params;
 81+ }
 82+
 83+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/GoogleMaps/SM_GoogleMapsQP.php
___________________________________________________________________
Added: svn:eol-style
184 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/GoogleMaps/SM_GoogleMapsFormInput.php
@@ -0,0 +1,87 @@
 2+<?php
 3+
 4+/**
 5+ * Class for Google Maps v2 form inputs.
 6+ *
 7+ * @file SM_GoogleMapsFormInput.php
 8+ * @ingroup SMGoogleMaps
 9+ *
 10+ * @author Jeroen De Dauw
 11+ * @author Robert Buzink
 12+ * @author Yaron Koren
 13+ */
 14+class SMGoogleMapsFormInput extends SMFormInput {
 15+
 16+ /**
 17+ * @see SMFormInput::getEarthZoom
 18+ *
 19+ * @since 0.6.5
 20+ */
 21+ protected function getEarthZoom() {
 22+ return 1;
 23+ }
 24+
 25+ /**
 26+ * @see SMFormInput::getShowAddressFunction
 27+ *
 28+ * @since 0.6.5
 29+ */
 30+ protected function getShowAddressFunction() {
 31+ global $egGoogleMapsKey;
 32+ return $egGoogleMapsKey == '' ? false : 'showGAddress';
 33+ }
 34+
 35+ /**
 36+ * @see smw/extensions/SemanticMaps/FormInputs/SMFormInput#addFormDependencies()
 37+ */
 38+ protected function addFormDependencies() {
 39+ global $wgOut;
 40+ global $smgScriptPath, $smgStyleVersion;
 41+
 42+ $this->service->addDependency( Html::linkedScript( "$smgScriptPath/includes/services/GoogleMaps/SM_GoogleMapsForms.js?$smgStyleVersion" ) );
 43+ $this->service->addDependencies( $wgOut );
 44+ }
 45+
 46+ /**
 47+ * @see MapsMapFeature::addSpecificFormInputHTML
 48+ */
 49+ public function addSpecificMapHTML() {
 50+ $mapName = $this->service->getMapId( false );
 51+
 52+ // Remove the overlays control in case it's present.
 53+ // TODO: make less insane
 54+ if ( in_string( 'overlays', $this->controls ) ) {
 55+ $this->controls = str_replace( array( ",'overlays'", "'overlays'," ), '', $this->controls );
 56+ }
 57+
 58+ $this->output .= Html::element(
 59+ 'div',
 60+ array(
 61+ 'id' => $mapName,
 62+ 'style' => "width: $this->width; height: $this->height; background-color: #cccccc; overflow: hidden;",
 63+ ),
 64+ wfMsg( 'maps-loading-map' )
 65+ );
 66+
 67+ MapsMapper::addInlineScript( $this->service, <<<EOT
 68+ makeGoogleMapFormInput(
 69+ "$mapName",
 70+ "$this->coordsFieldName",
 71+ {
 72+ lat: $this->centreLat,
 73+ lon: $this->centreLon,
 74+ zoom: $this->zoom,
 75+ type: $this->type,
 76+ types: [$this->types],
 77+ controls: [$this->controls],
 78+ scrollWheelZoom: $this->autozoom,
 79+ kml: [$this->kml]
 80+ },
 81+ {$this->markerCoords['lat']},
 82+ {$this->markerCoords['lon']}
 83+ );
 84+EOT
 85+ );
 86+ }
 87+
 88+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/GoogleMaps/SM_GoogleMapsFormInput.php
___________________________________________________________________
Added: svn:eol-style
189 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/GoogleMaps/SM_GoogleMapsForms.js
@@ -0,0 +1,64 @@
 2+ /**
 3+ * Javascript functions for Google Maps functionality in Semantic Maps
 4+ *
 5+ * @file SM_GoogleMapFunctions.js
 6+ * @ingroup SMGoogleMaps
 7+ *
 8+ * @author Jeroen De Dauw
 9+ */
 10+
 11+/**
 12+ * This function holds specific functionality for the Google Maps form input of Semantic Maps
 13+ */
 14+function makeGoogleMapFormInput( mapName, locationFieldName, mapOptions, marker_lat, marker_lon ) {
 15+ if ( GBrowserIsCompatible() ) {
 16+ mapOptions.centre = new GLatLng(mapOptions.lat, mapOptions.lon);
 17+ var map = createGoogleMap( mapName, mapOptions, [ { "lat": marker_lat, "lon": marker_lon, "title": "", "label": "", "icon": "" } ] );
 18+
 19+ // Show a starting marker only if marker coordinates are provided
 20+ if ( marker_lat != null && marker_lon != null ) {
 21+ map.addOverlay( new GMarker( new GLatLng( marker_lat, marker_lon ) ) );
 22+ }
 23+
 24+ // Click event handler for updating the location of the marker
 25+ GEvent.addListener(map, "click",
 26+ function(overlay, point) {
 27+ if (overlay) {
 28+ map.removeOverlay(overlay);
 29+ } else {
 30+ map.clearOverlays();
 31+ document.getElementById(locationFieldName).value = convertLatToDMS(point.y)+', '+convertLngToDMS(point.x);
 32+ map.addOverlay(new GMarker(point));
 33+ map.panTo(point);
 34+ }
 35+ }
 36+ );
 37+
 38+ // Make the map variable available for other functions
 39+ if (!window.GMaps) window.GMaps = new Object;
 40+ eval("window.GMaps." + mapName + " = map;");
 41+ }
 42+}
 43+
 44+/**
 45+ * This function holds specific functionality for the Google Maps form input of Semantic Maps.
 46+ */
 47+function showGAddress(address, mapName, outputElementName, notFoundFormat) {
 48+ var map = GMaps[mapName];
 49+ var geocoder = new GClientGeocoder();
 50+
 51+ geocoder.getLatLng(address,
 52+ function(point) {
 53+ if (!point) {
 54+ window.alert(address + ' ' + notFoundFormat);
 55+ } else {
 56+ map.clearOverlays();
 57+ map.setCenter(point, 14);
 58+ var marker = new GMarker(point);
 59+ map.addOverlay(marker);
 60+ document.getElementById(outputElementName).value = convertLatToDMS(point.y) + ', ' + convertLngToDMS(point.x);
 61+ }
 62+ }
 63+ );
 64+
 65+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/services/GoogleMaps/SM_GoogleMapsForms.js
___________________________________________________________________
Added: svn:eol-style
166 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/SM_GeoCoordsValue.php
@@ -0,0 +1,410 @@
 2+<?php
 3+
 4+/**
 5+ * Implementation of datavalues that are geographic coordinates.
 6+ *
 7+ * @since 0.6
 8+ *
 9+ * @file SM_GeoCoordsValue.php
 10+ * @ingroup SemanticMaps
 11+ * @ingroup SMWDataValues
 12+ *
 13+ * @author Jeroen De Dauw
 14+ * @author Markus Krötzsch
 15+ */
 16+class SMGeoCoordsValue extends SMWDataValue {
 17+
 18+ protected $coordinateSet;
 19+ protected $wikiValue;
 20+
 21+ /**
 22+ * Set the default format to 'map' when the requested properties are
 23+ * of type geographic coordinates.
 24+ *
 25+ * TODO: have a setting to turn this off and have it off by default for #show
 26+ *
 27+ * @since 0.6.5
 28+ *
 29+ * @param $format Mixed: The format (string), or false when not set yet
 30+ * @param $printRequests Array: The print requests made
 31+ * @param $params Array: The parameters for the query printer
 32+ *
 33+ * @return true
 34+ */
 35+ public static function addGeoCoordsDefaultFormat( &$format, array $printRequests, array $params ) {
 36+ // Only set the format when not set yet. This allows other extensions to override the Semantic Maps behaviour.
 37+ if ( $format === false ) {
 38+ // Only apply when there is more then one print request.
 39+ // This way requests comming from #show are ignored.
 40+ if ( count( $printRequests ) > 1 ) {
 41+ $allCoords = true;
 42+ $first = true;
 43+
 44+ // Loop through the print requests to determine their types.
 45+ foreach( $printRequests as $printRequest ) {
 46+ // Skip the first request, as it's the object.
 47+ if ( $first ) {
 48+ $first = false;
 49+ continue;
 50+ }
 51+
 52+ $typeId = $printRequest->getTypeID();
 53+
 54+ if ( $typeId != '_geo' ) {
 55+ $allCoords = false;
 56+ break;
 57+ }
 58+ }
 59+
 60+ // If they are all coordinates, set the result format to 'map'.
 61+ if ( $allCoords ) {
 62+ $format = 'map';
 63+ }
 64+ }
 65+
 66+ }
 67+
 68+ return true;
 69+ }
 70+
 71+ /**
 72+ * Adds support for the geographical coordinate data type to Semantic MediaWiki.
 73+ *
 74+ * @since 0.6
 75+ *
 76+ * TODO: i18n keys still need to be moved
 77+ *
 78+ * @return true
 79+ */
 80+ public static function initGeoCoordsType() {
 81+ SMWDataValueFactory::registerDatatype( '_geo', __CLASS__, 'Geographic coordinate' );
 82+ return true;
 83+ }
 84+
 85+ /**
 86+ * Defines the signature for geographical fields needed for the smw_coords table.
 87+ *
 88+ * @since 0.6
 89+ *
 90+ * @param array $fieldTypes The field types defined by SMW, passed by reference.
 91+ *
 92+ * @return true
 93+ */
 94+ public static function initGeoCoordsFieldTypes( array $fieldTypes ) {
 95+ global $smgUseSpatialExtensions;
 96+
 97+ // Only add the table when the SQL store is not a postgres database, and it has not been added by SMW itself.
 98+ if ( $smgUseSpatialExtensions && !array_key_exists( 'c', $fieldTypes ) ) {
 99+ $fieldTypes['c'] = 'Point NOT NULL';
 100+ }
 101+
 102+ return true;
 103+ }
 104+
 105+ /**
 106+ * Defines the layout for the smw_coords table which is used to store value of the GeoCoords type.
 107+ *
 108+ * @since 0.6
 109+ *
 110+ * @param array $propertyTables The property tables defined by SMW, passed by reference.
 111+ */
 112+ public static function initGeoCoordsTable( array $propertyTables ) {
 113+ global $smgUseSpatialExtensions;
 114+
 115+ // No spatial extensions support for postgres yet, so just store as 2 float fields.
 116+ $signature = $smgUseSpatialExtensions ? array( 'point' => 'c' ) : array( 'lat' => 'f', 'lon' => 'f' );
 117+ $indexes = $smgUseSpatialExtensions ? array( array( 'point', 'SPATIAL INDEX' ) ) : array_keys( $signature );
 118+
 119+ $propertyTables['smw_coords'] = new SMWSQLStore2Table(
 120+ 'sm_coords',
 121+ $signature,
 122+ $indexes // These are the fields that should be indexed.
 123+ );
 124+
 125+ return true;
 126+ }
 127+
 128+ /**
 129+ * @see SMWDataValue::parseUserValue
 130+ *
 131+ * @since 0.6
 132+ */
 133+ protected function parseUserValue( $value ) {
 134+ $this->parseUserValueOrQuery( $value );
 135+ }
 136+
 137+ /**
 138+ * Overwrite SMWDataValue::getQueryDescription() to be able to process
 139+ * comparators between all values.
 140+ *
 141+ * @since 0.6
 142+ *
 143+ * @param string $value
 144+ *
 145+ * @return SMWDescription
 146+ */
 147+ public function getQueryDescription( $value ) {
 148+ return $this->parseUserValueOrQuery( $value, true );
 149+ }
 150+
 151+ /**
 152+ * Parses the value into the coordinates and any meta data provided, such as distance.
 153+ *
 154+ * @since 0.6
 155+ *
 156+ * @param $value String
 157+ * @param $asQuery Boolean
 158+ */
 159+ protected function parseUserValueOrQuery( $value, $asQuery = false ) {
 160+ $this->wikiValue = $value;
 161+
 162+ $comparator = SMW_CMP_EQ;
 163+
 164+ if ( $value == '' ) {
 165+ $this->addError( wfMsg( 'smw_novalues' ) );
 166+ } else {
 167+ SMWDataValue::prepareValue( $value, $comparator );
 168+
 169+ $parts = explode( '(', $value );
 170+
 171+ $coordinates = trim( array_shift( $parts ) );
 172+ $distance = count( $parts ) > 0 ? trim( array_shift( $parts ) ) : false;
 173+
 174+ if ( $distance !== false ) {
 175+ $distance = substr( trim( $distance ), 0, -1 );
 176+
 177+ if ( !MapsDistanceParser::isDistance( $distance ) ) {
 178+ $this->addError( wfMsgExt( 'semanticmaps-unrecognizeddistance', array( 'parsemag' ), $distance ) );
 179+ $distance = false;
 180+ }
 181+ }
 182+
 183+ $parsedCoords = MapsCoordinateParser::parseCoordinates( $coordinates );
 184+ if ( $parsedCoords ) {
 185+ $this->coordinateSet = $parsedCoords;
 186+
 187+ if ( $this->m_caption === false && !$asQuery ) {
 188+ global $smgQPCoodFormat, $smgQPCoodDirectional;
 189+ $this->m_caption = MapsCoordinateParser::formatCoordinates( $parsedCoords, $smgQPCoodFormat, $smgQPCoodDirectional );
 190+ }
 191+ } else {
 192+ $this->addError( wfMsgExt( 'maps_unrecognized_coords', array( 'parsemag' ), $coordinates, 1 ) );
 193+ }
 194+ }
 195+
 196+ if ( $asQuery ) {
 197+ $this->setUserValue( $value );
 198+
 199+ switch ( true ) {
 200+ case !$this->isValid() :
 201+ return new SMWThingDescription();
 202+ break;
 203+ case $distance !== false :
 204+ return new SMAreaValueDescription( $this, $comparator, $distance );
 205+ break;
 206+ default :
 207+ return new SMGeoCoordsValueDescription( $this, $comparator );
 208+ break;
 209+ }
 210+ }
 211+ }
 212+
 213+ /**
 214+ * @see SMWDataValue::parseDBkeys
 215+ *
 216+ * @since 0.6
 217+ */
 218+ protected function parseDBkeys( $args ) {
 219+ global $smgUseSpatialExtensions, $smgQPCoodFormat, $smgQPCoodDirectional;
 220+
 221+ if ( $smgUseSpatialExtensions ) {
 222+ // var_dump($args);exit;
 223+ }
 224+ else {
 225+ $this->coordinateSet['lat'] = (float)$args[0];
 226+ $this->coordinateSet['lon'] = (float)$args[1];
 227+ }
 228+
 229+ $this->m_caption = MapsCoordinateParser::formatCoordinates(
 230+ $this->coordinateSet,
 231+ $smgQPCoodFormat,
 232+ $smgQPCoodDirectional
 233+ );
 234+
 235+ $this->wikiValue = $this->m_caption;
 236+ }
 237+
 238+ /**
 239+ * @see SMWDataValue::getDBkeys
 240+ *
 241+ * @since 0.6
 242+ */
 243+ public function getDBkeys() {
 244+ global $smgUseSpatialExtensions;
 245+
 246+ $this->unstub();
 247+
 248+ if ( $smgUseSpatialExtensions ) {
 249+ // TODO: test this
 250+ $point = str_replace( ',', '.', " POINT({$this->coordinateSet['lat']} {$this->coordinateSet['lon']}) " );
 251+
 252+ $dbr = wfGetDB( DB_SLAVE );
 253+ $row = $dbr->selectRow( 'page', "GeomFromText('$point') AS geom", '' );
 254+
 255+ return array( $row->geom );
 256+ }
 257+ else {
 258+ return array(
 259+ $this->coordinateSet['lat'],
 260+ $this->coordinateSet['lon']
 261+ );
 262+ }
 263+ }
 264+
 265+ /**
 266+ * @see SMWDataValue::getSignature
 267+ *
 268+ * @since 0.6
 269+ */
 270+ public function getSignature() {
 271+ global $smgUseSpatialExtensions;
 272+ return $smgUseSpatialExtensions ? 'c' : 'ff';
 273+ }
 274+
 275+ /**
 276+ * @see SMWDataValue::getShortWikiText
 277+ *
 278+ * @since 0.6
 279+ */
 280+ public function getShortWikiText( $linked = null ) {
 281+ if ( $this->isValid() && ( $linked !== null ) && ( $linked !== false ) ) {
 282+ SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP );
 283+
 284+ // TODO: fix lang keys so they include the space and coordinates.
 285+
 286+ return '<span class="smwttinline">' . htmlspecialchars( $this->m_caption ) . '<span class="smwttcontent">' .
 287+ htmlspecialchars ( wfMsgForContent( 'maps-latitude' ) . ' ' . $this->coordinateSet['lat'] ) . '<br />' .
 288+ htmlspecialchars ( wfMsgForContent( 'maps-longitude' ) . ' ' . $this->coordinateSet['lon'] ) .
 289+ '</span></span>';
 290+ }
 291+ else {
 292+ return htmlspecialchars( $this->m_caption );
 293+ }
 294+ }
 295+
 296+ /**
 297+ * @see SMWDataValue::getShortHTMLText
 298+ *
 299+ * @since 0.6
 300+ */
 301+ public function getShortHTMLText( $linker = null ) {
 302+ return $this->getShortWikiText( $linker );
 303+ }
 304+
 305+ /**
 306+ * @see SMWDataValue::getLongWikiText
 307+ *
 308+ * @since 0.6
 309+ */
 310+ public function getLongWikiText( $linked = null ) {
 311+ if ( !$this->isValid() ) {
 312+ return $this->getErrorText();
 313+ }
 314+ else {
 315+ global $smgQPCoodFormat, $smgQPCoodDirectional;
 316+ return MapsCoordinateParser::formatCoordinates( $this->coordinateSet, $smgQPCoodFormat, $smgQPCoodDirectional );
 317+ }
 318+ }
 319+
 320+ /**
 321+ * @see SMWDataValue::getLongHTMLText
 322+ *
 323+ * @since 0.6
 324+ */
 325+ public function getLongHTMLText( $linker = null ) {
 326+ return $this->getLongWikiText( $linker );
 327+ }
 328+
 329+ /**
 330+ * @see SMWDataValue::getWikiValue
 331+ *
 332+ * @since 0.6
 333+ */
 334+ public function getWikiValue() {
 335+ $this->unstub();
 336+ return $this->wikiValue;
 337+ }
 338+
 339+ /**
 340+ * @see SMWDataValue::getExportData
 341+ *
 342+ * @since 0.6
 343+ */
 344+ public function getExportData() {
 345+ if ( $this->isValid() ) {
 346+ global $smgQPCoodFormat, $smgQPCoodDirectional;
 347+ $lit = new SMWExpLiteral(
 348+ MapsCoordinateParser::formatCoordinates( $this->coordinateSet, $smgQPCoodFormat, $smgQPCoodDirectional ),
 349+ $this,
 350+ 'http://www.w3.org/2001/XMLSchema#string'
 351+ );
 352+ return new SMWExpData( $lit );
 353+ } else {
 354+ return null;
 355+ }
 356+ }
 357+
 358+ /**
 359+ * Create links to mapping services based on a wiki-editable message. The parameters
 360+ * available to the message are:
 361+ *
 362+ * $1: The location in non-directional float notation.
 363+ * $2: The location in directional DMS notation.
 364+ * $3: The latitude in non-directional float notation.
 365+ * $4 The longitude in non-directional float notation.
 366+ *
 367+ * @since 0.6.4
 368+ *
 369+ * @return array
 370+ */
 371+ protected function getServiceLinkParams() {
 372+ return array(
 373+ MapsCoordinateParser::formatCoordinates( $this->coordinateSet, 'float', false ),
 374+ MapsCoordinateParser::formatCoordinates( $this->coordinateSet, 'dms', true ),
 375+ $this->coordinateSet['lat'],
 376+ $this->coordinateSet['lon']
 377+ );
 378+ }
 379+
 380+ /**
 381+ * @since 0.6
 382+ *
 383+ * @return array
 384+ */
 385+ public function getCoordinateSet() {
 386+ return $this->coordinateSet;
 387+ }
 388+
 389+ /**
 390+ * @see SMWDataValue::getValueIndex
 391+ *
 392+ * @since 0.6
 393+ *
 394+ * @return integer
 395+ */
 396+ public function getValueIndex() {
 397+ return 0;
 398+ }
 399+
 400+ /**
 401+ * @see SMWDataValue::getLabelIndex
 402+ *
 403+ * @since 0.6
 404+ *
 405+ * @return integer
 406+ */
 407+ public function getLabelIndex() {
 408+ return 0;
 409+ }
 410+
 411+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/SM_GeoCoordsValue.php
___________________________________________________________________
Added: svn:eol-style
1412 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/forminputs/SM_FormInput.php
@@ -0,0 +1,398 @@
 2+<?php
 3+
 4+/**
 5+ * Abstract class that provides the common functionality for all map form inputs
 6+ *
 7+ * @file SM_FormInput.php
 8+ * @ingroup SemanticMaps
 9+ *
 10+ * @author Jeroen De Dauw
 11+ */
 12+abstract class SMFormInput implements iMappingFeature {
 13+
 14+ /**
 15+ * Ensures all dependencies for the used map are loaded, and increases that map service's count
 16+ */
 17+ protected abstract function addFormDependencies();
 18+
 19+ /**
 20+ * Returns the zoom level at which the whole earth is visible.
 21+ */
 22+ protected abstract function getEarthZoom();
 23+
 24+ /**
 25+ * List of parameter definitions for forms.
 26+ *
 27+ * @var array or false
 28+ */
 29+ protected static $formParameters = false;
 30+
 31+ /**
 32+ * @var iMappingService
 33+ */
 34+ protected $service;
 35+
 36+ /**
 37+ * @var array
 38+ */
 39+ protected $markerCoords;
 40+
 41+ /**
 42+ * Parameters specific to this feature.
 43+ *
 44+ * @var mixed
 45+ */
 46+ protected $specificParameters = false;
 47+
 48+ protected $coordsFieldName;
 49+
 50+ private $coordinates;
 51+
 52+ /**
 53+ * Constructor.
 54+ *
 55+ * @param iMappingService $service
 56+ */
 57+ public function __construct( iMappingService $service ) {
 58+ $this->service = $service;
 59+ }
 60+
 61+ /**
 62+ * Returns the specific parameters by first checking if they have been initialized yet,
 63+ * doing to work if this is not the case, and then returning them.
 64+ *
 65+ * @since 0.6.5
 66+ *
 67+ * @return array
 68+ */
 69+ public final function getSpecificParameterInfo() {
 70+ if ( $this->specificParameters === false ) {
 71+ $this->specificParameters = array();
 72+ $this->initSpecificParamInfo( $this->specificParameters );
 73+ }
 74+
 75+ return $this->specificParameters;
 76+ }
 77+
 78+ /**
 79+ * Initializes the specific parameters.
 80+ *
 81+ * Override this method to set parameters specific to a feature service comibination in
 82+ * the inheriting class.
 83+ *
 84+ * @since 0.6.5
 85+ *
 86+ * @param array $parameters
 87+ */
 88+ protected function initSpecificParamInfo( array &$parameters ) {
 89+ }
 90+
 91+ /**
 92+ * Validates and corrects the provided map properties, and the sets them as class fields.
 93+ *
 94+ * @param array $mapProperties
 95+ *
 96+ * @return mixed ValidationError object if there is a fatal error, false othewise
 97+ */
 98+ protected final function setMapProperties( array $mapProperties ) {
 99+ /*
 100+ * Assembliy of the allowed parameters and their information.
 101+ * The main parameters (the ones that are shared by everything) are overidden
 102+ * by the feature parameters (the ones specific to a feature). The result is then
 103+ * again overidden by the service parameters (the ones specific to the service),
 104+ * and finally by the specific parameters (the ones specific to a service-feature combination).
 105+ */
 106+ $parameterInfo = $this->getFormParameterInfo();
 107+ $this->service->addParameterInfo( $parameterInfo );
 108+
 109+ // TODO
 110+ $parameterInfo = array_merge_recursive( $parameterInfo, $this->getSpecificParameterInfo() );
 111+
 112+ $validator = new Validator( 'form', false ); // TODO
 113+
 114+ foreach ( $params as $key => $value ) {
 115+ if ( !is_array( $value ) && !is_object( $value ) ) {
 116+ $parameters[$key] = $value;
 117+ }
 118+ }
 119+
 120+ $validator->setParameters( $parameters, $parameterInfo );
 121+
 122+ $validator->validateParameters();
 123+
 124+ $fatalError = $validator->hasFatalError();
 125+
 126+ if ( $fatalError === false ) {
 127+ $parameters = $validator->getParameterValues();
 128+
 129+ foreach ( $parameters as $paramName => $paramValue ) {
 130+ if ( !property_exists( __CLASS__, $paramName ) ) {
 131+ $this-> { $paramName } = $paramValue;
 132+ }
 133+ else {
 134+ // If this happens in any way, it could be a big vunerability, so throw an exception.
 135+ throw new Exception( 'Attempt to override a class field during map property assignment. Field name: ' . $paramName );
 136+ }
 137+ }
 138+ }
 139+
 140+ return $fatalError;
 141+ }
 142+
 143+ /**
 144+ * This function is a hook for Semantic Forms, and returns the HTML needed in
 145+ * the form to handle coordinate data.
 146+ *
 147+ * TODO: Use function args for sf stuffz
 148+ *
 149+ * @return array
 150+ */
 151+ public final function formInputHTML( $coordinates, $input_name, $is_mandatory, $is_disabled, $field_args ) {
 152+ global $sfgTabIndex;
 153+
 154+ $this->coordinates = $coordinates;
 155+
 156+ $fatalError = $this->setMapProperties( $field_args );
 157+
 158+ if ( $fatalError !== false ) {
 159+ return array(
 160+ '<div><span class="errorbox">' .
 161+ htmlspecialchars( wfMsgExt( 'validator-fatal-error', 'parsemag', $fatalError->getMessage() ) ) .
 162+ '</span></div><br /><br /><br /><br />',
 163+ ''
 164+ );
 165+ }
 166+
 167+ $this->setCoordinates();
 168+ $this->setCentre();
 169+ $this->setZoom();
 170+
 171+ // Create html element names.
 172+ $mapName = $this->service->getMapId();
 173+ $this->coordsFieldName = $mapName . '_coords_' . $sfgTabIndex;
 174+ $infoFieldName = $mapName . '_info_' . $sfgTabIndex;
 175+
 176+ $geocodingFunction = $this->getShowAddressFunction();
 177+
 178+ static $addedFormJs = false;
 179+ if ( !$addedFormJs ) {
 180+ global $wgOut;
 181+ $addedFormJs = true;
 182+
 183+ $n = Xml::escapeJsString( wfMsgForContent( 'maps-abb-north' ) );
 184+ $e = Xml::escapeJsString( wfMsgForContent( 'maps-abb-east' ) );
 185+ $s = Xml::escapeJsString( wfMsgForContent( 'maps-abb-south' ) );
 186+ $w = Xml::escapeJsString( wfMsgForContent( 'maps-abb-west' ) );
 187+ $deg = Xml::escapeJsString( MapsCoordinateParser::SYMBOL_DEG );
 188+
 189+ $wgOut->addInlineScript(
 190+ <<<EOT
 191+function convertLatToDMS (val) {
 192+ return Math.abs(val) + "$deg " + ( val < 0 ? "$s" : "$n" );
 193+}
 194+function convertLngToDMS (val) {
 195+ return Math.abs(val) + "$deg " + ( val < 0 ? "$w" : "$e" );
 196+}
 197+EOT
 198+ );
 199+ }
 200+
 201+ // Create the non specific form HTML.
 202+ $this->output .= Html::input(
 203+ $input_name,
 204+ $this->markerCoords ? MapsCoordinateParser::formatCoordinates( $this->markerCoords ) : '',
 205+ 'text',
 206+ array(
 207+ 'size' => 42, #_O
 208+ 'tabindex' => $sfgTabIndex,
 209+ 'id' => $this->coordsFieldName
 210+ )
 211+ );
 212+
 213+ $this->output .= Html::element(
 214+ 'span',
 215+ array(
 216+ 'class' => 'error_message',
 217+ 'id' => $infoFieldName
 218+ )
 219+ );
 220+
 221+ if ( $geocodingFunction !== false ) {
 222+ $this->addGeocodingField( $geocodingFunction, $mapName, $mapName . '_geocode_' . $sfgTabIndex );
 223+ }
 224+
 225+ if ( $this->markerCoords === false ) {
 226+ $this->markerCoords = array(
 227+ 'lat' => 'null',
 228+ 'lon' => 'null'
 229+ );
 230+
 231+ $this->centreLat = 'null';
 232+ $this->centreLon = 'null';
 233+ }
 234+
 235+ $this->addSpecificMapHTML();
 236+
 237+ $this->addFormDependencies();
 238+
 239+ // TODO: errors
 240+ return array( $this->output, '' );
 241+ }
 242+
 243+ /**
 244+ * Adds geocoding controls to the form.
 245+ *
 246+ * @param string $geocodingFunction
 247+ * @param string $mapName
 248+ * @param string $geocodeFieldName
 249+ */
 250+ private function addGeocodingField( $geocodingFunction, $mapName, $geocodeFieldId ) {
 251+ global $sfgTabIndex;
 252+ $sfgTabIndex++;
 253+
 254+ $adressField = SMFormInput::getDynamicInput(
 255+ 'geocode',
 256+ wfMsg( 'semanticmaps_enteraddresshere' ),
 257+ array(
 258+ 'size' => '30',
 259+ 'id' => $geocodeFieldId,
 260+ 'style' => 'color: #707070',
 261+ 'tabindex' => $sfgTabIndex
 262+ )
 263+ );
 264+
 265+ $notFoundText = Xml::escapeJsString( wfMsg( 'semanticmaps_notfound' ) );
 266+ $mapName = Xml::escapeJsString( $mapName );
 267+ $geoFieldId = Xml::escapeJsString( $geocodeFieldId );
 268+ $coordFieldName = Xml::escapeJsString( $this->coordsFieldName );
 269+
 270+ $this->output .= '<p>' . $adressField .
 271+ Html::input(
 272+ 'geosubmit',
 273+ wfMsg( 'semanticmaps_lookupcoordinates' ),
 274+ 'submit',
 275+ array(
 276+ 'onClick' => "$geocodingFunction( document.forms['createbox'].$geoFieldId.value, '$mapName', '$coordFieldName', '$notFoundText'); return false"
 277+ )
 278+ ) .
 279+ '</p>';
 280+ }
 281+
 282+ /**
 283+ * Sets the zoom so the whole map is visible in case there is no maker yet,
 284+ * and sets it to the default when there is a marker but no zoom parameter.
 285+ */
 286+ private function setZoom() {
 287+ if ( empty( $this->coordinates ) ) {
 288+ $this->zoom = $this->getEarthZoom();
 289+ } else if ( $this->zoom == 'null' ) {
 290+ $this->zoom = $this->service->getDefaultZoom();
 291+ }
 292+ }
 293+
 294+ /**
 295+ * Sets the $this->markerCoords value, which are the coordinates for the marker.
 296+ */
 297+ private function setCoordinates() {
 298+ if ( empty( $this->coordinates ) ) {
 299+ // If no coordinates exist yet, no marker should be displayed.
 300+ $this->markerCoords = false;
 301+ }
 302+ else {
 303+ $this->markerCoords = MapsCoordinateParser::parseCoordinates( $this->coordinates );
 304+ }
 305+ }
 306+
 307+ /**
 308+ * Sets the $centreLat and $centreLon fields.
 309+ * Note: this needs to be done AFTRE the maker coordinates are set.
 310+ */
 311+ private function setCentre() {
 312+ if ( empty( $this->centre ) ) {
 313+ if ( isset( $this->coordinates ) ) {
 314+ $this->centreLat = $this->markerCoords['lat'];
 315+ $this->centreLon = $this->markerCoords['lon'];
 316+ }
 317+ else {
 318+ $this->centreLat = '0';
 319+ $this->centreLon = '0';
 320+ }
 321+ }
 322+ else {
 323+ // Geocode and convert if required.
 324+ $centre = MapsGeocoders::attemptToGeocode( $this->centre, $this->geoservice, $this->serviceName );
 325+
 326+ $this->centreLat = Xml::escapeJsString( $centre['lat'] );
 327+ $this->centreLon = Xml::escapeJsString( $centre['lon'] );
 328+ }
 329+ }
 330+
 331+ /**
 332+ * Returns html for an html input field with a default value that will automatically dissapear when
 333+ * the user clicks in it, and reappers when the focus on the field is lost and it's still empty.
 334+ *
 335+ * @param string $name
 336+ * @param string $value
 337+ * @param array $attribs
 338+ *
 339+ * @return string (html)
 340+ */
 341+ protected static function getDynamicInput( $name, $value, $attribs = array() ) {
 342+ $escapedValue = Xml::escapeJsString( $value );
 343+
 344+ $attribs['onfocus'] = "if (this.value==\"$escapedValue\") {this.value='';}";
 345+ $attribs['onblur'] = "if (this.value=='') {this.value=\"$escapedValue\";}";
 346+
 347+ return Html::input(
 348+ $name,
 349+ $value,
 350+ 'text',
 351+ $attribs
 352+ );
 353+ }
 354+
 355+ /**
 356+ * Returns the name of the JavaScript function to use for live geocoding,
 357+ * or false to indicate there is no such function. Override this method
 358+ * to implement geocoding functionallity.
 359+ *
 360+ * @return mixed: string or false
 361+ */
 362+ protected function getShowAddressFunction() {
 363+ return false;
 364+ }
 365+
 366+ /**
 367+ * Gets the definitions for the parameters specific to the form input feature.
 368+ * This function implements a form of caching by storing the definitions, once
 369+ * created, in self::$formParameters, and returning that field when set.
 370+ *
 371+ * @since 0.6.5
 372+ *
 373+ * @return array
 374+ */
 375+ protected function getFormParameterInfo() {
 376+ $params = MapsMapper::getCommonParameters();
 377+
 378+ // TODO
 379+ //$params['width']->setDefault( $smgFIWidth );
 380+ //$params['height']->setDefault( $smgFIHeight );
 381+
 382+ $params['centre'] = new Parameter(
 383+ 'centre',
 384+ Parameter::TYPE_STRING,
 385+ '', // TODO
 386+ array( 'center' ),
 387+ array(
 388+ new CriterionIsLocation(),
 389+ )
 390+ );
 391+
 392+ // TODO
 393+ //$params['geoservice']->setDefault( $egMapsDefaultGeoService );
 394+ //$params['mappingservice']->setDefault( $egMapsDefaultServices['fi'] );
 395+
 396+ return $params;
 397+ }
 398+
 399+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/forminputs/SM_FormInput.php
___________________________________________________________________
Added: svn:eol-style
1400 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/forminputs/SM_FormInputs.php
@@ -0,0 +1,109 @@
 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+$wgHooks['MappingFeatureLoad'][] = 'SMFormInputs::initialize';
 18+
 19+final class SMFormInputs {
 20+
 21+ public static function initialize() {
 22+ global $smgDir, $wgAutoloadClasses, $sfgFormPrinter;
 23+
 24+ // This code should not get called when SF is not loaded, but let's have this
 25+ // check to not run into problems when people mess up the settings.
 26+ if ( !defined( 'SF_VERSION' ) ) return true;
 27+
 28+ $wgAutoloadClasses['SMFormInput'] = dirname( __FILE__ ) . '/SM_FormInput.php';
 29+
 30+ $hasFormInputs = false;
 31+
 32+ foreach ( MapsMappingServices::getServiceIdentifiers() as $serviceIdentifier ) {
 33+ $service = MapsMappingServices::getServiceInstance( $serviceIdentifier );
 34+
 35+ // Check if the service has a form input.
 36+ $FIClass = $service->getFeature( 'fi' );
 37+
 38+ // If the service has no FI, skipt it and continue with the next one.
 39+ if ( $FIClass === false ) continue;
 40+
 41+ // At least one form input will be enabled when this point is reached.
 42+ $hasFormInputs = true;
 43+
 44+ // Add the result form input type for the service name.
 45+ self::initFormHook( $service->getName(), $service->getName() );
 46+
 47+ // Loop through the service alliases, and add them as form input types.
 48+ foreach ( $service->getAliases() as $alias ) {
 49+ self::initFormHook( $alias, $service->getName() );
 50+ }
 51+ }
 52+
 53+ // Add the 'map' form input type if there are mapping services that have FI's loaded.
 54+ if ( $hasFormInputs ) self::initFormHook( 'map' );
 55+
 56+ return true;
 57+ }
 58+
 59+
 60+
 61+ /**
 62+ * Adds a mapping service's form hook.
 63+ *
 64+ * @param string $inputName The name of the form input.
 65+ * @param strig $mainName
 66+ */
 67+ private static function initFormHook( $inputName, $mainName = '' ) {
 68+ global $wgAutoloadClasses, $sfgFormPrinter, $smgDir;
 69+
 70+ // Add the form input hook for the service.
 71+ $field_args = array();
 72+
 73+ if ( $mainName != '' ) {
 74+ $field_args['service_name'] = $mainName;
 75+ }
 76+
 77+ $sfgFormPrinter->setInputTypeHook( $inputName, 'smfSelectFormInputHTML', $field_args );
 78+ }
 79+
 80+}
 81+
 82+/**
 83+ * Calls the relevant form input class depending on the provided service.
 84+ *
 85+ * @param string $coordinates
 86+ * @param string $input_name
 87+ * @param boolean $is_mandatory
 88+ * @param boolean $is_disabled
 89+ * @param array $field_args
 90+ *
 91+ * @return array
 92+ */
 93+function smfSelectFormInputHTML( $coordinates, $input_name, $is_mandatory, $is_disabled, array $field_args ) {
 94+ // Get the service name from the field_args, and set it to null if it doesn't exist.
 95+ if ( array_key_exists( 'service_name', $field_args ) ) {
 96+ $serviceName = $field_args['service_name'];
 97+ }
 98+ else {
 99+ $serviceName = null;
 100+ }
 101+
 102+ // Get the instance of the service class.
 103+ $service = MapsMappingServices::getValidServiceInstance( $serviceName, 'fi' );
 104+
 105+ // Get an instance of the class handling the current form input and service.
 106+ $formInput = $service->getFeatureInstance( 'fi' );
 107+
 108+ // Get and return the form input HTML from the hook corresponding with the provided service.
 109+ return $formInput->formInputHTML( $coordinates, $input_name, $is_mandatory, $is_disabled, $field_args );
 110+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/forminputs/SM_FormInputs.php
___________________________________________________________________
Added: svn:eol-style
1111 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/SM_GeoCoordsValueDescription.php
@@ -0,0 +1,106 @@
 2+<?php
 3+
 4+/**
 5+ * File holding the SMGeoCoordsValueDescription class.
 6+ *
 7+ * @file SM_GeoCoordsValueDescription.php
 8+ * @ingroup SemanticMaps
 9+ *
 10+ * @author Jeroen De Dauw
 11+ */
 12+
 13+if ( !defined( 'MEDIAWIKI' ) ) {
 14+ die( 'Not an entry point.' );
 15+}
 16+
 17+/**
 18+ * Description of one data value of type Goegraphical Coordinates.
 19+ *
 20+ * @author Jeroen De Dauw
 21+ *
 22+ * @since 0.6
 23+ *
 24+ * @ingroup SemanticMaps
 25+ */
 26+class SMGeoCoordsValueDescription extends SMWValueDescription {
 27+
 28+ /**
 29+ * Constructor.
 30+ *
 31+ * @since 0.6
 32+ *
 33+ * @param SMGeoCoordsValue $dataValue
 34+ */
 35+ public function __construct( SMGeoCoordsValue $dataValue, $comparator ) {
 36+ parent::__construct( $dataValue, $comparator );
 37+ }
 38+
 39+ /**
 40+ * @see SMWDescription::getQueryString
 41+ *
 42+ * @since 0.6
 43+ *
 44+ * @param Boolean $asvalue
 45+ */
 46+ public function getQueryString( $asValue = false ) {
 47+ if ( $this->m_datavalue !== null ) {
 48+ $queryString = $this->m_datavalue->getWikiValue();
 49+ return $asValue ? $queryString : "[[$queryString]]";
 50+ } else {
 51+ return $asValue ? '+' : '';
 52+ }
 53+ }
 54+
 55+ /**
 56+ * @see SMWDescription::getSQLCondition
 57+ *
 58+ * @since 0.6
 59+ *
 60+ * @param string $tableName
 61+ * @param array $fieldNames
 62+ * @param DatabaseBase or Database $dbs
 63+ *
 64+ * @return true
 65+ */
 66+ public function getSQLCondition( $tableName, array $fieldNames, $dbs ) {
 67+ global $smgUseSpatialExtensions;
 68+
 69+ $dataValue = $this->getDatavalue();
 70+
 71+ // Only execute the query when the description's type is geographical coordinates,
 72+ // the description is valid, and the near comparator is used.
 73+ if ( $dataValue->getTypeID() != '_geo' || !$dataValue->isValid() ) return false;
 74+
 75+ $comparator = false;
 76+
 77+ switch ( $this->getComparator() ) {
 78+ case SMW_CMP_EQ: $comparator = '='; break;
 79+ case SMW_CMP_LEQ: $comparator = '<='; break;
 80+ case SMW_CMP_GEQ: $comparator = '>='; break;
 81+ case SMW_CMP_NEQ: $comparator = '!='; break;
 82+ }
 83+
 84+ if ( $comparator ) {
 85+ $coordinates = $dataValue->getCoordinateSet();
 86+
 87+ $lat = $dbs->addQuotes( $coordinates['lat'] );
 88+ $lon = $dbs->addQuotes( $coordinates['lon'] );
 89+
 90+ $conditions = array();
 91+
 92+ if ( $smgUseSpatialExtensions ) {
 93+ // TODO
 94+ }
 95+ else {
 96+ $conditions[] = "{$tableName}.$fieldNames[0] $comparator $lat";
 97+ $conditions[] = "{$tableName}.$fieldNames[1] $comparator $lon";
 98+ }
 99+
 100+ return implode( ' && ', $conditions );
 101+ }
 102+ else {
 103+ return false;
 104+ }
 105+ }
 106+
 107+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/SM_GeoCoordsValueDescription.php
___________________________________________________________________
Added: svn:eol-style
1108 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_QueryPrinters.php
@@ -0,0 +1,182 @@
 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+$wgHooks['MappingFeatureLoad'][] = 'SMQueryPrinters::initialize';
 18+
 19+final class SMQueryPrinters {
 20+
 21+ /**
 22+ * Initialization function for Maps query printer functionality.
 23+ */
 24+ public static function initialize() {
 25+ global $smgDir, $wgAutoloadClasses;
 26+
 27+ $wgAutoloadClasses['SMQueryHandler'] = dirname( __FILE__ ) . '/SM_QueryHandler.php';
 28+ $wgAutoloadClasses['SMMapper'] = dirname( __FILE__ ) . '/SM_Mapper.php';
 29+ $wgAutoloadClasses['SMMapPrinter'] = dirname( __FILE__ ) . '/SM_MapPrinter.php';
 30+ $wgAutoloadClasses['SMKMLPrinter'] = dirname( __FILE__ ) . '/SM_KMLPrinter.php';
 31+
 32+ self::initFormat( 'kml', 'SMKMLPrinter' );
 33+
 34+ $hasQueryPrinters = false;
 35+
 36+ foreach ( MapsMappingServices::getServiceIdentifiers() as $serviceIdentifier ) {
 37+ $service = MapsMappingServices::getServiceInstance( $serviceIdentifier );
 38+
 39+ // Check if the service has a query printer.
 40+ $QPClass = $service->getFeature( 'qp' );
 41+
 42+ // If the service has no QP, skipt it and continue with the next one.
 43+ if ( $QPClass === false ) continue;
 44+
 45+ // At least one query printer will be enabled when this point is reached.
 46+ $hasQueryPrinters = true;
 47+
 48+ // Initiate the format.
 49+ $aliases = $service->getAliases();
 50+ self::initFormat( $service->getName(), $QPClass, $aliases );
 51+ }
 52+
 53+ // Add the 'map' result format if there are mapping services that have QP's loaded.
 54+ if ( $hasQueryPrinters ) {
 55+ self::initFormat( 'map', 'SMMapper' );
 56+ }
 57+
 58+ return true;
 59+ }
 60+
 61+ /**
 62+ * Returns an array containing the parameter info.
 63+ *
 64+ * @since 0.7
 65+ *
 66+ * @return array
 67+ */
 68+ public static function getParameterInfo() {
 69+ global $egMapsDefaultServices, $egMapsAvailableGeoServices, $egMapsDefaultGeoService, $egMapsMapWidth, $egMapsMapHeight;
 70+ global $egMapsDefaultLabel, $egMapsDefaultTitle;
 71+ global $smgQPForceShow, $smgQPShowTitle, $smgQPTemplate;
 72+
 73+ $params = MapsMapper::getCommonParameters();
 74+
 75+ $params['staticlocations'] = new ListParameter( 'staticlocations', ';' );
 76+ $params['staticlocations']->addAliases( 'locations' );
 77+ $params['staticlocations']->addCriteria( new CriterionIsLocation( '~' ) );
 78+ $params['staticlocations']->addManipulations( new MapsParamCoordSet( '~' ) );
 79+ $params['staticlocations']->setDefault( array() );
 80+
 81+ $params['centre'] = new Parameter(
 82+ 'centre',
 83+ Parameter::TYPE_STRING,
 84+ '', // TODO
 85+ array( 'center' ),
 86+ array(
 87+ new CriterionIsLocation(),
 88+ )
 89+ );
 90+
 91+ $params['icon'] = new Parameter(
 92+ 'icon',
 93+ Parameter::TYPE_STRING,
 94+ '', // TODO
 95+ array(),
 96+ array(
 97+ New CriterionNotEmpty()
 98+ )
 99+ );
 100+
 101+ $params['forceshow'] = new Parameter(
 102+ 'forceshow',
 103+ Parameter::TYPE_BOOLEAN,
 104+ $smgQPForceShow,
 105+ array( 'force show' )
 106+ );
 107+ $params['forceshow']->addManipulations( new ParamManipulationBoolean() );
 108+
 109+ $params['showtitle'] = new Parameter(
 110+ 'showtitle',
 111+ Parameter::TYPE_BOOLEAN,
 112+ $smgQPShowTitle,
 113+ array( 'show title' )
 114+ );
 115+ $params['showtitle']->addManipulations( new ParamManipulationBoolean() );
 116+
 117+ $params['template'] = new Parameter(
 118+ 'template',
 119+ Parameter::TYPE_STRING,
 120+ $smgQPTemplate,
 121+ array(),
 122+ array(
 123+ New CriterionNotEmpty()
 124+ )
 125+ );
 126+
 127+ $params['title'] = new Parameter(
 128+ 'title',
 129+ Parameter::TYPE_STRING,
 130+ $egMapsDefaultTitle
 131+ );
 132+
 133+ $params['label'] = new Parameter(
 134+ 'label',
 135+ Parameter::TYPE_STRING,
 136+ $egMapsDefaultLabel,
 137+ array( 'text' )
 138+ );
 139+
 140+ return $params;
 141+ }
 142+
 143+ /**
 144+ * Add the result format for a mapping service or alias.
 145+ *
 146+ * @param string $format
 147+ * @param string $formatClass
 148+ * @param array $aliases
 149+ */
 150+ private static function initFormat( $format, $formatClass, array $aliases = array() ) {
 151+ global $wgAutoloadClasses, $smgDir, $smwgResultAliases;
 152+
 153+ // Add the QP to SMW.
 154+ self::addFormatQP( $format, $formatClass );
 155+
 156+ // If SMW supports aliasing, add the aliases to $smwgResultAliases.
 157+ if ( isset( $smwgResultAliases ) ) {
 158+ $smwgResultAliases[$format] = $aliases;
 159+ }
 160+ else { // If SMW does not support aliasing, add every alias as a format.
 161+ foreach ( $aliases as $alias ) self::addFormatQP( $alias, $formatClass );
 162+ }
 163+ }
 164+
 165+ /**
 166+ * Adds a QP to SMW's $smwgResultFormats array or SMWQueryProcessor
 167+ * depending on if SMW supports $smwgResultFormats.
 168+ *
 169+ * @param string $format
 170+ * @param string $class
 171+ */
 172+ private static function addFormatQP( $format, $class ) {
 173+ global $smwgResultFormats;
 174+
 175+ if ( isset( $smwgResultFormats ) ) {
 176+ $smwgResultFormats[$format] = $class;
 177+ }
 178+ else {
 179+ SMWQueryProcessor::$formats[$format] = $class;
 180+ }
 181+ }
 182+
 183+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_QueryPrinters.php
___________________________________________________________________
Added: svn:eol-style
1184 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_MapPrinter.php
@@ -0,0 +1,553 @@
 2+<?php
 3+
 4+/**
 5+ * Abstract class that provides the common functionality for all map query printers.
 6+ *
 7+ * TODO: make use of SMQueryHandler
 8+ * TODO: make use of new-style Validator parameter handling
 9+ *
 10+ * @file SM_MapPrinter.php
 11+ * @ingroup SemanticMaps
 12+ *
 13+ * @author Jeroen De Dauw
 14+ * @author Robert Buzink
 15+ * @author Yaron Koren
 16+ */
 17+abstract class SMMapPrinter extends SMWResultPrinter implements iMappingFeature {
 18+
 19+ /**
 20+ * Returns the name of the service to get the correct mapping service object.
 21+ *
 22+ * @since 0.6.3
 23+ *
 24+ * @return string
 25+ */
 26+ protected abstract function getServiceName();
 27+
 28+ /**
 29+ * @var iMappingService
 30+ */
 31+ protected $service;
 32+
 33+ /**
 34+ * @var array
 35+ */
 36+ protected $locations = array();
 37+
 38+ /**
 39+ * @var string
 40+ */
 41+ protected $markerJs;
 42+
 43+ /**
 44+ * @var string
 45+ */
 46+ protected $centreLat;
 47+
 48+ /**
 49+ * @var string
 50+ */
 51+ protected $centreLon;
 52+
 53+ /**
 54+ * @var string
 55+ */
 56+ protected $output = '';
 57+
 58+ /**
 59+ * @var array or false
 60+ */
 61+ protected $specificParameters = false;
 62+
 63+ /**
 64+ * Indicates if the zoom paramter was set to it's default.
 65+ *
 66+ * @since 0.7
 67+ *
 68+ * @var boolean
 69+ */
 70+ protected $zoomDefaulted;
 71+
 72+ /**
 73+ * Constructor.
 74+ *
 75+ * @param $format String
 76+ * @param $inline
 77+ * @param $service iMappingService
 78+ */
 79+ public function __construct( $format, $inline, /* iMappingService */ $service = null ) {
 80+ // TODO: this is a hack since I can't find a way to pass along the service object here when the QP is created in SMW.
 81+ if ( $service == null ) {
 82+ $service = MapsMappingServices::getServiceInstance( $this->getServiceName() );
 83+ }
 84+
 85+ $this->service = $service;
 86+ }
 87+
 88+ /**
 89+ * Returns the specific parameters by first checking if they have been initialized yet,
 90+ * doing to work if this is not the case, and then returning them.
 91+ *
 92+ * @since 0.6.5
 93+ *
 94+ * @return array
 95+ */
 96+ public final function getSpecificParameterInfo() {
 97+ if ( $this->specificParameters === false ) {
 98+ $this->specificParameters = array();
 99+ $this->initSpecificParamInfo( $this->specificParameters );
 100+ }
 101+
 102+ return $this->specificParameters;
 103+ }
 104+
 105+ /**
 106+ * Initializes the specific parameters.
 107+ *
 108+ * Override this method to set parameters specific to a feature service comibination in
 109+ * the inheriting class.
 110+ *
 111+ * @since 0.6.5
 112+ *
 113+ * @param array $parameters
 114+ */
 115+ protected function initSpecificParamInfo( array &$parameters ) {
 116+ }
 117+
 118+ /**
 119+ * Builds up and returns the HTML for the map, with the queried coordinate data on it.
 120+ *
 121+ * @param SMWQueryResult $res
 122+ * @param $outputmode
 123+ *
 124+ * @return array
 125+ */
 126+ public final function getResultText( /* SMWQueryResult */ $res, $outputmode ) {
 127+ if ( self::manageMapProperties( $this->m_params ) ) {
 128+ $this->formatResultData( $res, $outputmode );
 129+
 130+ // Only create a map when there is at least one result.
 131+ if ( count( $this->locations ) > 0 || $this->forceshow ) {
 132+ $this->setZoom();
 133+
 134+ $this->setCentre();
 135+
 136+ $this->markerJs = $this->service->createMarkersJs( $this->locations );
 137+
 138+ $this->addSpecificMapHTML();
 139+
 140+ $dependencies = $this->service->getDependencyHtml();
 141+ $hash = md5( $dependencies );
 142+ SMWOutputs::requireHeadItem( $hash, $dependencies );
 143+ }
 144+ else {
 145+ // TODO: add warning when level high enough and append to error list?
 146+ }
 147+ }
 148+
 149+ return array( $this->output, 'noparse' => true, 'isHTML' => true );
 150+ }
 151+
 152+ /**
 153+ * Validates and corrects the provided map properties, and the sets them as class fields.
 154+ *
 155+ * @param array $mapProperties
 156+ *
 157+ * @return boolean Indicates whether the map should be shown or not.
 158+ */
 159+ protected final function manageMapProperties( array $mapProperties ) {
 160+
 161+ /*
 162+ * Assembliy of the allowed parameters and their information.
 163+ * The main parameters (the ones that are shared by everything) are overidden
 164+ * by the feature parameters (the ones specific to a feature). The result is then
 165+ * again overidden by the service parameters (the ones specific to the service),
 166+ * and finally by the specific parameters (the ones specific to a service-feature combination).
 167+ */
 168+ $parameterInfo = SMQueryPrinters::getParameterInfo();
 169+ $this->service->addParameterInfo( $parameterInfo );
 170+
 171+ // TODO
 172+ $parameterInfo = array_merge_recursive( $parameterInfo, $this->getSpecificParameterInfo() );
 173+
 174+ $validator = new Validator( $this->getName(), false );
 175+
 176+ $validator->setParameters( $mapProperties, $parameterInfo );
 177+
 178+ $validator->validateParameters();
 179+
 180+ $fatalError = $validator->hasFatalError();
 181+
 182+ if ( $fatalError === false ) {
 183+ $this->zoomDefaulted = $validator->getParameter( 'zoom' )->wasSetToDefault();
 184+ $this->setMapProperties( $validator->getParameterValues() );
 185+ }
 186+ else {
 187+ $this->output = '<span class="errorbox">' .
 188+ htmlspecialchars( wfMsgExt( 'validator-fatal-error', 'parsemag', $fatalError->getMessage() ) ) .
 189+ '</span>';
 190+ }
 191+
 192+ return !$fatalError;
 193+ }
 194+
 195+ /**
 196+ * Sets the map properties as class fields.
 197+ *
 198+ * @param array $mapProperties
 199+ */
 200+ private function setMapProperties( array $mapProperties ) {
 201+ foreach ( $mapProperties as $paramName => $paramValue ) {
 202+ if ( !property_exists( __CLASS__, $paramName ) ) {
 203+ $this-> { $paramName } = $paramValue;
 204+ }
 205+ else {
 206+ throw new Exception( 'Attempt to override a class field during map propertie assignment. Field name: ' . $paramName );
 207+ }
 208+ }
 209+ }
 210+
 211+ /**
 212+ * Reads the parameters and gets the query printers output.
 213+ *
 214+ * @param SMWQueryResult $results
 215+ * @param array $params
 216+ * @param $outputmode
 217+ *
 218+ * @return array
 219+ */
 220+ public final function getResult( /* SMWQueryResult */ $results, /* array */ $params, $outputmode ) {
 221+ // Skip checks, results with 0 entries are normal.
 222+ $this->readParameters( $params, $outputmode );
 223+
 224+ return $this->getResultText( $results, SMW_OUTPUT_HTML );
 225+ }
 226+
 227+ /**
 228+ * Loops over the rows in the result and adds them via addResultRow.
 229+ *
 230+ * @param SMWQueryResult $res
 231+ * @param $outputmode
 232+ */
 233+ protected function formatResultData( SMWQueryResult $res, $outputmode ) {
 234+ $this->addStaticLocations();
 235+
 236+ while ( ( $row = $res->getNext() ) !== false ) {
 237+ $this->addResultRow( $outputmode, $row );
 238+ }
 239+ }
 240+
 241+ /**
 242+ * Adds the static locations (specified via the staticlocations parameter) to the map.
 243+ *
 244+ * @since 0.7
 245+ */
 246+ protected function addStaticLocations() {
 247+ global $wgParser;
 248+
 249+ // New parser object to render popup contents with.
 250+ $parser = clone $wgParser;
 251+
 252+ $this->title = $parser->parse( $this->title, $parser->getTitle(), new ParserOptions() )->getText();
 253+ $this->label = $parser->parse( $this->label, $parser->getTitle(), new ParserOptions() )->getText();
 254+
 255+ // Each $location is an array containg the coordinate set as first element, possibly followed by meta data.
 256+ foreach ( $this->staticlocations as $location ) {
 257+ $markerData = MapsCoordinateParser::parseCoordinates( array_shift( $location ) );
 258+
 259+ if ( !$markerData ) continue;
 260+
 261+ $markerData = array( $markerData['lat'], $markerData['lon'] );
 262+
 263+ if ( count( $location ) > 0 ) {
 264+ // Parse and add the point specific title if it's present.
 265+ $markerData['title'] = $parser->parse( $location[0], $parser->getTitle(), new ParserOptions() )->getText();
 266+
 267+ if ( count( $location ) > 1 ) {
 268+ // Parse and add the point specific label if it's present.
 269+ $markerData['label'] = $parser->parse( $location[1], $parser->getTitle(), new ParserOptions() )->getText();
 270+
 271+ if ( count( $location ) > 2 ) {
 272+ // Add the point specific icon if it's present.
 273+ $markerData['icon'] = $location[2];
 274+ }
 275+ }
 276+ }
 277+
 278+ // If there is no point specific icon, use the general icon parameter when available.
 279+ if ( !array_key_exists( 'icon', $markerData ) ) {
 280+ $markerData['icon'] = $this->icon;
 281+ }
 282+
 283+ if ( $markerData['icon'] != '' ) {
 284+ $markerData['icon'] = MapsMapper::getImageUrl( $markerData['icon'] );
 285+ }
 286+
 287+ // Temporary fix, will refactor away later
 288+ // TODO
 289+ $markerData = array_values( $markerData );
 290+ if ( count( $markerData ) < 5 ) {
 291+ if ( count( $markerData ) < 4 ) {
 292+ $markerData[] = '';
 293+ }
 294+ $markerData[] = '';
 295+ }
 296+
 297+ $this->locations[] = $markerData;
 298+ }
 299+ }
 300+
 301+ /**
 302+ * This function will loop through all properties (fields) of one record (row),
 303+ * and add the location data, title, label and icon to the m_locations array.
 304+ *
 305+ * TODO: this doesn't qualify as a megamoth just yet, but some splitting up would be nice
 306+ *
 307+ * @param $outputmode
 308+ * @param array $row The record you want to add data from
 309+ */
 310+ protected function addResultRow( $outputmode, array $row ) {
 311+ global $wgUser, $smgUseSpatialExtensions;
 312+
 313+ $skin = $wgUser->getSkin();
 314+
 315+ $title = '';
 316+ $titleForTemplate = '';
 317+ $text = '';
 318+ $lat = '';
 319+ $lon = '';
 320+
 321+ $coords = array();
 322+ $label = array();
 323+
 324+ // Loop throught all fields of the record.
 325+ foreach ( $row as $i => $field ) {
 326+ $pr = $field->getPrintRequest();
 327+
 328+ // Loop throught all the parts of the field value.
 329+ while ( ( $object = $field->getNextObject() ) !== false ) {
 330+ if ( $object->getTypeID() == '_wpg' && $i == 0 ) {
 331+ if ( $this->showtitle ) $title = $object->getLongText( $outputmode, $skin );
 332+ if ( $this->template ) $titleForTemplate = $object->getLongText( $outputmode, NULL );
 333+ }
 334+
 335+ if ( $object->getTypeID() != '_geo' && $i != 0 ) {
 336+ if ( $this->template ) {
 337+ if ( $object instanceof SMWWikiPageValue ) {
 338+ $label[] = $object->getTitle()->getPrefixedText();
 339+ } else {
 340+ $label[] = $object->getLongText( $outputmode, $skin );
 341+ }
 342+ }
 343+ else {
 344+ $propertyName = $pr->getHTMLText( $skin );
 345+ if ( $propertyName != '' ) $propertyName .= ': ';
 346+ $text .= $propertyName . $object->getLongText( $outputmode, $skin ) . '<br />';
 347+ }
 348+ }
 349+
 350+ if ( $pr->getMode() == SMWPrintRequest::PRINT_PROP && $pr->getTypeID() == '_geo' ) {
 351+ $coords[] = $object->getDBkeys();
 352+ }
 353+ }
 354+ }
 355+
 356+ if ( $this->template ) {
 357+ // New parser object to render the templates with.
 358+ global $wgParser;
 359+ $parser = clone $wgParser;
 360+ }
 361+
 362+ foreach ( $coords as $coord ) {
 363+ if ( count( $coord ) >= 2 ) {
 364+ if ( $smgUseSpatialExtensions ) {
 365+ // TODO
 366+ }
 367+ else {
 368+ list( $lat, $lon ) = $coord;
 369+ }
 370+
 371+ if ( $lat != '' && $lon != '' ) {
 372+ $icon = $this->getLocationIcon( $row );
 373+
 374+ if ( $this->template ) {
 375+ $segments = array_merge(
 376+ array( $this->template, 'title=' . $titleForTemplate, 'latitude=' . $lat, 'longitude=' . $lon ),
 377+ $label
 378+ );
 379+
 380+ $text = $parser->parse( '{{' . implode( '|', $segments ) . '}}', $parser->getTitle(), new ParserOptions() )->getText();
 381+ }
 382+
 383+ $this->locations[] = array(
 384+ $lat,
 385+ $lon,
 386+ $title,
 387+ $text,
 388+ $icon
 389+ );
 390+ }
 391+ }
 392+ }
 393+ }
 394+
 395+ /**
 396+ * Get the icon for a row.
 397+ *
 398+ * @param array $row
 399+ *
 400+ * @return string
 401+ */
 402+ private function getLocationIcon( array $row ) {
 403+ $icon = '';
 404+ $legend_labels = array();
 405+
 406+ // Look for display_options field, which can be set by Semantic Compound Queries
 407+ // the location of this field changed in SMW 1.5
 408+ $display_location = method_exists( $row[0], 'getResultSubject' ) ? $row[0]->getResultSubject() : $row[0];
 409+
 410+ if ( property_exists( $display_location, 'display_options' ) && is_array( $display_location->display_options ) ) {
 411+ $display_options = $display_location->display_options;
 412+ if ( array_key_exists( 'icon', $display_options ) ) {
 413+ $icon = $display_options['icon'];
 414+
 415+ // 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
 416+ if ( array_key_exists( 'legend label', $display_options ) ) {
 417+
 418+ $legend_label = $display_options['legend label'];
 419+
 420+ if ( ! array_key_exists( $icon, $legend_labels ) ) {
 421+ $legend_labels[$icon] = $legend_label;
 422+ }
 423+ }
 424+ }
 425+ } // Icon can be set even for regular, non-compound queries If it is, though, we have to translate the name into a URL here
 426+ elseif ( $this->icon != '' ) {
 427+ $icon = MapsMapper::getImageUrl( $this->icon );
 428+ }
 429+
 430+ return $icon;
 431+ }
 432+
 433+ /**
 434+ * Sets the zoom level to the provided value, or when not set, to the default.
 435+ */
 436+ protected function setZoom() {
 437+ if ( $this->zoomDefaulted ) {
 438+ if ( count( $this->locations ) > 1 ) {
 439+ $this->zoom = 'null';
 440+ }
 441+ }
 442+ }
 443+
 444+ /**
 445+ * Sets the $centre_lat and $centre_lon fields.
 446+ * Note: this needs to be done AFTRE the maker coordinates are set.
 447+ */
 448+ protected function setCentre() {
 449+ // If a centre value is set, use it.
 450+ if ( $this->centre != '' ) {
 451+ // Geocode and convert if required.
 452+ $centre = MapsGeocoders::attemptToGeocode( $this->centre, $this->geoservice, $this->service->getName() );
 453+
 454+ if ( $centre ) {
 455+ $this->centreLat = $centre['lat'];
 456+ $this->centreLon = $centre['lon'];
 457+ }
 458+ else {
 459+ $this->setCentreDefault();
 460+ }
 461+ }
 462+ else {
 463+ $this->setCentreDefault();
 464+ }
 465+ }
 466+
 467+ /**
 468+ * Figures out the default value for the centre.
 469+ */
 470+ private function setCentreDefault() {
 471+ if ( count( $this->locations ) > 1 ) {
 472+ // 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.
 473+ $this->centreLat = 'null';
 474+ $this->centreLon = 'null';
 475+ }
 476+ elseif ( count( $this->locations ) == 1 ) {
 477+ // If centre is not set and there is exactelly one marker, use it's coordinates.
 478+ $this->centreLat = Xml::escapeJsString( $this->locations[0][0] );
 479+ $this->centreLon = Xml::escapeJsString( $this->locations[0][1] );
 480+ }
 481+ else {
 482+ // If centre is not set and there are no results, centre on the default coordinates.
 483+ global $egMapsDefaultMapCentre;
 484+ // TODO
 485+ }
 486+ }
 487+
 488+ /**
 489+ * Returns the internationalized name of the mapping service.
 490+ *
 491+ * @return string
 492+ */
 493+ public final function getName() {
 494+ return wfMsg( 'maps_' . $this->service->getName() );
 495+ }
 496+
 497+ /**
 498+ * Returns a list of parameter information, for usage by Special:Ask and others.
 499+ *
 500+ * @return array
 501+ */
 502+ public function getParameters() {
 503+ global $egMapsMapWidth, $egMapsMapHeight;
 504+
 505+ $params = parent::getParameters();
 506+
 507+ $paramDescs = SMQueryPrinters::getParameterInfo();
 508+ $this->service->addParameterInfo( $paramDescs );
 509+
 510+ foreach ( $paramDescs as $paramDesc ) {
 511+ $param = array(
 512+ 'name' => $paramDesc->getName(),
 513+ 'type' => $this->getMappedParamType( $paramDesc->getType() ),
 514+ 'description' => $paramDesc->getDescription() ? $paramDesc->getDescription() : '',
 515+ 'default' => $paramDesc->isRequired() ? '' : $paramDesc->getDefault()
 516+ );
 517+
 518+ foreach ( $paramDesc->getCriteria() as $criterion ) {
 519+ if ( $criterion instanceof CriterionInArray ) {
 520+ $param['values'] = $criterion->getAllowedValues();
 521+ $param['type'] = $paramDesc->isList() ? 'enum-list' : 'enumeration';
 522+ break;
 523+ }
 524+ }
 525+
 526+ $params[] = $param;
 527+ }
 528+
 529+ return $params;
 530+ }
 531+
 532+ /**
 533+ * Takes in an element of the Parameter::TYPE_ enum and turns it into an SMW type (string) indicator.
 534+ *
 535+ * @since 0.7.6
 536+ *
 537+ * @param Parameter::TYPE_ $type
 538+ *
 539+ * @return string
 540+ */
 541+ protected function getMappedParamType( $type ) {
 542+ static $typeMap = array(
 543+ Parameter::TYPE_STRING => 'string',
 544+ Parameter::TYPE_BOOLEAN => 'boolean',
 545+ Parameter::TYPE_CHAR => 'int',
 546+ Parameter::TYPE_FLOAT => 'int',
 547+ Parameter::TYPE_INTEGER => 'int',
 548+ Parameter::TYPE_NUMBER => 'int',
 549+ );
 550+
 551+ return $typeMap[$type];
 552+ }
 553+
 554+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_MapPrinter.php
___________________________________________________________________
Added: svn:eol-style
1555 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_QueryHandler.php
@@ -0,0 +1,285 @@
 2+<?php
 3+
 4+/**
 5+ * Class for handling geographical SMW queries.
 6+ *
 7+ * @since 0.7.3
 8+ *
 9+ * @ingroup SemanticMaps
 10+ * @file SM_QueryHandler.php
 11+ *
 12+ * @author Jeroen De Dauw
 13+ */
 14+class SMQueryHandler {
 15+
 16+ const LINK_NONE = 0;
 17+ const LINK_RELATIVE = 1;
 18+ const LINK_ABSOLUTE = 2;
 19+
 20+ protected $queryResult;
 21+ protected $outputmode;
 22+
 23+ protected $locations = false;
 24+
 25+ /**
 26+ * @since 0.7.4
 27+ *
 28+ * @var array
 29+ */
 30+ protected $params;
 31+
 32+ // TODO: add system to properly handle query parameters
 33+ public $template = false;
 34+ public $icon = '';
 35+
 36+ public $titleLink = self::LINK_ABSOLUTE;
 37+ public $propNameLink = self::LINK_NONE;
 38+ public $propValueLink = self::LINK_NONE;
 39+
 40+ public $titleLinkSeperate = true;
 41+
 42+ /**
 43+ * Constructor.
 44+ *
 45+ * @since 0.7.3
 46+ *
 47+ * @param SMWQueryResult $queryResult
 48+ * @param integer $outputmode
 49+ */
 50+ public function __construct( SMWQueryResult $queryResult, $outputmode, array $params ) {
 51+ $this->queryResult = $queryResult;
 52+ $this->outputmode = $outputmode;
 53+ $this->params = $params;
 54+
 55+ $linkType = $params['linkabsolute'] ? self::LINK_ABSOLUTE : self::LINK_RELATIVE;
 56+
 57+ $this->titleLink = $params['linkpage'] ? $linkType : self::LINK_NONE;
 58+ $this->propNameLink = $params['linkpropnames'] ? $linkType : self::LINK_NONE;
 59+ $this->propValueLink = $params['linkpropvalues'] ? $linkType : self::LINK_NONE;
 60+ }
 61+
 62+ /**
 63+ * Gets the query result as a list of locations.
 64+ *
 65+ * @since 0.7.3
 66+ *
 67+ * @return array of MapsLocation
 68+ */
 69+ public function getLocations() {
 70+ if ( $this->locations === false ) {
 71+ $this->locations = $this->findLocations();
 72+ }
 73+
 74+ return $this->locations;
 75+ }
 76+
 77+ /**
 78+ * Gets the query result as a list of locations.
 79+ *
 80+ * @since 0.7.3
 81+ *
 82+ * @return array of MapsLocation
 83+ */
 84+ protected function findLocations() {
 85+ $locations = array();
 86+
 87+ while ( ( $row = $this->queryResult->getNext() ) !== false ) {
 88+ $locations = array_merge( $locations, $this->handleResultRow( $row ) );
 89+ }
 90+
 91+ return $locations;
 92+ }
 93+
 94+ /**
 95+ * Returns the locations found in the provided result row.
 96+ *
 97+ * TODO: split up this method if possible (!)
 98+ * TODO: fix template handling
 99+ * TODO: clean up link type handling
 100+ *
 101+ * @since 0.7.3
 102+ *
 103+ * @param array $row Array of SMWResultArray
 104+ *
 105+ * @return array of MapsLocation
 106+ */
 107+ protected function handleResultRow( array /* of SMWResultArray */ $row ) {
 108+ global $wgUser, $smgUseSpatialExtensions, $wgTitle;
 109+
 110+ $locations = array();
 111+
 112+ $skin = $wgUser->getSkin();
 113+
 114+ $title = '';
 115+ $text = '';
 116+ $lat = '';
 117+ $lon = '';
 118+
 119+ $coords = array();
 120+ $label = array();
 121+
 122+ // Loop throught all fields of the record.
 123+ foreach ( $row as $i => $resultArray ) {
 124+ /* SMWPrintRequest */ $printRequest = $resultArray->getPrintRequest();
 125+
 126+ // Loop throught all the parts of the field value.
 127+ while ( ( /* SMWDataValue */ $object = $resultArray->getNextObject() ) !== false ) {
 128+ if ( $object->getTypeID() == '_wpg' && $i == 0 ) {
 129+ if ( !$this->titleLinkSeperate && $this->titleLink == self::LINK_ABSOLUTE ) {
 130+ $title = Html::element(
 131+ 'a',
 132+ array( 'href' => $object->getTitle()->getFullUrl() ),
 133+ $object->getTitle()->getText()
 134+ );
 135+ }
 136+ else {
 137+ $title = $object->getLongText(
 138+ $this->outputmode,
 139+ ( $this->titleLink == self::LINK_RELATIVE && !$this->titleLinkSeperate ) ? $skin : NULL
 140+ );
 141+ }
 142+
 143+ if ( $this->titleLinkSeperate && $this->titleLink != self::LINK_NONE ) {
 144+ $text .= Html::element(
 145+ 'a',
 146+ array( 'href' => $object->getTitle()->getFullUrl() ),
 147+ str_replace( '$1', $object->getTitle()->getText(), $this->params['pagelinktext'] )
 148+ ) . '<br />';
 149+ }
 150+ }
 151+
 152+ if ( $object->getTypeID() != '_geo' && $i != 0 ) {
 153+ switch ( $this->propNameLink ) {
 154+ case self::LINK_NONE:
 155+ $propertyName = $printRequest->getHTMLText( NULL );
 156+ break;
 157+ case self::LINK_RELATIVE:
 158+ $propertyName = $printRequest->getHTMLText( $skin );
 159+ break;
 160+ case self::LINK_ABSOLUTE:
 161+ $t = Title::newFromText( $printRequest->getHTMLText( NULL ), SMW_NS_PROPERTY );
 162+
 163+ if ( $t->exists() ) {
 164+
 165+ $propertyName = $propertyName = Html::element(
 166+ 'a',
 167+ array( 'href' => $t->getFullUrl() ),
 168+ $printRequest->getHTMLText( NULL )
 169+ );
 170+ }
 171+ else {
 172+ $propertyName = $printRequest->getHTMLText( NULL );
 173+ }
 174+ break;
 175+ }
 176+
 177+ if ( $propertyName != '' ) $propertyName .= ': ';
 178+
 179+ switch ( $this->propNameLink ) {
 180+ case self::LINK_NONE:
 181+ $propertyValue = $object->getLongText( $this->outputmode, NULL );
 182+ break;
 183+ case self::LINK_RELATIVE:
 184+ $propertyValue = $object->getLongText( $this->outputmode, $skin );
 185+ break;
 186+ case self::LINK_ABSOLUTE:
 187+ $hasPage = $object->getTypeID() == '_wpg';
 188+
 189+ if ( $hasPage ) {
 190+ $t = Title::newFromText( $object->getLongText( $this->outputmode, NULL ), NS_MAIN );
 191+ $hasPage = $t->exists();
 192+ }
 193+
 194+ if ( $hasPage ) {
 195+ $propertyValue = Html::element(
 196+ 'a',
 197+ array( 'href' => $t->getFullUrl() ),
 198+ $object->getLongText( $this->outputmode, NULL )
 199+ );
 200+ }
 201+ else {
 202+ $propertyValue = $object->getLongText( $this->outputmode, NULL );
 203+ }
 204+ break;
 205+ }
 206+
 207+ $text .= $propertyName . $propertyValue . '<br />';
 208+ }
 209+
 210+ if ( $printRequest->getMode() == SMWPrintRequest::PRINT_PROP && $printRequest->getTypeID() == '_geo' ) {
 211+ $coords[] = $object->getDBkeys();
 212+ }
 213+ }
 214+ }
 215+
 216+ foreach ( $coords as $coord ) {
 217+ if ( count( $coord ) >= 2 ) {
 218+ if ( $smgUseSpatialExtensions ) {
 219+ // TODO
 220+ }
 221+ else {
 222+ list( $lat, $lon ) = $coord;
 223+ }
 224+
 225+ if ( $lat != '' && $lon != '' ) {
 226+ $icon = $this->getLocationIcon( $row );
 227+
 228+ $location = new MapsLocation();
 229+
 230+ $location->setCoordinates( array( $lat, $lon ) );
 231+
 232+ if ( $location->isValid() ) {
 233+ $location->setTitle( $title );
 234+ $location->setText( $text );
 235+ $location->setIcon( $icon );
 236+
 237+ $locations[] = $location;
 238+ }
 239+ }
 240+ }
 241+ }
 242+
 243+ return $locations;
 244+ }
 245+
 246+ /**
 247+ * Get the icon for a row.
 248+ *
 249+ * @since 0.7.3
 250+ *
 251+ * @param array $row
 252+ *
 253+ * @return string
 254+ */
 255+ protected function getLocationIcon( array $row ) {
 256+ $icon = '';
 257+ $legend_labels = array();
 258+
 259+ // Look for display_options field, which can be set by Semantic Compound Queries
 260+ // the location of this field changed in SMW 1.5
 261+ $display_location = method_exists( $row[0], 'getResultSubject' ) ? $row[0]->getResultSubject() : $row[0];
 262+
 263+ if ( property_exists( $display_location, 'display_options' ) && is_array( $display_location->display_options ) ) {
 264+ $display_options = $display_location->display_options;
 265+ if ( array_key_exists( 'icon', $display_options ) ) {
 266+ $icon = $display_options['icon'];
 267+
 268+ // 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
 269+ if ( array_key_exists( 'legend label', $display_options ) ) {
 270+
 271+ $legend_label = $display_options['legend label'];
 272+
 273+ if ( ! array_key_exists( $icon, $legend_labels ) ) {
 274+ $legend_labels[$icon] = $legend_label;
 275+ }
 276+ }
 277+ }
 278+ } // Icon can be set even for regular, non-compound queries If it is, though, we have to translate the name into a URL here
 279+ elseif ( $this->icon != '' ) {
 280+ $icon = MapsMapper::getImageUrl( $this->icon );
 281+ }
 282+
 283+ return $icon;
 284+ }
 285+
 286+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_QueryHandler.php
___________________________________________________________________
Added: svn:eol-style
1287 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_Mapper.php
@@ -0,0 +1,71 @@
 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+final class SMMapper {
 13+
 14+ /**
 15+ * @var SMMapPrinter
 16+ */
 17+ protected $queryPrinter;
 18+
 19+ /**
 20+ * Constructor.
 21+ *
 22+ * @param $format String
 23+ * @param $inline
 24+ */
 25+ public function __construct( $format, $inline ) {
 26+ global $egMapsDefaultServices;
 27+
 28+ // TODO: allow service parameter to override the default
 29+ // Note: if this is allowed, then the getParameters should only return the base parameters.
 30+ if ( $format == 'map' ) $format = $egMapsDefaultServices['qp'];
 31+
 32+ // Get the instance of the service class.
 33+ $service = MapsMappingServices::getValidServiceInstance( $format, 'qp' );
 34+
 35+ // Get an instance of the class handling the current query printer and service.
 36+ $QPClass = $service->getFeature( 'qp' );
 37+ $this->queryPrinter = new $QPClass( $format, $inline, $service );
 38+ }
 39+
 40+ public static function getAliases() {
 41+ return $this->queryPrinter->getAliases();
 42+ }
 43+
 44+ public static function setAliases() {
 45+ return $this->queryPrinter->setAliases();
 46+ }
 47+
 48+ public function getName() {
 49+ return wfMsg( 'maps_map' );
 50+ }
 51+
 52+ public function getQueryMode( $context ) {
 53+ return $this->queryPrinter->getQueryMode( $context );
 54+ }
 55+
 56+ public function getResult( $results, $params, $outputmode ) {
 57+ return $this->queryPrinter->getResult( $results, $params, $outputmode );
 58+ }
 59+
 60+ protected function getResultText( $res, $outputmode ) {
 61+ return $this->queryPrinter->getResultText( $res, $outputmode );
 62+ }
 63+
 64+ public function getParameters() {
 65+ return $this->queryPrinter->getParameters();
 66+ }
 67+
 68+ public function getMimeType( $res ) {
 69+ return $this->queryPrinter->getMimeType( $res );
 70+ }
 71+
 72+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_Mapper.php
___________________________________________________________________
Added: svn:eol-style
173 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_KMLPrinter.php
@@ -0,0 +1,149 @@
 2+<?php
 3+
 4+/**
 5+ * SMWResultPrinter class for printing a query result as KML.
 6+ *
 7+ * @since 0.7.3
 8+ *
 9+ * @file SM_KMLPrinter.php
 10+ * @ingroup SemanticMaps
 11+ *
 12+ * @author Jeroen De Dauw
 13+ */
 14+class SMKMLPrinter extends SMWResultPrinter {
 15+
 16+ /**
 17+ * Handler of the print request.
 18+ *
 19+ * @since 0.7.3
 20+ *
 21+ * @param SMWQueryResult $res
 22+ * @param $outputmode
 23+ *
 24+ * @return array
 25+ */
 26+ public function getResultText( /* SMWQueryResult */ $res, $outputmode ) {
 27+ $validator = new Validator( $this->getName(), false );
 28+
 29+ $validator->setParameters( $this->m_params, $this->getParameterInfo() );
 30+
 31+ $validator->validateParameters();
 32+
 33+ $fatalError = $validator->hasFatalError();
 34+
 35+ if ( $fatalError !== false ) {
 36+ return '<span class="errorbox">' .
 37+ htmlspecialchars( wfMsgExt( 'validator-fatal-error', 'parsemag', $fatalError->getMessage() ) ) .
 38+ '</span>';
 39+ }
 40+
 41+ $params = $validator->getParameterValues();
 42+
 43+ if ( $outputmode == SMW_OUTPUT_FILE ) {
 44+ return $this->getKML( $res, $outputmode, $params );
 45+ }
 46+ else {
 47+ return $this->getLink( $res, $outputmode, $params );
 48+ }
 49+ }
 50+
 51+ /**
 52+ * Returns a list of parameter definitions.
 53+ *
 54+ * @since 0.7.4
 55+ *
 56+ * @return array
 57+ */
 58+ protected function getParameterInfo() {
 59+ $params = array();
 60+
 61+ $params[] = new Parameter( 'linkpage', Parameter::TYPE_BOOLEAN, true );
 62+
 63+ $params[] = new Parameter( 'linkpropnames', Parameter::TYPE_BOOLEAN, false );
 64+ $params[] = new Parameter( 'linkpropvalues', Parameter::TYPE_BOOLEAN, false );
 65+
 66+ $params[] = new Parameter( 'linkabsolute', Parameter::TYPE_BOOLEAN, true );
 67+
 68+ $params['pagelinktext'] = new Parameter( 'pagelinktext', Parameter::TYPE_STRING, wfMsg( 'semanticmaps-default-kml-pagelink' ) );
 69+
 70+ return $params;
 71+ }
 72+
 73+ /**
 74+ * Returns the KML for the query result.
 75+ *
 76+ * @since 0.7.3
 77+ *
 78+ * @param SMWQueryResult $res
 79+ * @param integer $outputmode
 80+ * @param array $params
 81+ *
 82+ * @return string
 83+ */
 84+ protected function getKML( SMWQueryResult $res, $outputmode, array $params ) {
 85+ $queryHandler = new SMQueryHandler( $res, $outputmode, $params );
 86+ $locations = $queryHandler->getLocations();
 87+
 88+ $formatter = new MapsKMLFormatter( $params );
 89+ $formatter->addPlacemarks( $locations );
 90+
 91+ return $formatter->getKML();
 92+ }
 93+
 94+ /**
 95+ * Returns a link (HTML) pointing to a query that returns the actual KML file.
 96+ *
 97+ * @since 0.7.3
 98+ *
 99+ * @param SMWQueryResult $res
 100+ * @param integer $outputmode
 101+ * @param array $params
 102+ *
 103+ * @return string
 104+ */
 105+ protected function getLink( SMWQueryResult $res, $outputmode, array $params ) {
 106+ $searchLabel = $this->getSearchLabel( $outputmode );
 107+ $link = $res->getQueryLink( $searchLabel ? $searchLabel : wfMsgForContent( 'semanticmaps-kml-link' ) );
 108+ $link->setParameter( 'kml', 'format' );
 109+
 110+ $link->setParameter( $params['linkpage'] ? 'yes' : 'no', 'linkpage' );
 111+ $link->setParameter( $params['linkpropnames'] ? 'yes' : 'no', 'linkpropnames' );
 112+ $link->setParameter( $params['linkpropvalues'] ? 'yes' : 'no', 'linkpropvalues' );
 113+ $link->setParameter( $params['linkabsolute'] ? 'yes' : 'no', 'linkabsolute' );
 114+
 115+ $link->setParameter( $params['pagelinktext'], 'pagelinktext' );
 116+
 117+ if ( array_key_exists( 'limit', $this->m_params ) ) {
 118+ $link->setParameter( $this->m_params['limit'], 'limit' );
 119+ } else { // Use a reasonable default limit.
 120+ $link->setParameter( 20, 'limit' );
 121+ }
 122+
 123+ $this->isHTML = ( $outputmode == SMW_OUTPUT_HTML );
 124+
 125+ return $link->getText( $outputmode, $this->mLinker );
 126+ }
 127+
 128+ /**
 129+ * @see SMWResultPrinter::getMimeType()
 130+ */
 131+ public function getMimeType( $res ) {
 132+ return 'application/vnd.google-earth.kml+xml';
 133+ }
 134+
 135+ /**
 136+ * @see SMWResultPrinter::getFileName()
 137+ */
 138+ public function getFileName( $res ) {
 139+ // TODO
 140+ return 'kml.kml';
 141+ }
 142+
 143+ /**
 144+ * @see SMWResultPrinter::getName()
 145+ */
 146+ public final function getName() {
 147+ return wfMsg( 'semanticmaps-kml' );
 148+ }
 149+
 150+}
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/queryprinters/SM_KMLPrinter.php
___________________________________________________________________
Added: svn:eol-style
1151 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/includes/SM_AreaValueDescription.php
@@ -0,0 +1,197 @@
 2+<?php
 3+
 4+/**
 5+ * Description of a geographical area defined by a coordinates set and a distance to the bounds.
 6+ * The bounds are a 'rectangle' (but bend due to the earhs curvature), as the resulting query
 7+ * would otherwise be to resource intensive.
 8+ *
 9+ * @since 0.6
 10+ *
 11+ * @file SM_AreaValueDescription.php
 12+ * @ingroup SemanticMaps
 13+ *
 14+ * @author Jeroen De Dauw
 15+ *
 16+ * TODO: would be awesome to use Spatial Extensions to select coordinates
 17+ */
 18+class SMAreaValueDescription extends SMWValueDescription {
 19+
 20+ /**
 21+ * Associative array containing the bounds of the area, or false when not set.
 22+ *
 23+ * @since 0.6
 24+ *
 25+ * @var mixed
 26+ */
 27+ protected $bounds = false;
 28+
 29+ /**
 30+ * Constructor.
 31+ *
 32+ * @since 0.6
 33+ *
 34+ * @param SMGeoCoordsValue $dataValue
 35+ * @param string $comparator
 36+ * @param string $radius
 37+ */
 38+ public function __construct( SMGeoCoordsValue $dataValue, $comparator, $radius ) {
 39+ parent::__construct( $dataValue, $comparator );
 40+
 41+ // Only if the MapsGeoFunctions class is loaded, we can create the bounding box.
 42+ if ( self::geoFunctionsAreAvailable() ) {
 43+ $this->calculateBounds( $dataValue, $radius );
 44+ }
 45+ }
 46+
 47+ /**
 48+ * Sets the mBounds fields to an array returned by SMAreaValueDescription::getBoundingBox.
 49+ *
 50+ * @since 0.6
 51+ *
 52+ * @param SMGeoCoordsValue $dataValue
 53+ * @param string $radius
 54+ */
 55+ protected function calculateBounds( SMGeoCoordsValue $dataValue, $radius ) {
 56+ $this->bounds = self::getBoundingBox(
 57+ $dataValue->getCoordinateSet(),
 58+ MapsDistanceParser::parseDistance( $radius )
 59+ );
 60+ }
 61+
 62+ /**
 63+ * @see SMWDescription:getQueryString
 64+ *
 65+ * @since 0.6
 66+ *
 67+ * @param Boolean $asvalue
 68+ */
 69+ public function getQueryString( $asValue = false ) {
 70+ if ( $this->m_datavalue !== null ) {
 71+ $queryString = $this->m_datavalue->getWikiValue();
 72+ return $asValue ? $queryString : "[[$queryString]]";
 73+ } else {
 74+ return $asValue ? '+' : '';
 75+ }
 76+ }
 77+
 78+ /**
 79+ * @see SMWDescription:prune
 80+ *
 81+ * @since 0.6
 82+ */
 83+ public function prune( &$maxsize, &$maxdepth, &$log ) {
 84+ if ( ( $maxsize < $this->getSize() ) || ( $maxdepth < $this->getDepth() ) ) {
 85+ $log[] = $this->getQueryString();
 86+
 87+ $result = new SMWThingDescription();
 88+ $result->setPrintRequests( $this->getPrintRequests() );
 89+
 90+ return $result;
 91+ } else {
 92+ $maxsize = $maxsize - $this->getSize();
 93+ $maxdepth = $maxdepth - $this->getDepth();
 94+ return $this;
 95+ }
 96+ }
 97+
 98+ /**
 99+ * Returns the bounds of the area.
 100+ *
 101+ * @since 0.6
 102+ *
 103+ * @return array
 104+ */
 105+ public function getBounds() {
 106+ return $this->bounds;
 107+ }
 108+
 109+ /**
 110+ * @see SMWDescription::getSQLCondition
 111+ *
 112+ * @since 0.6
 113+ *
 114+ * @param string $tableName
 115+ * @param array $fieldNames
 116+ * @param DatabaseBase or Database $dbs
 117+ *
 118+ * @return string or false
 119+ */
 120+ public function getSQLCondition( $tableName, array $fieldNames, $dbs ) {
 121+ global $smgUseSpatialExtensions;
 122+
 123+ $dataValue = $this->getDatavalue();
 124+
 125+ // Only execute the query when the description's type is geographical coordinates,
 126+ // the description is valid, and the near comparator is used.
 127+ if ( $dataValue->getTypeID() != '_geo'
 128+ || !$dataValue->isValid()
 129+ || ( $this->getComparator() != SMW_CMP_EQ && $this->getComparator() != SMW_CMP_NEQ )
 130+ ) {
 131+ return false;
 132+ }
 133+
 134+ $north = $dbs->addQuotes( $this->bounds['north'] );
 135+ $east = $dbs->addQuotes( $this->bounds['east'] );
 136+ $south = $dbs->addQuotes( $this->bounds['south'] );
 137+ $west = $dbs->addQuotes( $this->bounds['west'] );
 138+
 139+ $isEq = $this->getComparator() == SMW_CMP_EQ;
 140+
 141+ if ( $smgUseSpatialExtensions ) {
 142+ // TODO
 143+ $sql = '';
 144+ }
 145+ else {
 146+ $conditions = array();
 147+
 148+ $smallerThen = $isEq ? '<' : '>=';
 149+ $biggerThen = $isEq ? '>' : '<=';
 150+ $joinCond = $isEq ? '&&' : '||';
 151+
 152+ $conditions[] = "{$tableName}.$fieldNames[0] $smallerThen $north";
 153+ $conditions[] = "{$tableName}.$fieldNames[0] $biggerThen $south";
 154+ $conditions[] = "{$tableName}.$fieldNames[1] $smallerThen $east";
 155+ $conditions[] = "{$tableName}.$fieldNames[1] $biggerThen $west";
 156+
 157+ $sql = implode( " $joinCond ", $conditions );
 158+ }
 159+
 160+ return $sql;
 161+ }
 162+
 163+ /**
 164+ * Returns the lat and lon limits of a bounding box around a circle defined by the provided parameters.
 165+ *
 166+ * @since 0.6
 167+ *
 168+ * @param array $centerCoordinates Array containing non-directional float coordinates with lat and lon keys.
 169+ * @param float $circleRadius The radidus of the circle to create a bounding box for, in m.
 170+ *
 171+ * @return An associative array containing the limits with keys north, east, south and west.
 172+ */
 173+ protected static function getBoundingBox( array $centerCoordinates, $circleRadius ) {
 174+ $north = MapsGeoFunctions::findDestination( $centerCoordinates, 0, $circleRadius );
 175+ $east = MapsGeoFunctions::findDestination( $centerCoordinates, 90, $circleRadius );
 176+ $south = MapsGeoFunctions::findDestination( $centerCoordinates, 180, $circleRadius );
 177+ $west = MapsGeoFunctions::findDestination( $centerCoordinates, 270, $circleRadius );
 178+
 179+ return array(
 180+ 'north' => $north['lat'],
 181+ 'east' => $east['lon'],
 182+ 'south' => $south['lat'],
 183+ 'west' => $west['lon'],
 184+ );
 185+ }
 186+
 187+ /**
 188+ * Returns a boolean indicating if MapsGeoFunctions is available.
 189+ *
 190+ * @since 0.6
 191+ *
 192+ * @return boolean
 193+ */
 194+ protected static function geoFunctionsAreAvailable() {
 195+ return class_exists( 'MapsGeoFunctions' );
 196+ }
 197+
 198+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/includes/SM_AreaValueDescription.php
___________________________________________________________________
Added: svn:eol-style
1199 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/COPYING
@@ -0,0 +1,682 @@
 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 this software for convenience.
 8+----
 9+
 10+ GNU GENERAL PUBLIC LICENSE
 11+ Version 3, 29 June 2007
 12+
 13+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 14+ Everyone is permitted to copy and distribute verbatim copies
 15+ of this license document, but changing it is not allowed.
 16+
 17+ Preamble
 18+
 19+ The GNU General Public License is a free, copyleft license for
 20+software and other kinds of works.
 21+
 22+ The licenses for most software and other practical works are designed
 23+to take away your freedom to share and change the works. By contrast,
 24+the GNU General Public License is intended to guarantee your freedom to
 25+share and change all versions of a program--to make sure it remains free
 26+software for all its users. We, the Free Software Foundation, use the
 27+GNU General Public License for most of our software; it applies also to
 28+any other work released this way by its authors. You can apply it to
 29+your programs, too.
 30+
 31+ When we speak of free software, we are referring to freedom, not
 32+price. Our General Public Licenses are designed to make sure that you
 33+have the freedom to distribute copies of free software (and charge for
 34+them if you wish), that you receive source code or can get it if you
 35+want it, that you can change the software or use pieces of it in new
 36+free programs, and that you know you can do these things.
 37+
 38+ To protect your rights, we need to prevent others from denying you
 39+these rights or asking you to surrender the rights. Therefore, you have
 40+certain responsibilities if you distribute copies of the software, or if
 41+you modify it: responsibilities to respect the freedom of others.
 42+
 43+ For example, if you distribute copies of such a program, whether
 44+gratis or for a fee, you must pass on to the recipients the same
 45+freedoms that you received. You must make sure that they, too, receive
 46+or can get the source code. And you must show them these terms so they
 47+know their rights.
 48+
 49+ Developers that use the GNU GPL protect your rights with two steps:
 50+(1) assert copyright on the software, and (2) offer you this License
 51+giving you legal permission to copy, distribute and/or modify it.
 52+
 53+ For the developers' and authors' protection, the GPL clearly explains
 54+that there is no warranty for this free software. For both users' and
 55+authors' sake, the GPL requires that modified versions be marked as
 56+changed, so that their problems will not be attributed erroneously to
 57+authors of previous versions.
 58+
 59+ Some devices are designed to deny users access to install or run
 60+modified versions of the software inside them, although the manufacturer
 61+can do so. This is fundamentally incompatible with the aim of
 62+protecting users' freedom to change the software. The systematic
 63+pattern of such abuse occurs in the area of products for individuals to
 64+use, which is precisely where it is most unacceptable. Therefore, we
 65+have designed this version of the GPL to prohibit the practice for those
 66+products. If such problems arise substantially in other domains, we
 67+stand ready to extend this provision to those domains in future versions
 68+of the GPL, as needed to protect the freedom of users.
 69+
 70+ Finally, every program is threatened constantly by software patents.
 71+States should not allow patents to restrict development and use of
 72+software on general-purpose computers, but in those that do, we wish to
 73+avoid the special danger that patents applied to a free program could
 74+make it effectively proprietary. To prevent this, the GPL assures that
 75+patents cannot be used to render the program non-free.
 76+
 77+ The precise terms and conditions for copying, distribution and
 78+modification follow.
 79+
 80+ TERMS AND CONDITIONS
 81+
 82+ 0. Definitions.
 83+
 84+ "This License" refers to version 3 of the GNU General Public License.
 85+
 86+ "Copyright" also means copyright-like laws that apply to other kinds of
 87+works, such as semiconductor masks.
 88+
 89+ "The Program" refers to any copyrightable work licensed under this
 90+License. Each licensee is addressed as "you". "Licensees" and
 91+"recipients" may be individuals or organizations.
 92+
 93+ To "modify" a work means to copy from or adapt all or part of the work
 94+in a fashion requiring copyright permission, other than the making of an
 95+exact copy. The resulting work is called a "modified version" of the
 96+earlier work or a work "based on" the earlier work.
 97+
 98+ A "covered work" means either the unmodified Program or a work based
 99+on the Program.
 100+
 101+ To "propagate" a work means to do anything with it that, without
 102+permission, would make you directly or secondarily liable for
 103+infringement under applicable copyright law, except executing it on a
 104+computer or modifying a private copy. Propagation includes copying,
 105+distribution (with or without modification), making available to the
 106+public, and in some countries other activities as well.
 107+
 108+ To "convey" a work means any kind of propagation that enables other
 109+parties to make or receive copies. Mere interaction with a user through
 110+a computer network, with no transfer of a copy, is not conveying.
 111+
 112+ An interactive user interface displays "Appropriate Legal Notices"
 113+to the extent that it includes a convenient and prominently visible
 114+feature that (1) displays an appropriate copyright notice, and (2)
 115+tells the user that there is no warranty for the work (except to the
 116+extent that warranties are provided), that licensees may convey the
 117+work under this License, and how to view a copy of this License. If
 118+the interface presents a list of user commands or options, such as a
 119+menu, a prominent item in the list meets this criterion.
 120+
 121+ 1. Source Code.
 122+
 123+ The "source code" for a work means the preferred form of the work
 124+for making modifications to it. "Object code" means any non-source
 125+form of a work.
 126+
 127+ A "Standard Interface" means an interface that either is an official
 128+standard defined by a recognized standards body, or, in the case of
 129+interfaces specified for a particular programming language, one that
 130+is widely used among developers working in that language.
 131+
 132+ The "System Libraries" of an executable work include anything, other
 133+than the work as a whole, that (a) is included in the normal form of
 134+packaging a Major Component, but which is not part of that Major
 135+Component, and (b) serves only to enable use of the work with that
 136+Major Component, or to implement a Standard Interface for which an
 137+implementation is available to the public in source code form. A
 138+"Major Component", in this context, means a major essential component
 139+(kernel, window system, and so on) of the specific operating system
 140+(if any) on which the executable work runs, or a compiler used to
 141+produce the work, or an object code interpreter used to run it.
 142+
 143+ The "Corresponding Source" for a work in object code form means all
 144+the source code needed to generate, install, and (for an executable
 145+work) run the object code and to modify the work, including scripts to
 146+control those activities. However, it does not include the work's
 147+System Libraries, or general-purpose tools or generally available free
 148+programs which are used unmodified in performing those activities but
 149+which are not part of the work. For example, Corresponding Source
 150+includes interface definition files associated with source files for
 151+the work, and the source code for shared libraries and dynamically
 152+linked subprograms that the work is specifically designed to require,
 153+such as by intimate data communication or control flow between those
 154+subprograms and other parts of the work.
 155+
 156+ The Corresponding Source need not include anything that users
 157+can regenerate automatically from other parts of the Corresponding
 158+Source.
 159+
 160+ The Corresponding Source for a work in source code form is that
 161+same work.
 162+
 163+ 2. Basic Permissions.
 164+
 165+ All rights granted under this License are granted for the term of
 166+copyright on the Program, and are irrevocable provided the stated
 167+conditions are met. This License explicitly affirms your unlimited
 168+permission to run the unmodified Program. The output from running a
 169+covered work is covered by this License only if the output, given its
 170+content, constitutes a covered work. This License acknowledges your
 171+rights of fair use or other equivalent, as provided by copyright law.
 172+
 173+ You may make, run and propagate covered works that you do not
 174+convey, without conditions so long as your license otherwise remains
 175+in force. You may convey covered works to others for the sole purpose
 176+of having them make modifications exclusively for you, or provide you
 177+with facilities for running those works, provided that you comply with
 178+the terms of this License in conveying all material for which you do
 179+not control copyright. Those thus making or running the covered works
 180+for you must do so exclusively on your behalf, under your direction
 181+and control, on terms that prohibit them from making any copies of
 182+your copyrighted material outside their relationship with you.
 183+
 184+ Conveying under any other circumstances is permitted solely under
 185+the conditions stated below. Sublicensing is not allowed; section 10
 186+makes it unnecessary.
 187+
 188+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
 189+
 190+ No covered work shall be deemed part of an effective technological
 191+measure under any applicable law fulfilling obligations under article
 192+11 of the WIPO copyright treaty adopted on 20 December 1996, or
 193+similar laws prohibiting or restricting circumvention of such
 194+measures.
 195+
 196+ When you convey a covered work, you waive any legal power to forbid
 197+circumvention of technological measures to the extent such circumvention
 198+is effected by exercising rights under this License with respect to
 199+the covered work, and you disclaim any intention to limit operation or
 200+modification of the work as a means of enforcing, against the work's
 201+users, your or third parties' legal rights to forbid circumvention of
 202+technological measures.
 203+
 204+ 4. Conveying Verbatim Copies.
 205+
 206+ You may convey verbatim copies of the Program's source code as you
 207+receive it, in any medium, provided that you conspicuously and
 208+appropriately publish on each copy an appropriate copyright notice;
 209+keep intact all notices stating that this License and any
 210+non-permissive terms added in accord with section 7 apply to the code;
 211+keep intact all notices of the absence of any warranty; and give all
 212+recipients a copy of this License along with the Program.
 213+
 214+ You may charge any price or no price for each copy that you convey,
 215+and you may offer support or warranty protection for a fee.
 216+
 217+ 5. Conveying Modified Source Versions.
 218+
 219+ You may convey a work based on the Program, or the modifications to
 220+produce it from the Program, in the form of source code under the
 221+terms of section 4, provided that you also meet all of these conditions:
 222+
 223+ a) The work must carry prominent notices stating that you modified
 224+ it, and giving a relevant date.
 225+
 226+ b) The work must carry prominent notices stating that it is
 227+ released under this License and any conditions added under section
 228+ 7. This requirement modifies the requirement in section 4 to
 229+ "keep intact all notices".
 230+
 231+ c) You must license the entire work, as a whole, under this
 232+ License to anyone who comes into possession of a copy. This
 233+ License will therefore apply, along with any applicable section 7
 234+ additional terms, to the whole of the work, and all its parts,
 235+ regardless of how they are packaged. This License gives no
 236+ permission to license the work in any other way, but it does not
 237+ invalidate such permission if you have separately received it.
 238+
 239+ d) If the work has interactive user interfaces, each must display
 240+ Appropriate Legal Notices; however, if the Program has interactive
 241+ interfaces that do not display Appropriate Legal Notices, your
 242+ work need not make them do so.
 243+
 244+ A compilation of a covered work with other separate and independent
 245+works, which are not by their nature extensions of the covered work,
 246+and which are not combined with it such as to form a larger program,
 247+in or on a volume of a storage or distribution medium, is called an
 248+"aggregate" if the compilation and its resulting copyright are not
 249+used to limit the access or legal rights of the compilation's users
 250+beyond what the individual works permit. Inclusion of a covered work
 251+in an aggregate does not cause this License to apply to the other
 252+parts of the aggregate.
 253+
 254+ 6. Conveying Non-Source Forms.
 255+
 256+ You may convey a covered work in object code form under the terms
 257+of sections 4 and 5, provided that you also convey the
 258+machine-readable Corresponding Source under the terms of this License,
 259+in one of these ways:
 260+
 261+ a) Convey the object code in, or embodied in, a physical product
 262+ (including a physical distribution medium), accompanied by the
 263+ Corresponding Source fixed on a durable physical medium
 264+ customarily used for software interchange.
 265+
 266+ b) Convey the object code in, or embodied in, a physical product
 267+ (including a physical distribution medium), accompanied by a
 268+ written offer, valid for at least three years and valid for as
 269+ long as you offer spare parts or customer support for that product
 270+ model, to give anyone who possesses the object code either (1) a
 271+ copy of the Corresponding Source for all the software in the
 272+ product that is covered by this License, on a durable physical
 273+ medium customarily used for software interchange, for a price no
 274+ more than your reasonable cost of physically performing this
 275+ conveying of source, or (2) access to copy the
 276+ Corresponding Source from a network server at no charge.
 277+
 278+ c) Convey individual copies of the object code with a copy of the
 279+ written offer to provide the Corresponding Source. This
 280+ alternative is allowed only occasionally and noncommercially, and
 281+ only if you received the object code with such an offer, in accord
 282+ with subsection 6b.
 283+
 284+ d) Convey the object code by offering access from a designated
 285+ place (gratis or for a charge), and offer equivalent access to the
 286+ Corresponding Source in the same way through the same place at no
 287+ further charge. You need not require recipients to copy the
 288+ Corresponding Source along with the object code. If the place to
 289+ copy the object code is a network server, the Corresponding Source
 290+ may be on a different server (operated by you or a third party)
 291+ that supports equivalent copying facilities, provided you maintain
 292+ clear directions next to the object code saying where to find the
 293+ Corresponding Source. Regardless of what server hosts the
 294+ Corresponding Source, you remain obligated to ensure that it is
 295+ available for as long as needed to satisfy these requirements.
 296+
 297+ e) Convey the object code using peer-to-peer transmission, provided
 298+ you inform other peers where the object code and Corresponding
 299+ Source of the work are being offered to the general public at no
 300+ charge under subsection 6d.
 301+
 302+ A separable portion of the object code, whose source code is excluded
 303+from the Corresponding Source as a System Library, need not be
 304+included in conveying the object code work.
 305+
 306+ A "User Product" is either (1) a "consumer product", which means any
 307+tangible personal property which is normally used for personal, family,
 308+or household purposes, or (2) anything designed or sold for incorporation
 309+into a dwelling. In determining whether a product is a consumer product,
 310+doubtful cases shall be resolved in favor of coverage. For a particular
 311+product received by a particular user, "normally used" refers to a
 312+typical or common use of that class of product, regardless of the status
 313+of the particular user or of the way in which the particular user
 314+actually uses, or expects or is expected to use, the product. A product
 315+is a consumer product regardless of whether the product has substantial
 316+commercial, industrial or non-consumer uses, unless such uses represent
 317+the only significant mode of use of the product.
 318+
 319+ "Installation Information" for a User Product means any methods,
 320+procedures, authorization keys, or other information required to install
 321+and execute modified versions of a covered work in that User Product from
 322+a modified version of its Corresponding Source. The information must
 323+suffice to ensure that the continued functioning of the modified object
 324+code is in no case prevented or interfered with solely because
 325+modification has been made.
 326+
 327+ If you convey an object code work under this section in, or with, or
 328+specifically for use in, a User Product, and the conveying occurs as
 329+part of a transaction in which the right of possession and use of the
 330+User Product is transferred to the recipient in perpetuity or for a
 331+fixed term (regardless of how the transaction is characterized), the
 332+Corresponding Source conveyed under this section must be accompanied
 333+by the Installation Information. But this requirement does not apply
 334+if neither you nor any third party retains the ability to install
 335+modified object code on the User Product (for example, the work has
 336+been installed in ROM).
 337+
 338+ The requirement to provide Installation Information does not include a
 339+requirement to continue to provide support service, warranty, or updates
 340+for a work that has been modified or installed by the recipient, or for
 341+the User Product in which it has been modified or installed. Access to a
 342+network may be denied when the modification itself materially and
 343+adversely affects the operation of the network or violates the rules and
 344+protocols for communication across the network.
 345+
 346+ Corresponding Source conveyed, and Installation Information provided,
 347+in accord with this section must be in a format that is publicly
 348+documented (and with an implementation available to the public in
 349+source code form), and must require no special password or key for
 350+unpacking, reading or copying.
 351+
 352+ 7. Additional Terms.
 353+
 354+ "Additional permissions" are terms that supplement the terms of this
 355+License by making exceptions from one or more of its conditions.
 356+Additional permissions that are applicable to the entire Program shall
 357+be treated as though they were included in this License, to the extent
 358+that they are valid under applicable law. If additional permissions
 359+apply only to part of the Program, that part may be used separately
 360+under those permissions, but the entire Program remains governed by
 361+this License without regard to the additional permissions.
 362+
 363+ When you convey a copy of a covered work, you may at your option
 364+remove any additional permissions from that copy, or from any part of
 365+it. (Additional permissions may be written to require their own
 366+removal in certain cases when you modify the work.) You may place
 367+additional permissions on material, added by you to a covered work,
 368+for which you have or can give appropriate copyright permission.
 369+
 370+ Notwithstanding any other provision of this License, for material you
 371+add to a covered work, you may (if authorized by the copyright holders of
 372+that material) supplement the terms of this License with terms:
 373+
 374+ a) Disclaiming warranty or limiting liability differently from the
 375+ terms of sections 15 and 16 of this License; or
 376+
 377+ b) Requiring preservation of specified reasonable legal notices or
 378+ author attributions in that material or in the Appropriate Legal
 379+ Notices displayed by works containing it; or
 380+
 381+ c) Prohibiting misrepresentation of the origin of that material, or
 382+ requiring that modified versions of such material be marked in
 383+ reasonable ways as different from the original version; or
 384+
 385+ d) Limiting the use for publicity purposes of names of licensors or
 386+ authors of the material; or
 387+
 388+ e) Declining to grant rights under trademark law for use of some
 389+ trade names, trademarks, or service marks; or
 390+
 391+ f) Requiring indemnification of licensors and authors of that
 392+ material by anyone who conveys the material (or modified versions of
 393+ it) with contractual assumptions of liability to the recipient, for
 394+ any liability that these contractual assumptions directly impose on
 395+ those licensors and authors.
 396+
 397+ All other non-permissive additional terms are considered "further
 398+restrictions" within the meaning of section 10. If the Program as you
 399+received it, or any part of it, contains a notice stating that it is
 400+governed by this License along with a term that is a further
 401+restriction, you may remove that term. If a license document contains
 402+a further restriction but permits relicensing or conveying under this
 403+License, you may add to a covered work material governed by the terms
 404+of that license document, provided that the further restriction does
 405+not survive such relicensing or conveying.
 406+
 407+ If you add terms to a covered work in accord with this section, you
 408+must place, in the relevant source files, a statement of the
 409+additional terms that apply to those files, or a notice indicating
 410+where to find the applicable terms.
 411+
 412+ Additional terms, permissive or non-permissive, may be stated in the
 413+form of a separately written license, or stated as exceptions;
 414+the above requirements apply either way.
 415+
 416+ 8. Termination.
 417+
 418+ You may not propagate or modify a covered work except as expressly
 419+provided under this License. Any attempt otherwise to propagate or
 420+modify it is void, and will automatically terminate your rights under
 421+this License (including any patent licenses granted under the third
 422+paragraph of section 11).
 423+
 424+ However, if you cease all violation of this License, then your
 425+license from a particular copyright holder is reinstated (a)
 426+provisionally, unless and until the copyright holder explicitly and
 427+finally terminates your license, and (b) permanently, if the copyright
 428+holder fails to notify you of the violation by some reasonable means
 429+prior to 60 days after the cessation.
 430+
 431+ Moreover, your license from a particular copyright holder is
 432+reinstated permanently if the copyright holder notifies you of the
 433+violation by some reasonable means, this is the first time you have
 434+received notice of violation of this License (for any work) from that
 435+copyright holder, and you cure the violation prior to 30 days after
 436+your receipt of the notice.
 437+
 438+ Termination of your rights under this section does not terminate the
 439+licenses of parties who have received copies or rights from you under
 440+this License. If your rights have been terminated and not permanently
 441+reinstated, you do not qualify to receive new licenses for the same
 442+material under section 10.
 443+
 444+ 9. Acceptance Not Required for Having Copies.
 445+
 446+ You are not required to accept this License in order to receive or
 447+run a copy of the Program. Ancillary propagation of a covered work
 448+occurring solely as a consequence of using peer-to-peer transmission
 449+to receive a copy likewise does not require acceptance. However,
 450+nothing other than this License grants you permission to propagate or
 451+modify any covered work. These actions infringe copyright if you do
 452+not accept this License. Therefore, by modifying or propagating a
 453+covered work, you indicate your acceptance of this License to do so.
 454+
 455+ 10. Automatic Licensing of Downstream Recipients.
 456+
 457+ Each time you convey a covered work, the recipient automatically
 458+receives a license from the original licensors, to run, modify and
 459+propagate that work, subject to this License. You are not responsible
 460+for enforcing compliance by third parties with this License.
 461+
 462+ An "entity transaction" is a transaction transferring control of an
 463+organization, or substantially all assets of one, or subdividing an
 464+organization, or merging organizations. If propagation of a covered
 465+work results from an entity transaction, each party to that
 466+transaction who receives a copy of the work also receives whatever
 467+licenses to the work the party's predecessor in interest had or could
 468+give under the previous paragraph, plus a right to possession of the
 469+Corresponding Source of the work from the predecessor in interest, if
 470+the predecessor has it or can get it with reasonable efforts.
 471+
 472+ You may not impose any further restrictions on the exercise of the
 473+rights granted or affirmed under this License. For example, you may
 474+not impose a license fee, royalty, or other charge for exercise of
 475+rights granted under this License, and you may not initiate litigation
 476+(including a cross-claim or counterclaim in a lawsuit) alleging that
 477+any patent claim is infringed by making, using, selling, offering for
 478+sale, or importing the Program or any portion of it.
 479+
 480+ 11. Patents.
 481+
 482+ A "contributor" is a copyright holder who authorizes use under this
 483+License of the Program or a work on which the Program is based. The
 484+work thus licensed is called the contributor's "contributor version".
 485+
 486+ A contributor's "essential patent claims" are all patent claims
 487+owned or controlled by the contributor, whether already acquired or
 488+hereafter acquired, that would be infringed by some manner, permitted
 489+by this License, of making, using, or selling its contributor version,
 490+but do not include claims that would be infringed only as a
 491+consequence of further modification of the contributor version. For
 492+purposes of this definition, "control" includes the right to grant
 493+patent sublicenses in a manner consistent with the requirements of
 494+this License.
 495+
 496+ Each contributor grants you a non-exclusive, worldwide, royalty-free
 497+patent license under the contributor's essential patent claims, to
 498+make, use, sell, offer for sale, import and otherwise run, modify and
 499+propagate the contents of its contributor version.
 500+
 501+ In the following three paragraphs, a "patent license" is any express
 502+agreement or commitment, however denominated, not to enforce a patent
 503+(such as an express permission to practice a patent or covenant not to
 504+sue for patent infringement). To "grant" such a patent license to a
 505+party means to make such an agreement or commitment not to enforce a
 506+patent against the party.
 507+
 508+ If you convey a covered work, knowingly relying on a patent license,
 509+and the Corresponding Source of the work is not available for anyone
 510+to copy, free of charge and under the terms of this License, through a
 511+publicly available network server or other readily accessible means,
 512+then you must either (1) cause the Corresponding Source to be so
 513+available, or (2) arrange to deprive yourself of the benefit of the
 514+patent license for this particular work, or (3) arrange, in a manner
 515+consistent with the requirements of this License, to extend the patent
 516+license to downstream recipients. "Knowingly relying" means you have
 517+actual knowledge that, but for the patent license, your conveying the
 518+covered work in a country, or your recipient's use of the covered work
 519+in a country, would infringe one or more identifiable patents in that
 520+country that you have reason to believe are valid.
 521+
 522+ If, pursuant to or in connection with a single transaction or
 523+arrangement, you convey, or propagate by procuring conveyance of, a
 524+covered work, and grant a patent license to some of the parties
 525+receiving the covered work authorizing them to use, propagate, modify
 526+or convey a specific copy of the covered work, then the patent license
 527+you grant is automatically extended to all recipients of the covered
 528+work and works based on it.
 529+
 530+ A patent license is "discriminatory" if it does not include within
 531+the scope of its coverage, prohibits the exercise of, or is
 532+conditioned on the non-exercise of one or more of the rights that are
 533+specifically granted under this License. You may not convey a covered
 534+work if you are a party to an arrangement with a third party that is
 535+in the business of distributing software, under which you make payment
 536+to the third party based on the extent of your activity of conveying
 537+the work, and under which the third party grants, to any of the
 538+parties who would receive the covered work from you, a discriminatory
 539+patent license (a) in connection with copies of the covered work
 540+conveyed by you (or copies made from those copies), or (b) primarily
 541+for and in connection with specific products or compilations that
 542+contain the covered work, unless you entered into that arrangement,
 543+or that patent license was granted, prior to 28 March 2007.
 544+
 545+ Nothing in this License shall be construed as excluding or limiting
 546+any implied license or other defenses to infringement that may
 547+otherwise be available to you under applicable patent law.
 548+
 549+ 12. No Surrender of Others' Freedom.
 550+
 551+ If conditions are imposed on you (whether by court order, agreement or
 552+otherwise) that contradict the conditions of this License, they do not
 553+excuse you from the conditions of this License. If you cannot convey a
 554+covered work so as to satisfy simultaneously your obligations under this
 555+License and any other pertinent obligations, then as a consequence you may
 556+not convey it at all. For example, if you agree to terms that obligate you
 557+to collect a royalty for further conveying from those to whom you convey
 558+the Program, the only way you could satisfy both those terms and this
 559+License would be to refrain entirely from conveying the Program.
 560+
 561+ 13. Use with the GNU Affero General Public License.
 562+
 563+ Notwithstanding any other provision of this License, you have
 564+permission to link or combine any covered work with a work licensed
 565+under version 3 of the GNU Affero General Public License into a single
 566+combined work, and to convey the resulting work. The terms of this
 567+License will continue to apply to the part which is the covered work,
 568+but the special requirements of the GNU Affero General Public License,
 569+section 13, concerning interaction through a network will apply to the
 570+combination as such.
 571+
 572+ 14. Revised Versions of this License.
 573+
 574+ The Free Software Foundation may publish revised and/or new versions of
 575+the GNU General Public License from time to time. Such new versions will
 576+be similar in spirit to the present version, but may differ in detail to
 577+address new problems or concerns.
 578+
 579+ Each version is given a distinguishing version number. If the
 580+Program specifies that a certain numbered version of the GNU General
 581+Public License "or any later version" applies to it, you have the
 582+option of following the terms and conditions either of that numbered
 583+version or of any later version published by the Free Software
 584+Foundation. If the Program does not specify a version number of the
 585+GNU General Public License, you may choose any version ever published
 586+by the Free Software Foundation.
 587+
 588+ If the Program specifies that a proxy can decide which future
 589+versions of the GNU General Public License can be used, that proxy's
 590+public statement of acceptance of a version permanently authorizes you
 591+to choose that version for the Program.
 592+
 593+ Later license versions may give you additional or different
 594+permissions. However, no additional obligations are imposed on any
 595+author or copyright holder as a result of your choosing to follow a
 596+later version.
 597+
 598+ 15. Disclaimer of Warranty.
 599+
 600+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
 601+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
 602+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
 603+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
 604+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 605+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
 606+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
 607+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 608+
 609+ 16. Limitation of Liability.
 610+
 611+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
 612+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
 613+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
 614+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
 615+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
 616+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
 617+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
 618+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
 619+SUCH DAMAGES.
 620+
 621+ 17. Interpretation of Sections 15 and 16.
 622+
 623+ If the disclaimer of warranty and limitation of liability provided
 624+above cannot be given local legal effect according to their terms,
 625+reviewing courts shall apply local law that most closely approximates
 626+an absolute waiver of all civil liability in connection with the
 627+Program, unless a warranty or assumption of liability accompanies a
 628+copy of the Program in return for a fee.
 629+
 630+ END OF TERMS AND CONDITIONS
 631+
 632+ How to Apply These Terms to Your New Programs
 633+
 634+ If you develop a new program, and you want it to be of the greatest
 635+possible use to the public, the best way to achieve this is to make it
 636+free software which everyone can redistribute and change under these terms.
 637+
 638+ To do so, attach the following notices to the program. It is safest
 639+to attach them to the start of each source file to most effectively
 640+state the exclusion of warranty; and each file should have at least
 641+the "copyright" line and a pointer to where the full notice is found.
 642+
 643+ <one line to give the program's name and a brief idea of what it does.>
 644+ Copyright (C) <year> <name of author>
 645+
 646+ This program is free software: you can redistribute it and/or modify
 647+ it under the terms of the GNU General Public License as published by
 648+ the Free Software Foundation, either version 3 of the License, or
 649+ (at your option) any later version.
 650+
 651+ This program is distributed in the hope that it will be useful,
 652+ but WITHOUT ANY WARRANTY; without even the implied warranty of
 653+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 654+ GNU General Public License for more details.
 655+
 656+ You should have received a copy of the GNU General Public License
 657+ along with this program. If not, see <http://www.gnu.org/licenses/>.
 658+
 659+Also add information on how to contact you by electronic and paper mail.
 660+
 661+ If the program does terminal interaction, make it output a short
 662+notice like this when it starts in an interactive mode:
 663+
 664+ <program> Copyright (C) <year> <name of author>
 665+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
 666+ This is free software, and you are welcome to redistribute it
 667+ under certain conditions; type `show c' for details.
 668+
 669+The hypothetical commands `show w' and `show c' should show the appropriate
 670+parts of the General Public License. Of course, your program's commands
 671+might be different; for a GUI interface, you would use an "about box".
 672+
 673+ You should also get your employer (if you work as a programmer) or school,
 674+if any, to sign a "copyright disclaimer" for the program, if necessary.
 675+For more information on this, and how to apply and follow the GNU GPL, see
 676+<http://www.gnu.org/licenses/>.
 677+
 678+ The GNU General Public License does not permit incorporating your program
 679+into proprietary programs. If your program is a subroutine library, you
 680+may consider it more useful to permit linking proprietary applications with
 681+the library. If this is what you want to do, use the GNU Lesser General
 682+Public License instead of this License. But first, please read
 683+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/COPYING
___________________________________________________________________
Added: svn:eol-style
1684 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/SemanticMaps.i18n.php
@@ -0,0 +1,1125 @@
 2+<?php
 3+
 4+/**
 5+ * Internationalization file for the Semantic Maps extension
 6+ *
 7+ * @file SemanticMaps.i18n.php
 8+ * @ingroup Semantic Maps
 9+ *
 10+ * @author Jeroen De Dauw
 11+ */
 12+
 13+$messages = array();
 14+
 15+/** English
 16+ * @author Jeroen De Dauw
 17+ */
 18+$messages['en'] = array(
 19+ // General
 20+ 'semanticmaps-desc' => "Provides the ability to view and edit coordinate data stored with the Semantic MediaWiki extension ([http://mapping.referata.com/wiki/Examples demo's]).",
 21+ 'semanticmaps-unrecognizeddistance' => 'The value $1 is not a valid distance.',
 22+ 'semanticmaps-kml-link' => 'View the KML file',
 23+ 'semanticmaps-kml' => 'KML',
 24+ 'semanticmaps-default-kml-pagelink' => 'View page $1',
 25+
 26+ // Forms
 27+ 'semanticmaps_lookupcoordinates' => 'Look up coordinates',
 28+ 'semanticmaps_enteraddresshere' => 'Enter address here',
 29+ 'semanticmaps_notfound' => 'not found',
 30+
 31+ // Parameter descriptions
 32+ 'semanticmaps_paramdesc_format' => 'The mapping service used to generate the map',
 33+ 'semanticmaps_paramdesc_geoservice' => 'The geocoding service used to turn addresses into coordinates',
 34+ 'semanticmaps_paramdesc_height' => 'The height of the map, in pixels (default is $1)',
 35+ 'semanticmaps_paramdesc_width' => 'The width of the map, in pixels (default is $1)',
 36+ 'semanticmaps_paramdesc_zoom' => 'The zoom level of the map',
 37+ 'semanticmaps_paramdesc_centre' => 'The coordinates of the maps\' centre',
 38+ 'semanticmaps_paramdesc_controls' => 'The user controls placed on the map',
 39+ 'semanticmaps_paramdesc_types' => 'The map types available on the map',
 40+ 'semanticmaps_paramdesc_type' => 'The default map type for the map',
 41+ 'semanticmaps_paramdesc_overlays' => 'The overlays available on the map',
 42+ 'semanticmaps_paramdesc_autozoom' => 'If zoom in and out by using the mouse scroll wheel is enabled',
 43+ 'semanticmaps_paramdesc_layers' => 'The layers available on the map',
 44+);
 45+
 46+/** Message documentation (Message documentation)
 47+ * @author Fryed-peach
 48+ * @author Purodha
 49+ * @author Raymond
 50+ */
 51+$messages['qqq'] = array(
 52+ 'semanticmaps-desc' => '{{desc}}',
 53+ '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.',
 54+);
 55+
 56+/** Afrikaans (Afrikaans)
 57+ * @author Naudefj
 58+ */
 59+$messages['af'] = array(
 60+ 'semanticmaps-desc' => 'Bied die vermoë om koördinaatdata met behulp van die Semantiese MediaWiki-uitbreiding te sien en te wysig ([http://mapping.referata.com/wiki/Examples demo]).',
 61+ 'semanticmaps-unrecognizeddistance' => 'Die waarde "$1" is nie \'n geldige afstand nie.',
 62+ 'semanticmaps_lookupcoordinates' => 'Soek koördinate op',
 63+ 'semanticmaps_enteraddresshere' => 'Voer adres hier in',
 64+ 'semanticmaps_notfound' => 'nie gevind nie',
 65+ 'semanticmaps_paramdesc_format' => 'Die kaartdiens wat die kaart lewer',
 66+ 'semanticmaps_paramdesc_geoservice' => 'Die geokoderingsdiens gebruik om adresse na koördinate om te skakel',
 67+ 'semanticmaps_paramdesc_height' => 'Die hoogte van die kaart in spikkels (standaard is $1)',
 68+ 'semanticmaps_paramdesc_width' => 'Die breedte van die kaart in spikkels (standaard is $1)',
 69+ 'semanticmaps_paramdesc_zoom' => 'Die zoom-vlak van die kaart',
 70+ 'semanticmaps_paramdesc_centre' => 'Die koördinate van die middel van die kaart',
 71+ 'semanticmaps_paramdesc_controls' => 'Die gebruikerskontroles op die kaart geplaas',
 72+ 'semanticmaps_paramdesc_types' => 'Die kaarttipes beskikbaar op die kaart',
 73+ 'semanticmaps_paramdesc_type' => 'Die standaard kaarttipe vir die kaart',
 74+ 'semanticmaps_paramdesc_overlays' => 'Die oorleggings beskikbaar op die kaart',
 75+ 'semanticmaps_paramdesc_autozoom' => 'Of in- en uitzoom met die muis se wiel moontlik is',
 76+ 'semanticmaps_paramdesc_layers' => 'Die lae beskikbaar op die kaart',
 77+);
 78+
 79+/** Gheg Albanian (Gegë)
 80+ * @author Mdupont
 81+ */
 82+$messages['aln'] = array(
 83+ 'semanticmaps_paramdesc_zoom' => 'Shkalla e zmadhimit Harta',
 84+ 'semanticmaps_paramdesc_centre' => "Koordinatat e qendrës hartave '",
 85+ 'semanticmaps_paramdesc_controls' => 'Perdoruesi kontrolleve të vendosura në hartë',
 86+ 'semanticmaps_paramdesc_types' => 'Llojet Harta dispozicion në hartë',
 87+ 'semanticmaps_paramdesc_type' => 'Harta default lloji për hartën',
 88+ 'semanticmaps_paramdesc_overlays' => 'Overlays në dispozicion në hartë',
 89+ 'semanticmaps_paramdesc_autozoom' => 'Nëse zoom brenda dhe jashtë duke përdorur rrotëzën miut është i aktivizuar',
 90+ 'semanticmaps_paramdesc_layers' => 'Shtresat në dispozicion në hartë',
 91+);
 92+
 93+/** Arabic (العربية)
 94+ * @author Meno25
 95+ * @author OsamaK
 96+ */
 97+$messages['ar'] = array(
 98+ 'semanticmaps-desc' => 'يقدم إمكانية عرض وتعديل بيانات التنسيق التي خزنها امتداد سيمانتيك ميدياويكي ([http://mapping.referata.com/wiki/Examples تجربة]).',
 99+ 'semanticmaps-kml' => 'كيه إم إل',
 100+ 'semanticmaps_lookupcoordinates' => 'ابحث عن الإحداثيات',
 101+ 'semanticmaps_enteraddresshere' => 'أدخل العنوان هنا',
 102+ 'semanticmaps_notfound' => 'لم يوجد',
 103+ 'semanticmaps_paramdesc_format' => 'خدمة الخرائط المستخدمة لتوليد الخريطة',
 104+ 'semanticmaps_paramdesc_geoservice' => 'خدمة التكويد الجغرافي المستخدمة لتحويل العناوين إلى إحداثيات',
 105+ 'semanticmaps_paramdesc_height' => 'ارتفاع الخريطة، بالبكسل (افتراضيا $1)',
 106+ 'semanticmaps_paramdesc_width' => 'عرض الخريطة، بالبكسل (افتراضيا $1)',
 107+ 'semanticmaps_paramdesc_zoom' => 'مستوى التقريب للخريطة',
 108+ 'semanticmaps_paramdesc_centre' => 'إحداثيات وسط الخريطة',
 109+ 'semanticmaps_paramdesc_controls' => 'متحكمات المستخدم موضوعة على الخريطة',
 110+ 'semanticmaps_paramdesc_types' => 'أنواع الخرائط المتوفرة على الخريطة',
 111+ 'semanticmaps_paramdesc_type' => 'نوع الخريطة الافتراضي للخريطة',
 112+ 'semanticmaps_paramdesc_overlays' => 'الطبقات الفوقية متوفرة على الخريطة',
 113+ 'semanticmaps_paramdesc_autozoom' => 'لو أن التقريب والابتعاد بواسطة استخدام عجلة تدحرج الفأرة مفعلة',
 114+ 'semanticmaps_paramdesc_layers' => 'الطبقات المتوفرة على الخريطة',
 115+);
 116+
 117+/** Egyptian Spoken Arabic (مصرى)
 118+ * @author Ghaly
 119+ * @author Meno25
 120+ */
 121+$messages['arz'] = array(
 122+ 'semanticmaps_name' => 'خرائط دلالية',
 123+ 'semanticmaps_lookupcoordinates' => 'ابحث عن الإحداثيات',
 124+ 'semanticmaps_enteraddresshere' => 'أدخل العنوان هنا',
 125+);
 126+
 127+/** Belarusian (Taraškievica orthography) (‪Беларуская (тарашкевіца)‬)
 128+ * @author EugeneZelenko
 129+ * @author Jim-by
 130+ * @author Wizardist
 131+ */
 132+$messages['be-tarask'] = array(
 133+ 'semanticmaps-desc' => 'Забясьпечвае магчымасьць прагляду і рэдагаваньня зьвестак пра каардынаты, якія захоўваюцца з дапамогай пашырэньня Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples дэманстрацыя]).',
 134+ 'semanticmaps-unrecognizeddistance' => 'Значэньне $1 — няслушная адлегласьць.',
 135+ 'semanticmaps-kml-link' => 'Паказаць KML-файл',
 136+ 'semanticmaps-default-kml-pagelink' => 'Паказаць старонку $1',
 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 Fohanno
 156+ * @author Fulup
 157+ * @author Y-M D
 158+ */
 159+$messages['br'] = array(
 160+ 'semanticmaps-desc' => 'Talvezout a ra da welet ha da gemmañ roadennoù stoket dre an astenn Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demo]).',
 161+ 'semanticmaps-unrecognizeddistance' => "An talvoud $1 n'eo ket un hed reizh anezhañ.",
 162+ 'semanticmaps-kml-link' => 'Gwelet ar restr KML',
 163+ 'semanticmaps-default-kml-pagelink' => 'Gwelet ar pennad $1',
 164+ 'semanticmaps_lookupcoordinates' => 'Istimañ an daveennoù',
 165+ 'semanticmaps_enteraddresshere' => "Merkit ar chomlec'h amañ",
 166+ 'semanticmaps_notfound' => "N'eo ket bet kavet",
 167+ 'semanticmaps_paramdesc_format' => 'Ar servij kartennaouiñ implijet da grouiñ ar gartenn',
 168+ 'semanticmaps_paramdesc_geoservice' => "Ar servij geokodiñ implijet da dreiñ ar chomlec'hioù e daveennoù",
 169+ 'semanticmaps_paramdesc_height' => 'Uhelder ar gartenn, e pikseloù ($1 dre izouer)',
 170+ 'semanticmaps_paramdesc_width' => 'Ledander ar gartenn, e pikseloù ($1 dre izouer)',
 171+ 'semanticmaps_paramdesc_zoom' => 'Live zoum ar gartenn',
 172+ 'semanticmaps_paramdesc_centre' => 'Daveennoù kreiz ar gartenn',
 173+ 'semanticmaps_paramdesc_controls' => "Ar c'hontrolloù implijer lakaet war ar gartenn",
 174+ 'semanticmaps_paramdesc_types' => "Ar seurtoù kartennoù a c'haller kaout war ar gartenn",
 175+ 'semanticmaps_paramdesc_type' => 'Ar seurt kartenn dre ziouer evit ar gartenn',
 176+ 'semanticmaps_paramdesc_overlays' => "Ar gwiskadoù a c'haller da gaout war ar gartenn",
 177+ 'semanticmaps_paramdesc_autozoom' => 'Mard eo gweredekaet ar zoumañ hag an dizoumañ gant rodig al logodenn',
 178+ 'semanticmaps_paramdesc_layers' => 'Ar gwiskadoù zo da gaout war ar gartenn',
 179+);
 180+
 181+/** Bosnian (Bosanski)
 182+ * @author CERminator
 183+ * @author Palapa
 184+ */
 185+$messages['bs'] = array(
 186+ 'semanticmaps-desc' => 'Daje mogućnost pregleda i uređivanja podataka koordinata koji su spremljeni putem Semantic MediaWiki proširenja ([http://mapping.referata.com/wiki/Examples demo]).',
 187+ 'semanticmaps-unrecognizeddistance' => 'Vrijednost $1 nije ispravno odstojanje.',
 188+ 'semanticmaps-kml-link' => 'Pogledajte KML datoteku',
 189+ 'semanticmaps-default-kml-pagelink' => 'Pogledajte stranicu $1',
 190+ 'semanticmaps_lookupcoordinates' => 'Nađi koordinate',
 191+ 'semanticmaps_enteraddresshere' => 'Unesite adresu ovdje',
 192+ 'semanticmaps_notfound' => 'nije pronađeno',
 193+ 'semanticmaps_paramdesc_format' => 'Usluga kartiranja korištena za generiranje karte',
 194+ 'semanticmaps_paramdesc_geoservice' => 'Usluga geokodiranja korištena za pretvaranje adresa u koordinate',
 195+ 'semanticmaps_paramdesc_height' => 'Visina mape, u pikselima (pretpostavljeno je $1)',
 196+ 'semanticmaps_paramdesc_width' => 'Širina mape, u pikselima (pretpostavljeno je $1)',
 197+ 'semanticmaps_paramdesc_zoom' => 'Nivo zumiranja mape',
 198+ 'semanticmaps_paramdesc_centre' => 'Koordinate centra karte',
 199+ 'semanticmaps_paramdesc_controls' => 'Korisničke kontrole postavljene na kartu',
 200+ 'semanticmaps_paramdesc_types' => 'Tipovi karti dostupnih na mapi',
 201+ 'semanticmaps_paramdesc_type' => 'Pretpostavljeni tip karte za kartu',
 202+ 'semanticmaps_paramdesc_overlays' => 'Slojevi dostupni na karti',
 203+ 'semanticmaps_paramdesc_autozoom' => 'Ako je zumiranje i odaljavanje putem kotačića na mišu omogućeno',
 204+ 'semanticmaps_paramdesc_layers' => 'Slojevi dostupni na mapi',
 205+);
 206+
 207+/** Catalan (Català)
 208+ * @author Paucabot
 209+ * @author Solde
 210+ * @author Toniher
 211+ */
 212+$messages['ca'] = array(
 213+ 'semanticmaps-desc' => "Proporciona l'habilitat de visualitzar i editar dades de coordenades emmagatzemades a través de l'extensió del Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples alguns exemples]).
 214+Serveis de mapes disponibles: $1",
 215+ 'semanticmaps-unrecognizeddistance' => 'El valor $1 no és un valor de distància.',
 216+ 'semanticmaps-kml-link' => 'Visualitza el fitxer KML',
 217+ 'semanticmaps-default-kml-pagelink' => 'Visualitza la pàgina $1',
 218+ 'semanticmaps_lookupcoordinates' => 'Consulta les coordenades',
 219+ 'semanticmaps_enteraddresshere' => 'Introduïu una adreça a continuació',
 220+ 'semanticmaps_notfound' => "no s'ha trobat",
 221+ 'semanticmaps_paramdesc_format' => "El servei de mapes que s'utilitza per generar el mapa",
 222+ 'semanticmaps_paramdesc_geoservice' => 'El servei de geocodificació que es fa servir per transformar les adreces en coordenades',
 223+ 'semanticmaps_paramdesc_height' => "L'altura del mapa, en píxel (per defecte és $1)",
 224+ 'semanticmaps_paramdesc_width' => "L'amplada del mapa, en píxels (per defecte és $1)",
 225+ 'semanticmaps_paramdesc_zoom' => 'El nivell de zoom del mapa',
 226+ 'semanticmaps_paramdesc_centre' => 'Les coordenades del centre dels mapes',
 227+ 'semanticmaps_paramdesc_controls' => "Els controls d'usuari emplaçats al mapa",
 228+ 'semanticmaps_paramdesc_types' => 'El tipus de mapa disponibles en el mapa',
 229+ 'semanticmaps_paramdesc_type' => 'El tipus de mapa per defecte del mapa',
 230+ 'semanticmaps_paramdesc_overlays' => 'Les capes disponibles en el mapa',
 231+ 'semanticmaps_paramdesc_autozoom' => "Si està disponible el zoom d'augment i reducció fent servir la rodeta del ratolí",
 232+ 'semanticmaps_paramdesc_layers' => 'Les capes disponibles al mapa',
 233+);
 234+
 235+/** German (Deutsch)
 236+ * @author DaSch
 237+ * @author Imre
 238+ * @author Kghbln
 239+ * @author Pill
 240+ * @author The Evil IP address
 241+ * @author Umherirrender
 242+ */
 243+$messages['de'] = array(
 244+ 'semanticmaps-desc' => 'Ermöglicht das Anzeigen und Bearbeiten von Daten zu Koordinaten, die mit Semantic MediaWiki gespeichert werden ([http://mapping.referata.com/wiki/Examples Demonstrationsseite]).',
 245+ 'semanticmaps-unrecognizeddistance' => 'Der Wert $1 ist keine gültige Distanz.',
 246+ 'semanticmaps-kml-link' => 'KML-Datei ansehen',
 247+ 'semanticmaps-default-kml-pagelink' => 'Artikel $1 ansehen',
 248+ 'semanticmaps_lookupcoordinates' => 'Koordinaten nachschlagen',
 249+ 'semanticmaps_enteraddresshere' => 'Adresse hier eingeben',
 250+ 'semanticmaps_notfound' => 'nicht gefunden',
 251+ 'semanticmaps_paramdesc_format' => 'Der Kartographiedienst zum Generieren der Karte',
 252+ 'semanticmaps_paramdesc_geoservice' => 'Der Geokodierungsdienst, um Adressen in Koordinaten umzuwandeln',
 253+ 'semanticmaps_paramdesc_height' => 'Die Höhe der Karte in Pixeln (Standard ist $1)',
 254+ 'semanticmaps_paramdesc_width' => 'Die Breite der Karte in Pixeln (Standard ist $1)',
 255+ 'semanticmaps_paramdesc_zoom' => 'Die Vergrößerungsstufe der Karte',
 256+ 'semanticmaps_paramdesc_centre' => 'Die Koordinaten der Kartenmitte',
 257+ 'semanticmaps_paramdesc_controls' => 'Die Benutzerkontrollen, die sich auf der Karte befinden',
 258+ 'semanticmaps_paramdesc_types' => 'Die verfügbaren Kartentypen für die Karte',
 259+ 'semanticmaps_paramdesc_type' => 'Der Standard-Kartentyp für die Karte',
 260+ 'semanticmaps_paramdesc_overlays' => 'Die auf der Karte verfügbaren Overlays',
 261+ 'semanticmaps_paramdesc_autozoom' => 'Wenn Vergrößerung und Verkleinerung mit dem Maus-Scrollrad aktiviert ist',
 262+ 'semanticmaps_paramdesc_layers' => 'Die auf der Karte verfügbaren Ebenen',
 263+);
 264+
 265+/** Lower Sorbian (Dolnoserbski)
 266+ * @author Michawiki
 267+ */
 268+$messages['dsb'] = array(
 269+ 'semanticmaps-desc' => 'Bitujo zmóžnosć se koordinatowe daty pśez rozšyrjenje Semantic MediaWiki woglědaś a wobźěłaś ([http://mapping.referata.com/wiki/Examples demo]).',
 270+ 'semanticmaps-unrecognizeddistance' => 'Gódnota $1 njejo płaśiwa distanca.',
 271+ 'semanticmaps-kml-link' => 'KML-dataju se woglědaś',
 272+ 'semanticmaps-default-kml-pagelink' => 'Bok $1 se woglědaś',
 273+ 'semanticmaps_lookupcoordinates' => 'Za koordinatami póglědaś',
 274+ 'semanticmaps_enteraddresshere' => 'Zapódaj how adresu',
 275+ 'semanticmaps_notfound' => 'njenamakany',
 276+ 'semanticmaps_paramdesc_format' => 'Kartěrowańska słužba, kótaraž se wužywa, aby napórała kórtu',
 277+ 'semanticmaps_paramdesc_geoservice' => 'Geokoděrowańska słužba, kótaraž se wužywa, aby pśetwóriła adrese do koordinatow',
 278+ 'semanticmaps_paramdesc_height' => 'Wusokosć kórty, w pikselach (standard jo $1)',
 279+ 'semanticmaps_paramdesc_width' => 'Šyrokosć kórty, w pikselach (standard jo $1)',
 280+ 'semanticmaps_paramdesc_zoom' => 'Skalěrowański schóźeńk kórty',
 281+ 'semanticmaps_paramdesc_centre' => 'Koordinaty srjejźišća kórty',
 282+ 'semanticmaps_paramdesc_controls' => 'Wužywarske elementy na kórśe',
 283+ 'semanticmaps_paramdesc_types' => 'Kórtowe typy, kótarež stoje za kórtu k dispoziciji',
 284+ 'semanticmaps_paramdesc_type' => 'Standardny kórtowy typ za kórtu',
 285+ 'semanticmaps_paramdesc_overlays' => 'Pśewarstowanja, kótarež stoje za kórtu k dispoziciji',
 286+ 'semanticmaps_paramdesc_autozoom' => 'Jolic pówětšenje a pómjeńšenje z pomocu kólaska myški jo zmóžnjone',
 287+ 'semanticmaps_paramdesc_layers' => 'Warsty, kótarež stoje za kórtu k dispoziciji',
 288+);
 289+
 290+/** Greek (Ελληνικά)
 291+ * @author ZaDiak
 292+ */
 293+$messages['el'] = array(
 294+ 'semanticmaps_lookupcoordinates' => 'Επιθεώρηση συντεταγμένων',
 295+ 'semanticmaps_enteraddresshere' => 'Εισαγωγή διεύθυνσης εδώ',
 296+ 'semanticmaps_notfound' => 'δεν βρέθηκε',
 297+);
 298+
 299+/** Esperanto (Esperanto)
 300+ * @author Yekrats
 301+ */
 302+$messages['eo'] = array(
 303+ 'semanticmaps_lookupcoordinates' => 'Rigardi koordinatojn',
 304+ 'semanticmaps_enteraddresshere' => 'Enigu adreson ĉi tie',
 305+ 'semanticmaps_notfound' => 'ne trovita',
 306+);
 307+
 308+/** Spanish (Español)
 309+ * @author Crazymadlover
 310+ * @author Imre
 311+ * @author Locos epraix
 312+ * @author Translationista
 313+ */
 314+$messages['es'] = array(
 315+ 'semanticmaps-desc' => 'Proporciona la capacidad de ver y editar los datos coordinados almacenados a través de la extensión Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demo]).',
 316+ 'semanticmaps-unrecognizeddistance' => 'El valor $1 no esuna distancia válida.',
 317+ 'semanticmaps_lookupcoordinates' => 'Busque las coordenadas',
 318+ 'semanticmaps_enteraddresshere' => 'Ingresar dirección aquí',
 319+ 'semanticmaps_notfound' => 'no encontrado',
 320+ 'semanticmaps_paramdesc_format' => 'El servicio cartográfico usado para generar el mapa',
 321+ 'semanticmaps_paramdesc_geoservice' => 'El servicio de geocodificación para convertir direcciones en coordenadas',
 322+ 'semanticmaps_paramdesc_height' => 'Alto del mapa en píxeles (el predeterminado es $1)',
 323+ 'semanticmaps_paramdesc_width' => 'Ancho del mapa en píxeles (el predeterminado es $1)',
 324+ 'semanticmaps_paramdesc_zoom' => 'Nivel de acercamiento del mapa',
 325+ 'semanticmaps_paramdesc_centre' => 'Las coordenadas del centro del mapa',
 326+ 'semanticmaps_paramdesc_controls' => 'Los controles de usuario ubicados en el mapa',
 327+ 'semanticmaps_paramdesc_types' => 'Los tipos de mapa disponibles en el mapa',
 328+ 'semanticmaps_paramdesc_type' => 'El tipo de mapa predeterminado para el mapa',
 329+ 'semanticmaps_paramdesc_overlays' => 'FUZZY!!! Las capas disponibles en el mapa',
 330+ 'semanticmaps_paramdesc_autozoom' => 'En caso de que el acercamiento y alejamiento mediante la rueda del ratón esté habilitado',
 331+ 'semanticmaps_paramdesc_layers' => 'Las capas disponibles en el mapa',
 332+);
 333+
 334+/** Basque (Euskara)
 335+ * @author An13sa
 336+ */
 337+$messages['eu'] = array(
 338+ 'semanticmaps_lookupcoordinates' => 'Koordenatuak bilatu',
 339+);
 340+
 341+/** Finnish (Suomi)
 342+ * @author Crt
 343+ * @author Str4nd
 344+ */
 345+$messages['fi'] = array(
 346+ 'semanticmaps_enteraddresshere' => 'Kirjoita osoite tähän',
 347+ 'semanticmaps_notfound' => 'ei löytynyt',
 348+ 'semanticmaps_paramdesc_height' => 'Kartan korkeus pikseleinä (oletus on $1)',
 349+ 'semanticmaps_paramdesc_width' => 'Kartan leveys pikseleinä (oletus on $1)',
 350+ 'semanticmaps_paramdesc_zoom' => 'Kartan suurennostaso',
 351+ 'semanticmaps_paramdesc_centre' => 'Kartan keskipisteen koordinaatit',
 352+);
 353+
 354+/** French (Français)
 355+ * @author Crochet.david
 356+ * @author Grondin
 357+ * @author IAlex
 358+ * @author Jean-Frédéric
 359+ * @author Peter17
 360+ * @author PieRRoMaN
 361+ * @author Sherbrooke
 362+ * @author Urhixidur
 363+ */
 364+$messages['fr'] = array(
 365+ 'semanticmaps-desc' => "Permet d'afficher et de modifier les données de coordonnées stockées par l'extension Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demo]).",
 366+ 'semanticmaps-unrecognizeddistance' => "La valeur $1 n'est pas une distance valide",
 367+ 'semanticmaps-kml-link' => 'Voir le fichier KML',
 368+ 'semanticmaps-default-kml-pagelink' => 'Voir l’article $1',
 369+ 'semanticmaps_lookupcoordinates' => 'Estimer les coordonnées',
 370+ 'semanticmaps_enteraddresshere' => 'Entrez ici l’adresse',
 371+ 'semanticmaps_notfound' => 'pas trouvé',
 372+ 'semanticmaps_paramdesc_format' => 'Le service de cartographie utilisé pour générer la carte',
 373+ 'semanticmaps_paramdesc_geoservice' => 'Le service de géocodage utilisé pour transformer les adresses en coordonnées',
 374+ 'semanticmaps_paramdesc_height' => 'La hauteur de la carte, en pixels ($1 par défaut)',
 375+ 'semanticmaps_paramdesc_width' => 'La largeur de la carte, en pixels ($1 par défaut)',
 376+ 'semanticmaps_paramdesc_zoom' => 'Le niveau d’agrandissement de la carte',
 377+ 'semanticmaps_paramdesc_centre' => 'Les coordonnées du centre de la carte',
 378+ 'semanticmaps_paramdesc_controls' => 'Les contrôles utilisateurs placés sur la carte',
 379+ 'semanticmaps_paramdesc_types' => 'Les types de cartes disponibles sur la carte',
 380+ 'semanticmaps_paramdesc_type' => 'Le type de carte par défaut pour la carte',
 381+ 'semanticmaps_paramdesc_overlays' => 'Les revêtements disponibles sur la carte',
 382+ 'semanticmaps_paramdesc_autozoom' => 'Si le zoom avant et arrière en utilisant la molette de la souris est activé',
 383+ 'semanticmaps_paramdesc_layers' => 'Les revêtements disponibles sur la carte',
 384+);
 385+
 386+/** Franco-Provençal (Arpetan)
 387+ * @author ChrisPtDe
 388+ */
 389+$messages['frp'] = array(
 390+ 'semanticmaps-unrecognizeddistance' => 'La valor $1 est pas una distance valida.',
 391+ 'semanticmaps_lookupcoordinates' => 'Èstimar les coordonâs',
 392+ 'semanticmaps_enteraddresshere' => 'Buchiéd l’adrèce ique',
 393+ 'semanticmaps_notfound' => 'pas trovâ',
 394+);
 395+
 396+/** Galician (Galego)
 397+ * @author Toliño
 398+ */
 399+$messages['gl'] = array(
 400+ 'semanticmaps-desc' => 'Proporciona a capacidade de ollar e modificar os datos de coordenadas gardados a través da extensión Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demostración]).',
 401+ 'semanticmaps-unrecognizeddistance' => 'O valor $1 non é unha distancia válida.',
 402+ 'semanticmaps-kml-link' => 'Ollar o ficheiro KML',
 403+ 'semanticmaps-default-kml-pagelink' => 'Ver a páxina "$1"',
 404+ 'semanticmaps_lookupcoordinates' => 'Ver as coordenadas',
 405+ 'semanticmaps_enteraddresshere' => 'Introduza o enderezo aquí',
 406+ 'semanticmaps_notfound' => 'non se atopou',
 407+ 'semanticmaps_paramdesc_format' => 'O servizo de cartografía utilizado para xerar o mapa',
 408+ 'semanticmaps_paramdesc_geoservice' => 'O servizo de xeocodificación usado para transformar enderezos en coordenadas',
 409+ 'semanticmaps_paramdesc_height' => 'A altura do mapa, en píxeles (por defecto, $1)',
 410+ 'semanticmaps_paramdesc_width' => 'O largo do mapa, en píxeles (por defecto, $1)',
 411+ 'semanticmaps_paramdesc_zoom' => 'O nivel de zoom do mapa',
 412+ 'semanticmaps_paramdesc_centre' => 'As coordenadas do centro do mapa',
 413+ 'semanticmaps_paramdesc_controls' => 'Os controis de usuario situados no mapa',
 414+ 'semanticmaps_paramdesc_types' => 'Os tipos de mapa dispoñibles no mapa',
 415+ 'semanticmaps_paramdesc_type' => 'O tipo de mapa por defecto para o mapa',
 416+ 'semanticmaps_paramdesc_overlays' => 'As sobreposicións dispoñibles no mapa',
 417+ 'semanticmaps_paramdesc_autozoom' => 'Activa o achegamento e afastamento coa roda do rato',
 418+ 'semanticmaps_paramdesc_layers' => 'As capas dispoñibles no mapa',
 419+);
 420+
 421+/** Swiss German (Alemannisch)
 422+ * @author Als-Holder
 423+ */
 424+$messages['gsw'] = array(
 425+ 'semanticmaps-desc' => 'Ergänzt e Megligkeit zum Aaluege un Bearbeite vu Koordinate, wu im Ramme vu dr Erwyterig „Semantisch MediaWiki“ gspycheret wore sin. [http://www.mediawiki.org/wiki/Extension:Semantic_Maps Dokumäntation]. [http://mapping.referata.com/wiki/Examples Demo]',
 426+ 'semanticmaps-unrecognizeddistance' => 'Dr Wert $1 isch kei giltigi Dischtanz.',
 427+ 'semanticmaps-kml-link' => 'KML-Datei aaluege',
 428+ 'semanticmaps-default-kml-pagelink' => 'Syte $1 aaluege',
 429+ 'semanticmaps_lookupcoordinates' => 'Koordinate nooluege',
 430+ 'semanticmaps_enteraddresshere' => 'Doo Adräss yygee',
 431+ 'semanticmaps_notfound' => 'nit gfunde',
 432+ 'semanticmaps_paramdesc_format' => 'Dr Chartedienscht, wu brucht wäre soll zum Erzyyge vu dr Charte',
 433+ 'semanticmaps_paramdesc_geoservice' => 'Dr Geokodierigs-Service, wu brucht wäre soll zum umwandle vu Adrässe in Koordinate',
 434+ 'semanticmaps_paramdesc_height' => 'D Hechi vu dr Charte, in Pixel (Standard: $1)',
 435+ 'semanticmaps_paramdesc_width' => 'D Breiti vu dr Charte, in Pixel (Standard: $1)',
 436+ 'semanticmaps_paramdesc_zoom' => 'S Zoom-Level vu dr Charte',
 437+ 'semanticmaps_paramdesc_centre' => 'D Koordinate vum Mittelpunkt vu dr Charte',
 438+ 'semanticmaps_paramdesc_controls' => 'D Hilfsmittel, wu in d Charte yygfiegt sin',
 439+ 'semanticmaps_paramdesc_types' => 'D Chartetype, wu fir d Charte verfiegbar sin',
 440+ 'semanticmaps_paramdesc_type' => 'Dr Standard-Chartetyp fir d Charte',
 441+ 'semanticmaps_paramdesc_overlays' => 'D Overlays, wu fir d Charte verfiegbar sin',
 442+ 'semanticmaps_paramdesc_autozoom' => 'Eb mer e Charte cha vergreßere oder verchleinere mit em Muusrad',
 443+ 'semanticmaps_paramdesc_layers' => 'D Lage, wu fir Charte verfiegbar sin',
 444+);
 445+
 446+/** Hebrew (עברית)
 447+ * @author Rotemliss
 448+ * @author YaronSh
 449+ */
 450+$messages['he'] = array(
 451+ 'semanticmaps-desc' => 'הוספת האפשרות לצפייה ולעריכה בנתוני קואורדינטה המאוחסנים דרך הרחבת המדיה־ויקי הסמנטי ([http://mapping.referata.com/wiki/Examples הדגמה]).1',
 452+ 'semanticmaps_lookupcoordinates' => 'חיפוש קואורדינטות',
 453+ 'semanticmaps_enteraddresshere' => 'כתבו כתובת כאן',
 454+ 'semanticmaps_notfound' => 'לא נמצאה',
 455+ 'semanticmaps_paramdesc_format' => 'שירות המיפוי המשמש להכנת המפה',
 456+ 'semanticmaps_paramdesc_height' => 'גובה המפה, בפיקסלים (ברירת המחדל היא $1)',
 457+ 'semanticmaps_paramdesc_width' => 'רוחב המפה, בפיקסלים (ברירת המחדל היא $1)',
 458+ 'semanticmaps_paramdesc_zoom' => 'רמת התקריב של המפה',
 459+ 'semanticmaps_paramdesc_centre' => 'קואורדינטות מרכז המפה',
 460+ 'semanticmaps_paramdesc_controls' => 'פקדי המשתמש ממוקמים על המפה',
 461+ 'semanticmaps_paramdesc_types' => 'צורות המפה הזמינות על המפה',
 462+ 'semanticmaps_paramdesc_type' => 'סוג ברירת המחדל של המפה עבור המפה',
 463+ 'semanticmaps_paramdesc_overlays' => 'השכבות הזמינות במפה',
 464+ 'semanticmaps_paramdesc_layers' => 'השכבות הזמינות במפה',
 465+);
 466+
 467+/** Croatian (Hrvatski)
 468+ * @author Tivek
 469+ */
 470+$messages['hr'] = array(
 471+ 'semanticmaps-desc' => "Pruža pregledavanje i uređivanje koordinata spremljenih koristeći Semantic MediaWiki ekstenziju ([http://mapping.referata.com/wiki/Examples demo's]).",
 472+ 'semanticmaps-unrecognizeddistance' => 'Vrijednost $1 nije valjana udaljenost.',
 473+ 'semanticmaps_lookupcoordinates' => 'Potraži koordinate',
 474+ 'semanticmaps_enteraddresshere' => 'Unesite adresu ovdje',
 475+ 'semanticmaps_notfound' => 'nije nađeno',
 476+ 'semanticmaps_paramdesc_format' => 'Kartografska usluga koja se koristi za stvaranje karte',
 477+ 'semanticmaps_paramdesc_geoservice' => 'Goecoding usluga koja pretvara adrese u koordinate',
 478+ 'semanticmaps_paramdesc_height' => 'Visina karte, u pikselima ($1 ako nije navedeno)',
 479+ 'semanticmaps_paramdesc_width' => 'Širina karte, u pikselima ($1 ako nije navedeno)',
 480+ 'semanticmaps_paramdesc_zoom' => 'Razina zumiranja karte',
 481+ 'semanticmaps_paramdesc_centre' => 'Koordinate centra karte',
 482+ 'semanticmaps_paramdesc_controls' => 'Korisničke kontrole stavljene na kartu',
 483+ 'semanticmaps_paramdesc_types' => 'Dostupni tipovi karte',
 484+ 'semanticmaps_paramdesc_type' => 'Prvotno zadani tip karte',
 485+ 'semanticmaps_paramdesc_overlays' => 'Nadslojevi dostupni na karti',
 486+ 'semanticmaps_paramdesc_autozoom' => 'Ako je omogućeno zumiranje kotačićem miša',
 487+ 'semanticmaps_paramdesc_layers' => 'Slojevi dostupni na karti',
 488+);
 489+
 490+/** Upper Sorbian (Hornjoserbsce)
 491+ * @author Michawiki
 492+ */
 493+$messages['hsb'] = array(
 494+ 'semanticmaps-desc' => 'Zmóžnja zwobraznjenje a wobdźěłanje koordinatowych datow, kotrež su so z rozšěrjenjom Semantic MediaWiki składowali ([http://mapping.referata.com/wiki/Examples přikłady]).',
 495+ 'semanticmaps-unrecognizeddistance' => 'Hódnota $1 płaćiwa distanca njeje.',
 496+ 'semanticmaps-kml-link' => 'KML-dataju sej wobhladać',
 497+ 'semanticmaps-default-kml-pagelink' => 'Nastawk $1 sej wobhladać',
 498+ 'semanticmaps_lookupcoordinates' => 'Za koordinatami hladać',
 499+ 'semanticmaps_enteraddresshere' => 'Zapodaj tu adresu',
 500+ 'semanticmaps_notfound' => 'njenamakany',
 501+ 'semanticmaps_paramdesc_format' => 'Kartěrowanska słužba, kotraž so wužiwa, zo by kartu wutworiła',
 502+ 'semanticmaps_paramdesc_geoservice' => 'Geokodowanska słužba, kotraž so wužiwa, zo by adresy do koordinatow přetworiła',
 503+ 'semanticmaps_paramdesc_height' => 'Wysokosć karty, w pikselach (standard je $1)',
 504+ 'semanticmaps_paramdesc_width' => 'Šěrokosć karty, w pikselach (standard je $1)',
 505+ 'semanticmaps_paramdesc_zoom' => 'Skalowanski schodźenk karty',
 506+ 'semanticmaps_paramdesc_centre' => 'Koordinaty srjedźišća karty',
 507+ 'semanticmaps_paramdesc_controls' => 'Wužiwarske elementy na karće',
 508+ 'semanticmaps_paramdesc_types' => 'Kartowe typy, kotrež za kartu k dispoziciji steja',
 509+ 'semanticmaps_paramdesc_type' => 'Standardny kartowy typ za kartu',
 510+ 'semanticmaps_paramdesc_overlays' => 'Naworštowanja, kotrež za kartu k dispoziciji steja',
 511+ 'semanticmaps_paramdesc_autozoom' => 'Jeli powjetšenje a pomjenšenje z pomocu kolesko myški je zmóžnjene',
 512+ 'semanticmaps_paramdesc_layers' => 'Woršty, kotrež za kartu k dispoziciji steja',
 513+);
 514+
 515+/** Hungarian (Magyar)
 516+ * @author Dani
 517+ * @author Glanthor Reviol
 518+ */
 519+$messages['hu'] = array(
 520+ '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://mapping.referata.com/wiki/Examples demo]).',
 521+ 'semanticmaps_lookupcoordinates' => 'Koordináták felkeresése',
 522+ 'semanticmaps_enteraddresshere' => 'Add meg a címet itt',
 523+ 'semanticmaps_notfound' => 'nincs találat',
 524+ 'semanticmaps_paramdesc_format' => 'A térkép generálásához használt térképszolgáltatás.',
 525+ 'semanticmaps_paramdesc_height' => 'A térkép magassága, képpontban (alapértelmezetten $1)',
 526+ 'semanticmaps_paramdesc_width' => 'A térkép szélessége, képpontban (alapértelmezetten $1)',
 527+ 'semanticmaps_paramdesc_zoom' => 'A térkép nagyítása',
 528+ 'semanticmaps_paramdesc_centre' => 'A térkép középpontjának koordinátái',
 529+ 'semanticmaps_paramdesc_types' => 'A térképen elérhető térképtípusok',
 530+ 'semanticmaps_paramdesc_type' => 'A térkép alapértelmezett térképtípusa',
 531+ 'semanticmaps_paramdesc_overlays' => 'A térképen lévő rétegek',
 532+ 'semanticmaps_paramdesc_layers' => 'A térképen lévő rétegek',
 533+);
 534+
 535+/** Interlingua (Interlingua)
 536+ * @author McDutchie
 537+ */
 538+$messages['ia'] = array(
 539+ 'semanticmaps-desc' => 'Forni le capacitate de vider e modificar datos de coordinatas immagazinate con le extension Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demonstrationes]).',
 540+ 'semanticmaps-unrecognizeddistance' => 'Le valor $1 non es un distantia valide.',
 541+ 'semanticmaps-kml-link' => 'Vider le file KML',
 542+ 'semanticmaps-default-kml-pagelink' => 'Vider articulo $1',
 543+ 'semanticmaps_lookupcoordinates' => 'Cercar coordinatas',
 544+ 'semanticmaps_enteraddresshere' => 'Entra adresse hic',
 545+ 'semanticmaps_notfound' => 'non trovate',
 546+ 'semanticmaps_paramdesc_format' => 'Le servicio cartographic usate pro generar le carta',
 547+ 'semanticmaps_paramdesc_geoservice' => 'Le servicio de geocodification usate pro converter adresses in coordinatas',
 548+ 'semanticmaps_paramdesc_height' => 'Le altitude del carta, in pixeles (predefinition es $1)',
 549+ 'semanticmaps_paramdesc_width' => 'Le latitude del carta, in pixeles (predefinition es $1)',
 550+ 'semanticmaps_paramdesc_zoom' => 'Le nivello de zoom del carta',
 551+ 'semanticmaps_paramdesc_centre' => 'Le coordinatas del centro del carta',
 552+ 'semanticmaps_paramdesc_controls' => 'Le buttones de adjustamento placiate in le carta',
 553+ 'semanticmaps_paramdesc_types' => 'Le typos de carta disponibile in le carta',
 554+ 'semanticmaps_paramdesc_type' => 'Le typo de carta predefinite pro le carta',
 555+ 'semanticmaps_paramdesc_overlays' => 'Le superpositiones disponibile in le carta',
 556+ 'semanticmaps_paramdesc_autozoom' => 'Si le zoom avante e retro con le rota de rolamento del mouse es active',
 557+ 'semanticmaps_paramdesc_layers' => 'Le stratos disponibile in le carta',
 558+);
 559+
 560+/** Indonesian (Bahasa Indonesia)
 561+ * @author Bennylin
 562+ * @author Farras
 563+ * @author IvanLanin
 564+ */
 565+$messages['id'] = array(
 566+ 'semanticmaps-desc' => 'Memampukan penampilan dan penyuntingan data koordinat yang disimpan melalui pengaya MediaWiki Semantic ([http://mapping.referata.com/wiki/Examples demo]).',
 567+ 'semanticmaps-unrecognizeddistance' => 'Nilai $1 bukan jarak yang sah.',
 568+ 'semanticmaps-kml-link' => 'Lihat berkas KML',
 569+ 'semanticmaps-default-kml-pagelink' => 'Lihat halaman $1',
 570+ 'semanticmaps_lookupcoordinates' => 'Cari koordinat',
 571+ 'semanticmaps_enteraddresshere' => 'Masukkan alamat di sini',
 572+ 'semanticmaps_notfound' => 'tidak ditemukan',
 573+ 'semanticmaps_paramdesc_format' => 'Layanan pemetaan untuk membuat peta',
 574+ 'semanticmaps_paramdesc_geoservice' => 'Layanan kode geo untuk mengubah alamat menjadi koordinat',
 575+ 'semanticmaps_paramdesc_height' => 'Tinggi peta, dalam piksel (umumnya $1)',
 576+ 'semanticmaps_paramdesc_width' => 'Lebar peta, dalam piksel (umumnya $1)',
 577+ 'semanticmaps_paramdesc_zoom' => 'Tingkat zum peta',
 578+ 'semanticmaps_paramdesc_centre' => 'Koordinat bagian tengah peta',
 579+ 'semanticmaps_paramdesc_controls' => 'Kontrol pengguna yang diletakkan di peta',
 580+ 'semanticmaps_paramdesc_types' => 'Jenis peta tersedia di peta',
 581+ 'semanticmaps_paramdesc_type' => 'Jenis peta biasa untuk peta ini',
 582+ 'semanticmaps_paramdesc_overlays' => 'Lapisan yang tersedia di peta',
 583+ 'semanticmaps_paramdesc_autozoom' => 'Bila ingin zum dekat dan jauh menggunakan mouse, gunakan roda gulung',
 584+ 'semanticmaps_paramdesc_layers' => 'Lapisan tersedia di peta',
 585+);
 586+
 587+/** Italian (Italiano)
 588+ * @author Civvì
 589+ * @author Darth Kule
 590+ * @author HalphaZ
 591+ */
 592+$messages['it'] = array(
 593+ 'semanticmaps-desc' => "Offre la possibilità di visualizzare e modificare le coordinate memorizzate attraverso l'estensione Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demo]).",
 594+ 'semanticmaps-unrecognizeddistance' => 'Il valore $1 non è una distanza valida.',
 595+ 'semanticmaps_lookupcoordinates' => 'Cerca coordinate',
 596+ 'semanticmaps_enteraddresshere' => 'Inserisci indirizzo qui',
 597+ 'semanticmaps_notfound' => 'non trovato',
 598+ 'semanticmaps_paramdesc_format' => 'Il servizio di mapping utilizzato per generare la mappa',
 599+ 'semanticmaps_paramdesc_geoservice' => 'Il servizio di geocoding utilizzato per trasformare gli indirizzi in coordinate',
 600+ 'semanticmaps_paramdesc_height' => "L'altezza della mappa in pixel (il valore di default è $1)",
 601+ 'semanticmaps_paramdesc_width' => 'La larghezza della mappa in pixel (il valore di default è $1)',
 602+ 'semanticmaps_paramdesc_zoom' => 'Il livello di zoom della mappa',
 603+ 'semanticmaps_paramdesc_centre' => 'Le coordinate del centro della mappa',
 604+ 'semanticmaps_paramdesc_controls' => 'I controlli utente posizionati sulla mappa',
 605+ 'semanticmaps_paramdesc_types' => 'I tipi di mappa disponibili sulla mappa',
 606+ 'semanticmaps_paramdesc_type' => 'Il tipo mappa predefinito per la mappa',
 607+ 'semanticmaps_paramdesc_overlays' => 'Gli overlay disponibili sulla mappa',
 608+ 'semanticmaps_paramdesc_autozoom' => 'Se sono attivati lo zoom avanti e indietro utilizzando la rotellina del mouse',
 609+ 'semanticmaps_paramdesc_layers' => 'Gli strati (layer) disponibili sulla mappa',
 610+);
 611+
 612+/** Japanese (日本語)
 613+ * @author Fryed-peach
 614+ * @author Mizusumashi
 615+ * @author 青子守歌
 616+ */
 617+$messages['ja'] = array(
 618+ 'semanticmaps-desc' => 'Semantic MediaWiki 拡張機能を通して格納された座標データを表示・編集する機能を提供する ([http://mapping.referata.com/wiki/Examples 実演])。',
 619+ 'semanticmaps-unrecognizeddistance' => '値$1は有効な距離ではありません。',
 620+ 'semanticmaps-kml-link' => 'KMLファイルを閲覧',
 621+ 'semanticmaps-default-kml-pagelink' => 'ページ$1を表示',
 622+ 'semanticmaps_lookupcoordinates' => '座標を調べる',
 623+ 'semanticmaps_enteraddresshere' => '住所をここに入力します',
 624+ 'semanticmaps_notfound' => '見つかりません',
 625+ 'semanticmaps_paramdesc_format' => '地図の生成に利用されている地図サービス',
 626+ 'semanticmaps_paramdesc_geoservice' => '住所の座標への変換に利用されているジオコーディングサービス',
 627+ 'semanticmaps_paramdesc_height' => '地図の縦幅 (単位はピクセル、既定は$1)',
 628+ 'semanticmaps_paramdesc_width' => '地図の横幅 (単位はピクセル、既定は$1)',
 629+ 'semanticmaps_paramdesc_zoom' => '地図の拡大度',
 630+ 'semanticmaps_paramdesc_centre' => '地図の中心の座標',
 631+ 'semanticmaps_paramdesc_controls' => 'この地図上に設置するユーザーコントロール',
 632+ 'semanticmaps_paramdesc_types' => 'この地図で利用できる地図タイプ',
 633+ 'semanticmaps_paramdesc_type' => 'この地図のデフォルト地図タイプ',
 634+ 'semanticmaps_paramdesc_overlays' => 'この地図で利用できるオーバーレイ',
 635+ 'semanticmaps_paramdesc_autozoom' => 'マウスのスクロールホイールを使ったズームインやアウトを有効にするか',
 636+ 'semanticmaps_paramdesc_layers' => 'この地図で利用できるレイヤー',
 637+);
 638+
 639+/** Khmer (ភាសាខ្មែរ)
 640+ * @author Thearith
 641+ */
 642+$messages['km'] = array(
 643+ 'semanticmaps_lookupcoordinates' => 'ក្រឡេក​មើល​កូអរដោនេ',
 644+);
 645+
 646+/** Colognian (Ripoarisch)
 647+ * @author Purodha
 648+ */
 649+$messages['ksh'] = array(
 650+ 'semanticmaps-desc' => 'Määt et müjjelesch, Koodinaate ze beloore un ze ändere, di per Semantesch Mediawiki faßjehallde woodte. (E [http://mapping.referata.com/wiki/Examples Beijshpöll])',
 651+ 'semanticmaps_lookupcoordinates' => 'Koordinate nohkike',
 652+ 'semanticmaps_enteraddresshere' => 'Donn hee de Address enjäve',
 653+ 'semanticmaps_notfound' => 'nit jefonge',
 654+ 'semanticmaps_paramdesc_format' => 'Dä Deens för Kaate ußzejävve, woh heh di Kaat vun kütt',
 655+ 'semanticmaps_paramdesc_geoservice' => "Dä Deens för Adräße en Ko'odinaate öm_ze_wandelle",
 656+ 'semanticmaps_paramdesc_height' => 'De Hühde vun heh dä Kaat en Pixelle — schtandattmääßesch {{PLURAL:$1|$1 Pixel|$1 Pixelle|nix}}',
 657+ 'semanticmaps_paramdesc_width' => 'De Breedt vun heh dä Kaat en Pixelle — schtandattmääßesch {{PLURAL:$1|$1 Pixel|$1 Pixelle|nix}}',
 658+ 'semanticmaps_paramdesc_zoom' => 'Wi doll dä Zoom fö heh di Kaat es',
 659+ 'semanticmaps_paramdesc_centre' => "De Ko'odinaate op de Ääd, vun de Medde vun heh dä Kaat",
 660+ 'semanticmaps_paramdesc_controls' => 'De Knöppe för de Bedeenung, di op di Kaat jemohlt wäääde',
 661+ 'semanticmaps_paramdesc_types' => 'De Kaate-Zoote di mer för heh di Kaat ußsöhke kann',
 662+ 'semanticmaps_paramdesc_type' => 'De Schtandatt Kaate-Zoot för heh di Kaat',
 663+ 'semanticmaps_paramdesc_overlays' => 'De zohsäzlijje Eijnzelheijte, di mer op di Kaat drop bränge kann',
 664+ 'semanticmaps_paramdesc_autozoom' => 'Falls et erin un eruß zoome met däm Kompjuter singe Muuß ierem Rättsche aanjeschalldt es, dann:',
 665+ 'semanticmaps_paramdesc_layers' => 'De Nivohs, di för di Kaat ze han sin',
 666+);
 667+
 668+/** Kurdish (Latin) (Kurdî (Latin))
 669+ * @author George Animal
 670+ */
 671+$messages['ku-latn'] = array(
 672+ 'semanticmaps_notfound' => 'nehate dîtin',
 673+);
 674+
 675+/** Luxembourgish (Lëtzebuergesch)
 676+ * @author Robby
 677+ */
 678+$messages['lb'] = array(
 679+ 'semanticmaps-unrecognizeddistance' => 'De Wäert $1 ass keng valabel Distanz.',
 680+ 'semanticmaps-kml-link' => 'KML-Fichier weisen',
 681+ 'semanticmaps-default-kml-pagelink' => 'Säit $1 weisen',
 682+ 'semanticmaps_lookupcoordinates' => 'Koordinaten nokucken',
 683+ 'semanticmaps_enteraddresshere' => 'Adress hei aginn',
 684+ 'semanticmaps_notfound' => 'net fonnt',
 685+ 'semanticmaps_paramdesc_format' => "De Kartographie-Service dee fir d'generéiere vun der Kaart benotzt gëtt",
 686+ 'semanticmaps_paramdesc_height' => "D'Héicht vun der Kaart, a Pixelen (Standard ass $1)",
 687+ 'semanticmaps_paramdesc_width' => "D'Breet vun der Kaart, a Pixelen (Standard ass $1)",
 688+ 'semanticmaps_paramdesc_zoom' => 'DenNiveau vum Zoom vun der Kaart',
 689+ 'semanticmaps_paramdesc_centre' => "D'Koordinate vum zentrum vun der Kaart",
 690+ 'semanticmaps_paramdesc_controls' => "D'Benotzerkontrollen déi op der Kaart plazéiert sinn",
 691+ 'semanticmaps_paramdesc_types' => 'Déi disponibel Kaartentypen op der Kaart',
 692+ 'semanticmaps_paramdesc_type' => "De Standard-Kaartentyp fir d'Kaart",
 693+);
 694+
 695+/** Macedonian (Македонски)
 696+ * @author Bjankuloski06
 697+ */
 698+$messages['mk'] = array(
 699+ 'semanticmaps-desc' => 'Овозможува прегледување и уредување на координатни податоци складирани со додатокот Семантички МедијаВики ([http://mapping.referata.com/wiki/Examples урнеци]).',
 700+ 'semanticmaps-unrecognizeddistance' => 'Вредноста $1 не претставува важечко растојание.',
 701+ 'semanticmaps-kml-link' => 'Преглед на KML-податотеката',
 702+ 'semanticmaps-default-kml-pagelink' => 'Преглед на статијата $1',
 703+ 'semanticmaps_lookupcoordinates' => 'Побарај координати',
 704+ 'semanticmaps_enteraddresshere' => 'Внесете адреса тука',
 705+ 'semanticmaps_notfound' => 'не е најдено ништо',
 706+ 'semanticmaps_paramdesc_format' => 'Картографската служба со која се создава картата',
 707+ 'semanticmaps_paramdesc_geoservice' => 'Службата за геокодирање со која адресите се претвораат во координати',
 708+ 'semanticmaps_paramdesc_height' => 'Висината на картата во пиксели ($1 по основно)',
 709+ 'semanticmaps_paramdesc_width' => 'Ширината на картата во пиксели ($1 по основно)',
 710+ 'semanticmaps_paramdesc_zoom' => 'Размерот на картата',
 711+ 'semanticmaps_paramdesc_centre' => 'Координатите на средиштето на картата',
 712+ 'semanticmaps_paramdesc_controls' => 'Корисничките контроли за на картата',
 713+ 'semanticmaps_paramdesc_types' => 'Типови на карти, достапни за картата',
 714+ 'semanticmaps_paramdesc_type' => 'Основно зададениот тип на карта',
 715+ 'semanticmaps_paramdesc_overlays' => 'Достапните облоги за картата',
 716+ 'semanticmaps_paramdesc_autozoom' => 'Ако е овозможено приближување и оддалечување со тркалцето на глушецот',
 717+ 'semanticmaps_paramdesc_layers' => 'Слоевите достапни на картата',
 718+);
 719+
 720+/** Malayalam (മലയാളം)
 721+ * @author Praveenp
 722+ */
 723+$messages['ml'] = array(
 724+ 'semanticmaps_enteraddresshere' => 'വിലാസം നൽകുക',
 725+ 'semanticmaps_notfound' => 'കണ്ടെത്താനായില്ല',
 726+);
 727+
 728+/** Dutch (Nederlands)
 729+ * @author Jeroen De Dauw
 730+ * @author Siebrand
 731+ */
 732+$messages['nl'] = array(
 733+ 'semanticmaps-desc' => 'Biedt de mogelijkheid om locatiegegevens die opgeslagen zijn in Semantic MediaWiki te bewerken en te bekijken',
 734+ 'semanticmaps-unrecognizeddistance' => 'De waarde "$1" is geen geldige afstand.',
 735+ 'semanticmaps-kml-link' => 'KML-bestand bekijken',
 736+ 'semanticmaps-default-kml-pagelink' => 'Pagina $1 bekijken',
 737+ 'semanticmaps_lookupcoordinates' => 'Coördinaten opzoeken',
 738+ 'semanticmaps_enteraddresshere' => 'Voer hier het adres in',
 739+ 'semanticmaps_notfound' => 'niet gevonden',
 740+ 'semanticmaps_paramdesc_format' => 'De kaartdienst die de kaart levert',
 741+ 'semanticmaps_paramdesc_geoservice' => 'De geocoderingsdienst die adressen in coördinaten converteert',
 742+ 'semanticmaps_paramdesc_height' => 'De hoogte van de kaart in pixels (standaard is $1)',
 743+ 'semanticmaps_paramdesc_width' => 'De breedte van de kaart in pixels (standaard is $1)',
 744+ 'semanticmaps_paramdesc_zoom' => 'Het zoomniveau van de kaart',
 745+ 'semanticmaps_paramdesc_centre' => 'De coördinaten van het midden van de kaart',
 746+ 'semanticmaps_paramdesc_controls' => 'De op de kaart te plaatsen hulpmiddelen',
 747+ 'semanticmaps_paramdesc_types' => 'De voor de kaart beschikbare kaarttypen',
 748+ 'semanticmaps_paramdesc_type' => 'Het standaard kaarttype voor de kaart',
 749+ 'semanticmaps_paramdesc_overlays' => 'De voor de kaart beschikbare overlays',
 750+ 'semanticmaps_paramdesc_autozoom' => 'Of in- en uitzoomen met het scrollwiel van de muis mogelijk is',
 751+ 'semanticmaps_paramdesc_layers' => 'De lagen die beschikbaar zijn voor de kaart',
 752+);
 753+
 754+/** Norwegian Nynorsk (‪Norsk (nynorsk)‬)
 755+ * @author Harald Khan
 756+ */
 757+$messages['nn'] = array(
 758+ 'semanticmaps_lookupcoordinates' => 'Sjekk koordinatar',
 759+ 'semanticmaps_enteraddresshere' => 'Skriv inn adressa her',
 760+);
 761+
 762+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 763+ * @author Event
 764+ * @author Jon Harald Søby
 765+ * @author Nghtwlkr
 766+ */
 767+$messages['no'] = array(
 768+ 'semanticmaps-desc' => 'Tilbyr muligheten til å se og endre koordinatdata lagret gjennom Semantic MediaWiki-utvidelsen ([http://mapping.referata.com/wiki/Examples demo]).',
 769+ 'semanticmaps-unrecognizeddistance' => 'Verdien $1 er ikke en gyldig avstand.',
 770+ 'semanticmaps-kml-link' => 'Vis KML-filen',
 771+ 'semanticmaps-default-kml-pagelink' => 'Vis siden $1',
 772+ 'semanticmaps_lookupcoordinates' => 'Sjekk koordinater',
 773+ 'semanticmaps_enteraddresshere' => 'Skriv inn adressen her',
 774+ 'semanticmaps_notfound' => 'ikke funnet',
 775+ 'semanticmaps_paramdesc_format' => 'Karttjenesten brukt for å generere kart',
 776+ 'semanticmaps_paramdesc_geoservice' => 'Geokodetjenesten brukt for å gjøre adresser om til koordinater',
 777+ 'semanticmaps_paramdesc_height' => 'Høyden til kartet, i piksler (standard er $1)',
 778+ 'semanticmaps_paramdesc_width' => 'Bredden til kartet, i piksler (standard er $1)',
 779+ 'semanticmaps_paramdesc_zoom' => 'Zoomnivået til kartet',
 780+ 'semanticmaps_paramdesc_centre' => 'Koordinatene til kartets senter',
 781+ 'semanticmaps_paramdesc_controls' => 'Brukerkontrollene plassert på kartet',
 782+ 'semanticmaps_paramdesc_types' => 'Karttypene tilgjengelig for kartet',
 783+ 'semanticmaps_paramdesc_type' => 'Standard karttype for kartet',
 784+ 'semanticmaps_paramdesc_overlays' => 'Overlag tilgjengelig for kartet',
 785+ 'semanticmaps_paramdesc_autozoom' => 'Dersom zooming ved bruk av musehjulet er slått på',
 786+ 'semanticmaps_paramdesc_layers' => 'Lagene tilgjengelig på kartet',
 787+);
 788+
 789+/** Occitan (Occitan)
 790+ * @author Cedric31
 791+ */
 792+$messages['oc'] = array(
 793+ 'semanticmaps-desc' => "Permet de veire e modificar las donadas de coordenadas estocadas a travèrs l'extension Semantic MediaWiki. [http://www.mediawiki.org/wiki/Extension:Semantic_Maps Documentacion]. [http://mapping.referata.com/wiki/Examples Demo]",
 794+ 'semanticmaps_lookupcoordinates' => 'Estimar las coordenadas',
 795+ 'semanticmaps_enteraddresshere' => 'Picatz aicí l’adreça',
 796+ 'semanticmaps_notfound' => 'pas trobat',
 797+);
 798+
 799+/** Polish (Polski)
 800+ * @author Deejay1
 801+ * @author Derbeth
 802+ * @author Leinad
 803+ * @author Odder
 804+ * @author Sp5uhe
 805+ */
 806+$messages['pl'] = array(
 807+ 'semanticmaps-desc' => 'Daje możliwość przeglądania oraz edytowania współrzędnych zapisanych przez rozszerzenie Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demo]).',
 808+ 'semanticmaps-unrecognizeddistance' => 'Wartość $1 nie jest poprawną odległością.',
 809+ 'semanticmaps-kml-link' => 'Wyświetla plik KML',
 810+ 'semanticmaps-default-kml-pagelink' => 'Pokaż stronę $1',
 811+ 'semanticmaps_lookupcoordinates' => 'Wyszukaj współrzędne',
 812+ 'semanticmaps_enteraddresshere' => 'Podaj adres',
 813+ 'semanticmaps_notfound' => 'nie odnaleziono',
 814+ 'semanticmaps_paramdesc_format' => 'Usługa kartograficzna używana do generowania map',
 815+ 'semanticmaps_paramdesc_geoservice' => 'Usługa geokodowania wykorzystywana do przeliczania adresów na współrzędne',
 816+ 'semanticmaps_paramdesc_height' => 'Wysokość mapy w pikselach (domyślnie $1)',
 817+ 'semanticmaps_paramdesc_width' => 'Szerokość mapy w pikselach (domyślnie $1)',
 818+ 'semanticmaps_paramdesc_zoom' => 'Stopień powiększenia mapy',
 819+ 'semanticmaps_paramdesc_centre' => 'Współrzędne środka mapy',
 820+ 'semanticmaps_paramdesc_controls' => 'Elementy sterujące dla użytkownika umieszczone na mapie',
 821+ 'semanticmaps_paramdesc_types' => 'Rodzaje map dostępne na mapie',
 822+ 'semanticmaps_paramdesc_type' => 'Domyślny typ mapy',
 823+ 'semanticmaps_paramdesc_overlays' => 'Dostępne nakładki do mapy',
 824+ 'semanticmaps_paramdesc_autozoom' => 'Jeśli włączone jest powiększanie i pomniejszanie za pomocą kółka myszy',
 825+ 'semanticmaps_paramdesc_layers' => 'Dostępne na mapie warstwy',
 826+);
 827+
 828+/** Piedmontese (Piemontèis)
 829+ * @author Borichèt
 830+ * @author Dragonòt
 831+ */
 832+$messages['pms'] = array(
 833+ 'semanticmaps-desc' => "A dà la possibilità ëd vardé e modifiché ij dat ëd le coordinà memorisà con l'estension Semantic MediaWiki ([http://mapping.referata.com/wiki/Demo d'esempi]).",
 834+ 'semanticmaps-unrecognizeddistance' => "Ël valor $1 a l'é pa na distansa bon-a.",
 835+ 'semanticmaps-kml-link' => "Vëdde l'archivi KML",
 836+ 'semanticmaps-default-kml-pagelink' => 'Lese la pàgina $1',
 837+ 'semanticmaps_lookupcoordinates' => 'Serca coordinà',
 838+ 'semanticmaps_enteraddresshere' => 'Ansëriss adrëssa sì',
 839+ 'semanticmaps_notfound' => 'pa trovà',
 840+ 'semanticmaps_paramdesc_format' => 'Ël servissi ëd cartografìa dovrà për generé la carta',
 841+ 'semanticmaps_paramdesc_geoservice' => "Ël servissi ëd geocodìfica dovrà për trasformé j'adrësse an coordinà",
 842+ 'semanticmaps_paramdesc_height' => "L'autëssa dla carta, an pontin (lë stàndard a l'é $1)",
 843+ 'semanticmaps_paramdesc_width' => "La larghëssa dla carta, an pontin (lë stàndard a l'é $1)",
 844+ 'semanticmaps_paramdesc_zoom' => "Ël livel d'angrandiment ëd la carta",
 845+ 'semanticmaps_paramdesc_centre' => 'Le coordinà dël sènter ëd la carta',
 846+ 'semanticmaps_paramdesc_controls' => 'Ij contròj utent piassà an sla carta',
 847+ 'semanticmaps_paramdesc_types' => 'Le sòrt ëd carte disponìbij an sla carta',
 848+ 'semanticmaps_paramdesc_type' => 'Ël tipo ëd carta stàndard për la carta',
 849+ 'semanticmaps_paramdesc_overlays' => 'Le dzor-posission disponìbij an sla carta',
 850+ 'semanticmaps_paramdesc_autozoom' => "Se l'angrandiment anans e andré an dovrand la roëtta dël rat a l'é abilità",
 851+ 'semanticmaps_paramdesc_layers' => 'Ij livej disponìbij an sla carta',
 852+);
 853+
 854+/** Pashto (پښتو)
 855+ * @author Ahmed-Najib-Biabani-Ibrahimkhel
 856+ */
 857+$messages['ps'] = array(
 858+ 'semanticmaps_notfound' => 'و نه موندل شو',
 859+);
 860+
 861+/** Portuguese (Português)
 862+ * @author Hamilton Abreu
 863+ * @author Indech
 864+ * @author Malafaya
 865+ */
 866+$messages['pt'] = array(
 867+ 'semanticmaps-desc' => 'Permite ver e editar dados de coordenadas, armazenados através da extensão MediaWiki Semântico ([http://mapping.referata.com/wiki/Examples demonstração]).
 868+Serviços de cartografia disponíveis: $1',
 869+ 'semanticmaps-unrecognizeddistance' => 'O valor $1 não é uma distância válida.',
 870+ 'semanticmaps-kml-link' => 'Ver o ficheiro KML',
 871+ 'semanticmaps-default-kml-pagelink' => 'Ver a página $1',
 872+ 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas',
 873+ 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui',
 874+ 'semanticmaps_notfound' => 'não encontrado',
 875+ 'semanticmaps_paramdesc_format' => 'O serviço de cartografia usado para gerar o mapa',
 876+ 'semanticmaps_paramdesc_geoservice' => 'O serviço de geocódigos usado para transformar endereços em coordenadas',
 877+ 'semanticmaps_paramdesc_height' => 'A altura do mapa, em pixels (por omissão, $1)',
 878+ 'semanticmaps_paramdesc_width' => 'A largura do mapa, em pixels (por omissão, $1)',
 879+ 'semanticmaps_paramdesc_zoom' => 'O nível de aproximação do mapa',
 880+ 'semanticmaps_paramdesc_centre' => 'As coordenadas do centro do mapa',
 881+ 'semanticmaps_paramdesc_controls' => 'Os controles colocados no mapa',
 882+ 'semanticmaps_paramdesc_types' => 'Os tipos de mapa disponíveis no mapa',
 883+ 'semanticmaps_paramdesc_type' => 'O tipo do mapa, por omissão',
 884+ 'semanticmaps_paramdesc_overlays' => 'As sobreposições disponíveis no mapa',
 885+ 'semanticmaps_paramdesc_autozoom' => 'Possibilitar a aproximação e afastamento usando a roda de deslizamento do rato',
 886+ 'semanticmaps_paramdesc_layers' => 'As camadas disponíveis no mapa',
 887+);
 888+
 889+/** Brazilian Portuguese (Português do Brasil)
 890+ * @author Eduardo.mps
 891+ * @author Giro720
 892+ * @author Luckas Blade
 893+ */
 894+$messages['pt-br'] = array(
 895+ 'semanticmaps-desc' => 'Provê a possibilidade de ver e editar dados de coordenadas armazenados através da extensão Semantic MediaWiki. ([http://mapping.referata.com/wiki/Examples demonstração]).',
 896+ 'semanticmaps-unrecognizeddistance' => 'O valor $1 não é uma distância válida.',
 897+ 'semanticmaps-kml-link' => 'Ver o arquivo KML',
 898+ 'semanticmaps-default-kml-pagelink' => 'Ver a página $1',
 899+ 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas',
 900+ 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui',
 901+ 'semanticmaps_notfound' => 'Não encontrado',
 902+ 'semanticmaps_paramdesc_format' => 'O serviço de cartografia usado para gerar o mapa',
 903+ 'semanticmaps_paramdesc_geoservice' => 'O serviço de geocódigos usado para transformar endereços em coordenadas',
 904+ 'semanticmaps_paramdesc_height' => 'A altura do mapa, em pixels (por padrão, $1)',
 905+ 'semanticmaps_paramdesc_width' => 'A largura do mapa, em pixels (por padrão, $1)',
 906+ 'semanticmaps_paramdesc_zoom' => 'O nível de aproximação do mapa',
 907+ 'semanticmaps_paramdesc_centre' => 'As coordenadas do centro do mapa',
 908+ 'semanticmaps_paramdesc_controls' => 'Os controles colocados no mapa',
 909+ 'semanticmaps_paramdesc_types' => 'Os tipos de mapa disponíveis no mapa',
 910+ 'semanticmaps_paramdesc_type' => 'O tipo do mapa, por padrão',
 911+ 'semanticmaps_paramdesc_overlays' => 'As sobreposições disponíveis no mapa',
 912+ 'semanticmaps_paramdesc_autozoom' => 'Possibilitar a aproximação e afastamento usando a roda de deslizamento do mouse',
 913+ 'semanticmaps_paramdesc_layers' => 'As camadas disponíveis no mapa',
 914+);
 915+
 916+/** Romanian (Română)
 917+ * @author Firilacroco
 918+ */
 919+$messages['ro'] = array(
 920+ 'semanticmaps_enteraddresshere' => 'Introduceți adresa aici',
 921+ 'semanticmaps_notfound' => 'nu a fost găsit',
 922+);
 923+
 924+/** Tarandíne (Tarandíne)
 925+ * @author Joetaras
 926+ */
 927+$messages['roa-tara'] = array(
 928+ 'semanticmaps-desc' => "Dè l'abbilità a fà vedè e cangià le coordinate reggistrate cu l'estenzione Semandiche de MediaUicchi ([http://mapping.referata.com/wiki/Examples demo]).",
 929+ 'semanticmaps_lookupcoordinates' => 'Ingroce le coordinate',
 930+ 'semanticmaps_enteraddresshere' => "Scaffe l'indirizze aqquà",
 931+ 'semanticmaps_notfound' => 'no acchiate',
 932+);
 933+
 934+/** Russian (Русский)
 935+ * @author Eugene Mednikov
 936+ * @author Lockal
 937+ * @author Александр Сигачёв
 938+ */
 939+$messages['ru'] = array(
 940+ 'semanticmaps-desc' => 'Обеспечивает возможность просмотра и редактирования координатных данных, хранящихся в семантическом расширении MediaWiki ([http://mapping.referata.com/wiki/Examples примеры]).',
 941+ 'semanticmaps-unrecognizeddistance' => 'Значение $1 не является допустимым расстоянием.',
 942+ 'semanticmaps-kml-link' => 'Просмотреть файл KML',
 943+ 'semanticmaps-default-kml-pagelink' => 'Просмотреть страницу $1',
 944+ 'semanticmaps_lookupcoordinates' => 'Найти координаты',
 945+ 'semanticmaps_enteraddresshere' => 'Введите адрес',
 946+ 'semanticmaps_notfound' => 'не найдено',
 947+ 'semanticmaps_paramdesc_format' => 'Картографическая служба, используемая для создания карт',
 948+ 'semanticmaps_paramdesc_geoservice' => 'Служба геокодирования используется для преобразования адреса в координаты',
 949+ 'semanticmaps_paramdesc_height' => 'Высота карты в пикселях (по умолчанию $1)',
 950+ 'semanticmaps_paramdesc_width' => 'Ширина карты в пикселях (по умолчанию $1)',
 951+ 'semanticmaps_paramdesc_zoom' => 'Масштаб карты',
 952+ 'semanticmaps_paramdesc_centre' => 'Координаты центра карты',
 953+ 'semanticmaps_paramdesc_controls' => 'Элементы управления на карте',
 954+ 'semanticmaps_paramdesc_types' => 'Типы карты, доступные на карте',
 955+ 'semanticmaps_paramdesc_type' => 'Тип карты по умолчанию',
 956+ 'semanticmaps_paramdesc_overlays' => 'Доступные наложения',
 957+ 'semanticmaps_paramdesc_autozoom' => 'Если включено увеличение и уменьшение масштаб с помощью колеса прокрутки мыши',
 958+ 'semanticmaps_paramdesc_layers' => 'Доступные на карте слои',
 959+);
 960+
 961+/** Slovak (Slovenčina)
 962+ * @author Helix84
 963+ */
 964+$messages['sk'] = array(
 965+ 'semanticmaps-desc' => 'Poskytuje schopnosť zobrazovať a upravovať údaje súradníc uložené prostredníctvom rozšírenia Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demo]).',
 966+ 'semanticmaps_lookupcoordinates' => 'Vyhľadať súradnice',
 967+ 'semanticmaps_enteraddresshere' => 'Sem zadajte emailovú adresu',
 968+ 'semanticmaps_notfound' => 'nenájdené',
 969+ 'semanticmaps_paramdesc_format' => 'Služba použitá na tvorbu mapy',
 970+ 'semanticmaps_paramdesc_geoservice' => 'Služba použitá na vyhľadanie súradníc na základe adresy',
 971+ 'semanticmaps_paramdesc_height' => 'Výška mapy v pixloch (predvolené je $1)',
 972+ 'semanticmaps_paramdesc_width' => 'Šírka mapy v pixloch (predvolené je $1)',
 973+ 'semanticmaps_paramdesc_zoom' => 'Úroveň priblíženia mapy',
 974+ 'semanticmaps_paramdesc_centre' => 'Súradnice stredu mapy',
 975+ 'semanticmaps_paramdesc_controls' => 'Používateľské ovládacie prvky umiestnené na mape',
 976+ 'semanticmaps_paramdesc_types' => 'Typy máp dostupné na mape',
 977+ 'semanticmaps_paramdesc_type' => 'Predvolený typ mapy na mape',
 978+ 'semanticmaps_paramdesc_overlays' => 'Vrstvy dostupné na mape',
 979+ 'semanticmaps_paramdesc_autozoom' => 'Či je povolené približovanie a odďaľovanie mapy kolieskom myši',
 980+ 'semanticmaps_paramdesc_layers' => 'Dostupné vrstvy mapy',
 981+);
 982+
 983+/** Serbian Cyrillic ekavian (‪Српски (ћирилица)‬)
 984+ * @author Михајло Анђелковић
 985+ */
 986+$messages['sr-ec'] = array(
 987+ 'semanticmaps-unrecognizeddistance' => 'Вредност $1 није исправно растојање.',
 988+ 'semanticmaps_enteraddresshere' => 'Унеси адресу овде',
 989+ 'semanticmaps_notfound' => 'није нађено',
 990+ 'semanticmaps_paramdesc_height' => 'Висина мапе у пикселима (подразумевано је $1)',
 991+ 'semanticmaps_paramdesc_width' => 'Ширина мапе у пикселима (подразумевано је $1)',
 992+ 'semanticmaps_paramdesc_zoom' => 'Ниво увећања мапе',
 993+ 'semanticmaps_paramdesc_centre' => 'Координате центра мапе',
 994+);
 995+
 996+/** Serbian Latin ekavian (‪Srpski (latinica)‬)
 997+ * @author Michaello
 998+ */
 999+$messages['sr-el'] = array(
 1000+ 'semanticmaps-unrecognizeddistance' => 'Vrednost $1 nije ispravno rastojanje.',
 1001+ 'semanticmaps_enteraddresshere' => 'Unesi adresu ovde',
 1002+ 'semanticmaps_notfound' => 'nije nađeno',
 1003+ 'semanticmaps_paramdesc_height' => 'Visina mape u pikselima (podrazumevano je $1)',
 1004+ 'semanticmaps_paramdesc_width' => 'Širina mape u pikselima (podrazumevano je $1)',
 1005+ 'semanticmaps_paramdesc_zoom' => 'Nivo uvećanja mape',
 1006+ 'semanticmaps_paramdesc_centre' => 'Koordinate centra mape',
 1007+);
 1008+
 1009+/** Swedish (Svenska)
 1010+ * @author Boivie
 1011+ * @author Najami
 1012+ * @author Per
 1013+ */
 1014+$messages['sv'] = array(
 1015+ 'semanticmaps-desc' => 'Ger möjligheten att titta på och ändra koordinatdata sparad genom Semantic MediaWiki-utvidgningen ([http://mapping.referata.com/wiki/Examples demo]).',
 1016+ 'semanticmaps_lookupcoordinates' => 'Kolla upp koordinater',
 1017+ 'semanticmaps_enteraddresshere' => 'Skriv in adress här',
 1018+ 'semanticmaps_notfound' => 'hittades inte',
 1019+ 'semanticmaps_paramdesc_height' => 'Höjden på kartan i pixlar (standard är $1)',
 1020+ 'semanticmaps_paramdesc_width' => 'Bredden på kartan i pixlar (standard är $1)',
 1021+ 'semanticmaps_paramdesc_zoom' => 'Zoomnivån för kartan',
 1022+ 'semanticmaps_paramdesc_centre' => 'Koordinaterna för kartans mittpunkt',
 1023+ 'semanticmaps_paramdesc_type' => 'Standard karttyp för kartan',
 1024+ 'semanticmaps_paramdesc_layers' => 'Lagren tillgängliga för kartan',
 1025+);
 1026+
 1027+/** Telugu (తెలుగు)
 1028+ * @author Veeven
 1029+ */
 1030+$messages['te'] = array(
 1031+ 'semanticmaps_enteraddresshere' => 'చిరునామాని ఇక్కడ ఇవ్వండి',
 1032+ 'semanticmaps_notfound' => 'కనబడలేదు',
 1033+);
 1034+
 1035+/** Tagalog (Tagalog)
 1036+ * @author AnakngAraw
 1037+ */
 1038+$messages['tl'] = array(
 1039+ 'semanticmaps-desc' => 'Nagbibigay ng kakayahang makita at baguhin ang dato ng tugmaang nakatabi sa pamamagitan ng dugtong na Semantikong MediaWiki ([http://mapping.referata.com/wiki/Examples pagpapakita]).',
 1040+ 'semanticmaps-unrecognizeddistance' => 'Hindi isang tanggap na layo ang halagang $1.',
 1041+ 'semanticmaps_lookupcoordinates' => "Hanapin ang mga tugmaang-pampook (''coordinate'')",
 1042+ 'semanticmaps_enteraddresshere' => 'Ipasok ang adres dito',
 1043+ 'semanticmaps_notfound' => 'hindi natagpuan',
 1044+ 'semanticmaps_paramdesc_format' => 'Ang palingkurang pangpagmamapa na ginamit sa paglikha ng mapa',
 1045+ 'semanticmaps_paramdesc_geoservice' => 'Ang paglingkurang pang-geokodigo na ginagamit upang maging mga tugmaang-pampook ang mga direksyon',
 1046+ 'semanticmaps_paramdesc_height' => 'Ang taas ng mapa, sa piksels ($1 ang likas na nakatakda)',
 1047+ 'semanticmaps_paramdesc_width' => 'Ang lapad ng mapa, sa piksels ($1 ang likas na nakatakda)',
 1048+ 'semanticmaps_paramdesc_zoom' => 'Ang antas ng paglapit-tutok ng mapa',
 1049+ 'semanticmaps_paramdesc_centre' => 'Ang mga tugmaang-pampook ng gitna ng mga mapa',
 1050+ 'semanticmaps_paramdesc_controls' => 'Ang mga pangtaban ng tagagamit na inilagay sa ibabaw ng mapa',
 1051+ 'semanticmaps_paramdesc_types' => 'Ang mga uri ng mapang makukuha na nasa ibabaw ng mapa',
 1052+ 'semanticmaps_paramdesc_type' => 'Ang likas na nakatakdang uri ng mapa na para sa mapa',
 1053+ 'semanticmaps_paramdesc_overlays' => 'Ang makukuhang mga patong na nasa ibabaw ng mapa',
 1054+ 'semanticmaps_paramdesc_autozoom' => 'Kapag pinagana ang pagtutok-lapit at paglayo sa pamamagitan ng pang-ikid ng maws',
 1055+ 'semanticmaps_paramdesc_layers' => 'Ang makukuhang mga patong na nasa ibabaw ng mapa',
 1056+);
 1057+
 1058+/** Turkish (Türkçe)
 1059+ * @author Vito Genovese
 1060+ */
 1061+$messages['tr'] = array(
 1062+ 'semanticmaps_lookupcoordinates' => 'Koordinat ara',
 1063+ 'semanticmaps_enteraddresshere' => 'Adresi buraya girin',
 1064+ 'semanticmaps_notfound' => 'bulunamadı',
 1065+ 'semanticmaps_paramdesc_zoom' => 'Haritanın yakınlaşma seviyesi',
 1066+ 'semanticmaps_paramdesc_layers' => 'Haritada mevcut olan katmanlar',
 1067+);
 1068+
 1069+/** Veps (Vepsan kel')
 1070+ * @author Игорь Бродский
 1071+ */
 1072+$messages['vep'] = array(
 1073+ 'semanticmaps_notfound' => 'ei voi löuta',
 1074+);
 1075+
 1076+/** Vietnamese (Tiếng Việt)
 1077+ * @author Minh Nguyen
 1078+ * @author Vinhtantran
 1079+ */
 1080+$messages['vi'] = array(
 1081+ '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://mapping.referata.com/wiki/Examples thử xem]).',
 1082+ 'semanticmaps-unrecognizeddistance' => 'Giá trị $1 không phải là tầm hợp lệ.',
 1083+ 'semanticmaps_lookupcoordinates' => 'Tra tọa độ',
 1084+ 'semanticmaps_enteraddresshere' => 'Nhập địa chỉ vào đây',
 1085+ 'semanticmaps_notfound' => 'không tìm thấy',
 1086+ 'semanticmaps_paramdesc_format' => 'Dịch vụ cung cấp bản đồ',
 1087+ 'semanticmaps_paramdesc_geoservice' => 'Dịch vụ mã hóa địa lý được sử dụng để tính ra tọa độ của địa chỉ',
 1088+ 'semanticmaps_paramdesc_height' => 'Chiều cao của bản đồ bằng điểm ảnh (mặc định là $1)',
 1089+ 'semanticmaps_paramdesc_width' => 'Chiều rộng của bản đồ bằng điểm ảnh (mặc định là $1)',
 1090+ 'semanticmaps_paramdesc_zoom' => 'Mức độ thu phóng của bản đồ',
 1091+ 'semanticmaps_paramdesc_centre' => 'Tọa độ của trung tâm bản đồ',
 1092+ 'semanticmaps_paramdesc_controls' => 'Các điều khiển nằm trên bản đồ',
 1093+ 'semanticmaps_paramdesc_types' => 'Các chế độ có sẵn dành cho bản đồ',
 1094+ 'semanticmaps_paramdesc_type' => 'Chế độ mặc định của bản đồ',
 1095+ 'semanticmaps_paramdesc_overlays' => 'Các lấp có sẵn trên bản đồ',
 1096+ 'semanticmaps_paramdesc_autozoom' => 'Bánh xe chuột có thu phóng hay không',
 1097+ 'semanticmaps_paramdesc_layers' => 'Các lớp có sẵn trên bản đồ',
 1098+);
 1099+
 1100+/** Volapük (Volapük)
 1101+ * @author Smeira
 1102+ */
 1103+$messages['vo'] = array(
 1104+ 'semanticmaps_lookupcoordinates' => 'Tuvön koordinatis',
 1105+);
 1106+
 1107+/** Simplified Chinese (‪中文(简体)‬)
 1108+ * @author Gzdavidwong
 1109+ */
 1110+$messages['zh-hans'] = array(
 1111+ 'semanticmaps_lookupcoordinates' => '查找坐标',
 1112+ 'semanticmaps_notfound' => '未找到',
 1113+);
 1114+
 1115+/** Traditional Chinese (‪中文(繁體)‬)
 1116+ * @author Gzdavidwong
 1117+ * @author Mark85296341
 1118+ * @author Sheepy
 1119+ * @author Wrightbus
 1120+ */
 1121+$messages['zh-hant'] = array(
 1122+ 'semanticmaps-default-kml-pagelink' => '檢視頁面 $1',
 1123+ 'semanticmaps_lookupcoordinates' => '尋找座標',
 1124+ 'semanticmaps_notfound' => '未找到',
 1125+);
 1126+
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/SemanticMaps.i18n.php
___________________________________________________________________
Added: svn:eol-style
11127 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/SemanticMaps.php
@@ -0,0 +1,110 @@
 2+<?php
 3+
 4+/**
 5+ * Initialization file for the Maps extension.
 6+ *
 7+ * On MediaWiki.org: http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 8+ * Official documentation: http://mapping.referata.com/wiki/Semantic_Maps
 9+ * Examples/demo's: http://mapping.referata.com/wiki/Semantic_Maps_examples
 10+ *
 11+ * @file SemanticMaps.php
 12+ * @ingroup SemanticMaps
 13+ *
 14+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 15+ */
 16+
 17+/**
 18+ * This documenation group collects source code files belonging to Semantic Maps.
 19+ *
 20+ * Please do not use this group name for other code. If you have an extension to
 21+ * Semantic Maps, please use your own group definition.
 22+ *
 23+ * @defgroup SemanticMaps Semantic Maps
 24+ */
 25+
 26+if ( !defined( 'MEDIAWIKI' ) ) {
 27+ die( 'Not an entry point.' );
 28+}
 29+
 30+// Show a warning if Maps is not loaded.
 31+if ( ! defined( 'Maps_VERSION' ) ) {
 32+ die( '<b>Error:</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>.<br />' );
 33+}
 34+
 35+// Show a warning if Semantic MediaWiki is not loaded.
 36+if ( ! defined( 'SMW_VERSION' ) ) {
 37+ die( '<b>Error:</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>.<br />' );
 38+}
 39+
 40+define( 'SM_VERSION', '0.7.6' );
 41+
 42+$wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'other'][] = array(
 43+ 'path' => __FILE__,
 44+ 'name' => 'Semantic Maps',
 45+ 'version' => SM_VERSION,
 46+ 'author' => array(
 47+ '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]'
 48+ ),
 49+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Maps',
 50+ 'descriptionmsg' => 'semanticmaps-desc'
 51+);
 52+
 53+$useExtensionPath = version_compare( $wgVersion, '1.16', '>=' ) && isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath;
 54+$smgScriptPath = ( $useExtensionPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps';
 55+$smgDir = dirname( __FILE__ ) . '/';
 56+unset( $useExtensionPath );
 57+
 58+$smgStyleVersion = $wgStyleVersion . '-' . SM_VERSION;
 59+
 60+// Include the settings file.
 61+require_once 'SM_Settings.php';
 62+
 63+$wgExtensionFunctions[] = 'smfSetup';
 64+
 65+$wgExtensionMessagesFiles['SemanticMaps'] = $smgDir . 'SemanticMaps.i18n.php';
 66+
 67+$incDir = dirname( __FILE__ ) . '/includes/';
 68+
 69+// Data values
 70+$wgAutoloadClasses['SMGeoCoordsValue'] = $incDir . 'SM_GeoCoordsValue.php';
 71+
 72+// Value descriptions
 73+$wgAutoloadClasses['SMGeoCoordsValueDescription'] = $incDir . 'SM_GeoCoordsValueDescription.php';
 74+$wgAutoloadClasses['SMAreaValueDescription'] = $incDir . 'SM_AreaValueDescription.php';
 75+
 76+$wgAutoloadClasses['SemanticMapsHooks'] = dirname( __FILE__ ) . '/SemanticMaps.hooks.php';
 77+
 78+// Hook for initializing the Geographical Coordinate type.
 79+$wgHooks['smwInitDatatypes'][] = 'SMGeoCoordsValue::initGeoCoordsType';
 80+
 81+// Hook for initializing the field types needed by Geographical Coordinates.
 82+$wgHooks['SMWCustomSQLStoreFieldType'][] = 'SMGeoCoordsValue::initGeoCoordsFieldTypes';
 83+
 84+// Hook for defining a table to store geographical coordinates in.
 85+$wgHooks['SMWPropertyTables'][] = 'SMGeoCoordsValue::initGeoCoordsTable';
 86+
 87+// Hook for defining the default query printer for queries that ask for geographical coordinates.
 88+$wgHooks['SMWResultFormat'][] = 'SMGeoCoordsValue::addGeoCoordsDefaultFormat';
 89+
 90+// Hook for adding a Semantic Maps links to the Admin Links extension.
 91+$wgHooks['AdminLinks'][] = 'SemanticMapsHooks::addToAdminLinks';
 92+
 93+/**
 94+ * 'Initialization' function for the Semantic Maps extension.
 95+ * The only work done here is creating the extension credits for
 96+ * Semantic Maps. The actuall work in done via the Maps hooks.
 97+ *
 98+ * @since 0.1
 99+ *
 100+ * @return true
 101+ */
 102+function smfSetup() {
 103+ global $wgVersion;
 104+
 105+ // This function has been deprecated in 1.16, but needed for earlier versions.
 106+ if ( version_compare( $wgVersion, '1.16', '<' ) ) {
 107+ wfLoadExtensionMessages( 'SemanticMaps' );
 108+ }
 109+
 110+ return true;
 111+}
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/SemanticMaps.php
___________________________________________________________________
Added: svn:eol-style
1112 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/SemanticMaps.hooks.php
@@ -0,0 +1,36 @@
 2+<?php
 3+
 4+/**
 5+ * Static class for hooks handled by the Semantic Maps extension.
 6+ *
 7+ * @since 0.7
 8+ *
 9+ * @file SemanticMaps.hooks.php
 10+ * @ingroup SemanticMaps
 11+ *
 12+ * @author Jeroen De Dauw
 13+ */
 14+final class SemanticMapsHooks {
 15+
 16+ /**
 17+ * Adds a link to Admin Links page.
 18+ *
 19+ * @since 0.7
 20+ *
 21+ * @return true
 22+ */
 23+ public static function addToAdminLinks( &$admin_links_tree ) {
 24+ $displaying_data_section = $admin_links_tree->getSection( wfMsg( 'smw_adminlinks_displayingdata' ) );
 25+
 26+ // Escape if SMW hasn't added links.
 27+ if ( is_null( $displaying_data_section ) ) return true;
 28+
 29+ $smw_docu_row = $displaying_data_section->getRow( 'smw' );
 30+
 31+ $sm_docu_label = wfMsg( 'adminlinks_documentation', wfMsg( 'semanticmaps_name' ) );
 32+ $smw_docu_row->addItem( AlItem::newFromExternalLink( 'http://mapping.referata.com/wiki/Semantic_Maps', $sm_docu_label ) );
 33+
 34+ return true;
 35+ }
 36+
 37+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/SemanticMaps.hooks.php
___________________________________________________________________
Added: svn:eol-style
138 + native
Index: tags/extensions/SemanticMaps/REL_0_7_6/README
@@ -0,0 +1,25 @@
 2+== About ==
 3+
 4+Semantic Maps is an extension that adds semantic capabilities to the Maps extension. This
 5+includes the ability to add, edit, aggregate and visualize coordinate data stored through
 6+the Semantic MediaWiki extension.
 7+
 8+Since Semantic Maps uses the Maps API, you can use multiple mapping services. These include
 9+Google Maps (with Google Earth support), Yahoo! Maps, OpenLayers and OpenStreetMap.
 10+
 11+Both Semantic Maps and Maps are based on Semantic Google Maps and Semantic Layers, and are
 12+meant to replace these extensions. Having Semantic MediaWiki and Maps installed is a
 13+prerequisite for the Semantic Maps extension; the code will not work without it.
 14+
 15+Notes on installing Semantic Maps are found in the file INSTALL.
 16+
 17+
 18+== Contributing ==
 19+
 20+If you have bug reports or requests, please add them to the Talk page [0]. You can also
 21+send them to Jeroen De Dauw, jeroendedauw -at- gmail.com, and Yaron Koren, at yaron57 -at-
 22+gmail.com.
 23+
 24+[0] http://www.mediawiki.org/w/index.php?title=Extension_talk:Semantic_Maps
 25+
 26+For more info, see http://mapping.referata.com/wiki/Mapping_on_MediaWiki
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_0_7_6/README
___________________________________________________________________
Added: svn:eol-style
127 + native

Status & tagging log