r94700 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94699‎ | r94700 | r94701 >
Date:22:14, 16 August 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Tag for version 1.0.1.
Modified paths:
  • /tags/extensions/SemanticMaps/REL_1_0_1 (added) (history)

Diff [purge]

Index: tags/extensions/SemanticMaps/REL_1_0_1/SM_Settings.php
@@ -0,0 +1,67 @@
 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 copying 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+ * @licence GNU GPL v3
 16+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 17+ */
 18+
 19+if ( !defined( 'MEDIAWIKI' ) ) {
 20+ die( 'Not an entry point.' );
 21+}
 22+
 23+
 24+
 25+# Mapping services configuration
 26+
 27+ # Array of String. The default mapping service for each feature, which will be used when no valid service is provided by the user.
 28+ # Each service needs to be enabled, if not, the first one from the available services will be taken.
 29+ # Note: The default service needs to be available for the feature you set it for, since it's used as a fallback mechanism.
 30+ $egMapsDefaultServices['qp'] = $egMapsDefaultService;
 31+ $egMapsDefaultServices['fi'] = $egMapsDefaultService;
 32+
 33+
 34+
 35+# Queries
 36+
 37+ # Boolean. The default value for the forceshow parameter. Will force a map to be shown even when there are no query results
 38+ # when set to true. This value will only be used when the user does not provide one.
 39+ $smgQPForceShow = true;
 40+
 41+ # Boolean. The default value for the showtitle parameter. Will hide the title in the marker pop-ups when set to true.
 42+ # This value will only be used when the user does not provide one.
 43+ $smgQPShowTitle = true;
 44+
 45+ # String or false. Allows you to define the content and it's layout of marker pop-ups via a template.
 46+ # This value will only be used when the user does not provide one.
 47+ $smgQPTemplate = false;
 48+
 49+ # Enum. The default output format of coordinates.
 50+ # Possible values: Maps_COORDS_FLOAT, Maps_COORDS_DMS, Maps_COORDS_DM, Maps_COORDS_DD
 51+ $smgQPCoodFormat = $egMapsCoordinateNotation;
 52+
 53+ # Boolean. Indicates if coordinates should be outputted in directional notation by default.
 54+ $smgQPCoodDirectional = $egMapsCoordinateDirectional;
 55+
 56+
 57+
 58+# Forms
 59+
 60+ $smgFIMulti = true;
 61+
 62+ $smgFIFieldSize = 40;
 63+
 64+ # Integer or string. The default width and height of maps in forms created by using Semantic Forms.
 65+ # These values only be used when the user does not provide them.
 66+ $smgFIWidth = 665;
 67+ $smgFIHeight = $egMapsMapHeight;
 68+
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/SM_Settings.php
___________________________________________________________________
Added: svn:eol-style
169 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/INSTALL
@@ -0,0 +1,56 @@
 2+[[Semantic Maps 1.0.1]]
 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_1_0_1/INSTALL
___________________________________________________________________
Added: svn:eol-style
158 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/RELEASE-NOTES
@@ -0,0 +1,438 @@
 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+=== Semantic Maps 1.0.1 ===
 12+(2011-08-17)
 13+
 14+* Fixed handling of the semantic link caption in the geographical coordinate datavalue class.
 15+
 16+=== Semantic Maps 1.0 ===
 17+(2011-07-19)
 18+
 19+This version branched from Semantic Maps 0.7.x at version 0.7.3.
 20+See the maps release notes for all changes not specific to Semantic Maps.
 21+
 22+* Improved map query parameter support in the Special:Ask GUI
 23+
 24+* Fixed fatal error occurring when running maintenance/refreshLinks.php.
 25+
 26+* Rewrote all the form inputs to jQuery plugins.
 27+
 28+* Rewrote the map printers to use the SMQueryHandler class.
 29+
 30+* Added geocoding capability to the OpenLayers form input when having a GeoNames API account.
 31+
 32+* Added 'update map' button to all form inputs.
 33+
 34+* Fixed PostGres support for distance queries.
 35+
 36+* Use of the DataItems introduces in Semantic MediaWiki 1.6.
 37+
 38+=== Semantic Maps 0.7.3 ===
 39+(2010-11-30)
 40+
 41+==== new features ====
 42+
 43+* Added KML result format that allows the export of geographical data queried via SMW in the form of .kml files.
 44+
 45+=== Semantic Maps 0.7.2 ===
 46+(2010-10-28)
 47+
 48+==== Bug fixes ====
 49+
 50+* Fixed small layout issue in query pop-ups when property names are blank.
 51+
 52+=== Semantic Maps 0.7.1 ===
 53+(2010-10-20)
 54+
 55+==== New features ====
 56+
 57+* Image layers for OpenLayers maps, defined via pages in the Layer namespace.
 58+
 59+==== Bug fixes ====
 60+
 61+* Support for images without namespace prefix in the statispoints parameter in map ask queries.
 62+
 63+* Fixed several issue with the OpenLayers form input.
 64+
 65+* Fixed fatal error for Google Maps v2 options on Special:Ask.
 66+
 67+=== Semantic Maps 0.7 ===
 68+(2010-10-15)
 69+
 70+==== New features ====
 71+
 72+* Added 'locations' parameter to the map query printers that allows for displaying static locations
 73+ in addition to query results in queries. It behaves the same as the locations parameter in display_points.
 74+
 75+==== Bug fixes ====
 76+
 77+* Fixed compatibility with the MW 1.17 resource loader.
 78+
 79+==== Internal improvements ====
 80+
 81+* Use of Validator 0.4, allowing for more robust and consistent error reporting.
 82+
 83+* Restructured the directory structure of the extension to better match it's architecture.
 84+
 85+=== Semantic Maps 0.6.6 ===
 86+(2010-08-26)
 87+
 88+=== New features ===
 89+
 90+* Added support for 'semantic' extension type, added by SMW 1.5.2 and above.
 91+
 92+==== Refactoring ====
 93+
 94+* Use of the new MapsMappingServices class of the Maps extension instead of the globals.
 95+
 96+==== Bug fixes ====
 97+
 98+* Fixed issue that caused popup contents to be displayed incorrectly when using templates.
 99+
 100+* Fixed issue that lowercased template names provided with the template parameter in queries.
 101+
 102+=== Semantic Maps 0.6.5 ===
 103+(2010-07-27)
 104+
 105+==== New features ====
 106+
 107+* Added hook for default result formats based on queried data types (requires SMW 1.5.2 or above).
 108+
 109+==== Refactoring ====
 110+
 111+* Moved map id creation to the mapping service class for all features.
 112+
 113+* Moved marker js creation for query printers to the mapping service class for all features.
 114+
 115+* Moved default zoom level access method to the mapping service class for all features.
 116+
 117+* Cleaned up the way specific parameter info is handled.
 118+
 119+* Improved the structure of the geocoding functionality in form inputs.
 120+
 121+==== Bug fixes ====
 122+
 123+* Fixed the default zoom for form inputs and query printers.
 124+
 125+=== Semantic Maps 0.6.4 ===
 126+(2010-07-08)
 127+
 128+==== New features ====
 129+
 130+* Re-added service link support, which got removed in 0.6.
 131+
 132+==== Refactoring ====
 133+
 134+* Moved more functionality over from feature classes to service classes to prevent crazy code-flow and code duplication.
 135+
 136+==== Bug fixes ====
 137+
 138+* Fixed php notice that occurred in some queries, introduced in 0.6.3.
 139+
 140+* Fixed issue that caused result format maps not to load when a centre address was provided that could not be geocoded.
 141+
 142+=== Semantic Maps 0.6.3 ===
 143+(2010-06-20)
 144+
 145+==== Refactoring ====
 146+
 147+* 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.
 148+
 149+==== Bug fixes ====
 150+
 151+* Fixed issue that caused Yahoo! Maps and OpenLayers maps not to load on form pages.
 152+
 153+* Fixed php warning originating from Validator that occurred on form pages with maps.
 154+
 155+* Fixed issue that caused a fatal error when doing a query via special:ask with a mapping format, present since 0.6.
 156+
 157+=== Semantic Maps 0.6.2 ===
 158+(2010-06-07)
 159+
 160+==== Bug fixes ====
 161+
 162+* Fixed fatal error that occurred when editing a page via a form with a map on it.
 163+
 164+=== Semantic Maps 0.6.1 ===
 165+(2010-06-04)
 166+
 167+==== Bug fixes ====
 168+
 169+* Fixed serious bug that caused mapping parameters to get ignored in semantic queries and forms.
 170+
 171+* Fixed fatal error that occurred when not disabling the form input feature when Semantic Forms is not installed.
 172+
 173+* Fixed bug in map form inputs that stored 'west' coordinates as 'south' coordinates, effectively rendering the resulting coordinate set invalid.
 174+
 175+=== Semantic Maps 0.6 ===
 176+(2010-05-31)
 177+
 178+==== New features ====
 179+
 180+* Added full support for both directional and non-directional coordinate notations in DMS, DD, DM and float notation.
 181+
 182+* Added native geographical proximity query support.
 183+
 184+* Added settings to specify the width and height of maps in forms.
 185+
 186+* Added settings to specify the format of coordinates as shown in query printouts.
 187+
 188+==== Refactoring ====
 189+
 190+* Rewrote map divs and added loading message for each map.
 191+
 192+* Rewrote individual map JS to be added to the page header.
 193+
 194+* Restructured the directory structure to make what the services and features are more clear.
 195+
 196+* Rewrote storage of coordinates to make the proximity query scalable.
 197+
 198+==== Bug fixes ====
 199+
 200+* Fixed conflict with prototype library that caused compatibility problems with the Halo extension.
 201+
 202+=== Semantic Maps 0.5.5 ===
 203+(2010-03-20)
 204+
 205+==== Refactoring ====
 206+
 207+* Moved the geographical proximity query from Semantic MediaWiki over to Semantic Maps.
 208+
 209+* Stylized the code to conform to MediaWiki's spacing conventions.
 210+
 211+==== Bug fixes ====
 212+
 213+* Fixed issue causing properties of type Page to not show up in pop-ups when using the template parameter.
 214+
 215+* Fixed escaping issues that caused pop-ups to break when they contained '-signs.
 216+
 217+=== Semantic Maps 0.5.4 ===
 218+(2010-03-01)
 219+
 220+==== Bug fixes ====
 221+
 222+* Fixed potential xss vectors.
 223+
 224+* Fixed minor JS error that was present for all maps except OSM.
 225+
 226+* Fixed i18n issue that caused geocoords not to be recognized on several foreign language wiki's.
 227+
 228+=== Semantic Maps 0.5.3 ===
 229+(2010-02-01)
 230+
 231+==== Bug fixes ====
 232+
 233+* Fixed issue with the type and types parameters in the Yahoo! Maps form input.
 234+
 235+* Fixed OpenLayers form input projection bug, causing the the coordinates to be wrongly interpreted.
 236+
 237+* Fixed marker display for the OpenLayers form inputs.
 238+
 239+* Fixed issue causing a fatal error when executing a query on Special:Ask with the "map" format.
 240+
 241+=== Semantic Maps 0.5.2 ===
 242+(2010-01-20)
 243+
 244+==== New features ====
 245+
 246+* Added support for template= parameter to the result printers.
 247+
 248+* Added support for showtitle= parameter to the result printers.
 249+
 250+* 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.
 251+
 252+==== Bug fixes ====
 253+
 254+* Added missing SMW #Ask: parameters to the parameter list of the Semantic Maps query printers.
 255+
 256+* Fixed issue with centre parameter for maps with no results (using forceshow=on).
 257+
 258+=== Semantic Maps 0.5.1 ===
 259+(2009-12-25)
 260+
 261+==== New features ====
 262+
 263+* Added parameter support for the 'map' format on Special:Ask.
 264+
 265+* 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.
 266+
 267+==== Refactoring ====
 268+
 269+* Modified the parameter definitions to work with Validator 0.2.
 270+
 271+* Removed redundant (because of Validator 0.2) utility function calls from the mapping classes.
 272+
 273+* Ensured none of the form input classes get loaded when SF is not present.
 274+
 275+==== Bug fixes ====
 276+
 277+* Fixed issue with the query printers causing error messages to be shown for ask specific parameters.
 278+
 279+===Semantic Maps 0.5===
 280+(2009-12-17)
 281+
 282+====New features====
 283+
 284+* Added a result format for the OL optimized for OSM service.
 285+
 286+* Added support for the new Special:Ask page's parameter handling to the query printers.
 287+
 288+==== Refactoring ====
 289+
 290+* Moved the geographical coordinate data type handling from SMW to SM.
 291+
 292+* Added checks for extension dependencies that need to be present for Semantic Maps to be initialized.
 293+
 294+==== Bug fixes ====
 295+
 296+* Fixed issue with the form input registration. The main service names where getting changed into the default mapping service.
 297+
 298+===Semantic Maps 0.4.2===
 299+(2009-11-15)
 300+
 301+Changes in 0.4.2 discussed on the authors blog:
 302+
 303+* [http://blog.bn2vs.com/2009/11/16/maps-and-semantic-maps-0-4-2/ Maps and Semantic Maps 0.4.2 released]
 304+* [http://blog.bn2vs.com/2009/11/12/new-in-maps-0-4-2/ New in Maps 0.4.2]
 305+
 306+==== Bug fixes ====
 307+
 308+* 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.
 309+
 310+===Semantic Maps 0.4.1===
 311+(2009-11-10)
 312+
 313+====New features====
 314+
 315+* Added smart geocoding to the QP's centre parameter.
 316+
 317+* Added smart geocoding to the FI's centre parameter.
 318+
 319+==== Bug fixes ====
 320+
 321+* Fixed bug in the Yahoo! Maps form input, caused by not adapting a renamed variable.
 322+
 323+* Fixed bug in the form scripts caused by wrongly encoded JavaScript file of Maps.
 324+
 325+===Semantic Maps 0.4===
 326+(2009-11-03)
 327+
 328+Changes in 0.4 discussed on the authors blog:
 329+
 330+* [http://blog.bn2vs.com/2009/11/03/finally-maps-and-semantic-maps-0-4/ Finally! Maps and Semantic Maps 0.4!]
 331+
 332+====Bug fixes====
 333+
 334+* 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].
 335+
 336+* Fixed problem that caused the SM result formats to not get displayed on Special:Ask.
 337+
 338+===Semantic Maps 0.3.4===
 339+(2009-09-12)
 340+
 341+Changes in 0.3.4 discussed on the authors blog:
 342+
 343+* [http://blog.bn2vs.com/2009/09/12/maps-and-semantic-maps-0-3-4-released/ Maps and Semantic Maps 0.3.4 released]
 344+
 345+====Bug fixes====
 346+
 347+* Fixed bug causing error for people who do not have Semantic Forms installed and enabled, presumably introduced in 0.3.
 348+
 349+* 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.
 350+
 351+====Refactoring====
 352+
 353+* Restructured the extension to work with the new feature hook system of Maps.
 354+
 355+===Semantic Maps 0.3.3===
 356+(2009-08-15)
 357+
 358+Changes in 0.3.3 discussed on the authors blog:
 359+
 360+* [http://blog.bn2vs.com/2009/08/25/maps-and-semantic-maps-0-3-3/ Maps and Semantic Maps 0.3.3]
 361+
 362+====Bug fixes====
 363+
 364+* Fixed error caused by the 'map' format on the Special:Ask page
 365+
 366+===Semantic Maps 0.3.2===
 367+(2009-08-18)
 368+
 369+====Bug fixes====
 370+
 371+* Fixed logic error that caused maps to have a wrong centre and zoom when a query only returned one result.
 372+
 373+* Fixed an issue with the centre parameter in queries. In some cases it would not be processed correctly and cause PHP notices.
 374+
 375+===Semantic Maps 0.3.1===
 376+(2009-08-18)
 377+
 378+====Bug fixes====
 379+
 380+* Fixed script design flaw that caused errors when using the 'map' format in a query.
 381+
 382+===Semantic Maps 0.3===
 383+(2009-08-14)
 384+
 385+Changes in 0.3 discussed on the authors blog:
 386+
 387+* [http://blog.bn2vs.com/2009/08/13/final-changes-for-maps-and-sm-0-3/ Final changes for Maps and SM 0.3]
 388+
 389+* [http://blog.bn2vs.com/2009/08/07/new-features-in-maps-and-sm-0-3/ New features in Maps and SM 0.3]
 390+
 391+* [http://blog.bn2vs.com/2009/08/05/structural-changes-for-maps-and-sm-0-3/ Structural changes for Maps and SM 0.3]
 392+
 393+====New functionality====
 394+
 395+* Yahoo! Maps and OpenLayers now handle the "icon=" parameter that can come from Semantic Compound Queries, as Google Maps already did.
 396+
 397+====Refactoring====
 398+
 399+* Restructured the Query Printer classes (JavaScript based logic).
 400+
 401+* Made form input classes weakly typed, so they fully work with the new aliasing system.
 402+
 403+* Integrated the new hook system of Maps.
 404+
 405+* Made the form input class inherit from MapsMapFeature.
 406+
 407+====Bug fixes====
 408+
 409+* Mapping formats get added only once, as opossed to multiple times in version 0.2.2.
 410+
 411+* Added "elementNamePrefix" to the map names and fields of form inputs to prevent JavaScript errors.
 412+
 413+* When a query returns no results, nothing will be displayed, instead of an empty map.
 414+
 415+* The Google Maps form input now zooms in correctly when a user looks up an address.
 416+
 417+===Semantic Maps 0.2===
 418+(2009-07-29)
 419+
 420+====New functionality====
 421+
 422+* Added a hook for [[Extension:Admin_Links|Admin Links]].
 423+
 424+* Added multi geocoder integration with form inputs.
 425+
 426+* Added support for the Yahoo! Geocoder (in form inputs).
 427+
 428+====Refactoring====
 429+
 430+* Restructured the Form Input classes.
 431+
 432+====Bug fixes====
 433+
 434+* Fixed issue that occurred when a custom centre is set for a Yahoo! Maps map, causing the map to not display their markers correctly.
 435+
 436+===Semantic Maps 0.1===
 437+(2009-07-21)
 438+
 439+* 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_1_0_1/RELEASE-NOTES
___________________________________________________________________
Added: svn:eol-style
1440 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/SM_GoogleMaps3MultiInput.php
@@ -0,0 +1,47 @@
 2+<?php
 3+
 4+/**
 5+ * Google Maps v3 form input class for multiple locations.
 6+ *
 7+ * @since 1.0
 8+ * @file SM_GoogleMaps3MultiInput.php
 9+ * @ingroup SemanticMaps
 10+ *
 11+ * @licence GNU GPL v3
 12+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 13+ */
 14+class SMGoogleMaps3MultiInput extends SMFormInput {
 15+
 16+ /**
 17+ * @see SMFormInput::getResourceModules
 18+ *
 19+ * @since 1.0
 20+ *
 21+ * @return array of string
 22+ */
 23+ protected function getResourceModules() {
 24+ return array_merge( parent::getResourceModules(), array( 'ext.sm.fi.googlemaps3.multi' ) );
 25+ }
 26+
 27+ public static function onInputRequest( $coordinates, $input_name, $is_mandatory, $is_disabled, array $field_args ) {
 28+ $formInput = new self( MapsMappingServices::getServiceInstance( 'googlemaps3' ) );
 29+ return $formInput->getInputOutput( $coordinates, $input_name, $is_mandatory, $is_disabled, $field_args );
 30+ }
 31+
 32+ /**
 33+ * Returns a PHP object to encode to JSON with the map data.
 34+ *
 35+ * @since 1.0
 36+ *
 37+ * @param array $params
 38+ * @param Parser $parser
 39+ *
 40+ * @return mixed
 41+ */
 42+ protected function getJSONObject( array $params, Parser $parser ) {
 43+ $params['ismulti'] = true;
 44+
 45+ return $params;
 46+ }
 47+
 48+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/SM_GoogleMaps3MultiInput.php
___________________________________________________________________
Added: svn:eol-style
149 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/SM_GoogleMaps3.php
@@ -0,0 +1,77 @@
 2+<?php
 3+
 4+/**
 5+ * This groupe contains all Google Maps v3 related files of the Semantic Maps extension.
 6+ *
 7+ * @defgroup SMGoogleMaps3 Google Maps v3
 8+ * @ingroup SMGoogleMaps3
 9+ */
 10+
 11+/**
 12+ * This file holds the general information for the Google Maps v3 service.
 13+ *
 14+ * @since 1.0
 15+ *
 16+ * @file SM_GoogleMaps3.php
 17+ * @ingroup SMGoogleMaps3
 18+ *
 19+ * @licence GNU GPL v3
 20+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 21+ */
 22+
 23+if ( !defined( 'MEDIAWIKI' ) ) {
 24+ die( 'Not an entry point.' );
 25+}
 26+
 27+$moduleTemplate = array(
 28+ 'localBasePath' => dirname( __FILE__ ),
 29+ 'remoteBasePath' => $smgScriptPath . '/includes/services/GoogleMaps3',
 30+ 'group' => 'ext.semanticmaps',
 31+);
 32+
 33+$wgResourceModules['ext.sm.fi.googlemaps3'] = $moduleTemplate + array(
 34+ 'dependencies' => array( 'ext.maps.googlemaps3', 'ext.sm.forminputs' ),
 35+ 'scripts' => array(
 36+ 'ext.sm.googlemapsinput.js'
 37+ ),
 38+);
 39+
 40+$wgResourceModules['ext.sm.fi.googlemaps3.single'] = $moduleTemplate + array(
 41+ 'dependencies' => array( 'ext.sm.fi.googlemaps3' ),
 42+ 'scripts' => array(
 43+ 'jquery.googlemapsinput.js',
 44+ ),
 45+ 'messages' => array(
 46+ )
 47+);
 48+/*
 49+$wgResourceModules['ext.sm.fi.googlemaps3.multi'] = $moduleTemplate + array(
 50+ 'dependencies' => array( 'ext.sm.fi.googlemaps3', 'jquery.ui.button', 'jquery.ui.dialog' ),
 51+ 'localBasePath' => dirname( __FILE__ ),
 52+ 'scripts' => array(
 53+ 'jquery.gmapsmultiinput.js',
 54+ ),
 55+ 'messages' => array(
 56+ 'semanticmaps-forminput-remove',
 57+ 'semanticmaps-forminput-add',
 58+ 'semanticmaps-forminput-locations'
 59+ )
 60+);
 61+*/
 62+unset( $moduleTemplate );
 63+
 64+$wgHooks['MappingServiceLoad'][] = 'smfInitGoogleMaps3';
 65+
 66+function smfInitGoogleMaps3() {
 67+ global $wgAutoloadClasses, $sfgFormPrinter;
 68+
 69+ $wgAutoloadClasses['SMGoogleMaps3FormInput'] = dirname( __FILE__ ) . '/SM_GoogleMaps3FormInput.php';
 70+ //$wgAutoloadClasses['SMGoogleMaps3MultiInput'] = dirname( __FILE__ ) . '/SM_GoogleMaps3MultiInput.php';
 71+
 72+ MapsMappingServices::registerServiceFeature( 'googlemaps3', 'qp', 'SMMapPrinter' );
 73+ MapsMappingServices::registerServiceFeature( 'googlemaps3', 'fi', 'SMGoogleMaps3FormInput' );
 74+
 75+ //$sfgFormPrinter->setInputTypeHook( 'googlemapsmulti', array( 'SMGoogleMaps3MultiInput', 'onInputRequest' ), array() );
 76+
 77+ return true;
 78+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/SM_GoogleMaps3.php
___________________________________________________________________
Added: svn:eol-style
179 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/ext.sm.googlemapsinput.js
@@ -0,0 +1,33 @@
 2+/**
 3+ * JavasSript for the Google Maps v3 form input in the Semantic Maps extension.
 4+ * @see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 5+ *
 6+ * @since 1.0
 7+ * @ingroup SemanticMaps
 8+ *
 9+ * @licence GNU GPL v3
 10+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 11+ */
 12+
 13+jQuery(document).ready(function() {
 14+ if ( true ) { // TODO
 15+ for ( i in window.mwmaps.googlemaps3_forminputs ) {
 16+ if ( window.mwmaps.googlemaps3_forminputs[i].ismulti ) {
 17+ jQuery( '#' + i + '_forminput' ).gmapsmultiinput( i, window.mwmaps.googlemaps3_forminputs[i] );
 18+ }
 19+ else {
 20+ jQuery( '#' + i + '_forminput' ).googlemapsinput( i, window.mwmaps.googlemaps3_forminputs[i] );
 21+ }
 22+ }
 23+ }
 24+ else {
 25+ alert( mediaWiki.msg( 'maps-googlemaps3-incompatbrowser' ) );
 26+
 27+ for ( i in window.mwmaps.googlemaps3_forminputs ) {
 28+ jQuery( '#' + i + '_forminput' )
 29+ .html( $( '<input />' )
 30+ .attr( { 'name': i, 'value': semanticMaps.buildInputValue( window.mwmaps.googlemaps3_forminputs[i].locations ) } )
 31+ );
 32+ }
 33+ }
 34+});
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/ext.sm.googlemapsinput.js
___________________________________________________________________
Added: svn:eol-style
135 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/jquery.googlemapsinput.js
@@ -0,0 +1,70 @@
 2+/**
 3+ * JavasSript for the Google Maps v3 form input of the Semantic Maps extension.
 4+ * @see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 5+ *
 6+ * @since 1.0
 7+ * @ingroup SemanticMaps
 8+ *
 9+ * @licence GNU GPL v3
 10+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 11+ */
 12+
 13+(function( $ ){ $.fn.googlemapsinput = function( mapDivId, options ) {
 14+
 15+ var self = this;
 16+ var geocoder = false;
 17+
 18+ /**
 19+ * Creates and places a new marker on the map at the provided
 20+ * coordinate set and the pans to it.
 21+ * @param {Object} coordinate
 22+ */
 23+ this.showCoordinate = function( coordinate ) {
 24+ this.mapDiv.removeMarkers();
 25+ coordinate.icon = '';
 26+ coordinate.title = '';
 27+ coordinate.text = coord.dms( coordinate.lat, coordinate.lon );
 28+ var marker = this.mapDiv.addMarker( coordinate );
 29+ this.mapDiv.map.panTo( marker.getPosition() );
 30+ };
 31+
 32+ /**
 33+ * Calls this.showCoordinate with the provided latLng and updates the input field.
 34+ * @param {google.maps.LatLng} latLng
 35+ */
 36+ this.showLatLng = function( latLng ) {
 37+ var location = { lat: latLng.lat(), lon: latLng.lng() };
 38+ this.showCoordinate( location );
 39+ this.updateInput( [ location ] );
 40+ }
 41+
 42+ this.setupGeocoder = function() {
 43+ if ( geocoder === false ) {
 44+ geocoder = new google.maps.Geocoder();
 45+ }
 46+ }
 47+
 48+ this.geocodeAddress = function( address ) {
 49+ this.setupGeocoder();
 50+ geocoder.geocode( { 'address': address }, function( results, status ) {
 51+ if ( status == google.maps.GeocoderStatus.OK ) {
 52+ self.showLatLng( results[0].geometry.location );
 53+ }
 54+ else {
 55+ // TODO: i18n
 56+ alert( "Geocode was not successful for the following reason: " + status );
 57+ }
 58+ } );
 59+ };
 60+
 61+ this.mapforminput( mapDivId, options );
 62+
 63+ this.mapDiv.googlemaps( options );
 64+
 65+ google.maps.event.addListener( this.mapDiv.map, 'click', function( event ) {
 66+ self.showLatLng( event.latLng );
 67+ } );
 68+
 69+ return this;
 70+
 71+}; })( jQuery );
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/jquery.googlemapsinput.js
___________________________________________________________________
Added: svn:eol-style
172 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/SM_GoogleMaps3FormInput.php
@@ -0,0 +1,26 @@
 2+<?php
 3+
 4+/**
 5+ * Google Maps v3 form input class.
 6+ *
 7+ * @since 1.0
 8+ * @file SM_GoogleMaps3FormInput.php
 9+ * @ingroup SemanticMaps
 10+ *
 11+ * @licence GNU GPL v3
 12+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 13+ */
 14+class SMGoogleMaps3FormInput extends SMFormInput {
 15+
 16+ /**
 17+ * @see SMFormInput::getResourceModules
 18+ *
 19+ * @since 1.0
 20+ *
 21+ * @return array of string
 22+ */
 23+ protected function getResourceModules() {
 24+ return array_merge( parent::getResourceModules(), array( 'ext.sm.fi.googlemaps3.single' ) );
 25+ }
 26+
 27+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/SM_GoogleMaps3FormInput.php
___________________________________________________________________
Added: svn:eol-style
128 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/jquery.gmapsmultiinput.js
@@ -0,0 +1,317 @@
 2+/**
 3+ * JavasSript for the Google Maps v3 form input of the Semantic Maps extension.
 4+ * @see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 5+ *
 6+ * @since 1.0
 7+ * @ingroup SemanticMaps
 8+ *
 9+ * @licence GNU GPL v3
 10+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 11+ */
 12+
 13+(function( $, mw ){ $.fn.gmapsmultiinput = function( mapDivId, options ) {
 14+ var MAPFILES_URL = "http://maps.gstatic.com/intl/en_us/mapfiles/";
 15+
 16+ var clickIcon = new google.maps.MarkerImage(
 17+ MAPFILES_URL + 'dd-start.png',
 18+ new google.maps.Size(20, 34),
 19+ new google.maps.Point(0, 0),
 20+ new google.maps.Point(10, 34)
 21+ );
 22+
 23+ var clickMarker = null;
 24+
 25+ var geocoder = new google.maps.Geocoder();
 26+
 27+ this.attr( { 'class': "ui-widget" } ).css( { 'width': 'auto' } );
 28+
 29+ this.html(
 30+ $( '<div />' ).css( {
 31+ 'display': 'none'
 32+ } ).append( $( '<input />' ).attr( { 'type': 'text', 'name': options.inputname, 'id': mapDivId + '_values' } ) )
 33+ );
 34+
 35+ updateInputValue( semanticMaps.buildInputValue( options.locations ) );
 36+
 37+ var table = $( '<table />' ).attr( { 'class' : 'mapinput ui-widget ui-widget-content' } );
 38+ this.append( table );
 39+
 40+ var mapDiv = $( '<div />' )
 41+ .attr( {
 42+ 'id': mapDivId,
 43+ 'class': 'ui-widget ui-widget-content'
 44+ } )
 45+ .css( {
 46+ 'width': options.width,
 47+ 'height': options.height
 48+ } );
 49+ this.append( mapDiv );
 50+ mapDiv.googlemaps( options );
 51+
 52+ google.maps.event.addListener( mapDiv.map, 'click', onClickCallback );
 53+
 54+ function onClickCallback() {
 55+ // TODO
 56+ }
 57+
 58+ table.append(
 59+ '<thead><tr class="ui-widget-header "><th colspan="2">' + mw.msg( 'semanticmaps-forminput-locations' ) + '</th></tr></thead><tbody>'
 60+ );
 61+
 62+ var rowNr = options.locations.length;
 63+
 64+ for ( i in options.locations ) {
 65+ appendTableRow( i, options.locations[i].lat, options.locations[i].lon );
 66+ }
 67+
 68+ table.append(
 69+ '<tr id="' + mapDivId + '_addrow"><td width="300px">' +
 70+ '<input type="text" class="text ui-widget-content ui-corner-all" width="95%" id="' + mapDivId + '_addfield" />' +
 71+ '</td><td>' +
 72+ '<button id="' + mapDivId + '_addbutton" mapid="' + mapDivId + '">' + mw.msg( 'semanticmaps-forminput-add' ) + '</button>' +
 73+ '</td></tr></tbody>'
 74+ );
 75+
 76+ $( "#" + mapDivId + '_addbutton' ).button().click( onAddButtonClick );
 77+
 78+ function onAddButtonClick() {
 79+ var location = $( '#' + mapDivId + '_addfield' ).attr( 'value' );
 80+ submitGeocodeQuery( location );
 81+ return false;
 82+ }
 83+
 84+ function submitGeocodeQuery( query ) {
 85+ if ( /\s*^\-?\d+(\.\d+)?\s*\,\s*\-?\d+(\.\d+)?\s*$/.test( query ) ) {
 86+ var latlng = parseLatLng(query);
 87+
 88+ if (latlng == null) {
 89+ $( '#' + mapDivId + '_addfield' ).attr( 'value', '' );
 90+ } else {
 91+ geocode({ 'latLng': latlng });
 92+ }
 93+ } else {
 94+ geocode({ 'address': query });
 95+ }
 96+ }
 97+
 98+ function parseLatLng(value) {
 99+ value.replace('/\s//g');
 100+ var coords = value.split(',');
 101+ var lat = parseFloat(coords[0]);
 102+ var lng = parseFloat(coords[1]);
 103+ if (isNaN(lat) || isNaN(lng)) {
 104+ return null;
 105+ } else {
 106+ return new google.maps.LatLng(lat, lng);
 107+ }
 108+ }
 109+
 110+ function geocode(request) {
 111+ var hash = '';
 112+
 113+ if (request.latLng) {
 114+ clickMarker = new google.maps.Marker({
 115+ 'position': request.latLng,
 116+ 'map': map,
 117+ 'title': request.latLng.toString(),
 118+ 'clickable': false,
 119+ 'icon': clickIcon,
 120+ 'shadow': shadow
 121+ });
 122+ hash = 'q=' + request.latLng.toUrlValue(6);
 123+ } else {
 124+ hash = 'q=' + request.address;
 125+ }
 126+
 127+ var vpbias = false;
 128+ var country = '';
 129+ var language = '';
 130+
 131+ if (vpbias) {
 132+ hash += '&vpcenter=' + map.getCenter().toUrlValue(6);
 133+ hash += '&vpzoom=' + map.getZoom();
 134+ request.bounds = map.getBounds();
 135+ }
 136+
 137+ if (country) {
 138+ hash += '&country=' + country;
 139+ request.country = country;
 140+ }
 141+
 142+ if (language) {
 143+ hash += '&language=' + language;
 144+ request.language = language;
 145+ }
 146+
 147+ hashFragment = '#' + escape(hash);
 148+ window.location.hash = escape(hash);
 149+ geocoder.geocode(request, showResults);
 150+ }
 151+
 152+ function showResults(results, status) {
 153+ var reverse = (clickMarker != null); // TODO
 154+
 155+ if (! results) {
 156+ // TODO
 157+ alert("Geocoder did not return a valid response");
 158+ } else {
 159+ //document.getElementById("statusValue").innerHTML = status;
 160+
 161+ if (status == google.maps.GeocoderStatus.OK) {
 162+ //document.getElementById("matchCount").innerHTML = results.length;
 163+ var marker = new google.maps.Marker( {
 164+ map: mapDiv.map,
 165+ position: results[0].geometry.location,
 166+ title: results[0].geometry.location.toString()
 167+ } );
 168+ addLocationRow( results[0].geometry.location.lat(), results[0].geometry.location.lng() );
 169+ //plotMatchesOnMap(results, reverse);
 170+ } else {
 171+ if ( !reverse) {
 172+ mapDiv.map.setCenter(new google.maps.LatLng(0.0, 0.0));
 173+ mapDiv.map.setZoom(1); // TODO
 174+ }
 175+ }
 176+ }
 177+ }
 178+
 179+ function plotMatchesOnMap(results, reverse) {
 180+ markers = new Array(results.length);
 181+ var resultsListHtml = "";
 182+
 183+ var openInfoWindow = function(resultNum, result, marker) {
 184+ return function() {
 185+ if (selected != null) {
 186+ document.getElementById('p' + selected).style.backgroundColor = "white";
 187+ clearBoundsOverlays();
 188+ }
 189+
 190+ map.fitBounds(result.geometry.viewport);
 191+ infowindow.setContent(getAddressComponentsHtml(result.address_components));
 192+ infowindow.open(map, marker);
 193+
 194+ if (result.geometry.bounds) {
 195+ boundsOverlay = new google.maps.Rectangle({
 196+ 'bounds': result.geometry.bounds,
 197+ 'strokeColor': '#ff0000',
 198+ 'strokeOpacity': 1.0,
 199+ 'strokeWeight': 2.0,
 200+ 'fillOpacity': 0.0
 201+ });
 202+ boundsOverlay.setMap(map);
 203+ google.maps.event.addListener(boundsOverlay, 'click', onClickCallback);
 204+ document.getElementById('boundsLegend').style.display = 'block';
 205+ } else {
 206+ boundsOverlay = null;
 207+ }
 208+
 209+ viewportOverlay = new google.maps.Rectangle({
 210+ 'bounds': result.geometry.viewport,
 211+ 'strokeColor': '#0000ff',
 212+ 'strokeOpacity': 1.0,
 213+ 'strokeWeight': 2.0,
 214+ 'fillOpacity': 0.0
 215+ });
 216+ viewportOverlay.setMap(map);
 217+ google.maps.event.addListener(viewportOverlay, 'click', onClickCallback);
 218+ document.getElementById('viewportLegend').style.display = 'block';
 219+
 220+ document.getElementById('p' + resultNum).style.backgroundColor = "#eeeeff";
 221+ document.getElementById('matches').scrollTop =
 222+ document.getElementById('p' + resultNum).offsetTop -
 223+ document.getElementById('matches').offsetTop;
 224+ selected = resultNum;
 225+ }
 226+ }
 227+
 228+ for (var i = 0; i < results.length; i++) {
 229+ var icon = new google.maps.MarkerImage(
 230+ getMarkerImageUrl(i),
 231+ new google.maps.Size(20, 34),
 232+ new google.maps.Point(0, 0),
 233+ new google.maps.Point(10, 34)
 234+ );
 235+
 236+ markers[i] = new google.maps.Marker({
 237+ 'position': results[i].geometry.location,
 238+ 'map': map,
 239+ 'icon': icon,
 240+ 'shadow': shadow
 241+ });
 242+
 243+ google.maps.event.addListener(markers[i], 'click', openInfoWindow(i, results[i], markers[i]));
 244+
 245+ resultsListHtml += getResultsListItem(i, getResultDescription(results[i]));
 246+ }
 247+
 248+ document.getElementById("matches").innerHTML = resultsListHtml;
 249+ document.getElementById("p0").style.border = "none";
 250+ document.getElementById("matches").style.display = "block";
 251+
 252+ if (reverse){
 253+ // make a smooth movement to the clicked position
 254+ map.panTo(clickMarker.getPosition());
 255+ google.maps.event.addListenerOnce(map, 'idle', function(){
 256+ selectMarker(0);
 257+ });
 258+ }
 259+ else {
 260+ zoomToViewports(results);
 261+ selectMarker(0);
 262+ }
 263+ }
 264+
 265+ function getMarkerImageUrl(resultNum) {
 266+ return MAPFILES_URL + "marker" + String.fromCharCode(65 + resultNum) + ".png";
 267+ }
 268+
 269+ function addLocationRow( lat, lon ) {
 270+ var addRow = $( '#' + mapDivId + '_addrow' );
 271+
 272+ addRow.remove();
 273+ appendTableRow( rowNr, lat, lon ); // TODO
 274+ table.append( addRow );
 275+ $( '#' + mapDivId + '_addfield' ).attr( 'value', '' );
 276+ $( "#" + mapDivId + '_addbutton' ).button().click( onAddButtonClick );
 277+ rowNr++;
 278+
 279+ updateInput();
 280+ }
 281+
 282+ function onRemoveButtonClick() {
 283+ $( '#' + mapDivId + '_row_' + $( this ).attr( 'rowid' ) ).remove();
 284+ updateInput();
 285+ return false;
 286+ }
 287+
 288+ function appendTableRow( i, lat, lon ) {
 289+ table.append(
 290+ '<tr id="' + mapDivId + '_row_' + i + '"><td>' +
 291+ coord.dms( lat, lon ) +
 292+ '</td><td>' +
 293+ '<button class="forminput-remove" rowid="' + i + '" id="' + mapDivId + '_addbutton_' + i + '">' +
 294+ mw.msg( 'semanticmaps-forminput-remove' ) +
 295+ '</button>' +
 296+ '</td></tr>'
 297+ );
 298+
 299+ $( "#" + mapDivId + '_addbutton_' + i ).button().click( onRemoveButtonClick );
 300+ }
 301+
 302+
 303+
 304+ function updateInput() {
 305+ var locations = [];
 306+
 307+ //$( '' ).each();
 308+
 309+ updateInputValue( semanticMaps.buildInputValue( locations ) );
 310+ }
 311+
 312+ function updateInputValue( value ) {
 313+ $( '#' + mapDivId + '_values' ).text( value );
 314+ }
 315+
 316+ return this;
 317+
 318+}; })( jQuery, mediaWiki );
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps3/jquery.gmapsmultiinput.js
___________________________________________________________________
Added: svn:eol-style
1319 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/YahooMaps/SM_YahooMaps.php
@@ -0,0 +1,48 @@
 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+$wgResourceModules['ext.sm.fi.yahoomaps'] = array(
 25+ 'dependencies' => array( 'ext.maps.yahoomaps', 'ext.sm.forminputs' ),
 26+ 'localBasePath' => dirname( __FILE__ ),
 27+ 'remoteBasePath' => $smgScriptPath . '/includes/services/YahooMaps',
 28+ 'group' => 'ext.semanticmaps',
 29+ 'scripts' => array(
 30+ 'jquery.yahoomapsinput.js',
 31+ 'ext.sm.yahoomaps.js'
 32+ ),
 33+);
 34+
 35+$wgHooks['MappingServiceLoad'][] = 'smfInitYahooMaps';
 36+
 37+function smfInitYahooMaps() {
 38+ global $wgAutoloadClasses;
 39+
 40+ $wgAutoloadClasses['SMYahooMapsQP'] = dirname( __FILE__ ) . '/SM_YahooMapsQP.php';
 41+
 42+ // 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.
 43+ if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMYahooMapsFormInput'] = dirname( __FILE__ ) . '/SM_YahooMapsFormInput.php';
 44+
 45+ MapsMappingServices::registerServiceFeature( 'yahoomaps', 'qp', 'SMMapPrinter' );
 46+ MapsMappingServices::registerServiceFeature( 'yahoomaps', 'fi', 'SMYahooMapsFormInput' );
 47+
 48+ return true;
 49+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/YahooMaps/SM_YahooMaps.php
___________________________________________________________________
Added: svn:eol-style
150 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/YahooMaps/ext.sm.yahoomaps.js
@@ -0,0 +1,25 @@
 2+/**
 3+ * JavasSript for the Yahoo! Maps form input in the Semantic Maps extension.
 4+ * @see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 5+ *
 6+ * @since 1.0
 7+ * @ingroup SemanticMaps
 8+ *
 9+ * @licence GNU GPL v3
 10+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 11+ */
 12+
 13+jQuery(document).ready(function() {
 14+ if ( true ) {
 15+ for ( i in window.mwmaps.yahoomaps_forminputs ) {
 16+ jQuery( '#' + i + '_forminput' ).yahoomapsinput( i, window.mwmaps.yahoomaps_forminputs[i] );
 17+ }
 18+ }
 19+ else {
 20+ alert( mediaWiki.msg( 'maps-yahoomaps-incompatbrowser' ) );
 21+
 22+ for ( i in window.mwmaps.yahoomaps_forminputs ) {
 23+ jQuery( '#' + i + '_forminput' ).text( mediaWiki.msg( 'maps-load-failed' ) );
 24+ }
 25+ }
 26+});
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/YahooMaps/ext.sm.yahoomaps.js
___________________________________________________________________
Added: svn:eol-style
127 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/YahooMaps/SM_YahooMapsFormInput.php
@@ -0,0 +1,25 @@
 2+<?php
 3+
 4+/**
 5+ * Yahoo! Maps form input class.
 6+ *
 7+ * @file SM_GoogleMaps3FormInput.php
 8+ * @ingroup SemanticMaps
 9+ *
 10+ * @licence GNU GPL v3
 11+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 12+ */
 13+class SMYahooMapsFormInput extends SMFormInput {
 14+
 15+ /**
 16+ * @see SMFormInput::getResourceModules
 17+ *
 18+ * @since 1.0
 19+ *
 20+ * @return array of string
 21+ */
 22+ protected function getResourceModules() {
 23+ return array_merge( parent::getResourceModules(), array( 'ext.sm.fi.yahoomaps' ) );
 24+ }
 25+
 26+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/YahooMaps/SM_YahooMapsFormInput.php
___________________________________________________________________
Added: svn:eol-style
127 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/YahooMaps/jquery.yahoomapsinput.js
@@ -0,0 +1,56 @@
 2+/**
 3+ * JavasSript for the Yahoo! Maps form input of the Semantic Maps extension.
 4+ * @see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 5+ *
 6+ * @since 1.0
 7+ * @ingroup SemanticMaps
 8+ *
 9+ * @licence GNU GPL v3
 10+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 11+ */
 12+
 13+(function( $ ){ $.fn.yahoomapsinput = function( options ) {
 14+
 15+ var self = this;
 16+
 17+ /**
 18+ * Creates and places a new marker on the map at the provided
 19+ * coordinate set and the pans to it.
 20+ * @param {Object} coordinate
 21+ */
 22+ this.showCoordinate = function( coordinate ) {
 23+ this.mapDiv.map.removeMarkersAll();
 24+ coordinate.icon = '';
 25+ coordinate.title = '';
 26+ coordinate.text = coord.dms( coordinate.lat, coordinate.lon );
 27+ var marker = this.mapDiv.addMarker( coordinate );
 28+ this.mapDiv.map.drawZoomAndCenter( new YGeoPoint( coordinate.lat, coordinate.lon ) );
 29+ };
 30+
 31+ this.geocodeAddress = function( address ) {
 32+ this.mapDiv.map.drawZoomAndCenter( address );
 33+
 34+ YEvent.Capture(this.mapDiv.map, EventsList.onEndGeoCode,
 35+ function( resultObj ) {
 36+ map.addOverlay( new YMarker( resultObj.GeoPoint ) );
 37+ this.updateInput( [ { 'lat': resultObj.GeoPoint.Lat, 'lon': resultObj.GeoPoint.Lon } ] );
 38+ }
 39+ );
 40+ };
 41+
 42+ // Click event handler for updating the location of the marker.
 43+ YEvent.Capture(this.mapDiv.map, EventsList.MouseClick,
 44+ function(_e, point) {
 45+ var coordinate = { 'lat': point.Lat, 'lon': point.Lon };
 46+ this.showCoordinate( coordinate );
 47+ this.updateInput( [ coordinate ] );
 48+ }
 49+ );
 50+
 51+ this.mapforminput( mapDivId, options );
 52+
 53+ this.mapDiv.yahoomaps( options );
 54+
 55+ return this;
 56+
 57+}; })( jQuery );
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/YahooMaps/jquery.yahoomapsinput.js
___________________________________________________________________
Added: svn:eol-style
158 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/OpenLayers/SM_OpenLayers.php
@@ -0,0 +1,50 @@
 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+$wgResourceModules['ext.sm.fi.openlayers'] = array(
 25+ 'dependencies' => array( 'ext.maps.openlayers', 'ext.sm.forminputs' ),
 26+ 'localBasePath' => dirname( __FILE__ ),
 27+ 'remoteBasePath' => $smgScriptPath . '/includes/services/OpenLayers',
 28+ 'group' => 'ext.semanticmaps',
 29+ 'scripts' => array(
 30+ 'jquery.openlayersinput.js',
 31+ 'ext.sm.openlayersinput.js'
 32+ ),
 33+ 'messages' => array(
 34+ )
 35+);
 36+
 37+$wgHooks['MappingServiceLoad'][] = 'smfInitOpenLayers';
 38+
 39+function smfInitOpenLayers() {
 40+ global $wgAutoloadClasses;
 41+
 42+ $wgAutoloadClasses['SMOpenLayersQP'] = dirname( __FILE__ ) . '/SM_OpenLayersQP.php';
 43+
 44+ // 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.
 45+ if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMOpenLayersFormInput'] = dirname( __FILE__ ) . '/SM_OpenLayersFormInput.php';
 46+
 47+ MapsMappingServices::registerServiceFeature( 'openlayers', 'qp', 'SMMapPrinter' );
 48+ MapsMappingServices::registerServiceFeature( 'openlayers', 'fi', 'SMOpenLayersFormInput' );
 49+
 50+ return true;
 51+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/OpenLayers/SM_OpenLayers.php
___________________________________________________________________
Added: svn:eol-style
152 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/OpenLayers/ext.sm.openlayersinput.js
@@ -0,0 +1,25 @@
 2+/**
 3+ * JavasSript for the OpenLayers form input in the Semantic Maps extension.
 4+ * @see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 5+ *
 6+ * @since 1.0
 7+ * @ingroup SemanticMaps
 8+ *
 9+ * @licence GNU GPL v3
 10+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 11+ */
 12+
 13+jQuery(document).ready(function() {
 14+ if ( true ) {
 15+ for ( i in window.mwmaps.openlayers_forminputs ) {
 16+ jQuery( '#' + i + '_forminput' ).openlayersinput( i, window.mwmaps.openlayers_forminputs[i] );
 17+ }
 18+ }
 19+ else {
 20+ alert( mediaWiki.msg( 'maps-openlayers-incompatbrowser' ) );
 21+
 22+ for ( i in window.mwmaps.openlayers_forminputs ) {
 23+ jQuery( '#' + i + '_forminput' ).text( mediaWiki.msg( 'maps-load-failed' ) );
 24+ }
 25+ }
 26+});
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/OpenLayers/ext.sm.openlayersinput.js
___________________________________________________________________
Added: svn:eol-style
127 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/OpenLayers/SM_OpenLayersFormInput.php
@@ -0,0 +1,42 @@
 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::getResourceModules
 16+ *
 17+ * @since 1.0
 18+ *
 19+ * @return array of string
 20+ */
 21+ protected function getResourceModules() {
 22+ return array_merge( parent::getResourceModules(), array( 'ext.sm.fi.openlayers' ) );
 23+ }
 24+
 25+ /**
 26+ * Returns a PHP object to encode to JSON with the map data.
 27+ *
 28+ * @since 1.0
 29+ *
 30+ * @param array $params
 31+ * @param Parser $parser
 32+ *
 33+ * @return mixed
 34+ */
 35+ protected function getJSONObject( array $params, Parser $parser ) {
 36+ global $egMapsGeoNamesUser;
 37+
 38+ $params['geonamesusername'] = $egMapsGeoNamesUser;
 39+
 40+ return $params;
 41+ }
 42+
 43+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/OpenLayers/SM_OpenLayersFormInput.php
___________________________________________________________________
Added: svn:eol-style
144 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/OpenLayers/jquery.openlayersinput.js
@@ -0,0 +1,127 @@
 2+/**
 3+ * JavasSript for the OpenLayers form input of the Semantic Maps extension.
 4+ * @see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 5+ *
 6+ * @since 1.0
 7+ * @ingroup SemanticMaps
 8+ *
 9+ * @licence GNU GPL v3
 10+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 11+ */
 12+
 13+(function( $ ){ $.fn.openlayersinput = function( mapDivId, options ) {
 14+
 15+ var self = this;
 16+
 17+ /**
 18+ * @param {OpenLayers.LonLat} location
 19+ * @param {string} title
 20+ */
 21+ this.showLocation = function( location, title ) {
 22+ var markerLayer = self.mapDiv.map.getLayer('markerLayer');
 23+ var markerCollection = markerLayer.markers;
 24+
 25+ for ( var i = markerCollection.length - 1; i >= 0; i-- ) {
 26+ markerLayer.removeMarker( markerCollection[i] );
 27+ }
 28+
 29+ var normalProjectionLocation = new OpenLayers.LonLat( location.lon, location.lat );
 30+ normalProjectionLocation.transform( new OpenLayers.Projection( "EPSG:900913" ), new OpenLayers.Projection( "EPSG:4326" ) );
 31+
 32+ var text = coord.dms( normalProjectionLocation.lat, normalProjectionLocation.lon );
 33+
 34+ if ( title != '' ) {
 35+ text = '<b>' + title + '</b><hr />' + text;
 36+ }
 37+
 38+ markerLayer.addMarker(
 39+ this.mapDiv.getOLMarker(
 40+ markerLayer,
 41+ {
 42+ lonlat: location,
 43+ text: text,
 44+ title: title,
 45+ icon: options.icon
 46+ }
 47+ )
 48+ );
 49+
 50+ self.mapDiv.map.panTo( location );
 51+
 52+ self.input.attr( 'value', semanticMaps.buildInputValue( [ normalProjectionLocation ] ) );
 53+ };
 54+
 55+ this.projectAndShowLocation = function( location, title ) {
 56+ location.transform( new OpenLayers.Projection( "EPSG:4326" ), new OpenLayers.Projection( "EPSG:900913" ) );
 57+ this.showLocation( location, title );
 58+ };
 59+
 60+ this.showCoordinate = function( coordinate ) {
 61+ this.projectAndShowLocation( new OpenLayers.LonLat( coordinate.lon, coordinate.lat ), '' );
 62+ };
 63+
 64+ if ( options.geonamesusername != '' ) {
 65+ this.geocodeAddress = function( address ) {
 66+ $.getJSON(
 67+ 'http://api.geonames.org/searchJSON?callback=?',
 68+ {
 69+ 'q': address,
 70+ 'username': options.geonamesusername,
 71+ //'formatted': 'true',
 72+ 'maxRows': 1
 73+ },
 74+ function( data ) {
 75+ if ( data.totalResultsCount ) {
 76+ if ( data.totalResultsCount > 0 ) {
 77+ self.projectAndShowLocation( new OpenLayers.LonLat( data.geonames[0].lng, data.geonames[0].lat ), address );
 78+ }
 79+ else {
 80+ // TODO: notify no result
 81+ }
 82+ }
 83+ else {
 84+ // TODO: error
 85+ }
 86+ }
 87+ );
 88+ };
 89+ }
 90+
 91+ this.mapforminput( mapDivId, options );
 92+
 93+ this.mapDiv.openlayers( mapDivId, options );
 94+
 95+ var clickControl = new (OpenLayers.Class(OpenLayers.Control, {
 96+ defaultHandlerOptions: {
 97+ 'single': true,
 98+ 'double': false,
 99+ 'pixelTolerance': 0,
 100+ 'stopSingle': false,
 101+ 'stopDouble': false
 102+ },
 103+
 104+ initialize: function(options) {
 105+ this.handlerOptions = OpenLayers.Util.extend(
 106+ {}, this.defaultHandlerOptions
 107+ );
 108+ OpenLayers.Control.prototype.initialize.apply(
 109+ this, arguments
 110+ );
 111+ this.handler = new OpenLayers.Handler.Click(
 112+ this, {
 113+ 'click': this.trigger
 114+ }, this.handlerOptions
 115+ );
 116+ },
 117+
 118+ trigger: function(e) {
 119+ self.showLocation( self.mapDiv.map.getLonLatFromViewPortPx(e.xy), 'Click' ); // TODO
 120+ }
 121+
 122+ }))();
 123+ this.mapDiv.map.addControl( clickControl );
 124+ clickControl.activate();
 125+
 126+ return this;
 127+
 128+}; })( jQuery );
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/OpenLayers/jquery.openlayersinput.js
___________________________________________________________________
Added: svn:eol-style
1129 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps/SM_GoogleMaps.php
@@ -0,0 +1,33 @@
 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+ MapsMappingServices::registerServiceFeature( 'googlemaps2', 'qp', 'SMMapPrinter' );
 32+
 33+ return true;
 34+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/services/GoogleMaps/SM_GoogleMaps.php
___________________________________________________________________
Added: svn:eol-style
135 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/SM_GeoCoordsValue.php
@@ -0,0 +1,236 @@
 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+ * @licence GNU GPL v3
 14+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 15+ * @author Markus Krötzsch
 16+ */
 17+class SMGeoCoordsValue extends SMWDataValue {
 18+
 19+ protected $wikiValue;
 20+
 21+ /**
 22+ * @see SMWDataValue::setDataItem()
 23+ *
 24+ * @since 1.0
 25+ *
 26+ * @param $dataitem SMWDataItem
 27+ *
 28+ * @return boolean
 29+ */
 30+ protected function loadDataItem( SMWDataItem $dataItem ) {
 31+ if ( $dataItem->getDIType() == SMWDataItem::TYPE_GEO ) {
 32+ $this->m_dataitem = $dataItem;
 33+
 34+ global $smgQPCoodFormat, $smgQPCoodDirectional;
 35+ $this->wikiValue = MapsCoordinateParser::formatCoordinates(
 36+ $dataItem->getCoordinateSet(),
 37+ $smgQPCoodFormat,
 38+ $smgQPCoodDirectional
 39+ );
 40+ return true;
 41+ } else {
 42+ return false;
 43+ }
 44+ }
 45+
 46+ /**
 47+ * @see SMWDataValue::parseUserValue
 48+ *
 49+ * @since 0.6
 50+ */
 51+ protected function parseUserValue( $value ) {
 52+ $this->parseUserValueOrQuery( $value );
 53+ }
 54+
 55+ /**
 56+ * Overwrite SMWDataValue::getQueryDescription() to be able to process
 57+ * comparators between all values.
 58+ *
 59+ * @since 0.6
 60+ *
 61+ * @param string $value
 62+ *
 63+ * @return SMWDescription
 64+ */
 65+ public function getQueryDescription( $value ) {
 66+ return $this->parseUserValueOrQuery( $value, true );
 67+ }
 68+
 69+ /**
 70+ * Parses the value into the coordinates and any meta data provided, such as distance.
 71+ *
 72+ * @since 0.6
 73+ *
 74+ * @param $value String
 75+ * @param $asQuery Boolean
 76+ */
 77+ protected function parseUserValueOrQuery( $value, $asQuery = false ) {
 78+ $this->wikiValue = $value;
 79+
 80+ $comparator = SMW_CMP_EQ;
 81+
 82+ if ( $value == '' ) {
 83+ $this->addError( wfMsg( 'smw_novalues' ) );
 84+ } else {
 85+ SMWDataValue::prepareValue( $value, $comparator );
 86+
 87+ $parts = explode( '(', $value );
 88+
 89+ $coordinates = trim( array_shift( $parts ) );
 90+ $distance = count( $parts ) > 0 ? trim( array_shift( $parts ) ) : false;
 91+
 92+ if ( $distance !== false ) {
 93+ $distance = substr( trim( $distance ), 0, -1 );
 94+
 95+ if ( !MapsDistanceParser::isDistance( $distance ) ) {
 96+ $this->addError( wfMsgExt( 'semanticmaps-unrecognizeddistance', array( 'parsemag' ), $distance ) );
 97+ $distance = false;
 98+ }
 99+ }
 100+
 101+ $parsedCoords = MapsCoordinateParser::parseCoordinates( $coordinates );
 102+ if ( $parsedCoords ) {
 103+ $this->m_dataitem = new SMWDIGeoCoord( $parsedCoords );
 104+ } else {
 105+ $this->addError( wfMsgExt( 'maps_unrecognized_coords', array( 'parsemag' ), $coordinates, 1 ) );
 106+ $this->m_dataitem = new SMWDIGeoCoord( array(0, 0) ); // make sure this is always set
 107+ }
 108+ }
 109+
 110+ if ( $asQuery ) {
 111+ $this->setUserValue( $value );
 112+
 113+ switch ( true ) {
 114+ case !$this->isValid() :
 115+ return new SMWThingDescription();
 116+ case $distance !== false :
 117+ return new SMAreaValueDescription( $this->getDataItem(), $comparator, $distance );
 118+ default :
 119+ return new SMGeoCoordsValueDescription( $this->getDataItem(), $comparator );
 120+ }
 121+ }
 122+ }
 123+
 124+ /**
 125+ * @see SMWDataValue::getShortWikiText
 126+ *
 127+ * @since 0.6
 128+ */
 129+ public function getShortWikiText( $linked = null ) {
 130+ if ( $this->isValid() ) {
 131+ if ( $this->m_caption === false ) {
 132+ global $smgQPCoodFormat, $smgQPCoodDirectional;
 133+ return MapsCoordinateParser::formatCoordinates( $this->m_dataitem->getCoordinateSet(), $smgQPCoodFormat, $smgQPCoodDirectional );
 134+ }
 135+ else {
 136+ return $this->m_caption;
 137+ }
 138+ }
 139+ else {
 140+ return $this->getErrorText();
 141+ }
 142+ }
 143+
 144+ /**
 145+ * @see SMWDataValue::getShortHTMLText
 146+ *
 147+ * @since 0.6
 148+ */
 149+ public function getShortHTMLText( $linker = null ) {
 150+ return $this->getShortWikiText( $linker );
 151+ }
 152+
 153+ /**
 154+ * @see SMWDataValue::getLongWikiText
 155+ *
 156+ * @since 0.6
 157+ */
 158+ public function getLongWikiText( $linked = null ) {
 159+ if ( $this->isValid() ) {
 160+ SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP );
 161+
 162+ // TODO: fix lang keys so they include the space and coordinates.
 163+ $coordinateSet = $this->m_dataitem->getCoordinateSet();
 164+
 165+ global $smgQPCoodFormat, $smgQPCoodDirectional;
 166+ $text = MapsCoordinateParser::formatCoordinates( $coordinateSet, $smgQPCoodFormat, $smgQPCoodDirectional );
 167+
 168+ return '<span class="smwttinline">' . htmlspecialchars( $text ) . '<span class="smwttcontent">' .
 169+ htmlspecialchars ( wfMsgForContent( 'maps-latitude' ) . ' ' . $coordinateSet['lat'] ) . '<br />' .
 170+ htmlspecialchars ( wfMsgForContent( 'maps-longitude' ) . ' ' . $coordinateSet['lon'] ) .
 171+ '</span></span>';
 172+ } else {
 173+ return $this->getErrorText();
 174+ }
 175+ }
 176+
 177+ /**
 178+ * @see SMWDataValue::getLongHTMLText
 179+ *
 180+ * @since 0.6
 181+ */
 182+ public function getLongHTMLText( $linker = null ) {
 183+ return $this->getLongWikiText( $linker );
 184+ }
 185+
 186+ /**
 187+ * @see SMWDataValue::getWikiValue
 188+ *
 189+ * @since 0.6
 190+ */
 191+ public function getWikiValue() {
 192+ return $this->wikiValue;
 193+ }
 194+
 195+ /**
 196+ * @see SMWDataValue::getExportData
 197+ *
 198+ * @since 0.6
 199+ */
 200+ public function getExportData() {
 201+ if ( $this->isValid() ) {
 202+ global $smgQPCoodFormat, $smgQPCoodDirectional;
 203+ $lit = new SMWExpLiteral(
 204+ MapsCoordinateParser::formatCoordinates( $this->m_dataitem->getCoordinateSet(), $smgQPCoodFormat, $smgQPCoodDirectional ),
 205+ $this,
 206+ 'http://www.w3.org/2001/XMLSchema#string'
 207+ );
 208+ return new SMWExpData( $lit );
 209+ } else {
 210+ return null;
 211+ }
 212+ }
 213+
 214+ /**
 215+ * Create links to mapping services based on a wiki-editable message. The parameters
 216+ * available to the message are:
 217+ *
 218+ * $1: The location in non-directional float notation.
 219+ * $2: The location in directional DMS notation.
 220+ * $3: The latitude in non-directional float notation.
 221+ * $4 The longitude in non-directional float notation.
 222+ *
 223+ * @since 0.6.4
 224+ *
 225+ * @return array
 226+ */
 227+ protected function getServiceLinkParams() {
 228+ $coordinateSet = $this->m_dataitem->getCoordinateSet();
 229+ return array(
 230+ MapsCoordinateParser::formatCoordinates( $coordinateSet, 'float', false ),
 231+ MapsCoordinateParser::formatCoordinates( $coordinateSet, 'dms', true ),
 232+ $coordinateSet['lat'],
 233+ $coordinateSet['lon']
 234+ );
 235+ }
 236+
 237+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/SM_GeoCoordsValue.php
___________________________________________________________________
Added: svn:eol-style
1238 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/forminputs/SM_FormInput.php
@@ -0,0 +1,222 @@
 2+<?php
 3+
 4+/**
 5+ * Base form input class.
 6+ *
 7+ * @file SM_FormInput.php
 8+ * @ingroup SemanticMaps
 9+ *
 10+ * @licence GNU GPL v3
 11+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 12+ */
 13+class SMFormInput {
 14+
 15+ /**
 16+ * @since 1.0
 17+ *
 18+ * @var iMappingService
 19+ */
 20+ protected $service;
 21+
 22+ /**
 23+ * A character to separate multiple locations with.
 24+ *
 25+ * @since 1.0
 26+ *
 27+ * @var char
 28+ */
 29+ const SEPARATOR = ';';
 30+
 31+ /**
 32+ * Constructor.
 33+ *
 34+ * @since 1.0
 35+ *
 36+ * @param iMappingService $service
 37+ */
 38+ public function __construct( iMappingService $service ) {
 39+ $this->service = $service;
 40+ }
 41+
 42+ /**
 43+ * Returns an array containing the parameter info.
 44+ *
 45+ * @since 1.0
 46+ *
 47+ * @return array
 48+ */
 49+ protected function getParameterInfo() {
 50+ global $smgFIMulti, $smgFIFieldSize;
 51+
 52+ $params = MapsMapper::getCommonParameters();
 53+ $this->service->addParameterInfo( $params );
 54+
 55+ $params['zoom']->setDefault( false, false );
 56+
 57+ $params['multi'] = new Parameter( 'multi', Parameter::TYPE_BOOLEAN );
 58+ $params['multi']->setDefault( $smgFIMulti, false );
 59+
 60+ $params['fieldsize'] = new Parameter( 'fieldsize', Parameter::TYPE_INTEGER );
 61+ $params['fieldsize']->setDefault( $smgFIFieldSize, false );
 62+ $params['fieldsize']->addCriteria( new CriterionInRange( 5, 100 ) );
 63+
 64+ $params['centre'] = new Parameter( 'centre' );
 65+ $params['centre']->setDefault( false, false );
 66+ $params['centre']->addAliases( 'center' );
 67+ $params['centre']->addCriteria( new CriterionIsLocation() );
 68+ $manipulation = new MapsParamLocation();
 69+ $manipulation->toJSONObj = true;
 70+ $params['centre']->addManipulations( $manipulation );
 71+
 72+ $params['icon'] = new Parameter( 'icon' );
 73+ $params['icon']->setDefault( '' );
 74+ $params['icon']->addCriteria( New CriterionNotEmpty() );
 75+
 76+ $params['locations'] = new ListParameter( 'locations', self::SEPARATOR );
 77+ $params['locations']->addCriteria( new CriterionIsLocation() );
 78+ $manipulation = new MapsParamLocation();
 79+ $manipulation->toJSONObj = true;
 80+ $params['locations']->addManipulations( $manipulation );
 81+
 82+ return $params;
 83+ }
 84+
 85+ /**
 86+ *
 87+ *
 88+ * @since 1.0
 89+ *
 90+ * @param string $coordinates
 91+ * @param string $input_name
 92+ * @param boolean $is_mandatory
 93+ * @param boolean $is_disabled
 94+ * @param array $field_args
 95+ *
 96+ * @return string
 97+ */
 98+ public function getInputOutput( $coordinates, $input_name, $is_mandatory, $is_disabled, array $params ) {
 99+ $parameters = array();
 100+ foreach ( $params as $key => $value ) {
 101+ if ( !is_array( $value ) && !is_object( $value ) ) {
 102+ $parameters[$key] = $value;
 103+ }
 104+ }
 105+
 106+ $parameters['locations'] = $coordinates;
 107+
 108+ $validator = new Validator( wfMsg( 'maps_' . $this->service->getName() ), false );
 109+ $validator->setParameters( $parameters, $this->getParameterInfo() );
 110+ $validator->validateParameters();
 111+
 112+ $fatalError = $validator->hasFatalError();
 113+
 114+ if ( $fatalError === false ) {
 115+ global $wgParser;
 116+
 117+ $params = $validator->getParameterValues();
 118+
 119+ // We can only take care of the zoom defaulting here,
 120+ // as not all locations are available in whats passed to Validator.
 121+ if ( $params['zoom'] === false && count( $params['locations'] ) <= 1 ) {
 122+ $params['zoom'] = $this->service->getDefaultZoom();
 123+ }
 124+
 125+ $mapName = $this->service->getMapId();
 126+
 127+ $params['inputname'] = $input_name;
 128+
 129+ $output = $this->getInputHTML( $params, $wgParser, $mapName ) . $this->getJSON( $params, $wgParser, $mapName );
 130+
 131+ $this->service->addResourceModules( $this->getResourceModules() );
 132+
 133+ $configVars = Skin::makeVariablesScript( $this->service->getConfigVariables() );
 134+
 135+ if ( true /* !is_null( $wgTitle ) && $wgTitle->isSpecialPage() */ ) { // TODO
 136+ global $wgOut;
 137+ $this->service->addDependencies( $wgOut );
 138+ $wgOut->addScript( $configVars );
 139+ }
 140+ else {
 141+ $this->service->addDependencies( $wgParser );
 142+ }
 143+
 144+ return $output;
 145+ }
 146+ else {
 147+ return
 148+ '<span class="errorbox">' .
 149+ htmlspecialchars( wfMsgExt( 'validator-fatal-error', 'parsemag', $fatalError->getMessage() ) ) .
 150+ '</span>';
 151+ }
 152+ }
 153+
 154+ /**
 155+ * Returns the HTML to display the map input.
 156+ *
 157+ * @since 1.0
 158+ *
 159+ * @param array $params
 160+ * @param Parser $parser
 161+ * @param string $mapName
 162+ *
 163+ * @return string
 164+ */
 165+ protected function getInputHTML( array $params, Parser $parser, $mapName ) {
 166+ return Html::element(
 167+ 'div',
 168+ array(
 169+ 'id' => $mapName . '_forminput',
 170+ 'style' => 'display: inline'
 171+ ),
 172+ wfMsg( 'semanticmaps-loading-forminput' )
 173+ );
 174+ }
 175+
 176+ /**
 177+ * Returns the JSON with the maps data.
 178+ *
 179+ * @since 1.0
 180+ *
 181+ * @param array $params
 182+ * @param Parser $parser
 183+ * @param string $mapName
 184+ *
 185+ * @return string
 186+ */
 187+ protected function getJSON( array $params, Parser $parser, $mapName ) {
 188+ $object = $this->getJSONObject( $params, $parser );
 189+
 190+ if ( $object === false ) {
 191+ return '';
 192+ }
 193+
 194+ return Html::inlineScript(
 195+ MapsMapper::getBaseMapJSON( $this->service->getName() . '_forminputs' )
 196+ . "mwmaps.{$this->service->getName()}_forminputs.{$mapName}=" . FormatJson::encode( $object ) . ';'
 197+ );
 198+ }
 199+
 200+ /**
 201+ * Returns a PHP object to encode to JSON with the map data.
 202+ *
 203+ * @since 1.0
 204+ *
 205+ * @param array $params
 206+ * @param Parser $parser
 207+ *
 208+ * @return mixed
 209+ */
 210+ protected function getJSONObject( array $params, Parser $parser ) {
 211+ return $params;
 212+ }
 213+
 214+ /**
 215+ * @since 1.0
 216+ *
 217+ * @return array of string
 218+ */
 219+ protected function getResourceModules() {
 220+ return array( 'ext.sm.forminputs' );
 221+ }
 222+
 223+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/forminputs/SM_FormInput.php
___________________________________________________________________
Added: svn:eol-style
1224 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/forminputs/jquery.mapforminput.js
@@ -0,0 +1,136 @@
 2+/**
 3+ * JavasSript for the form inputs of the Semantic Maps extension.
 4+ * @see http://www.mediawiki.org/wiki/Extension:Semantic_Maps
 5+ *
 6+ * This jQuery plugin creates a simple interface consisting out of
 7+ * a field with coordinates, a field for geocoding addresses and
 8+ * a map that displays these locations.
 9+ *
 10+ * jQuery plugins using this one can implement the following methods:
 11+ * - showCoordinate( location { lat, lon } )
 12+ * - geocodeAddress( string address )
 13+ *
 14+ * @param {string} mapDivId
 15+ * @param {Object} options
 16+ *
 17+ * @since 1.0
 18+ * @ingroup SemanticMaps
 19+ *
 20+ * @licence GNU GPL v3
 21+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 22+ */
 23+(function( $, mw ){ $.fn.mapforminput = function( mapDivId, options ) {
 24+
 25+ var self = this;
 26+
 27+ /**
 28+ * Creates a string with the provided coordinates to populate the main input field with.
 29+ * @param {Array} locations
 30+ * @return {string}
 31+ */
 32+ this.buildInputValue = function( locations ) {
 33+ var floats = [];
 34+
 35+ for ( i in locations ) {
 36+ floats.push( coord.float( locations[i].lat, locations[i].lon ) );
 37+ }
 38+
 39+ return floats.join( '; ' );
 40+ };
 41+
 42+ /**
 43+ * Populate the main input field with the provided coordinates.
 44+ * @param {Array} locations
 45+ */
 46+ this.updateInput = function( locations ) {
 47+ this.input.attr( 'value', this.buildInputValue( locations ) );
 48+ }
 49+
 50+ this.input = $( '<input />' ).attr( {
 51+ 'type': 'text',
 52+ 'name': options.inputname,
 53+ 'id': mapDivId + '_values',
 54+ 'value': this.buildInputValue( options.locations ),
 55+ 'size': options.fieldsize
 56+ } );
 57+
 58+ var updateButton = $( '<button />' ).text( mw.msg( 'semanticmaps-updatemap' ) );
 59+
 60+ updateButton.click( function() {
 61+ var locations = coord.split( self.input.attr( 'value' ) );
 62+ var location = coord.parse( locations[0] );
 63+
 64+ if ( location !== false ) {
 65+ self.showCoordinate( location );
 66+ }
 67+
 68+ return false;
 69+ } );
 70+
 71+ this.input.keypress( function( event ) {
 72+ if ( event.which == '13' ) {
 73+ event.preventDefault();
 74+ updateButton.click();
 75+ }
 76+ } );
 77+
 78+ this.geofield = $( '<input />' ).attr( {
 79+ 'type': 'text',
 80+ 'id': mapDivId + '_geofield',
 81+ 'value': mw.msg( 'semanticmaps_enteraddresshere' ),
 82+ 'style': 'color: darkgray',
 83+ 'size': options.fieldsize
 84+ } );
 85+
 86+ this.geofield.focus( function() {
 87+ if ( this.value == mw.msg( 'semanticmaps_enteraddresshere' ) ) {
 88+ this.value = '';
 89+ $( this ).css( 'color', '' );
 90+ }
 91+ } );
 92+
 93+ this.geofield.blur( function() {
 94+ if ( this.value == '' ) {
 95+ this.value = mw.msg( 'semanticmaps_enteraddresshere' );
 96+ $( this ).css( 'color', 'darkgray' );
 97+ }
 98+ } );
 99+
 100+ var geoButton = $( '<button />' ).text( mw.msg( 'semanticmaps_lookupcoordinates' ) );
 101+
 102+ geoButton.click( function() {
 103+ self.geocodeAddress( self.geofield.attr( 'value' ) );
 104+ return false;
 105+ } );
 106+
 107+ this.geofield.keypress( function( event ) {
 108+ if ( event.which == '13' ) {
 109+ event.preventDefault();
 110+ geoButton.click();
 111+ }
 112+ } );
 113+
 114+ var mapDiv = $( '<div />' )
 115+ .attr( {
 116+ 'id': mapDivId,
 117+ 'class': 'ui-widget ui-widget-content'
 118+ } )
 119+ .css( {
 120+ 'width': options.width,
 121+ 'height': options.height
 122+ } );
 123+ this.mapDiv = mapDiv;
 124+
 125+ if ( this.showCoordinate ) {
 126+ this.html( $( '<p />' ).append( this.input ).append( updateButton ) );
 127+ }
 128+
 129+ if ( this.geocodeAddress ) {
 130+ this.append( $( '<p />' ).append( this.geofield ).append( geoButton ) );
 131+ }
 132+
 133+ this.append( mapDiv );
 134+
 135+ return this;
 136+
 137+}; })( jQuery, mediaWiki );
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/forminputs/jquery.mapforminput.js
___________________________________________________________________
Added: svn:eol-style
1138 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/forminputs/SM_FormInputs.php
@@ -0,0 +1,122 @@
 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+$wgResourceModules['ext.sm.forminputs'] = array(
 18+ 'dependencies' => array( 'ext.maps.coord' ),
 19+ 'localBasePath' => dirname( __FILE__ ),
 20+ 'remoteBasePath' => $smgScriptPath . '/includes/forminputs',
 21+ 'group' => 'ext.semanticmaps',
 22+ 'scripts' => array(
 23+ 'jquery.mapforminput.js'
 24+ ),
 25+ 'messages' => array(
 26+ 'semanticmaps_enteraddresshere',
 27+ 'semanticmaps-updatemap',
 28+ 'semanticmaps_lookupcoordinates',
 29+ 'semanticmaps-forminput-remove',
 30+ 'semanticmaps-forminput-add',
 31+ 'semanticmaps-forminput-locations'
 32+ )
 33+);
 34+
 35+$wgHooks['MappingFeatureLoad'][] = 'SMFormInputs::initialize';
 36+
 37+final class SMFormInputs {
 38+
 39+ public static function initialize() {
 40+ global $wgAutoloadClasses;
 41+
 42+ // This code should not get called when SF is not loaded, but let's have this
 43+ // check to not run into problems when people mess up the settings.
 44+ if ( !defined( 'SF_VERSION' ) ) return true;
 45+
 46+ $wgAutoloadClasses['SMFormInput'] = dirname( __FILE__ ) . '/SM_FormInput.php';
 47+
 48+ $hasFormInputs = false;
 49+
 50+ foreach ( MapsMappingServices::getServiceIdentifiers() as $serviceIdentifier ) {
 51+ $service = MapsMappingServices::getServiceInstance( $serviceIdentifier );
 52+
 53+ // Check if the service has a form input.
 54+ $FIClass = $service->getFeature( 'fi' );
 55+
 56+ // If the service has no FI, skipt it and continue with the next one.
 57+ if ( $FIClass === false ) continue;
 58+
 59+ // At least one form input will be enabled when this point is reached.
 60+ $hasFormInputs = true;
 61+
 62+ // Add the result form input type for the service name.
 63+ self::initFormHook( $service->getName(), $service->getName() );
 64+
 65+ // Loop through the service alliases, and add them as form input types.
 66+ foreach ( $service->getAliases() as $alias ) {
 67+ self::initFormHook( $alias, $service->getName() );
 68+ }
 69+ }
 70+
 71+ // Add the 'map' form input type if there are mapping services that have FI's loaded.
 72+ if ( $hasFormInputs ) self::initFormHook( 'map' );
 73+
 74+ return true;
 75+ }
 76+
 77+ /**
 78+ * Adds a mapping service's form hook.
 79+ *
 80+ * @param string $inputName The name of the form input.
 81+ * @param strig $mainName
 82+ */
 83+ private static function initFormHook( $inputName, $mainName = '' ) {
 84+ global $sfgFormPrinter;
 85+
 86+ // Add the form input hook for the service.
 87+ $field_args = array();
 88+
 89+ if ( $mainName != '' ) {
 90+ $field_args['service_name'] = $mainName;
 91+ }
 92+
 93+ //$sfgFormPrinter->registerInputType( 'SMMapInput' );
 94+
 95+ $sfgFormPrinter->setInputTypeHook( $inputName, 'smfSelectFormInputHTML', $field_args );
 96+ }
 97+
 98+}
 99+
 100+/**
 101+ * Calls the relevant form input class depending on the provided service.
 102+ *
 103+ * @param string $coordinates
 104+ * @param string $input_name
 105+ * @param boolean $is_mandatory
 106+ * @param boolean $is_disabled
 107+ * @param array $field_args
 108+ *
 109+ * @return array
 110+ */
 111+function smfSelectFormInputHTML( $coordinates, $input_name, $is_mandatory, $is_disabled, array $field_args ) {
 112+ // Get the service name from the field_args, and set it to null if it doesn't exist.
 113+ $serviceName = array_key_exists( 'service_name', $field_args ) ? $field_args['service_name'] : null;
 114+
 115+ // Get the instance of the service class.
 116+ $service = MapsMappingServices::getValidServiceInstance( $serviceName, 'fi' );
 117+
 118+ // Get an instance of the class handling the current form input and service.
 119+ $formInput = $service->getFeatureInstance( 'fi' );
 120+
 121+ // Get and return the form input HTML from the hook corresponding with the provided service.
 122+ return $formInput->getInputOutput( $coordinates, $input_name, $is_mandatory, $is_disabled, $field_args );
 123+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/forminputs/SM_FormInputs.php
___________________________________________________________________
Added: svn:eol-style
1124 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/SM_GeoCoordsValueDescription.php
@@ -0,0 +1,84 @@
 2+<?php
 3+
 4+/**
 5+ * Description of one data value of type Goegraphical Coordinates.
 6+ *
 7+ * @since 0.6
 8+ * @file SM_GeoCoordsValueDescription.php
 9+ * @ingroup SemanticMaps
 10+ *
 11+ * @author Jeroen De Dauw
 12+ */
 13+class SMGeoCoordsValueDescription extends SMWValueDescription {
 14+
 15+ /**
 16+ * Constructor.
 17+ *
 18+ * @since 0.8
 19+ *
 20+ * @param SMWDataItem $dataItem
 21+ */
 22+ public function __construct( SMWDataItem $dataItem, $comparator ) {
 23+ parent::__construct( $dataItem, $comparator );
 24+ }
 25+
 26+ /**
 27+ * @see SMWDescription::getQueryString
 28+ *
 29+ * @since 0.6
 30+ *
 31+ * @param Boolean $asvalue
 32+ */
 33+ public function getQueryString( $asValue = false ) {
 34+ if ( $this->m_dataItem !== null ) {
 35+ $queryString = SMWDataValueFactory::newDataItemValue( $this->m_dataItem, $this->m_property )->getWikiValue();
 36+ return $asValue ? $queryString : "[[$queryString]]";
 37+ } else {
 38+ return $asValue ? '+' : '';
 39+ }
 40+ }
 41+
 42+ /**
 43+ * @see SMWDescription::getSQLCondition
 44+ *
 45+ * @since 0.6
 46+ *
 47+ * @param string $tableName
 48+ * @param array $fieldNames
 49+ * @param DatabaseBase or Database $dbs
 50+ *
 51+ * @return true
 52+ */
 53+ public function getSQLCondition( $tableName, array $fieldNames, $dbs ) {
 54+ $dataItem = $this->getDataItem();
 55+
 56+ // Only execute the query when the description's type is geographical coordinates,
 57+ // the description is valid, and the near comparator is used.
 58+ if ( $dataItem->getDIType() != SMWDataItem::TYPE_GEO ) return false;
 59+
 60+ $comparator = false;
 61+
 62+ switch ( $this->getComparator() ) {
 63+ case SMW_CMP_EQ: $comparator = '='; break;
 64+ case SMW_CMP_LEQ: $comparator = '<='; break;
 65+ case SMW_CMP_GEQ: $comparator = '>='; break;
 66+ case SMW_CMP_NEQ: $comparator = '!='; break;
 67+ }
 68+
 69+ if ( $comparator ) {
 70+ $lat = $dbs->addQuotes( $dataItem->getLatitude() );
 71+ $lon = $dbs->addQuotes( $dataItem->getLongitude() );
 72+
 73+ $conditions = array();
 74+
 75+ $conditions[] = "{$tableName}.$fieldNames[0] $comparator $lat";
 76+ $conditions[] = "{$tableName}.$fieldNames[1] $comparator $lon";
 77+
 78+ return implode( ' && ', $conditions );
 79+ }
 80+ else {
 81+ return false;
 82+ }
 83+ }
 84+
 85+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/SM_GeoCoordsValueDescription.php
___________________________________________________________________
Added: svn:eol-style
186 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_QueryPrinters.php
@@ -0,0 +1,100 @@
 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 $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(), 'SMMapper' /* $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+ * Add the result format for a mapping service or alias.
 63+ *
 64+ * @param string $format
 65+ * @param string $formatClass
 66+ * @param array $aliases
 67+ */
 68+ private static function initFormat( $format, $formatClass, array $aliases = array() ) {
 69+ global $smwgResultAliases;
 70+
 71+ // Add the QP to SMW.
 72+ self::addFormatQP( $format, $formatClass );
 73+
 74+ // If SMW supports aliasing, add the aliases to $smwgResultAliases.
 75+ if ( isset( $smwgResultAliases ) ) {
 76+ $smwgResultAliases[$format] = $aliases;
 77+ }
 78+ else { // If SMW does not support aliasing, add every alias as a format.
 79+ foreach ( $aliases as $alias ) self::addFormatQP( $alias, $formatClass );
 80+ }
 81+ }
 82+
 83+ /**
 84+ * Adds a QP to SMW's $smwgResultFormats array or SMWQueryProcessor
 85+ * depending on if SMW supports $smwgResultFormats.
 86+ *
 87+ * @param string $format
 88+ * @param string $class
 89+ */
 90+ private static function addFormatQP( $format, $class ) {
 91+ global $smwgResultFormats;
 92+
 93+ if ( isset( $smwgResultFormats ) ) {
 94+ $smwgResultFormats[$format] = $class;
 95+ }
 96+ else { // BC with some old SMW version
 97+ SMWQueryProcessor::$formats[$format] = $class;
 98+ }
 99+ }
 100+
 101+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_QueryPrinters.php
___________________________________________________________________
Added: svn:eol-style
1102 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_MapPrinter.php
@@ -0,0 +1,414 @@
 2+<?php
 3+
 4+/**
 5+ * Query printer for maps. Is invoked via SMMapper.
 6+ * Can be overriden per service to have custom output.
 7+ *
 8+ * @file SM_MapPrinter.php
 9+ * @ingroup SemanticMaps
 10+ *
 11+ * @licence GNU GPL v3
 12+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 13+ */
 14+class SMMapPrinter extends SMWResultPrinter {
 15+
 16+ /**
 17+ * @since 0.6
 18+ *
 19+ * @var iMappingService
 20+ */
 21+ protected $service;
 22+
 23+ /**
 24+ * @since 1.0
 25+ *
 26+ * @var false or string
 27+ */
 28+ protected $fatalErrorMsg = false;
 29+
 30+ /**
 31+ * @since 1.0
 32+ *
 33+ * @var array
 34+ */
 35+ protected $parameters;
 36+
 37+ /**
 38+ * Constructor.
 39+ *
 40+ * @param $format String
 41+ * @param $inline
 42+ * @param $service iMappingService
 43+ */
 44+ public function __construct( $format, $inline, iMappingService $service ) {
 45+ $this->service = $service;
 46+
 47+ parent::__construct( $format, $inline );
 48+ $this->useValidator = true;
 49+ }
 50+
 51+ /**
 52+ * (non-PHPdoc)
 53+ * @see SMWResultPrinter::readParameters()
 54+ */
 55+ protected function readParameters( /* array */ $params, $outputmode ) {
 56+ parent::readParameters( $params, $outputmode );
 57+
 58+ $validator = new Validator( $this->getName(), false );
 59+ $validator->setParameters( $params, $this->getParameterInfo() );
 60+ $validator->validateParameters();
 61+
 62+ $fatalError = $validator->hasFatalError();
 63+
 64+ if ( $fatalError === false ) {
 65+ $this->parameters = $validator->getParameterValues();
 66+ }
 67+ else {
 68+ $this->fatalErrorMsg =
 69+ '<span class="errorbox">' .
 70+ htmlspecialchars( wfMsgExt( 'validator-fatal-error', 'parsemag', $fatalError->getMessage() ) ) .
 71+ '</span>';
 72+ }
 73+ }
 74+
 75+ /**
 76+ * Returns an array containing the parameter info.
 77+ *
 78+ * @since 1.0
 79+ *
 80+ * @return array
 81+ */
 82+ protected function getParameterInfo() {
 83+ global $egMapsDefaultLabel, $egMapsDefaultTitle;
 84+ global $smgQPForceShow, $smgQPShowTitle, $smgQPTemplate;
 85+
 86+ $params = MapsMapper::getCommonParameters();
 87+ $this->service->addParameterInfo( $params );
 88+
 89+ $params['zoom']->setDefault( false );
 90+ $params['zoom']->setDoManipulationOfDefault( false );
 91+
 92+ $params['staticlocations'] = new ListParameter( 'staticlocations', ';' );
 93+ $params['staticlocations']->addAliases( 'locations' );
 94+ $params['staticlocations']->addCriteria( new CriterionIsLocation( '~' ) );
 95+ $params['staticlocations']->addManipulations( new MapsParamLocation( '~' ) );
 96+ $params['staticlocations']->setDefault( array() );
 97+ $params['staticlocations']->setMessage( 'semanticmaps-par-staticlocations' );
 98+
 99+ $params['centre'] = new Parameter( 'centre' );
 100+ $params['centre']->setDefault( false );
 101+ $params['centre']->addAliases( 'center' );
 102+ $params['centre']->addCriteria( new CriterionIsLocation() );
 103+ $params['centre']->setDoManipulationOfDefault( false );
 104+ $manipulation = new MapsParamLocation();
 105+ $manipulation->toJSONObj = true;
 106+ $params['centre']->addManipulations( $manipulation );
 107+ $params['centre']->setMessage( 'semanticmaps-par-centre' );
 108+
 109+ $params['icon'] = new Parameter(
 110+ 'icon',
 111+ Parameter::TYPE_STRING,
 112+ '',
 113+ array(),
 114+ array(
 115+ New CriterionNotEmpty()
 116+ )
 117+ );
 118+ $params['icon']->setMessage( 'maps-displaypoints-par-icon' );
 119+
 120+ $params['forceshow'] = new Parameter(
 121+ 'forceshow',
 122+ Parameter::TYPE_BOOLEAN,
 123+ $smgQPForceShow,
 124+ array( 'force show' )
 125+ );
 126+ $params['forceshow']->setMessage( 'semanticmaps-par-forceshow' );
 127+
 128+ $params['showtitle'] = new Parameter(
 129+ 'showtitle',
 130+ Parameter::TYPE_BOOLEAN,
 131+ $smgQPShowTitle,
 132+ array( 'show title' )
 133+ );
 134+ $params['showtitle']->setMessage( 'semanticmaps-par-showtitle' );
 135+
 136+ $params['template'] = new Parameter(
 137+ 'template',
 138+ Parameter::TYPE_STRING,
 139+ $smgQPTemplate,
 140+ array(),
 141+ array(
 142+ New CriterionNotEmpty()
 143+ )
 144+ );
 145+ $params['template']->setDoManipulationOfDefault( false );
 146+ $params['template']->setMessage( 'semanticmaps-par-template' );
 147+
 148+ $params['title'] = new Parameter(
 149+ 'title',
 150+ Parameter::TYPE_STRING,
 151+ $egMapsDefaultTitle
 152+ );
 153+ $params['title']->setMessage( 'maps-displaypoints-par-title' );
 154+
 155+ $params['label'] = new Parameter(
 156+ 'label',
 157+ Parameter::TYPE_STRING,
 158+ $egMapsDefaultLabel,
 159+ array( 'text' )
 160+ );
 161+ $params['label']->setMessage( 'maps-displaypoints-par-label' );
 162+
 163+ return $params;
 164+ }
 165+
 166+ /**
 167+ * Builds up and returns the HTML for the map, with the queried coordinate data on it.
 168+ *
 169+ * @param SMWQueryResult $res
 170+ * @param $outputmode
 171+ *
 172+ * @return array or string
 173+ */
 174+ public final function getResultText( SMWQueryResult $res, $outputmode ) {
 175+ if ( $this->fatalErrorMsg === false ) {
 176+ global $wgParser;
 177+
 178+ $params = $this->parameters;
 179+
 180+ $queryHandler = new SMQueryHandler( $res, $outputmode );
 181+ $queryHandler->setShowSubject( $params['showtitle'] );
 182+ $queryHandler->setTemplate( $params['template'] );
 183+
 184+ $this->handleMarkerData( $params, $queryHandler->getLocations() );
 185+ $locationAmount = count( $params['locations'] );
 186+
 187+ if ( $params['forceshow'] || $locationAmount > 0 ) {
 188+ // We can only take care of the zoom defaulting here,
 189+ // as not all locations are available in whats passed to Validator.
 190+ if ( $params['zoom'] === false && $locationAmount <= 1 ) {
 191+ $params['zoom'] = $this->service->getDefaultZoom();
 192+ }
 193+
 194+ $mapName = $this->service->getMapId();
 195+
 196+ SMWOutputs::requireHeadItem(
 197+ $mapName,
 198+ $this->service->getDependencyHtml() .
 199+ $configVars = Skin::makeVariablesScript( $this->service->getConfigVariables() )
 200+ );
 201+
 202+ foreach ( $this->service->getResourceModules() as $resourceModule ) {
 203+ SMWOutputs::requireResource( $resourceModule );
 204+ }
 205+
 206+ return array(
 207+ $this->getMapHTML( $params, $wgParser, $mapName ) . $this->getJSON( $params, $wgParser, $mapName ),
 208+ 'noparse' => true,
 209+ 'isHTML' => true
 210+ );
 211+ }
 212+ else {
 213+ return '';
 214+ }
 215+ }
 216+ else {
 217+ return $this->fatalErrorMsg;
 218+ }
 219+ }
 220+
 221+ /**
 222+ * Returns the HTML to display the map.
 223+ *
 224+ * @since 1.0
 225+ *
 226+ * @param array $params
 227+ * @param Parser $parser
 228+ * @param string $mapName
 229+ *
 230+ * @return string
 231+ */
 232+ protected function getMapHTML( array $params, Parser $parser, $mapName ) {
 233+ return Html::element(
 234+ 'div',
 235+ array(
 236+ 'id' => $mapName,
 237+ 'style' => "width: {$params['width']}; height: {$params['height']}; background-color: #cccccc; overflow: hidden;",
 238+ ),
 239+ wfMsg( 'maps-loading-map' )
 240+ );
 241+ }
 242+
 243+ /**
 244+ * Returns the JSON with the maps data.
 245+ *
 246+ * @since 1.0
 247+ *
 248+ * @param array $params
 249+ * @param Parser $parser
 250+ * @param string $mapName
 251+ *
 252+ * @return string
 253+ */
 254+ protected function getJSON( array $params, Parser $parser, $mapName ) {
 255+ $object = $this->getJSONObject( $params, $parser );
 256+
 257+ if ( $object === false ) {
 258+ return '';
 259+ }
 260+
 261+ return Html::inlineScript(
 262+ MapsMapper::getBaseMapJSON( $this->service->getName() )
 263+ . "mwmaps.{$this->service->getName()}.{$mapName}=" . json_encode( $object ) . ';'
 264+ );
 265+ }
 266+
 267+ /**
 268+ * Returns a PHP object to encode to JSON with the map data.
 269+ *
 270+ * @since 1.0
 271+ *
 272+ * @param array $params
 273+ * @param Parser $parser
 274+ *
 275+ * @return mixed
 276+ */
 277+ protected function getJSONObject( array $params, Parser $parser ) {
 278+ return $params;
 279+ }
 280+
 281+ /**
 282+ * Converts the data in the coordinates parameter to JSON-ready objects.
 283+ * These get stored in the locations parameter, and the coordinates on gets deleted.
 284+ *
 285+ * @since 1.0
 286+ *
 287+ * @param array &$params
 288+ * @param array $queryLocations
 289+ */
 290+ protected function handleMarkerData( array &$params, array $queryLocations ) {
 291+ global $wgParser;
 292+
 293+ $parser = version_compare( $GLOBALS['wgVersion'], '1.18', '<' ) ? $wgParser : clone $wgParser;
 294+
 295+ $iconUrl = MapsMapper::getFileUrl( $params['icon'] );
 296+ $params['locations'] = array();
 297+
 298+ foreach ( $params['staticlocations'] as $location ) {
 299+ if ( $location->isValid() ) {
 300+ $jsonObj = $location->getJSONObject( $params['title'], $params['label'], $iconUrl );
 301+
 302+ $jsonObj['title'] = $parser->parse( $jsonObj['title'], $parser->getTitle(), new ParserOptions() )->getText();
 303+ $jsonObj['text'] = $parser->parse( $jsonObj['text'], $parser->getTitle(), new ParserOptions() )->getText();
 304+
 305+ $hasTitleAndtext = $jsonObj['title'] != '' && $jsonObj['text'] != '';
 306+ $jsonObj['text'] = ( $hasTitleAndtext ? '<b>' . $jsonObj['title'] . '</b><hr />' : $jsonObj['title'] ) . $jsonObj['text'];
 307+ $jsonObj['title'] = strip_tags( $jsonObj['title'] );
 308+
 309+ $params['locations'][] = $jsonObj;
 310+ }
 311+ }
 312+
 313+ foreach ( $queryLocations as $location ) {
 314+ if ( $location->isValid() ) {
 315+ $jsonObj = $location->getJSONObject( $params['title'], $params['label'], $iconUrl );
 316+
 317+ $jsonObj['title'] = strip_tags( $jsonObj['title'] );
 318+
 319+ $params['locations'][] = $jsonObj;
 320+ }
 321+ }
 322+
 323+ unset( $params['staticlocations'] );
 324+ }
 325+
 326+ /**
 327+ * Reads the parameters and gets the query printers output.
 328+ *
 329+ * @param SMWQueryResult $results
 330+ * @param array $params
 331+ * @param $outputmode
 332+ *
 333+ * @return array
 334+ */
 335+ public final function getResult( SMWQueryResult $results, array $params, $outputmode ) {
 336+ // Skip checks, results with 0 entries are normal.
 337+ $this->readParameters( $params, $outputmode );
 338+
 339+ return $this->getResultText( $results, SMW_OUTPUT_HTML );
 340+ }
 341+
 342+ /**
 343+ * Returns the internationalized name of the mapping service.
 344+ *
 345+ * @return string
 346+ */
 347+ public final function getName() {
 348+ return wfMsg( 'maps_' . $this->service->getName() );
 349+ }
 350+
 351+ /**
 352+ * Returns a list of parameter information, for usage by Special:Ask and others.
 353+ *
 354+ * @return array
 355+ */
 356+ public function getParameters() {
 357+ $params = parent::getParameters();
 358+ $paramInfo = $this->getParameterInfo();
 359+
 360+ // Do not display this as an option, as the format already determines it
 361+ // TODO: this can probably be done cleaner with some changes in Maps
 362+ unset( $paramInfo['mappingservice'] );
 363+
 364+ if ( version_compare( SMW_VERSION, '1.6', '<' ) ) {
 365+ // Go through the descriptions, and convert them from Validator- to SMW-style.
 366+ // This if for b/c with SMW 1.5.x; SMW 1.6 directly accepts Parameter objects.
 367+ foreach ( $paramInfo as $paramDesc ) {
 368+ $param = array(
 369+ 'name' => $paramDesc->getName(),
 370+ 'type' => $this->getMappedParamType( $paramDesc->getType() ),
 371+ 'description' => $paramDesc->getDescription() ? $paramDesc->getDescription() : '',
 372+ 'default' => $paramDesc->isRequired() ? '' : $paramDesc->getDefault()
 373+ );
 374+
 375+ foreach ( $paramDesc->getCriteria() as $criterion ) {
 376+ if ( $criterion instanceof CriterionInArray ) {
 377+ $param['values'] = $criterion->getAllowedValues();
 378+ $param['type'] = $paramDesc->isList() ? 'enum-list' : 'enumeration';
 379+ break;
 380+ }
 381+ }
 382+
 383+ $params[] = $param;
 384+ }
 385+ }
 386+ else {
 387+ $params = array_merge( $params, $paramInfo );
 388+ }
 389+
 390+ return $params;
 391+ }
 392+
 393+ /**
 394+ * Takes in an element of the Parameter::TYPE_ enum and turns it into an SMW type (string) indicator.
 395+ *
 396+ * @since 1.0
 397+ *
 398+ * @param Parameter::TYPE_ $type
 399+ *
 400+ * @return string
 401+ */
 402+ protected function getMappedParamType( $type ) {
 403+ static $typeMap = array(
 404+ Parameter::TYPE_STRING => 'string',
 405+ Parameter::TYPE_BOOLEAN => 'boolean',
 406+ Parameter::TYPE_CHAR => 'int',
 407+ Parameter::TYPE_FLOAT => 'int',
 408+ Parameter::TYPE_INTEGER => 'int',
 409+ Parameter::TYPE_NUMBER => 'int',
 410+ );
 411+
 412+ return $typeMap[$type];
 413+ }
 414+
 415+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_MapPrinter.php
___________________________________________________________________
Added: svn:eol-style
1416 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_QueryHandler.php
@@ -0,0 +1,493 @@
 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+ protected $queryResult;
 17+ protected $outputmode;
 18+
 19+ protected $locations = false;
 20+
 21+ /**
 22+ * The template to use for the text, or false if there is none.
 23+ *
 24+ * @since 0.7.3
 25+ *
 26+ * @var false or string
 27+ */
 28+ protected $template = false;
 29+
 30+ /**
 31+ * The global icon.
 32+ *
 33+ * @since 0.7.3
 34+ *
 35+ * @var string
 36+ */
 37+ public $icon = '';
 38+
 39+ /**
 40+ * The global text.
 41+ *
 42+ * @since 1.0
 43+ *
 44+ * @var string
 45+ */
 46+ public $text = '';
 47+
 48+ /**
 49+ * The global title.
 50+ *
 51+ * @since 1.0
 52+ *
 53+ * @var string
 54+ */
 55+ public $title = '';
 56+
 57+ /**
 58+ * Make a separate link to the title or not?
 59+ *
 60+ * @since 0.7.3
 61+ *
 62+ * @var boolean
 63+ */
 64+ public $titleLinkSeperate;
 65+
 66+ /**
 67+ * Should link targets be made absolute (instead of relative)?
 68+ *
 69+ * @since 1.0
 70+ *
 71+ * @var boolean
 72+ */
 73+ protected $linkAbsolute;
 74+
 75+ /**
 76+ * The text used for the link to the page (if it's created). $1 will be replaced by the page name.
 77+ *
 78+ * @since 1.0
 79+ *
 80+ * @var string
 81+ */
 82+ protected $pageLinkText;
 83+
 84+ /**
 85+ * A separator to use beteen the subject and properties in the text field.
 86+ *
 87+ * @since 1.0
 88+ *
 89+ * @var string
 90+ */
 91+ protected $subjectSeparator = '<hr />';
 92+
 93+ /**
 94+ * Make the subject in the text bold or not?
 95+ *
 96+ * @since 1.0
 97+ *
 98+ * @var boolean
 99+ */
 100+ protected $boldSubject = true;
 101+
 102+ /**
 103+ * Show the subject in the text or not?
 104+ *
 105+ * @since 1.0
 106+ *
 107+ * @var boolean
 108+ */
 109+ protected $showSubject = true;
 110+
 111+ /**
 112+ * Constructor.
 113+ *
 114+ * @since 0.7.3
 115+ *
 116+ * @param SMWQueryResult $queryResult
 117+ * @param integer $outputmode
 118+ */
 119+ public function __construct( SMWQueryResult $queryResult, $outputmode, $linkAbsolute = false, $pageLinkText = '$1', $titleLinkSeperate = false ) {
 120+ $this->queryResult = $queryResult;
 121+ $this->outputmode = $outputmode;
 122+
 123+ $this->linkAbsolute = $linkAbsolute;
 124+ $this->pageLinkText = $pageLinkText;
 125+ $this->titleLinkSeperate = $titleLinkSeperate;
 126+ }
 127+
 128+ /**
 129+ * Sets the template.
 130+ *
 131+ * @since 1.0
 132+ *
 133+ * @param string $template
 134+ */
 135+ public function setTemplate( $template ) {
 136+ $this->template = $template == '' ? false : $template;
 137+ }
 138+
 139+ /**
 140+ * Sets the global icon.
 141+ *
 142+ * @since 1.0
 143+ *
 144+ * @param string $icon
 145+ */
 146+ public function setIcon( $icon ) {
 147+ $this->icon = $icon;
 148+ }
 149+
 150+ /**
 151+ * Sets the global title.
 152+ *
 153+ * @since 1.0
 154+ *
 155+ * @param string $title
 156+ */
 157+ public function setTitle( $title ) {
 158+ $this->title = $title;
 159+ }
 160+
 161+ /**
 162+ * Sets the global text.
 163+ *
 164+ * @since 1.0
 165+ *
 166+ * @param string $text
 167+ */
 168+ public function setText( $text ) {
 169+ $this->text = $text;
 170+ }
 171+
 172+ /**
 173+ * Sets the subject separator.
 174+ *
 175+ * @since 1.0
 176+ *
 177+ * @param string $subjectSeparator
 178+ */
 179+ public function setSubjectSeparator( $subjectSeparator ) {
 180+ $this->subjectSeparator = $subjectSeparator;
 181+ }
 182+
 183+ /**
 184+ * Sets if the subject should be made bold in the text.
 185+ *
 186+ * @since 1.0
 187+ *
 188+ * @param string $boldSubject
 189+ */
 190+ public function setBoldSubject( $boldSubject ) {
 191+ $this->boldSubject = $boldSubject;
 192+ }
 193+
 194+ /**
 195+ * Sets if the subject should shown in the text.
 196+ *
 197+ * @since 1.0
 198+ *
 199+ * @param string $showSubject
 200+ */
 201+ public function setShowSubject( $showSubject ) {
 202+ $this->showSubject = $showSubject;
 203+ }
 204+
 205+ /**
 206+ * Sets the text for the link to the page when separate from the title.
 207+ *
 208+ * @since 1.0
 209+ *
 210+ * @param string $text
 211+ */
 212+ public function setPageLinkText( $text ) {
 213+ $this->pageLinkText = $text;
 214+ }
 215+
 216+ /**
 217+ * Gets the query result as a list of locations.
 218+ *
 219+ * @since 0.7.3
 220+ *
 221+ * @return array of MapsLocation
 222+ */
 223+ public function getLocations() {
 224+ if ( $this->locations === false ) {
 225+ $this->locations = $this->findLocations();
 226+ }
 227+
 228+ return $this->locations;
 229+ }
 230+
 231+ /**
 232+ * Gets the query result as a list of locations.
 233+ *
 234+ * @since 0.7.3
 235+ *
 236+ * @return array of MapsLocation
 237+ */
 238+ protected function findLocations() {
 239+ $locations = array();
 240+
 241+ while ( ( $row = $this->queryResult->getNext() ) !== false ) {
 242+ $locations = array_merge( $locations, $this->handleResultRow( $row ) );
 243+ }
 244+
 245+ return $locations;
 246+ }
 247+
 248+ /**
 249+ * Returns the locations found in the provided result row.
 250+ *
 251+ * @since 0.7.3
 252+ *
 253+ * @param array $row Array of SMWResultArray
 254+ *
 255+ * @return array of MapsLocation
 256+ */
 257+ protected function handleResultRow( array /* of SMWResultArray */ $row ) {
 258+ $locations = array();
 259+ $properties = array();
 260+
 261+ $title = '';
 262+ $text = '';
 263+
 264+ // Loop throught all fields of the record.
 265+ foreach ( $row as $i => $resultArray ) {
 266+ /* SMWPrintRequest */ $printRequest = $resultArray->getPrintRequest();
 267+
 268+ // Loop throught all the parts of the field value.
 269+ while ( ( /* SMWDataValue */ $dataValue = $resultArray->getNextDataValue() ) !== false ) {
 270+ if ( $dataValue->getTypeID() == '_wpg' && $i == 0 ) {
 271+ list( $title, $text ) = $this->handleResultSubject( $dataValue );
 272+ }
 273+ elseif ( $dataValue->getTypeID() != '_geo' && $i != 0 ) {
 274+ $properties[] = $this->handleResultProperty( $dataValue, $printRequest );
 275+ }
 276+ elseif ( $printRequest->getMode() == SMWPrintRequest::PRINT_PROP && $printRequest->getTypeID() == '_geo' ) {
 277+ $dataItem = $dataValue->getDataItem();
 278+
 279+ $location = MapsLocation::newFromLatLon( $dataItem->getLatitude(), $dataItem->getLongitude() );
 280+
 281+ if ( $location->isValid() ) {
 282+ $locations[] = $location;
 283+ }
 284+
 285+ }
 286+ }
 287+ }
 288+
 289+ if ( count( $properties ) > 0 && $text != '' ) {
 290+ $text .= $this->subjectSeparator;
 291+ }
 292+
 293+ $icon = $this->getLocationIcon( $row );
 294+
 295+ return $this->buildLocationsList( $locations, $title, $text, $icon, $properties );
 296+ }
 297+
 298+ /**
 299+ * Handles a SMWDataValue subject value.
 300+ * Gets the plain text title and creates the HTML text with headers and the like.
 301+ *
 302+ * @since 1.0
 303+ *
 304+ * @param SMWDataValue $object
 305+ *
 306+ * @return array with title and text
 307+ */
 308+ protected function handleResultSubject( SMWDataValue $object ) {
 309+ global $wgUser;
 310+
 311+ $title = $object->getLongText( $this->outputmode, null );
 312+ $text = '';
 313+
 314+ if ( $this->showSubject ) {
 315+ if ( !$this->titleLinkSeperate && $this->linkAbsolute ) {
 316+ $text = Html::element(
 317+ 'a',
 318+ array( 'href' => $object->getTitle()->getFullUrl() ),
 319+ $object->getTitle()->getText()
 320+ );
 321+ }
 322+ else {
 323+ $text = $object->getLongText( $this->outputmode, $wgUser->getSkin() );
 324+ }
 325+
 326+ if ( $this->boldSubject ) {
 327+ $text = '<b>' . $text . '</b>';
 328+ }
 329+
 330+ if ( $this->titleLinkSeperate ) {
 331+ $txt = $object->getTitle()->getText();
 332+
 333+ if ( $this->pageLinkText != '' ) {
 334+ $txt = str_replace( '$1', $txt, $this->pageLinkText );
 335+ }
 336+ $text .= Html::element(
 337+ 'a',
 338+ array( 'href' => $object->getTitle()->getFullUrl() ),
 339+ $txt
 340+ );
 341+ }
 342+ }
 343+
 344+ return array( $title, $text );
 345+ }
 346+
 347+ /**
 348+ * Handles a single property (SMWPrintRequest) to be displayed for a record (SMWDataValue).
 349+ *
 350+ * @since 1.0
 351+ *
 352+ * @param SMWDataValue $object
 353+ * @param SMWPrintRequest $printRequest
 354+ *
 355+ * @return string
 356+ */
 357+ protected function handleResultProperty( SMWDataValue $object, SMWPrintRequest $printRequest ) {
 358+ global $wgUser;
 359+
 360+ if ( $this->template ) {
 361+ if ( $object instanceof SMWWikiPageValue ) {
 362+ return $object->getTitle()->getPrefixedText();
 363+ } else {
 364+ return $object->getLongText( SMW_OUTPUT_WIKI, NULL );
 365+ }
 366+ }
 367+
 368+ if ( $this->linkAbsolute ) {
 369+ $t = Title::newFromText( $printRequest->getHTMLText( NULL ), SMW_NS_PROPERTY );
 370+
 371+ if ( $t->exists() ) {
 372+ $propertyName = $propertyName = Html::element(
 373+ 'a',
 374+ array( 'href' => $t->getFullUrl() ),
 375+ $printRequest->getHTMLText( NULL )
 376+ );
 377+ }
 378+ else {
 379+ $propertyName = $printRequest->getHTMLText( NULL );
 380+ }
 381+ }
 382+ else {
 383+ $propertyName = $printRequest->getHTMLText( $wgUser->getSkin() );
 384+ }
 385+
 386+ if ( $this->linkAbsolute ) {
 387+ $hasPage = $object->getTypeID() == '_wpg';
 388+
 389+ if ( $hasPage ) {
 390+ $t = Title::newFromText( $object->getLongText( $this->outputmode, NULL ), NS_MAIN );
 391+ $hasPage = $t->exists();
 392+ }
 393+
 394+ if ( $hasPage ) {
 395+ $propertyValue = Html::element(
 396+ 'a',
 397+ array( 'href' => $t->getFullUrl() ),
 398+ $object->getLongText( $this->outputmode, NULL )
 399+ );
 400+ }
 401+ else {
 402+ $propertyValue = $object->getLongText( $this->outputmode, NULL );
 403+ }
 404+ }
 405+ else {
 406+ $propertyValue = $object->getLongText( $this->outputmode, $wgUser->getSkin() );
 407+ }
 408+
 409+ return $propertyName . ( $propertyName == '' ? '' : ': ' ) . $propertyValue;
 410+ }
 411+
 412+ /**
 413+ * Builds a set of locations with the provided title, text and icon.
 414+ *
 415+ * @since 1.0
 416+ *
 417+ * @param array of MapsLocation $locations
 418+ * @param string $title
 419+ * @param string $text
 420+ * @param string $icon
 421+ * @param array $properties
 422+ *
 423+ * @return array of MapsLocation
 424+ */
 425+ protected function buildLocationsList( array $locations, $title, $text, $icon, array $properties ) {
 426+ if ( $this->template ) {
 427+ global $wgParser;
 428+ $parser = version_compare( $GLOBALS['wgVersion'], '1.18', '<' ) ? $wgParser : clone $wgParser;
 429+ }
 430+ else {
 431+ $text .= implode( '<br />', $properties );
 432+ }
 433+
 434+ foreach ( $locations as $location ) {
 435+ if ( $this->template ) {
 436+ $segments = array_merge(
 437+ array( $this->template, 'title=' . $title, 'latitude=' . $location->getLatitude(), 'longitude=' . $location->getLongitude() ),
 438+ $properties
 439+ );
 440+
 441+ $text .= $parser->parse( '{{' . implode( '|', $segments ) . '}}', $parser->getTitle(), new ParserOptions() )->getText();
 442+ }
 443+
 444+ $location->setTitle( $title );
 445+ $location->setText( $text );
 446+ $location->setIcon( $icon );
 447+
 448+ $locations[] = $location;
 449+ }
 450+
 451+ return $locations;
 452+ }
 453+
 454+ /**
 455+ * Get the icon for a row.
 456+ *
 457+ * @since 0.7.3
 458+ *
 459+ * @param array $row
 460+ *
 461+ * @return string
 462+ */
 463+ protected function getLocationIcon( array $row ) {
 464+ $icon = '';
 465+ $legend_labels = array();
 466+
 467+ // Look for display_options field, which can be set by Semantic Compound Queries
 468+ // the location of this field changed in SMW 1.5
 469+ $display_location = method_exists( $row[0], 'getResultSubject' ) ? $row[0]->getResultSubject() : $row[0];
 470+
 471+ if ( property_exists( $display_location, 'display_options' ) && is_array( $display_location->display_options ) ) {
 472+ $display_options = $display_location->display_options;
 473+ if ( array_key_exists( 'icon', $display_options ) ) {
 474+ $icon = $display_options['icon'];
 475+
 476+ // 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
 477+ if ( array_key_exists( 'legend label', $display_options ) ) {
 478+
 479+ $legend_label = $display_options['legend label'];
 480+
 481+ if ( ! array_key_exists( $icon, $legend_labels ) ) {
 482+ $legend_labels[$icon] = $legend_label;
 483+ }
 484+ }
 485+ }
 486+ } // Icon can be set even for regular, non-compound queries If it is, though, we have to translate the name into a URL here
 487+ elseif ( $this->icon != '' ) {
 488+ $icon = MapsMapper::getFileUrl( $this->icon );
 489+ }
 490+
 491+ return $icon;
 492+ }
 493+
 494+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_QueryHandler.php
___________________________________________________________________
Added: svn:eol-style
1495 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_Mapper.php
@@ -0,0 +1,98 @@
 2+<?php
 3+
 4+/**
 5+ * Default class to assign as handler for map result formats.
 6+ * The reason SMMapPrinter is not used for this directly is that
 7+ * this would not allow having a deriving class of SMMapPrinter
 8+ * for a particular mapping service.
 9+ *
 10+ * @file SM_Mapper.php
 11+ * @ingroup SemanticMaps
 12+ *
 13+ * @licence GNU GPL v3
 14+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 15+ */
 16+final class SMMapper {
 17+
 18+ /**
 19+ * @var SMMapPrinter
 20+ */
 21+ protected $queryPrinter;
 22+
 23+ /**
 24+ * @since 1.0
 25+ *
 26+ * @var boolean
 27+ */
 28+ protected $isMapFormat;
 29+
 30+ /**
 31+ * Constructor.
 32+ *
 33+ * @param $format String
 34+ * @param $inline
 35+ */
 36+ public function __construct( $format, $inline ) {
 37+ global $egMapsDefaultServices;
 38+
 39+ $this->isMapFormat = $format == 'map';
 40+
 41+ // TODO: allow service parameter to override the default
 42+ // Note: if this is allowed, then the getParameters should only return the base parameters.
 43+ if ( $this->isMapFormat ) $format = $egMapsDefaultServices['qp'];
 44+
 45+ // Get the instance of the service class.
 46+ $service = MapsMappingServices::getValidServiceInstance( $format, 'qp' );
 47+
 48+ // Get an instance of the class handling the current query printer and service.
 49+ $QPClass = $service->getFeature( 'qp' );
 50+ $this->queryPrinter = new $QPClass( $format, $inline, $service );
 51+ }
 52+
 53+ /**
 54+ * Intercept calls to getName, so special behaviour for the map format can be implemented.
 55+ *
 56+ * @since 1.0
 57+ *
 58+ * @return string
 59+ */
 60+ public function getName() {
 61+ return $this->isMapFormat ? wfMsg( 'maps_map' ) : $this->queryPrinter->getName();
 62+ }
 63+
 64+ /**
 65+ * Explcitly define this method, so method_exists returns true in SMW.
 66+ *
 67+ * @see SMWResultPrinter::getParameters
 68+ *
 69+ * @since 1.0
 70+ */
 71+ public function getParameters() {
 72+ return $this->queryPrinter->getParameters();
 73+ }
 74+
 75+ /**
 76+ * Explcitly define this method, so method_exists returns true in SMW.
 77+ *
 78+ * @see SMWResultPrinter::getParameters
 79+ *
 80+ * @since 1.0
 81+ */
 82+ public function getValidatorParameters() {
 83+ return $this->queryPrinter->getValidatorParameters();
 84+ }
 85+
 86+ /**
 87+ * SMW thinks this class is a SMWResultPrinter, and calls methods that should
 88+ * be forewarded to $this->queryPrinter on it.
 89+ *
 90+ * @since 1.0
 91+ *
 92+ * @param string $name
 93+ * @param array $arguments
 94+ */
 95+ public function __call( $name, array $arguments ) {
 96+ return call_user_func_array( array( $this->queryPrinter, $name ), $arguments );
 97+ }
 98+
 99+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_Mapper.php
___________________________________________________________________
Added: svn:eol-style
1100 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_KMLPrinter.php
@@ -0,0 +1,151 @@
 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+ * Constructor.
 17+ *
 18+ * @param $format String
 19+ * @param $inline
 20+ */
 21+ public function __construct( $format, $inline ) {
 22+ parent::__construct( $format, $inline );
 23+ $this->useValidator = true;
 24+ }
 25+
 26+ /**
 27+ * Handler of the print request.
 28+ *
 29+ * @since 0.7.3
 30+ *
 31+ * @param SMWQueryResult $res
 32+ * @param $outputmode
 33+ *
 34+ * @return array
 35+ */
 36+ public function getResultText( SMWQueryResult $res, $outputmode ) {
 37+ if ( $outputmode == SMW_OUTPUT_FILE ) {
 38+ return $this->getKML( $res, $outputmode );
 39+ }
 40+ else {
 41+ return $this->getLink( $res, $outputmode );
 42+ }
 43+ }
 44+
 45+ /**
 46+ * @see SMWResultPrinter::handleParameters
 47+ *
 48+ * @since 1.0
 49+ *
 50+ * @param array $params
 51+ * @param $outputmode
 52+ */
 53+ protected function handleParameters( array $params, $outputmode ) {
 54+ $this->m_params = $params;
 55+ }
 56+
 57+ /**
 58+ * Returns a list of parameter definitions.
 59+ *
 60+ * @since 0.7.4
 61+ *
 62+ * @return array
 63+ */
 64+ public function getParameters() {
 65+ global $egMapsDefaultLabel, $egMapsDefaultTitle;
 66+
 67+ $params = array_merge( parent::getParameters(), $this->exportFormatParameters() );
 68+
 69+ $params['text'] = new Parameter( 'text', Parameter::TYPE_STRING, $egMapsDefaultLabel );
 70+ //$params['text']->setDescription();
 71+
 72+ $params['title'] = new Parameter( 'title', Parameter::TYPE_STRING, $egMapsDefaultTitle );
 73+
 74+ $params[] = new Parameter( 'linkabsolute', Parameter::TYPE_BOOLEAN, true );
 75+
 76+ $params['pagelinktext'] = new Parameter( 'pagelinktext', Parameter::TYPE_STRING, wfMsg( 'semanticmaps-default-kml-pagelink' ) );
 77+
 78+ return $params;
 79+ }
 80+
 81+ /**
 82+ * Returns the KML for the query result.
 83+ *
 84+ * @since 0.7.3
 85+ *
 86+ * @param SMWQueryResult $res
 87+ * @param integer $outputmode
 88+ *
 89+ * @return string
 90+ */
 91+ protected function getKML( SMWQueryResult $res, $outputmode ) {
 92+ $queryHandler = new SMQueryHandler( $res, $outputmode, $this->m_params['linkabsolute'], $this->m_params['pagelinktext'], false );
 93+ $queryHandler->setText( $this->m_params['text'] );
 94+ $queryHandler->setTitle( $this->m_params['title'] );
 95+ $queryHandler->setSubjectSeparator( '' );
 96+
 97+ $formatter = new MapsKMLFormatter( $this->m_params );
 98+ $formatter->addPlacemarks( $queryHandler->getLocations() );
 99+
 100+ return $formatter->getKML();
 101+ }
 102+
 103+ /**
 104+ * Returns a link (HTML) pointing to a query that returns the actual KML file.
 105+ *
 106+ * @since 0.7.3
 107+ *
 108+ * @param SMWQueryResult $res
 109+ * @param integer $outputmode
 110+ *
 111+ * @return string
 112+ */
 113+ protected function getLink( SMWQueryResult $res, $outputmode ) {
 114+ $searchLabel = $this->getSearchLabel( $outputmode );
 115+ $link = $res->getQueryLink( $searchLabel ? $searchLabel : wfMsgForContent( 'semanticmaps-kml-link' ) );
 116+ $link->setParameter( 'kml', 'format' );
 117+ $link->setParameter( $this->m_params['linkabsolute'] ? 'yes' : 'no', 'linkabsolute' );
 118+ $link->setParameter( $this->m_params['pagelinktext'], 'pagelinktext' );
 119+
 120+ if ( array_key_exists( 'limit', $this->m_params ) ) {
 121+ $link->setParameter( $this->m_params['limit'], 'limit' );
 122+ } else { // Use a reasonable default limit.
 123+ $link->setParameter( 20, 'limit' );
 124+ }
 125+
 126+ $this->isHTML = ( $outputmode == SMW_OUTPUT_HTML );
 127+
 128+ return $link->getText( $outputmode, $this->mLinker );
 129+ }
 130+
 131+ /**
 132+ * @see SMWResultPrinter::getMimeType()
 133+ */
 134+ public function getMimeType( $res ) {
 135+ return 'application/vnd.google-earth.kml+xml';
 136+ }
 137+
 138+ /**
 139+ * @see SMWResultPrinter::getFileName()
 140+ */
 141+ public function getFileName( $res ) {
 142+ // @TODO FIXME
 143+ return 'kml.kml';
 144+ }
 145+
 146+ /**
 147+ * @see SMWResultPrinter::getName()
 148+ */
 149+ public final function getName() {
 150+ return wfMsg( 'semanticmaps-kml' );
 151+ }
 152+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/queryprinters/SM_KMLPrinter.php
___________________________________________________________________
Added: svn:eol-style
1153 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/SM_GeoCoordsHooks.php
@@ -0,0 +1,80 @@
 2+<?php
 3+
 4+/**
 5+ * Implementation of datavalues that are geographic coordinates.
 6+ *
 7+ * @since 1.0
 8+ *
 9+ * @file SM_GeoCoordsHooks.php
 10+ * @ingroup SemanticMaps
 11+ *
 12+ * @licence GNU GPL v3
 13+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 14+ */
 15+final class SMGeoCoordsHooks {
 16+
 17+ /**
 18+ * Set the default format to 'map' when the requested properties are
 19+ * of type geographic coordinates.
 20+ *
 21+ * TODO: have a setting to turn this off and have it off by default for #show
 22+ *
 23+ * @since 1.0
 24+ *
 25+ * @param $format Mixed: The format (string), or false when not set yet
 26+ * @param $printRequests Array: The print requests made
 27+ * @param $params Array: The parameters for the query printer
 28+ *
 29+ * @return true
 30+ */
 31+ public static function addGeoCoordsDefaultFormat( &$format, array $printRequests, array $params ) {
 32+ // Only set the format when not set yet. This allows other extensions to override the Semantic Maps behaviour.
 33+ if ( $format === false ) {
 34+ // Only apply when there is more then one print request.
 35+ // This way requests comming from #show are ignored.
 36+ if ( count( $printRequests ) > 1 ) {
 37+ $allCoords = true;
 38+ $first = true;
 39+
 40+ // Loop through the print requests to determine their types.
 41+ foreach( $printRequests as $printRequest ) {
 42+ // Skip the first request, as it's the object.
 43+ if ( $first ) {
 44+ $first = false;
 45+ continue;
 46+ }
 47+
 48+ $typeId = $printRequest->getTypeID();
 49+
 50+ if ( $typeId != '_geo' ) {
 51+ $allCoords = false;
 52+ break;
 53+ }
 54+ }
 55+
 56+ // If they are all coordinates, set the result format to 'map'.
 57+ if ( $allCoords ) {
 58+ $format = 'map';
 59+ }
 60+ }
 61+
 62+ }
 63+
 64+ return true;
 65+ }
 66+
 67+ /**
 68+ * Adds support for the geographical coordinate data type to Semantic MediaWiki.
 69+ *
 70+ * @since 1.0
 71+ *
 72+ * TODO: i18n keys still need to be moved
 73+ *
 74+ * @return true
 75+ */
 76+ public static function initGeoCoordsType() {
 77+ SMWDataValueFactory::registerDatatype( '_geo', 'SMGeoCoordsValue', SMWDataItem::TYPE_GEO, 'Geographic coordinate' );
 78+ return true;
 79+ }
 80+
 81+}
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/SM_GeoCoordsHooks.php
___________________________________________________________________
Added: svn:eol-style
182 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/includes/SM_AreaValueDescription.php
@@ -0,0 +1,186 @@
 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 SMWDataItem $dataItem
 35+ * @param string $comparator
 36+ * @param string $radius
 37+ */
 38+ public function __construct( SMWDataItem $dataItem, $comparator, $radius ) {
 39+ parent::__construct( $dataItem, $comparator );
 40+
 41+ // Only if the MapsGeoFunctions class is loaded, we can create the bounding box.
 42+ if ( self::geoFunctionsAreAvailable() ) {
 43+ $this->calculateBounds( $dataItem, $radius );
 44+ }
 45+ }
 46+
 47+ /**
 48+ * Sets the bounds fields to an array returned by SMAreaValueDescription::getBoundingBox.
 49+ *
 50+ * @since 0.6
 51+ *
 52+ * @param SMWDIGeoCoord $dataItem
 53+ * @param string $radius
 54+ */
 55+ protected function calculateBounds( SMWDIGeoCoord $dataItem, $radius ) {
 56+ $this->bounds = self::getBoundingBox(
 57+ array( 'lat' => $dataItem->getLatitude(), 'lon' => $dataItem->getLongitude() ),
 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->getDataItem() !== null ) {
 71+ $queryString = SMWDataValueFactory::newDataItemValue( $this->getDataItem() )->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+ // Only execute the query when the description's type is geographical coordinates,
 122+ // the description is valid, and the near comparator is used.
 123+ if ( $this->getDataItem()->getDIType() != SMWDataItem::TYPE_GEO
 124+ || ( $this->getComparator() != SMW_CMP_EQ && $this->getComparator() != SMW_CMP_NEQ )
 125+ ) {
 126+ return false;
 127+ }
 128+
 129+ $north = $dbs->addQuotes( $this->bounds['north'] );
 130+ $east = $dbs->addQuotes( $this->bounds['east'] );
 131+ $south = $dbs->addQuotes( $this->bounds['south'] );
 132+ $west = $dbs->addQuotes( $this->bounds['west'] );
 133+
 134+ $isEq = $this->getComparator() == SMW_CMP_EQ;
 135+
 136+ $conditions = array();
 137+
 138+ $smallerThen = $isEq ? '<' : '>=';
 139+ $biggerThen = $isEq ? '>' : '<=';
 140+ $joinCond = $isEq ? 'AND' : 'OR';
 141+
 142+ $conditions[] = "{$tableName}.$fieldNames[0] $smallerThen $north";
 143+ $conditions[] = "{$tableName}.$fieldNames[0] $biggerThen $south";
 144+ $conditions[] = "{$tableName}.$fieldNames[1] $smallerThen $east";
 145+ $conditions[] = "{$tableName}.$fieldNames[1] $biggerThen $west";
 146+
 147+ $sql = implode( " $joinCond ", $conditions );
 148+
 149+ return $sql;
 150+ }
 151+
 152+ /**
 153+ * Returns the lat and lon limits of a bounding box around a circle defined by the provided parameters.
 154+ *
 155+ * @since 0.6
 156+ *
 157+ * @param array $centerCoordinates Array containing non-directional float coordinates with lat and lon keys.
 158+ * @param float $circleRadius The radidus of the circle to create a bounding box for, in m.
 159+ *
 160+ * @return An associative array containing the limits with keys north, east, south and west.
 161+ */
 162+ protected static function getBoundingBox( array $centerCoordinates, $circleRadius ) {
 163+ $north = MapsGeoFunctions::findDestination( $centerCoordinates, 0, $circleRadius );
 164+ $east = MapsGeoFunctions::findDestination( $centerCoordinates, 90, $circleRadius );
 165+ $south = MapsGeoFunctions::findDestination( $centerCoordinates, 180, $circleRadius );
 166+ $west = MapsGeoFunctions::findDestination( $centerCoordinates, 270, $circleRadius );
 167+
 168+ return array(
 169+ 'north' => $north['lat'],
 170+ 'east' => $east['lon'],
 171+ 'south' => $south['lat'],
 172+ 'west' => $west['lon'],
 173+ );
 174+ }
 175+
 176+ /**
 177+ * Returns a boolean indicating if MapsGeoFunctions is available.
 178+ *
 179+ * @since 0.6
 180+ *
 181+ * @return boolean
 182+ */
 183+ protected static function geoFunctionsAreAvailable() {
 184+ return class_exists( 'MapsGeoFunctions' );
 185+ }
 186+
 187+}
\ No newline at end of file
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/includes/SM_AreaValueDescription.php
___________________________________________________________________
Added: svn:eol-style
1188 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/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_1_0_1/COPYING
___________________________________________________________________
Added: svn:eol-style
1684 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/SemanticMaps.i18n.php
@@ -0,0 +1,999 @@
 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 demos]).",
 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-loading-forminput' => 'Loading map form input...',
 28+ 'semanticmaps_lookupcoordinates' => 'Look up coordinates',
 29+ 'semanticmaps_enteraddresshere' => 'Enter address here',
 30+ 'semanticmaps-updatemap' => 'Update map',
 31+ 'semanticmaps-forminput-remove' => 'Remove',
 32+ 'semanticmaps-forminput-add' => 'Add',
 33+ 'semanticmaps-forminput-locations' => 'Locations',
 34+
 35+ // Parameter descriptions
 36+
 37+ 'semanticmaps-par-staticlocations' => 'A list of locations to add to the map together with the queried data. Like with display_points, you can add a title, description and icon per location using the tilde "~" as separator.',
 38+ 'semanticmaps-par-forceshow' => 'Show the map even when there are no locations to display?',
 39+ 'semanticmaps-par-showtitle' => 'Show a title in the marker info window or not. Disabling this is often usefull when using a template to format the info window content.',
 40+ 'semanticmaps-par-centre' => 'The centre of the map. When not provided, the map will automatically pick the optimal centre to display all markers on the map.',
 41+ 'semanticmaps-par-template' => 'A template to use to format the info window contents.'
 42+);
 43+
 44+/** Message documentation (Message documentation)
 45+ * @author EugeneZelenko
 46+ * @author Fryed-peach
 47+ * @author Lloffiwr
 48+ * @author Purodha
 49+ * @author Raymond
 50+ */
 51+$messages['qqq'] = array(
 52+ 'semanticmaps-desc' => '{{desc}}',
 53+ 'semanticmaps-default-kml-pagelink' => '$1 is probably a page title.',
 54+ 'semanticmaps-loading-forminput' => 'Message displayed during a computer action',
 55+ 'semanticmaps_lookupcoordinates' => 'Submit button next to input box. The box contains the hint {{msg-mw|Semanticmaps_enteraddresshere}}',
 56+ 'semanticmaps_enteraddresshere' => 'Hint provided in an input box. The submit button next to the input box is {{msg-mw|Semanticmaps_lookupcoordinates}}',
 57+ 'semanticmaps-updatemap' => 'Submit button label',
 58+ 'semanticmaps-forminput-remove' => '{{Identical|Remove}}',
 59+ 'semanticmaps-forminput-add' => '{{Identical|Add}}',
 60+ 'semanticmaps-forminput-locations' => '{{Identical|Location}}',
 61+);
 62+
 63+/** Afrikaans (Afrikaans)
 64+ * @author Naudefj
 65+ */
 66+$messages['af'] = array(
 67+ '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]).',
 68+ 'semanticmaps-unrecognizeddistance' => 'Die waarde "$1" is nie \'n geldige afstand nie.',
 69+ 'semanticmaps_lookupcoordinates' => 'Soek koördinate op',
 70+ 'semanticmaps_enteraddresshere' => 'Voer adres hier in',
 71+);
 72+
 73+/** Gheg Albanian (Gegë)
 74+ * @author Mdupont
 75+ */
 76+$messages['aln'] = array(
 77+);
 78+
 79+/** Arabic (العربية)
 80+ * @author Meno25
 81+ * @author OsamaK
 82+ */
 83+$messages['ar'] = array(
 84+ 'semanticmaps-desc' => 'يقدم إمكانية عرض وتعديل بيانات التنسيق التي خزنها امتداد سيمانتيك ميدياويكي ([http://mapping.referata.com/wiki/Examples تجربة]).',
 85+ 'semanticmaps-kml' => 'كيه إم إل',
 86+ 'semanticmaps_lookupcoordinates' => 'ابحث عن الإحداثيات',
 87+ 'semanticmaps_enteraddresshere' => 'أدخل العنوان هنا',
 88+ 'semanticmaps-forminput-remove' => 'أزل',
 89+ 'semanticmaps-forminput-add' => 'أضف',
 90+);
 91+
 92+/** Egyptian Spoken Arabic (مصرى)
 93+ * @author Ghaly
 94+ * @author Meno25
 95+ */
 96+$messages['arz'] = array(
 97+ 'semanticmaps_name' => 'خرائط دلالية',
 98+ 'semanticmaps_lookupcoordinates' => 'ابحث عن الإحداثيات',
 99+ 'semanticmaps_enteraddresshere' => 'أدخل العنوان هنا',
 100+);
 101+
 102+/** Belarusian (Taraškievica orthography) (‪Беларуская (тарашкевіца)‬)
 103+ * @author EugeneZelenko
 104+ * @author Jim-by
 105+ * @author Wizardist
 106+ */
 107+$messages['be-tarask'] = array(
 108+ 'semanticmaps-desc' => 'Забясьпечвае магчымасьць прагляду і рэдагаваньня зьвестак пра каардынаты, якія захоўваюцца з дапамогай пашырэньня Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples дэманстрацыя]).',
 109+ 'semanticmaps-unrecognizeddistance' => 'Значэньне $1 — няслушная адлегласьць.',
 110+ 'semanticmaps-kml-link' => 'Паказаць KML-файл',
 111+ 'semanticmaps-default-kml-pagelink' => 'Паказаць старонку $1',
 112+ 'semanticmaps-loading-forminput' => 'Загрузка мапы…',
 113+ 'semanticmaps_lookupcoordinates' => 'Пошук каардынатаў',
 114+ 'semanticmaps_enteraddresshere' => 'Увядзіце тут адрас',
 115+ 'semanticmaps-updatemap' => 'Абнавіць мапу',
 116+ 'semanticmaps-forminput-remove' => 'Выдаліць',
 117+ 'semanticmaps-forminput-add' => 'Дадаць',
 118+ 'semanticmaps-forminput-locations' => 'Месцы',
 119+ 'semanticmaps-par-staticlocations' => 'Сьпіс месцазнаходжаньняў для даданьня на мапу разам з запытанымі зьвесткамі. Напрыклад, разам з «display_points», Вы можаце дадаць назву, апісаньне і мініятуру для месцазнаходжаньня з дапамогай сымбаля «~» у якасьці разьдзяляльніка.',
 120+ 'semanticmaps-par-forceshow' => 'Паказаць мапу, нават калі няма месцазнаходжаньняў для паказу?',
 121+ 'semanticmaps-par-showtitle' => 'Паказваць назву ў акне інфармацыі пра маркер ці не. Адключэньне гэтай функцыі часта карыснае падчас выкарыстаньня шаблёну для фарматаваньня зьместу акна інфармацыі.',
 122+ 'semanticmaps-par-centre' => 'Цэнтар мапы. Калі ён не пададзены, мапа будзе аўтаматычна выбіраць аптымальны цэнтар для паказу ўсіх маркераў.',
 123+ 'semanticmaps-par-template' => 'Шаблён для фарматаваньня зьместу акна інфармацыі.',
 124+);
 125+
 126+/** Bulgarian (Български)
 127+ * @author DCLXVI
 128+ */
 129+$messages['bg'] = array(
 130+ 'semanticmaps-forminput-remove' => 'Премахване',
 131+ 'semanticmaps-forminput-add' => 'Добавяне',
 132+);
 133+
 134+/** Bengali (বাংলা)
 135+ * @author Wikitanvir
 136+ */
 137+$messages['bn'] = array(
 138+ 'semanticmaps-kml-link' => 'কেএমএল ফাইল দেখাও',
 139+ 'semanticmaps-default-kml-pagelink' => '$1 পাতা প্রদর্শন করো',
 140+ 'semanticmaps_enteraddresshere' => 'এখানে ঠিকানা প্রবেশ করাও',
 141+ 'semanticmaps-updatemap' => 'মানচিত্র হালনাগাদ',
 142+ 'semanticmaps-forminput-remove' => 'অপসারণ',
 143+ 'semanticmaps-forminput-add' => 'যোগ',
 144+ 'semanticmaps-forminput-locations' => 'অবস্থান',
 145+);
 146+
 147+/** Breton (Brezhoneg)
 148+ * @author Fohanno
 149+ * @author Fulup
 150+ * @author Y-M D
 151+ */
 152+$messages['br'] = array(
 153+ 'semanticmaps-desc' => 'Talvezout a ra da welet ha da gemmañ roadennoù daveennoù stoket dre an astenn Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demo]).',
 154+ 'semanticmaps-unrecognizeddistance' => "An talvoud $1 n'eo ket un hed reizh anezhañ.",
 155+ 'semanticmaps-kml-link' => 'Gwelet ar restr KML',
 156+ 'semanticmaps-default-kml-pagelink' => 'Gwelet ar pennad $1',
 157+ 'semanticmaps-loading-forminput' => 'O kargañ enmont furmskrid ar gartenn...',
 158+ 'semanticmaps_lookupcoordinates' => 'Istimañ an daveennoù',
 159+ 'semanticmaps_enteraddresshere' => "Merkit ar chomlec'h amañ",
 160+ 'semanticmaps-updatemap' => 'Hizivaat ar gartenn',
 161+ 'semanticmaps-forminput-remove' => 'Dilemel',
 162+ 'semanticmaps-forminput-add' => 'Ouzhpennañ',
 163+ 'semanticmaps-forminput-locations' => "Lec'hiadurioù",
 164+ 'semanticmaps-par-forceshow' => "Diskouez ar gartenn ha pa ne vefe lec'h ebet da welet ?",
 165+ 'semanticmaps-par-template' => "Ur patrom d'ober gantañ da furmadiñ boued ar prenestr titouriñ.",
 166+);
 167+
 168+/** Bosnian (Bosanski)
 169+ * @author CERminator
 170+ * @author Palapa
 171+ */
 172+$messages['bs'] = array(
 173+ '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 primjeri]).',
 174+ 'semanticmaps-unrecognizeddistance' => 'Vrijednost $1 nije ispravno odstojanje.',
 175+ 'semanticmaps-kml-link' => 'Pogledajte KML datoteku',
 176+ 'semanticmaps-default-kml-pagelink' => 'Pogledajte stranicu $1',
 177+ 'semanticmaps-loading-forminput' => 'Učitavam obrazac unosa za mapu...',
 178+ 'semanticmaps_lookupcoordinates' => 'Nađi koordinate',
 179+ 'semanticmaps_enteraddresshere' => 'Unesite adresu ovdje',
 180+ 'semanticmaps-updatemap' => 'Ažuriraj mapu',
 181+ 'semanticmaps-forminput-remove' => 'Ukloni',
 182+ 'semanticmaps-forminput-add' => 'Dodaj',
 183+ 'semanticmaps-forminput-locations' => 'Lokacije',
 184+);
 185+
 186+/** Catalan (Català)
 187+ * @author Dvdgmz
 188+ * @author Paucabot
 189+ * @author SMP
 190+ * @author Solde
 191+ * @author Toniher
 192+ */
 193+$messages['ca'] = array(
 194+ 'semanticmaps-desc' => "Ofereix l'habilitat de visualitzar i editar dades de coordenades emmagatzemades a través de l'extensió Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples alguns exemples]).",
 195+ 'semanticmaps-unrecognizeddistance' => 'El valor $1 no és un valor de distància.',
 196+ 'semanticmaps-kml-link' => 'Visualitza el fitxer KML',
 197+ 'semanticmaps-default-kml-pagelink' => 'Visualitza la pàgina $1',
 198+ 'semanticmaps-loading-forminput' => "Carregant formulari d'entrada del mapa...",
 199+ 'semanticmaps_lookupcoordinates' => 'Consulta les coordenades',
 200+ 'semanticmaps_enteraddresshere' => 'Introduïu una adreça a continuació',
 201+ 'semanticmaps-updatemap' => 'Actualitza el mapa',
 202+ 'semanticmaps-forminput-remove' => 'Suprimeix',
 203+ 'semanticmaps-forminput-add' => 'Afegeix',
 204+ 'semanticmaps-forminput-locations' => 'Ubicacions',
 205+ 'semanticmaps-par-staticlocations' => "Una llista d'ubicacions per afegir al mapa juntament amb les dades consultades. Com amb 'display_points', s'hi pot afegir un títol, una descripció i una icona per a cada ubicació fent servir el signe \"~\" com a separador.",
 206+ 'semanticmaps-par-forceshow' => 'Es mostra el mapa fins i tot quan no hi ha ubicacions a mostrar?',
 207+ 'semanticmaps-par-showtitle' => "Es mostra o no un títol en la finestra d'informació del marcador. Inhabilitar-ho sovint és útil quan s'utilitza una plantilla per donar format al contingut de la finestra d'informació.",
 208+ 'semanticmaps-par-centre' => 'El centre del mapa. Quan no es proporciona, el map triarà automàticament el centre òptim per mostrar tots els marcadors al mapa.',
 209+ 'semanticmaps-par-template' => "Una plantilla que s'utilitza per dona format al contingut de la finestra d'informació.",
 210+);
 211+
 212+/** Czech (Česky)
 213+ * @author Utar
 214+ */
 215+$messages['cs'] = array(
 216+ 'semanticmaps-forminput-remove' => 'Odebrat',
 217+ 'semanticmaps-forminput-add' => 'Přidat',
 218+);
 219+
 220+/** Welsh (Cymraeg)
 221+ * @author Lloffiwr
 222+ */
 223+$messages['cy'] = array(
 224+ 'semanticmaps-unrecognizeddistance' => "Nid yw'r gwerth $1 yn bellter dilys.",
 225+ 'semanticmaps-kml-link' => 'Edrych ar y ffeil KML',
 226+ 'semanticmaps-default-kml-pagelink' => 'Edrych ar y dudalen $1',
 227+ 'semanticmaps-loading-forminput' => "Yn llwytho ffurflen mewnbynnu i'r map...",
 228+ 'semanticmaps_lookupcoordinates' => 'Canfydder y cyfesurynnau',
 229+ 'semanticmaps_enteraddresshere' => 'Ysgrifennwch y cyfeiriad yma',
 230+ 'semanticmaps-updatemap' => 'Diweddarer y map',
 231+ 'semanticmaps-forminput-remove' => 'Tynner oddi ar y map',
 232+ 'semanticmaps-forminput-add' => 'Ychwaneger',
 233+ 'semanticmaps-forminput-locations' => 'Lleoliadau',
 234+);
 235+
 236+/** German (Deutsch)
 237+ * @author DaSch
 238+ * @author Imre
 239+ * @author Kghbln
 240+ * @author Pill
 241+ * @author The Evil IP address
 242+ * @author Umherirrender
 243+ */
 244+$messages['de'] = array(
 245+ '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])',
 246+ 'semanticmaps-unrecognizeddistance' => 'Der Wert $1 ist keine gültige Distanz.',
 247+ 'semanticmaps-kml-link' => 'KML-Datei ansehen',
 248+ 'semanticmaps-default-kml-pagelink' => 'Artikel $1 ansehen',
 249+ 'semanticmaps-loading-forminput' => 'Lade die Formulareingaben zur Karte …',
 250+ 'semanticmaps_lookupcoordinates' => 'Koordinaten nachschlagen',
 251+ 'semanticmaps_enteraddresshere' => 'Adresse hier eingeben',
 252+ 'semanticmaps-updatemap' => 'Karte aktualisieren',
 253+ 'semanticmaps-forminput-remove' => 'Entfernen',
 254+ 'semanticmaps-forminput-add' => 'Hinzufügen',
 255+ 'semanticmaps-forminput-locations' => 'Standort',
 256+ 'semanticmaps-par-staticlocations' => 'Eine Listen von Standorten, die zusammen mit den abgefragten Daten, der Karte hinzugefügt werden sollen. Analog zu den Anzeigepunkten können je Standort Titel, Beschreibung und Symbol, unter Verwendung einer Tilde „~“ als Trennzeichen, hinzugefügt werden.',
 257+ 'semanticmaps-par-forceshow' => 'Die Karte auch dann anzeigen, wenn es keine Standorte zum Anzeigen gibt?',
 258+ 'semanticmaps-par-showtitle' => 'Anzeige eines Titels im Informationsfenster der Kennzeichnung oder nicht. Diese Option zu deaktivieren ist oftmals dann nützlich, sofern eine Vorlage zur Formatierung des Informationsfensterinhalts verwendet wird.',
 259+ 'semanticmaps-par-centre' => 'Das Zentrum der Karte. Sofern nicht angegeben wird automatisch das optimale Zentrum zur Darstellung aller Kennzeichnungen auf der Karte gewählt.',
 260+ 'semanticmaps-par-template' => 'Die zur Formatierung des Informationsfensterinhalts zu verwendende Vorlage.',
 261+);
 262+
 263+/** Lower Sorbian (Dolnoserbski)
 264+ * @author Michawiki
 265+ */
 266+$messages['dsb'] = array(
 267+ '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]).',
 268+ 'semanticmaps-unrecognizeddistance' => 'Gódnota $1 njejo płaśiwa distanca.',
 269+ 'semanticmaps-kml-link' => 'KML-dataju se woglědaś',
 270+ 'semanticmaps-default-kml-pagelink' => 'Bok $1 se woglědaś',
 271+ 'semanticmaps_lookupcoordinates' => 'Za koordinatami póglědaś',
 272+ 'semanticmaps_enteraddresshere' => 'Zapódaj how adresu',
 273+);
 274+
 275+/** Greek (Ελληνικά)
 276+ * @author ZaDiak
 277+ */
 278+$messages['el'] = array(
 279+ 'semanticmaps_lookupcoordinates' => 'Επιθεώρηση συντεταγμένων',
 280+ 'semanticmaps_enteraddresshere' => 'Εισαγωγή διεύθυνσης εδώ',
 281+);
 282+
 283+/** Esperanto (Esperanto)
 284+ * @author Yekrats
 285+ */
 286+$messages['eo'] = array(
 287+ 'semanticmaps_lookupcoordinates' => 'Rigardi koordinatojn',
 288+ 'semanticmaps_enteraddresshere' => 'Enigu adreson ĉi tie',
 289+);
 290+
 291+/** Spanish (Español)
 292+ * @author Crazymadlover
 293+ * @author Fitoschido
 294+ * @author Imre
 295+ * @author Locos epraix
 296+ * @author Translationista
 297+ */
 298+$messages['es'] = array(
 299+ 'semanticmaps-desc' => 'Proporciona la posibilidad de ver y editar datos de coordenadas almacenados con la extensión Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demos]).',
 300+ 'semanticmaps-unrecognizeddistance' => 'El valor $1 no es una distancia válida.',
 301+ 'semanticmaps-kml-link' => 'Ver el archivo KML',
 302+ 'semanticmaps-default-kml-pagelink' => 'Ver página $1',
 303+ 'semanticmaps-loading-forminput' => 'Cargando mapa de formulario de entrada...',
 304+ 'semanticmaps_lookupcoordinates' => 'Buscar coordenadas',
 305+ 'semanticmaps_enteraddresshere' => 'Introduce aquí la dirección',
 306+ 'semanticmaps-updatemap' => 'Actualizar mapa',
 307+ 'semanticmaps-forminput-remove' => 'Quitar',
 308+ 'semanticmaps-forminput-add' => 'Añadir',
 309+ 'semanticmaps-forminput-locations' => 'Ubicaciones',
 310+ 'semanticmaps-par-forceshow' => '¿Mostrar el mapa incluso cuando no hay ubicaciones que mostrar?',
 311+);
 312+
 313+/** Basque (Euskara)
 314+ * @author An13sa
 315+ */
 316+$messages['eu'] = array(
 317+ 'semanticmaps_lookupcoordinates' => 'Koordenatuak bilatu',
 318+);
 319+
 320+/** Finnish (Suomi)
 321+ * @author Crt
 322+ * @author Str4nd
 323+ */
 324+$messages['fi'] = array(
 325+ 'semanticmaps_enteraddresshere' => 'Kirjoita osoite tähän',
 326+);
 327+
 328+/** French (Français)
 329+ * @author Crochet.david
 330+ * @author Grondin
 331+ * @author Hashar
 332+ * @author IAlex
 333+ * @author Jean-Frédéric
 334+ * @author Peter17
 335+ * @author PieRRoMaN
 336+ * @author Sherbrooke
 337+ * @author Urhixidur
 338+ */
 339+$messages['fr'] = array(
 340+ '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]).",
 341+ 'semanticmaps-unrecognizeddistance' => "La valeur $1 n'est pas une distance valide",
 342+ 'semanticmaps-kml-link' => 'Voir le fichier KML',
 343+ 'semanticmaps-default-kml-pagelink' => 'Voir l’article $1',
 344+ 'semanticmaps-loading-forminput' => "Chargement du formulaire d'entrée de la carte...",
 345+ 'semanticmaps_lookupcoordinates' => 'Estimer les coordonnées',
 346+ 'semanticmaps_enteraddresshere' => 'Entrez ici l’adresse',
 347+ 'semanticmaps-updatemap' => 'Mise à jour de la carte',
 348+ 'semanticmaps-forminput-remove' => 'Enlever',
 349+ 'semanticmaps-forminput-add' => 'Ajouter',
 350+ 'semanticmaps-forminput-locations' => 'Emplacements',
 351+ 'semanticmaps-par-staticlocations' => 'Une liste des endroits à ajouter à la carte avec les données demandées. Comme avec display_points, vous pouvez ajouter un titre, une description et une icône par emplacement en utilisant le tilde « ~ » comme séparateur.',
 352+ 'semanticmaps-par-forceshow' => "Afficher la carte même quand il n'y a pas d'emplacement à afficher ?",
 353+ 'semanticmaps-par-showtitle' => "Afficher un titre dans la fenêtre d'informations des marqueurs ou non. La désactivation de ceci est souvent utile lorsque vous utilisez un modèle pour formater le contenu de la fenêtre d'informations.",
 354+ 'semanticmaps-par-centre' => "Le centre de la carte. Lorsqu'il n'est pas fourni, la carte va choisir automatiquement le centre optimal pour afficher tous les marqueurs sur la carte.",
 355+ 'semanticmaps-par-template' => "Un modèle à utiliser pour mettre en forme le contenu de la fenêtre d'informations.",
 356+);
 357+
 358+/** Franco-Provençal (Arpetan)
 359+ * @author ChrisPtDe
 360+ */
 361+$messages['frp'] = array(
 362+ 'semanticmaps-unrecognizeddistance' => 'La valor $1 est pas una distance valida.',
 363+ 'semanticmaps-kml-link' => 'Vêre lo fichiér KML',
 364+ 'semanticmaps-default-kml-pagelink' => 'Vêre la pâge $1',
 365+ 'semanticmaps-loading-forminput' => 'Chargement du formulèro d’entrâ de la mapa...',
 366+ 'semanticmaps_lookupcoordinates' => 'Èstimar les coordonâs',
 367+ 'semanticmaps_enteraddresshere' => 'Buchiéd l’adrèce ique',
 368+ 'semanticmaps-updatemap' => 'Misa a jorn de la mapa',
 369+ 'semanticmaps-forminput-remove' => 'Enlevar',
 370+ 'semanticmaps-forminput-add' => 'Apondre',
 371+ 'semanticmaps-forminput-locations' => 'Emplacements',
 372+);
 373+
 374+/** Galician (Galego)
 375+ * @author Toliño
 376+ */
 377+$messages['gl'] = array(
 378+ '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]).',
 379+ 'semanticmaps-unrecognizeddistance' => 'O valor $1 non é unha distancia válida.',
 380+ 'semanticmaps-kml-link' => 'Ollar o ficheiro KML',
 381+ 'semanticmaps-default-kml-pagelink' => 'Ver a páxina "$1"',
 382+ 'semanticmaps-loading-forminput' => 'Cargando o formulario de entrada do mapa...',
 383+ 'semanticmaps_lookupcoordinates' => 'Ver as coordenadas',
 384+ 'semanticmaps_enteraddresshere' => 'Introduza o enderezo aquí',
 385+ 'semanticmaps-updatemap' => 'Actualizar o mapa',
 386+ 'semanticmaps-forminput-remove' => 'Eliminar',
 387+ 'semanticmaps-forminput-add' => 'Engadir',
 388+ 'semanticmaps-forminput-locations' => 'Localizacións',
 389+ 'semanticmaps-par-staticlocations' => 'Unha lista de localizacións para engadir ao mapa xunto aos datos consultados. Como con display_points, pode engadir un título, unha descrición e mais unha icona por localización mediante o signo "~" como separador.',
 390+ 'semanticmaps-par-forceshow' => 'Quere mostrar o mapa, mesmo cando non haxa localizacións que presentar?',
 391+ 'semanticmaps-par-showtitle' => 'Mostrar ou non un título na ventá de información do marcador. Frecuentemente, desactivar isto é útil ao utilizar un modelo para dar formato ao contido da ventá de información.',
 392+ 'semanticmaps-par-centre' => 'O centro do mapa. Cando non se proporciona, o mapa ha escoller automaticamente o mellor centro para mostrar todos os marcadores no mapa.',
 393+ 'semanticmaps-par-template' => 'Un modelo a empregar para dar formato ao contido da ventá de información.',
 394+);
 395+
 396+/** Swiss German (Alemannisch)
 397+ * @author Als-Holder
 398+ */
 399+$messages['gsw'] = array(
 400+ '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]',
 401+ 'semanticmaps-unrecognizeddistance' => 'Dr Wert $1 isch kei giltigi Dischtanz.',
 402+ 'semanticmaps-kml-link' => 'KML-Datei aaluege',
 403+ 'semanticmaps-default-kml-pagelink' => 'Syte $1 aaluege',
 404+ 'semanticmaps-loading-forminput' => 'Am Lade vu dr Formularyygabe zue dr Charte …',
 405+ 'semanticmaps_lookupcoordinates' => 'Koordinate nooluege',
 406+ 'semanticmaps_enteraddresshere' => 'Doo Adräss yygee',
 407+ 'semanticmaps-updatemap' => 'Charte aktualisiere',
 408+ 'semanticmaps-forminput-remove' => 'Uuseneh',
 409+ 'semanticmaps-forminput-add' => 'Zuefiege',
 410+ 'semanticmaps-forminput-locations' => 'Standort',
 411+);
 412+
 413+/** Hebrew (עברית)
 414+ * @author Amire80
 415+ * @author Rotemliss
 416+ * @author YaronSh
 417+ */
 418+$messages['he'] = array(
 419+ 'semanticmaps-desc' => 'הוספת האפשרות לצפייה בנתוני הקואורדינטות המאוחסנים ולעריכתם באמצעות ההרחבה מדיה־ויקי סמנטית ([http://mapping.referata.com/wiki/Examples הדגמות]).',
 420+ 'semanticmaps-unrecognizeddistance' => 'הערך $1 אינו מרחק תקין.',
 421+ 'semanticmaps-kml-link' => 'הצגת קובץ KML',
 422+ 'semanticmaps-default-kml-pagelink' => 'הצגת הדף $1',
 423+ 'semanticmaps-loading-forminput' => 'טעינת המפה מהקלט...',
 424+ 'semanticmaps_lookupcoordinates' => 'חיפוש קואורדינטות',
 425+ 'semanticmaps_enteraddresshere' => 'כתבו כתובת כאן',
 426+ 'semanticmaps-updatemap' => 'עדכון מפה',
 427+ 'semanticmaps-forminput-remove' => 'הסרה',
 428+ 'semanticmaps-forminput-add' => 'הוספה',
 429+ 'semanticmaps-forminput-locations' => 'מיקומים',
 430+ 'semanticmaps-par-staticlocations' => 'רשימת מיקומים להוסיף למפה יחד עם הנתונים המבוקשים בשאילתה. כמו עם display_points, אפשר להוסיף כאן כותרת, תיאור וסמל לכל מיקום עם טילדה (~) בתור תו מפריד.',
 431+ 'semanticmaps-par-forceshow' => 'להציג מפה גם כשאין מיקומים להצגה?',
 432+ 'semanticmaps-par-showtitle' => 'להציג את הכותרת בחלון המידע על הסמן או לא. הכיבוי של זה שימושי לעתים קרובות כאשר נעשה שימוש בתבנית לעיצוב חלון המידע.',
 433+ 'semanticmaps-par-centre' => 'מרכז המפה. אם לא ניתן, המפה תבחר בעצמה את המרכז המיטבי להצגת כל הסמנים על המפה.',
 434+ 'semanticmaps-par-template' => 'תבנית לעיצוב תוכן חלון המידע.',
 435+);
 436+
 437+/** Croatian (Hrvatski)
 438+ * @author Tivek
 439+ */
 440+$messages['hr'] = array(
 441+ 'semanticmaps-desc' => "Pruža pregledavanje i uređivanje koordinata spremljenih koristeći Semantic MediaWiki ekstenziju ([http://mapping.referata.com/wiki/Examples demo's]).",
 442+ 'semanticmaps-unrecognizeddistance' => 'Vrijednost $1 nije valjana udaljenost.',
 443+ 'semanticmaps_lookupcoordinates' => 'Potraži koordinate',
 444+ 'semanticmaps_enteraddresshere' => 'Unesite adresu ovdje',
 445+);
 446+
 447+/** Upper Sorbian (Hornjoserbsce)
 448+ * @author Michawiki
 449+ */
 450+$messages['hsb'] = array(
 451+ '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]).',
 452+ 'semanticmaps-unrecognizeddistance' => 'Hódnota $1 płaćiwa distanca njeje.',
 453+ 'semanticmaps-kml-link' => 'KML-dataju sej wobhladać',
 454+ 'semanticmaps-default-kml-pagelink' => 'Nastawk $1 sej wobhladać',
 455+ 'semanticmaps-loading-forminput' => 'Formularne zapodawanske polo karty so začituje...',
 456+ 'semanticmaps_lookupcoordinates' => 'Za koordinatami hladać',
 457+ 'semanticmaps_enteraddresshere' => 'Zapodaj tu adresu',
 458+ 'semanticmaps-updatemap' => 'Kartu aktualizować',
 459+ 'semanticmaps-forminput-remove' => 'Wotstronić',
 460+ 'semanticmaps-forminput-add' => 'Přidać',
 461+ 'semanticmaps-forminput-locations' => 'Městna',
 462+);
 463+
 464+/** Hungarian (Magyar)
 465+ * @author Dani
 466+ * @author Glanthor Reviol
 467+ */
 468+$messages['hu'] = array(
 469+ '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]).',
 470+ 'semanticmaps_lookupcoordinates' => 'Koordináták felkeresése',
 471+ 'semanticmaps_enteraddresshere' => 'Add meg a címet itt',
 472+ 'semanticmaps-forminput-add' => 'Hozzáadás',
 473+ 'semanticmaps-forminput-locations' => 'Helyszínek',
 474+);
 475+
 476+/** Interlingua (Interlingua)
 477+ * @author McDutchie
 478+ */
 479+$messages['ia'] = array(
 480+ '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]).',
 481+ 'semanticmaps-unrecognizeddistance' => 'Le valor $1 non es un distantia valide.',
 482+ 'semanticmaps-kml-link' => 'Vider le file KML',
 483+ 'semanticmaps-default-kml-pagelink' => 'Vider articulo $1',
 484+ 'semanticmaps-loading-forminput' => 'Carga datos entrate in formulario...',
 485+ 'semanticmaps_lookupcoordinates' => 'Cercar coordinatas',
 486+ 'semanticmaps_enteraddresshere' => 'Entra adresse hic',
 487+ 'semanticmaps-updatemap' => 'Actualisar carta',
 488+ 'semanticmaps-forminput-remove' => 'Remover',
 489+ 'semanticmaps-forminput-add' => 'Adder',
 490+ 'semanticmaps-forminput-locations' => 'Locos',
 491+ 'semanticmaps-par-staticlocations' => 'Un lista de locos a adder al carta con le datos resultante del consulta. Como con display_points, tu pote adder un titulo, description e icone per loco usante le tilde "~" como separator.',
 492+ 'semanticmaps-par-forceshow' => 'Monstrar le carta mesmo si il non ha locos a monstrar?',
 493+ 'semanticmaps-par-showtitle' => 'Monstrar un titulo in le fenestra de information de marcator o non. Disactivar isto es sovente utile si un patrono es usate pro formatar le contento del fenestra de information.',
 494+ 'semanticmaps-par-centre' => 'Le centro del carta. Si non specificate, le systema selige automaticamente le centro optimal pro monstrar tote le marcatores in le carta.',
 495+ 'semanticmaps-par-template' => 'Un patrono a usar pro formatar le contento del fenestra de information.',
 496+);
 497+
 498+/** Indonesian (Bahasa Indonesia)
 499+ * @author Bennylin
 500+ * @author Farras
 501+ * @author IvanLanin
 502+ */
 503+$messages['id'] = array(
 504+ 'semanticmaps-desc' => 'Memberikan kemampuan untuk melihat dan menyunting data koordinat yang disimpan melalui pengaya MediaWiki Semantic
 505+([http://mapping.referata.com/wiki/Examples demo]).',
 506+ 'semanticmaps-unrecognizeddistance' => 'Nilai $1 bukan jarak yang sah.',
 507+ 'semanticmaps-kml-link' => 'Lihat berkas KML',
 508+ 'semanticmaps-default-kml-pagelink' => 'Lihat halaman $1',
 509+ 'semanticmaps-loading-forminput' => 'Memuat masukan bentuk peta...',
 510+ 'semanticmaps_lookupcoordinates' => 'Cari koordinat',
 511+ 'semanticmaps_enteraddresshere' => 'Masukkan alamat di sini',
 512+ 'semanticmaps-updatemap' => 'Pembaruan peta',
 513+ 'semanticmaps-forminput-remove' => 'Hapus',
 514+ 'semanticmaps-forminput-add' => 'Tambah',
 515+ 'semanticmaps-forminput-locations' => 'Lokasi',
 516+ 'semanticmaps-par-staticlocations' => 'Daftar lokasi yang akan ditambahkan ke dalam peta, berikut data kueri. Seperti halnya display_points, Anda dapat menambahkan judul, deskripsi, dan ikon per lokasi dengan menggunakan tanda tilde "~" sebagai pemisah.',
 517+ 'semanticmaps-par-forceshow' => 'Tampilkan peta bahkan ketika tidak ada lokasi untuk ditampilkan?',
 518+ 'semanticmaps-par-showtitle' => 'Tampilkan judul di jendela info penanda. Penonaktifan judul sering berguna ketika menggunakan templat untuk memformat isi jendela info.',
 519+ 'semanticmaps-par-centre' => 'Pusat peta. Jika tidak disediakan, peta secara otomatis akan memilih pusat optimal untuk menampilkan semua penanda di peta.',
 520+ 'semanticmaps-par-template' => 'Ttemplat yang digunakan untuk memformat isi jendela info.',
 521+);
 522+
 523+/** Italian (Italiano)
 524+ * @author Beta16
 525+ * @author Civvì
 526+ * @author Darth Kule
 527+ * @author HalphaZ
 528+ */
 529+$messages['it'] = array(
 530+ 'semanticmaps-desc' => "Fornisce la possibilità di visualizzare e modificare le coordinate memorizzate con l'estensione Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples demo]).",
 531+ 'semanticmaps-unrecognizeddistance' => 'Il valore $1 non è una distanza valida.',
 532+ 'semanticmaps-kml-link' => 'Visualizza il file KML',
 533+ 'semanticmaps-default-kml-pagelink' => 'Visualizza la pagina $1',
 534+ 'semanticmaps_lookupcoordinates' => 'Cerca coordinate',
 535+ 'semanticmaps_enteraddresshere' => 'Inserisci indirizzo qui',
 536+ 'semanticmaps-updatemap' => 'Aggiorna mappa',
 537+ 'semanticmaps-forminput-remove' => 'Rimuovi',
 538+ 'semanticmaps-forminput-add' => 'Aggiungi',
 539+);
 540+
 541+/** Japanese (日本語)
 542+ * @author Fryed-peach
 543+ * @author Mizusumashi
 544+ * @author 青子守歌
 545+ */
 546+$messages['ja'] = array(
 547+ 'semanticmaps-desc' => 'Semantic MediaWiki 拡張機能を通して格納された座標データを表示・編集する機能を提供する ([http://mapping.referata.com/wiki/Examples 実演])。',
 548+ 'semanticmaps-unrecognizeddistance' => '値$1は有効な距離ではありません。',
 549+ 'semanticmaps-kml-link' => 'KMLファイルを閲覧',
 550+ 'semanticmaps-default-kml-pagelink' => 'ページ$1を表示',
 551+ 'semanticmaps_lookupcoordinates' => '座標を調べる',
 552+ 'semanticmaps_enteraddresshere' => '住所をここに入力します',
 553+ 'semanticmaps-updatemap' => '地図を更新',
 554+);
 555+
 556+/** Khmer (ភាសាខ្មែរ)
 557+ * @author Thearith
 558+ */
 559+$messages['km'] = array(
 560+ 'semanticmaps_lookupcoordinates' => 'ក្រឡេក​មើល​កូអរដោនេ',
 561+);
 562+
 563+/** Colognian (Ripoarisch)
 564+ * @author Purodha
 565+ */
 566+$messages['ksh'] = array(
 567+ 'semanticmaps-desc' => 'Määt et müjjelesch, Koodinaate ze beloore un ze ändere, di mem „Semantesch Mediawiki“ faßjehallde woode sin. ([http://mapping.referata.com/wiki/Examples Beijshpöll för et vörzemaache])',
 568+ 'semanticmaps-unrecognizeddistance' => 'Dä Wäät „$1“ es keine jölteje Afschtand.',
 569+ 'semanticmaps-kml-link' => 'De KML-Dattei belooere',
 570+ 'semanticmaps-default-kml-pagelink' => 'De Sigg „$1“ belooere',
 571+ 'semanticmaps-loading-forminput' => 'Mer sin de Enjaabe vum Fommulaa for die Kaat aam laade&nbsp;…',
 572+ 'semanticmaps_lookupcoordinates' => 'Koordinate nohkike',
 573+ 'semanticmaps_enteraddresshere' => 'Donn hee de Address enjäve',
 574+ 'semanticmaps-updatemap' => 'De Kaad op der neue Shtand bränge',
 575+ 'semanticmaps-forminput-remove' => 'Fottnämme',
 576+ 'semanticmaps-forminput-add' => 'Dobei donn',
 577+ 'semanticmaps-forminput-locations' => 'Oote',
 578+ 'semanticmaps-par-staticlocations' => 'En Leß met Pläz, di zosamme met dä nohjefrochte Aanjabe op di Kaat sulle. Wi bei <code lang="en">display_points</code> kam_mer ene Tittel, ene Täx doh zoh, un e Minni_Belldsche
 579+för jeede Plaz aanjävve, med enem Schlängelsche (~) doh zwesche.',
 580+ 'semanticmaps-par-forceshow' => 'Donn de Kaat aanzeije, selvs wann kein Pläz drop ze zeije sin?',
 581+ 'semanticmaps-par-showtitle' => 'Donn en Övverschreff en däm Finster met Infomazjuhne övver de Makeerong aanzeije udder nit. De Övverschreff afzeschallde es öff joot, wam_mer en Schabloon nemmp för dä Enhallt vum Finster zerääsch ze possumenteere.',
 582+ 'semanticmaps-par-centre' => 'Der Meddelpunk vun dä Kaat. Wann keine aanjejovve_n_es jeiht dä automattesch op der optesche Meddelpunk vun all dä Makeerunge en dä Kaat.',
 583+ 'semanticmaps-par-template' => 'En Schabloon för der Enhalt vum Finster met de Enfommazjuhne ze jeschtallte',
 584+);
 585+
 586+/** Kurdish (Latin) (Kurdî (Latin))
 587+ * @author George Animal
 588+ */
 589+$messages['ku-latn'] = array(
 590+);
 591+
 592+/** Luxembourgish (Lëtzebuergesch)
 593+ * @author Robby
 594+ */
 595+$messages['lb'] = array(
 596+ 'semanticmaps-unrecognizeddistance' => 'De Wäert $1 ass keng valabel Distanz.',
 597+ 'semanticmaps-kml-link' => 'KML-Fichier weisen',
 598+ 'semanticmaps-default-kml-pagelink' => 'Säit $1 weisen',
 599+ 'semanticmaps_lookupcoordinates' => 'Koordinaten nokucken',
 600+ 'semanticmaps_enteraddresshere' => 'Adress hei aginn',
 601+ 'semanticmaps-updatemap' => 'Kaart aktualiséieren',
 602+ 'semanticmaps-forminput-remove' => 'Ewechhuelen',
 603+ 'semanticmaps-forminput-add' => 'Derbäisetzen',
 604+ 'semanticmaps-forminput-locations' => 'Plazen',
 605+);
 606+
 607+/** Macedonian (Македонски)
 608+ * @author Bjankuloski06
 609+ */
 610+$messages['mk'] = array(
 611+ 'semanticmaps-desc' => 'Овозможува прегледување и уредување на координатни податоци складирани со додатокот Семантички МедијаВики ([http://mapping.referata.com/wiki/Examples урнеци]).',
 612+ 'semanticmaps-unrecognizeddistance' => 'Вредноста $1 не претставува важечко растојание.',
 613+ 'semanticmaps-kml-link' => 'Преглед на KML-податотеката',
 614+ 'semanticmaps-default-kml-pagelink' => 'Преглед на статијата $1',
 615+ 'semanticmaps-loading-forminput' => 'Вчитувам карти од внесеното...',
 616+ 'semanticmaps_lookupcoordinates' => 'Побарај координати',
 617+ 'semanticmaps_enteraddresshere' => 'Внесете адреса тука',
 618+ 'semanticmaps-updatemap' => 'Поднови карта',
 619+ 'semanticmaps-forminput-remove' => 'Отстрани',
 620+ 'semanticmaps-forminput-add' => 'Додај',
 621+ 'semanticmaps-forminput-locations' => 'Места',
 622+ 'semanticmaps-par-staticlocations' => 'Список на места за додавање во картатата заедно со побараните податоци. Како и со „display_points“, тука можете да додадете наслов, опис и икона за секое место, користејќи тилда (~) како одделувач.',
 623+ 'semanticmaps-par-forceshow' => 'Да ја прикажувам картата дури и ако нема места за приказ?',
 624+ 'semanticmaps-par-showtitle' => 'Дали да се прикажува насловот на инфопрозорецот на ознаката. Оневозможете го кога користите шаблон за форматирање на содржината на инфопрозорецот.',
 625+ 'semanticmaps-par-centre' => 'Средиштето на картата. Ако не е укажано, картата автоматски ќе го одбере средиштето кајшто оптимално ќе се прикажат сите одбележувачи на картата.',
 626+ 'semanticmaps-par-template' => 'Шаблон за форматирање на содржината на инфопрозорецот.',
 627+);
 628+
 629+/** Malayalam (മലയാളം)
 630+ * @author Praveenp
 631+ */
 632+$messages['ml'] = array(
 633+ 'semanticmaps_enteraddresshere' => 'വിലാസം നൽകുക',
 634+);
 635+
 636+/** Malay (Bahasa Melayu)
 637+ * @author Anakmalaysia
 638+ */
 639+$messages['ms'] = array(
 640+ 'semanticmaps-forminput-remove' => 'Buang',
 641+ 'semanticmaps-forminput-add' => 'Tambahkan',
 642+ 'semanticmaps-forminput-locations' => 'Lokasi',
 643+);
 644+
 645+/** Dutch (Nederlands)
 646+ * @author Jeroen De Dauw
 647+ * @author Siebrand
 648+ */
 649+$messages['nl'] = array(
 650+ 'semanticmaps-desc' => 'Biedt de mogelijkheid om locatiegegevens die opgeslagen zijn in Semantic MediaWiki te bewerken en te bekijken',
 651+ 'semanticmaps-unrecognizeddistance' => 'De waarde "$1" is geen geldige afstand.',
 652+ 'semanticmaps-kml-link' => 'KML-bestand bekijken',
 653+ 'semanticmaps-default-kml-pagelink' => 'Pagina $1 bekijken',
 654+ 'semanticmaps-loading-forminput' => 'Bezig met het laden van de kaart formulierinvoer...',
 655+ 'semanticmaps_lookupcoordinates' => 'Coördinaten opzoeken',
 656+ 'semanticmaps_enteraddresshere' => 'Voer hier het adres in',
 657+ 'semanticmaps-updatemap' => 'Kaart bijwerken',
 658+ 'semanticmaps-forminput-remove' => 'Verwijderen',
 659+ 'semanticmaps-forminput-add' => 'Toevoegen',
 660+ 'semanticmaps-forminput-locations' => 'Locaties',
 661+ 'semanticmaps-par-staticlocations' => 'Een lijst met aan de kaart toe te voegen locaties samen met de opgevraagde gegevens. Zoals bij display_points, kunt u een naam, beschrijving en icoon per locatie toevoegen door de tilde ("~") als scheidingsteken te gebruiken.',
 662+ 'semanticmaps-par-forceshow' => 'De kaart zelfs weergeven als er geen weer te geven locaties zijn?',
 663+ 'semanticmaps-par-showtitle' => 'Een naam weergeven in het gegevensvenster van de markering of niet. Dit uitschakelen is vaak handig als er een sjabloon wordt gebruikt om de inhoud van het gegevensvenster vorm te geven.',
 664+ 'semanticmaps-par-centre' => 'Het centrum van de kaart. Als deze waarde niet wordt opgegeven, wordt automatisch een keuze gemaakt voor een centrum op basis van alle markeringen op de kaart.',
 665+ 'semanticmaps-par-template' => 'Een te gebruiken sjabloon om de inhoud van het gegevensvenster op te maken.',
 666+);
 667+
 668+/** Norwegian Nynorsk (‪Norsk (nynorsk)‬)
 669+ * @author Harald Khan
 670+ */
 671+$messages['nn'] = array(
 672+ 'semanticmaps_lookupcoordinates' => 'Sjekk koordinatar',
 673+ 'semanticmaps_enteraddresshere' => 'Skriv inn adressa her',
 674+);
 675+
 676+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 677+ * @author Event
 678+ * @author Jon Harald Søby
 679+ * @author Nghtwlkr
 680+ */
 681+$messages['no'] = array(
 682+ 'semanticmaps-desc' => 'Tilbyr muligheten til å se og endre koordinatdata lagret gjennom Semantic MediaWiki-utvidelsen ([http://mapping.referata.com/wiki/Examples demo]).',
 683+ 'semanticmaps-unrecognizeddistance' => 'Verdien $1 er ikke en gyldig avstand.',
 684+ 'semanticmaps-kml-link' => 'Vis KML-filen',
 685+ 'semanticmaps-default-kml-pagelink' => 'Vis siden $1',
 686+ 'semanticmaps_lookupcoordinates' => 'Sjekk koordinater',
 687+ 'semanticmaps_enteraddresshere' => 'Skriv inn adressen her',
 688+);
 689+
 690+/** Occitan (Occitan)
 691+ * @author Cedric31
 692+ */
 693+$messages['oc'] = array(
 694+ '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]",
 695+ 'semanticmaps_lookupcoordinates' => 'Estimar las coordenadas',
 696+ 'semanticmaps_enteraddresshere' => 'Picatz aicí l’adreça',
 697+);
 698+
 699+/** Polish (Polski)
 700+ * @author Deejay1
 701+ * @author Derbeth
 702+ * @author Leinad
 703+ * @author Odder
 704+ * @author Sp5uhe
 705+ */
 706+$messages['pl'] = array(
 707+ 'semanticmaps-desc' => 'Umożliwia przeglądanie oraz edytowanie współrzędnych zapisanych przez rozszerzenie Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples dema]).',
 708+ 'semanticmaps-unrecognizeddistance' => 'Wartość $1 nie jest poprawną odległością.',
 709+ 'semanticmaps-kml-link' => 'Wyświetla plik KML',
 710+ 'semanticmaps-default-kml-pagelink' => 'Pokaż stronę $1',
 711+ 'semanticmaps_lookupcoordinates' => 'Wyszukaj współrzędne',
 712+ 'semanticmaps_enteraddresshere' => 'Podaj adres',
 713+);
 714+
 715+/** Piedmontese (Piemontèis)
 716+ * @author Borichèt
 717+ * @author Dragonòt
 718+ */
 719+$messages['pms'] = array(
 720+ '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]).",
 721+ 'semanticmaps-unrecognizeddistance' => "Ël valor $1 a l'é pa na distansa bon-a.",
 722+ 'semanticmaps-kml-link' => "Vëdde l'archivi KML",
 723+ 'semanticmaps-default-kml-pagelink' => 'Lese la pàgina $1',
 724+ 'semanticmaps-loading-forminput' => 'Carié ël formolari për anserì la carta...',
 725+ 'semanticmaps_lookupcoordinates' => 'Serca coordinà',
 726+ 'semanticmaps_enteraddresshere' => 'Ansëriss adrëssa sì',
 727+ 'semanticmaps-updatemap' => 'Agiornament ëd la carta',
 728+ 'semanticmaps-forminput-remove' => 'Gava',
 729+ 'semanticmaps-forminput-add' => 'Gionta',
 730+ 'semanticmaps-forminput-locations' => 'Locassion',
 731+ 'semanticmaps-par-staticlocations' => 'Na lista ëd locassion da gionté a la carta ansema ai dat ciamà. Com con dispay_points, a peul gionté un tìtol, na descrission e na plancia për locassion an dovrand la tilde "~" com separator.',
 732+ 'semanticmaps-par-forceshow' => 'Mostré la carta ëdcò quand a-i son pa ëd locassion da mostré?',
 733+ 'semanticmaps-par-showtitle' => "Smon-e un tìtol ant la fnesta d'anformassion dël marcator opura nò. La disabilitassion ëd sòn a l'é soens ùtil quand as deuvra në stamp për formaté ël contnù dla fnesta d'anformassion.",
 734+ 'semanticmaps-par-centre' => "Ël sènter ëd la carta. Quand a l'é pa dàit, la carta a trovrà automaticament ël sènter otimal për smon-e tùit ij marcador an sla carta.",
 735+ 'semanticmaps-par-template' => "Në stamp da dovré deje a forma ai contnù dla fnesta d'anformassion.",
 736+);
 737+
 738+/** Pashto (پښتو)
 739+ * @author Ahmed-Najib-Biabani-Ibrahimkhel
 740+ */
 741+$messages['ps'] = array(
 742+);
 743+
 744+/** Portuguese (Português)
 745+ * @author Hamilton Abreu
 746+ * @author Indech
 747+ * @author Malafaya
 748+ */
 749+$messages['pt'] = array(
 750+ '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]).',
 751+ 'semanticmaps-unrecognizeddistance' => 'O valor $1 não é uma distância válida.',
 752+ 'semanticmaps-kml-link' => 'Ver o ficheiro KML',
 753+ 'semanticmaps-default-kml-pagelink' => 'Ver a página $1',
 754+ 'semanticmaps-loading-forminput' => 'A carregar o formulário de entrada do mapa...',
 755+ 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas',
 756+ 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui',
 757+ 'semanticmaps-updatemap' => 'Actualizar mapa',
 758+ 'semanticmaps-forminput-remove' => 'Remover',
 759+ 'semanticmaps-forminput-add' => 'Adicionar',
 760+ 'semanticmaps-forminput-locations' => 'Locais',
 761+ 'semanticmaps-par-staticlocations' => 'Uma lista de localizações para acrescentar ao mapa em conjunto com os dados consultados. Tal como nos pontos a apresentar ("display_points"), pode adicionar um título, descrição e ícone por localização, usando o til "~" como separador.',
 762+ 'semanticmaps-par-forceshow' => 'Mostrar o mapa mesmo quando não existem localizações para apresentar?',
 763+ 'semanticmaps-par-showtitle' => 'Mostrar, ou não, um título na janela informativa do marcador. É frequentemente desejável desactivar esta funcionalidade quando usar uma predefinição para formatar o conteúdo da janela informativa.',
 764+ 'semanticmaps-par-centre' => 'O centro do mapa. Quando este não for fornecido, o mapa escolherá automaticamente o centro óptimo para apresentar todos os marcadores do mapa.',
 765+ 'semanticmaps-par-template' => 'Uma predefinição que será usada para formatar o conteúdo da janela informativa.',
 766+);
 767+
 768+/** Brazilian Portuguese (Português do Brasil)
 769+ * @author Eduardo.mps
 770+ * @author Giro720
 771+ * @author Luckas Blade
 772+ */
 773+$messages['pt-br'] = array(
 774+ '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]).',
 775+ 'semanticmaps-unrecognizeddistance' => 'O valor $1 não é uma distância válida.',
 776+ 'semanticmaps-kml-link' => 'Ver o arquivo KML',
 777+ 'semanticmaps-default-kml-pagelink' => 'Ver a página $1',
 778+ 'semanticmaps_lookupcoordinates' => 'Pesquisar coordenadas',
 779+ 'semanticmaps_enteraddresshere' => 'Introduza um endereço aqui',
 780+);
 781+
 782+/** Romanian (Română)
 783+ * @author Firilacroco
 784+ */
 785+$messages['ro'] = array(
 786+ 'semanticmaps_enteraddresshere' => 'Introduceți adresa aici',
 787+);
 788+
 789+/** Tarandíne (Tarandíne)
 790+ * @author Joetaras
 791+ */
 792+$messages['roa-tara'] = array(
 793+ 'semanticmaps-desc' => "Dèje l'abbilità a fà vedè e cangià le coordinate reggistrate cu l'estenzione Semandiche de MediaUicchi ([http://mapping.referata.com/wiki/Examples demo]).",
 794+ 'semanticmaps-default-kml-pagelink' => "Vide 'a pàgene $1",
 795+ 'semanticmaps_lookupcoordinates' => 'Ingroce le coordinate',
 796+ 'semanticmaps_enteraddresshere' => "Scaffe l'indirizze aqquà",
 797+ 'semanticmaps-updatemap' => "Aggiorne 'a mappe",
 798+ 'semanticmaps-forminput-remove' => 'Live',
 799+ 'semanticmaps-forminput-add' => 'Aggiunge',
 800+);
 801+
 802+/** Russian (Русский)
 803+ * @author Eugene Mednikov
 804+ * @author Lockal
 805+ * @author Александр Сигачёв
 806+ */
 807+$messages['ru'] = array(
 808+ 'semanticmaps-desc' => 'Обеспечивает возможность просмотра и редактирования координатных данных, хранящихся в семантическом расширении MediaWiki ([http://mapping.referata.com/wiki/Examples примеры]).',
 809+ 'semanticmaps-unrecognizeddistance' => 'Значение $1 не является допустимым расстоянием.',
 810+ 'semanticmaps-kml-link' => 'Просмотреть файл KML',
 811+ 'semanticmaps-default-kml-pagelink' => 'Просмотреть страницу $1',
 812+ 'semanticmaps-loading-forminput' => 'Загрузка карты…',
 813+ 'semanticmaps_lookupcoordinates' => 'Найти координаты',
 814+ 'semanticmaps_enteraddresshere' => 'Введите адрес',
 815+ 'semanticmaps-updatemap' => 'Обновить карту',
 816+ 'semanticmaps-forminput-remove' => 'Удалить',
 817+ 'semanticmaps-forminput-add' => 'Добавить',
 818+ 'semanticmaps-forminput-locations' => 'Места',
 819+ 'semanticmaps-par-staticlocations' => 'Список мест для добавления на карту вместе с запрашиваемыми данными. Например, к display_points можно добавить название, описание и значок, используя тильду ~ в качестве разделителя.',
 820+ 'semanticmaps-par-forceshow' => 'Показывать карту даже тогда, когда нет мест для отображения?',
 821+ 'semanticmaps-par-template' => 'Шаблон для форматирования содержимого окна информация.',
 822+);
 823+
 824+/** Slovak (Slovenčina)
 825+ * @author Helix84
 826+ */
 827+$messages['sk'] = array(
 828+ '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]).',
 829+ 'semanticmaps_lookupcoordinates' => 'Vyhľadať súradnice',
 830+ 'semanticmaps_enteraddresshere' => 'Sem zadajte emailovú adresu',
 831+);
 832+
 833+/** Slovenian (Slovenščina)
 834+ * @author Lesko987
 835+ */
 836+$messages['sl'] = array(
 837+ 'semanticmaps-desc' => 'Omogoča ogled in urejanje podatke o lokaciji, shranjene z razširitvijo Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples Primeri]).',
 838+ 'semanticmaps-unrecognizeddistance' => 'Vrednost $1 ni pravilna razdalja.',
 839+ 'semanticmaps-kml-link' => 'Ogled datoteke KML',
 840+ 'semanticmaps-default-kml-pagelink' => 'Poglej stran $1',
 841+ 'semanticmaps-loading-forminput' => 'Nalaganje zemljevida iz vira...',
 842+ 'semanticmaps_lookupcoordinates' => 'Poišči koordinate',
 843+ 'semanticmaps_enteraddresshere' => 'Tukaj vnesite naslov',
 844+ 'semanticmaps-updatemap' => 'Osvežite zemljevid',
 845+ 'semanticmaps-forminput-remove' => 'Odstrani',
 846+ 'semanticmaps-forminput-add' => 'Dodaj',
 847+ 'semanticmaps-forminput-locations' => 'Lokacije',
 848+ 'semanticmaps-par-staticlocations' => 'Seznam lokacij za dodajanje na zemljevid skupaj z rezultati poizvedb. Tako kot z display_points, lahko dodate naslov, opis in ikono za vsako lokacijo z uporabo "~" kot ločilo.',
 849+ 'semanticmaps-par-forceshow' => 'Prikaži zemljevid tudi če ni lokacij za prikaz?',
 850+ 'semanticmaps-par-showtitle' => 'Prikaži naslov v oknu ali ne. Onemogočanje tega je pogosto uporabno, če uporabljate predloge za oblikovanje vsebine info okno.',
 851+ 'semanticmaps-par-centre' => 'Sredini zemljevida. Če ne podana, bo zemljevid samodejno izbral optimalno lokacijo za prikaz vseh oznak na zemljevidu.',
 852+ 'semanticmaps-par-template' => 'Predloga za oblikovanje vsebine info okna.',
 853+);
 854+
 855+/** Serbian Cyrillic ekavian (‪Српски (ћирилица)‬)
 856+ * @author Михајло Анђелковић
 857+ */
 858+$messages['sr-ec'] = array(
 859+ 'semanticmaps-unrecognizeddistance' => 'Вредност $1 није исправно растојање.',
 860+ 'semanticmaps_enteraddresshere' => 'Унеси адресу овде',
 861+);
 862+
 863+/** Serbian Latin ekavian (‪Srpski (latinica)‬)
 864+ * @author Michaello
 865+ */
 866+$messages['sr-el'] = array(
 867+ 'semanticmaps-unrecognizeddistance' => 'Vrednost $1 nije ispravno rastojanje.',
 868+ 'semanticmaps_enteraddresshere' => 'Unesi adresu ovde',
 869+);
 870+
 871+/** Swedish (Svenska)
 872+ * @author Boivie
 873+ * @author Najami
 874+ * @author Per
 875+ * @author WikiPhoenix
 876+ */
 877+$messages['sv'] = array(
 878+ 'semanticmaps-desc' => 'Ger möjlighet att se och redigera koordinatdata som sparats med Semantic MediaWiki-utvidgningen ([http://mapping.referata.com/wiki/Examples Demo]).',
 879+ 'semanticmaps-unrecognizeddistance' => 'Värdet $1 är inte ett giltigt avstånd.',
 880+ 'semanticmaps-kml-link' => 'Visa KML-filen',
 881+ 'semanticmaps-default-kml-pagelink' => 'Visa sida $1',
 882+ 'semanticmaps-loading-forminput' => 'Läser in karta från indata...',
 883+ 'semanticmaps_lookupcoordinates' => 'Kolla upp koordinater',
 884+ 'semanticmaps_enteraddresshere' => 'Skriv in adress här',
 885+ 'semanticmaps-updatemap' => 'Uppdatera karta',
 886+ 'semanticmaps-forminput-remove' => 'Ta bort',
 887+ 'semanticmaps-forminput-add' => 'Lägg till',
 888+ 'semanticmaps-forminput-locations' => 'Platser',
 889+ 'semanticmaps-par-forceshow' => 'Visa kartan även om det inte finns några platser att visa?',
 890+);
 891+
 892+/** Swahili (Kiswahili)
 893+ * @author Lloffiwr
 894+ */
 895+$messages['sw'] = array(
 896+ 'semanticmaps-kml-link' => 'Tazama faili la KML',
 897+ 'semanticmaps-default-kml-pagelink' => 'Tazama ukurasa $1',
 898+ 'semanticmaps-loading-forminput' => 'Fomu ya kuingiza ramani inapakiwa...',
 899+ 'semanticmaps_enteraddresshere' => 'Ingiza anwani hapa',
 900+ 'semanticmaps-updatemap' => 'Sasisha ramani',
 901+ 'semanticmaps-forminput-remove' => 'Ondoa',
 902+ 'semanticmaps-forminput-add' => 'Ongeza',
 903+ 'semanticmaps-forminput-locations' => 'Mahali',
 904+);
 905+
 906+/** Telugu (తెలుగు)
 907+ * @author Veeven
 908+ */
 909+$messages['te'] = array(
 910+ 'semanticmaps_enteraddresshere' => 'చిరునామాని ఇక్కడ ఇవ్వండి',
 911+ 'semanticmaps-forminput-add' => 'చేర్చు',
 912+);
 913+
 914+/** Tetum (Tetun)
 915+ * @author MF-Warburg
 916+ */
 917+$messages['tet'] = array(
 918+ 'semanticmaps-forminput-remove' => 'Hasai',
 919+ 'semanticmaps-forminput-add' => 'Tau tan',
 920+);
 921+
 922+/** Tagalog (Tagalog)
 923+ * @author AnakngAraw
 924+ */
 925+$messages['tl'] = array(
 926+ 'semanticmaps-desc' => 'Nagbibigay ng kakayahang matingnan at baguhin ang dato ng tugmaang pampook na nakaimbak sa pamamagitan ng dugtong ng Semantikong MediaWiki ([http://mapping.referata.com/wiki/Examples pagpapamalas]).',
 927+ 'semanticmaps-unrecognizeddistance' => 'Hindi isang tanggap na layo ang halagang $1.',
 928+ 'semanticmaps-kml-link' => 'Tingnan ang talaksang KML',
 929+ 'semanticmaps-default-kml-pagelink' => 'Tingnan ang pahinang $1',
 930+ 'semanticmaps-loading-forminput' => 'Ikinakarga ang pagpapasok ng anyo ng mapa...',
 931+ 'semanticmaps_lookupcoordinates' => "Hanapin ang mga tugmaang-pampook (''coordinate'')",
 932+ 'semanticmaps_enteraddresshere' => 'Ipasok ang adres dito',
 933+ 'semanticmaps-updatemap' => 'Isapanahon ang mapa',
 934+ 'semanticmaps-forminput-remove' => 'Tanggalin',
 935+ 'semanticmaps-forminput-add' => 'Idagdag',
 936+ 'semanticmaps-forminput-locations' => 'Mga kinalalagyan',
 937+);
 938+
 939+/** Turkish (Türkçe)
 940+ * @author Vito Genovese
 941+ */
 942+$messages['tr'] = array(
 943+ 'semanticmaps_lookupcoordinates' => 'Koordinat ara',
 944+ 'semanticmaps_enteraddresshere' => 'Adresi buraya girin',
 945+);
 946+
 947+/** Veps (Vepsan kel')
 948+ * @author Игорь Бродский
 949+ */
 950+$messages['vep'] = array(
 951+);
 952+
 953+/** Vietnamese (Tiếng Việt)
 954+ * @author Minh Nguyen
 955+ * @author Vinhtantran
 956+ */
 957+$messages['vi'] = array(
 958+ 'semanticmaps-desc' => 'Cung cấp khả năng xem và sửa đổi dữ liệu tọa độ được lưu bởi phần mở rộng Semantic MediaWiki ([http://mapping.referata.com/wiki/Examples thử xem]).',
 959+ 'semanticmaps-unrecognizeddistance' => 'Giá trị $1 không phải là tầm hợp lệ.',
 960+ 'semanticmaps-kml-link' => 'Xem tập tin KML',
 961+ 'semanticmaps-default-kml-pagelink' => 'Xem trang $1',
 962+ 'semanticmaps-loading-forminput' => 'Đang tải dữ liệu biểu mẫu bản đồ…',
 963+ 'semanticmaps_lookupcoordinates' => 'Tra tọa độ',
 964+ 'semanticmaps_enteraddresshere' => 'Nhập địa chỉ vào đây',
 965+ 'semanticmaps-updatemap' => 'Cập nhật bản đồ',
 966+ 'semanticmaps-forminput-remove' => 'Dời',
 967+ 'semanticmaps-forminput-add' => 'Thêm',
 968+ 'semanticmaps-forminput-locations' => 'Các vị trí',
 969+ 'semanticmaps-par-staticlocations' => 'Danh sách các vị trí để thêm vào bản đồ cùng với dữ liệu được truy vấn. Giống như với display_points, bạn có thể đặt tên, miêu tả, và hình tượng cho mỗi đánh dấu bằng cách phân tách dùng dấu ngã (~).',
 970+ 'semanticmaps-par-forceshow' => 'Hiển thị bản đồ ngay cả khi không có vị trí nào để hiển thị?',
 971+ 'semanticmaps-par-showtitle' => 'Tên tùy chọn của cửa sổ thông tin đánh dấu. Có thể để trống để định dạng nội dung cửa sổ thông tin dùng bản mẫu.',
 972+ 'semanticmaps-par-centre' => 'Trung tâm của bản đồ. Nếu không có, bản đồ sẽ tự động chọn trung tâm tối ưu bao gồm tất cả các dấu trên bản đồ.',
 973+ 'semanticmaps-par-template' => 'Bản đồ dùng để định dạng nội dung của cửa sổ thông tin.',
 974+);
 975+
 976+/** Volapük (Volapük)
 977+ * @author Smeira
 978+ */
 979+$messages['vo'] = array(
 980+ 'semanticmaps_lookupcoordinates' => 'Tuvön koordinatis',
 981+);
 982+
 983+/** Simplified Chinese (‪中文(简体)‬)
 984+ * @author Gzdavidwong
 985+ */
 986+$messages['zh-hans'] = array(
 987+ 'semanticmaps_lookupcoordinates' => '查找坐标',
 988+);
 989+
 990+/** Traditional Chinese (‪中文(繁體)‬)
 991+ * @author Gzdavidwong
 992+ * @author Mark85296341
 993+ * @author Sheepy
 994+ * @author Wrightbus
 995+ */
 996+$messages['zh-hant'] = array(
 997+ 'semanticmaps-default-kml-pagelink' => '檢視頁面 $1',
 998+ 'semanticmaps_lookupcoordinates' => '尋找座標',
 999+);
 1000+
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/SemanticMaps.i18n.php
___________________________________________________________________
Added: svn:eol-style
11001 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/SemanticMaps.php
@@ -0,0 +1,111 @@
 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+ * @licence GNU GPL v3
 15+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 16+ */
 17+
 18+/**
 19+ * This documenation group collects source code files belonging to Semantic Maps.
 20+ *
 21+ * Please do not use this group name for other code. If you have an extension to
 22+ * Semantic Maps, please use your own group definition.
 23+ *
 24+ * @defgroup SemanticMaps Semantic Maps
 25+ */
 26+
 27+if ( !defined( 'MEDIAWIKI' ) ) {
 28+ die( 'Not an entry point.' );
 29+}
 30+
 31+if ( version_compare( $wgVersion, '1.17', '<' ) ) {
 32+ die( '<b>Error:</b> This version of Semantic Maps requires MediaWiki 1.17 or above; use Semantic Maps 0.7.x for older versions.' );
 33+}
 34+
 35+// Show a warning if Maps is not loaded.
 36+if ( ! defined( 'Maps_VERSION' ) ) {
 37+ 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 />' );
 38+}
 39+
 40+// Show a warning if Semantic MediaWiki is not loaded.
 41+if ( ! defined( 'SMW_VERSION' ) ) {
 42+ 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 />' );
 43+}
 44+
 45+if ( version_compare( SMW_VERSION, '1.6 alpha', '<' ) ) {
 46+ die( '<b>Error:</b> This version of Semantic Maps requires Semantic MediaWiki 1.6 or above; use Semantic Maps 0.7.x for older versions.' );
 47+}
 48+
 49+define( 'SM_VERSION', '1.0.1' );
 50+
 51+$wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'other'][] = array(
 52+ 'path' => __FILE__,
 53+ 'name' => 'Semantic Maps',
 54+ 'version' => SM_VERSION,
 55+ 'author' => array(
 56+ '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]'
 57+ ),
 58+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Maps',
 59+ 'descriptionmsg' => 'semanticmaps-desc'
 60+);
 61+
 62+$smgScriptPath = ( $wgExtensionAssetsPath === false ? $wgScriptPath . '/extensions' : $wgExtensionAssetsPath ) . '/SemanticMaps';
 63+$smgDir = dirname( __FILE__ ) . '/';
 64+
 65+$smgStyleVersion = $wgStyleVersion . '-' . SM_VERSION;
 66+
 67+// Include the settings file.
 68+require_once 'SM_Settings.php';
 69+
 70+# (named) Array of String. This array contains the available features for Maps.
 71+# Commenting out the inclusion of any feature will make Maps completely ignore it, and so improve performance.
 72+
 73+ # Query printers
 74+ include_once $smgDir . 'includes/queryprinters/SM_QueryPrinters.php';
 75+ # Form imputs
 76+ include_once $smgDir . 'includes/forminputs/SM_FormInputs.php';
 77+
 78+# Include the mapping services that should be loaded into Semantic Maps.
 79+# Commenting or removing a mapping service will cause Semantic Maps to completely ignore it, and so improve performance.
 80+
 81+ # Google Maps API v2
 82+ include_once $smgDir . 'includes/services/GoogleMaps/SM_GoogleMaps.php';
 83+ # Google Maps API v3
 84+ include_once $smgDir . 'includes/services/GoogleMaps3/SM_GoogleMaps3.php';
 85+ # OpenLayers API
 86+ include_once $smgDir . 'includes/services/OpenLayers/SM_OpenLayers.php';
 87+ # Yahoo! Maps API
 88+ include_once $smgDir . 'includes/services/YahooMaps/SM_YahooMaps.php';
 89+
 90+$wgExtensionMessagesFiles['SemanticMaps'] = $smgDir . 'SemanticMaps.i18n.php';
 91+
 92+$incDir = dirname( __FILE__ ) . '/includes/';
 93+
 94+$wgAutoloadClasses['SMGeoCoordsHooks'] = $incDir . 'SM_GeoCoordsHooks.php';
 95+
 96+// Data values
 97+$wgAutoloadClasses['SMGeoCoordsValue'] = $incDir . 'SM_GeoCoordsValue.php';
 98+
 99+// Value descriptions
 100+$wgAutoloadClasses['SMGeoCoordsValueDescription'] = $incDir . 'SM_GeoCoordsValueDescription.php';
 101+$wgAutoloadClasses['SMAreaValueDescription'] = $incDir . 'SM_AreaValueDescription.php';
 102+
 103+$wgAutoloadClasses['SemanticMapsHooks'] = dirname( __FILE__ ) . '/SemanticMaps.hooks.php';
 104+
 105+// Hook for initializing the Geographical Coordinate type.
 106+$wgHooks['smwInitDatatypes'][] = 'SMGeoCoordsHooks::initGeoCoordsType';
 107+
 108+// Hook for defining the default query printer for queries that ask for geographical coordinates.
 109+$wgHooks['SMWResultFormat'][] = 'SMGeoCoordsHooks::addGeoCoordsDefaultFormat';
 110+
 111+// Hook for adding a Semantic Maps links to the Admin Links extension.
 112+$wgHooks['AdminLinks'][] = 'SemanticMapsHooks::addToAdminLinks';
Property changes on: tags/extensions/SemanticMaps/REL_1_0_1/SemanticMaps.php
___________________________________________________________________
Added: svn:eol-style
1113 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/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', 'Semantic Maps' );
 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_1_0_1/SemanticMaps.hooks.php
___________________________________________________________________
Added: svn:eol-style
138 + native
Index: tags/extensions/SemanticMaps/REL_1_0_1/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_1_0_1/README
___________________________________________________________________
Added: svn:eol-style
127 + native