Public Member Functions | |
| __construct ($format, $inline, iMappingService $service) | |
| Constructor. | |
| getResultText (SMWQueryResult $res, $outputmode) | |
| Builds up and returns the HTML for the map, with the queried coordinate data on it. | |
| getResult (SMWQueryResult $results, array $params, $outputmode) | |
| Reads the parameters and gets the query printers output. | |
| getName () | |
| Returns the internationalized name of the mapping service. | |
| getParameters () | |
| Returns a list of parameter information, for usage by Special:Ask and others. | |
Protected Member Functions | |
| getParameterInfo () | |
| Returns an array containing the parameter info. | |
| getMapHTML (array $params, Parser $parser, $mapName) | |
| Returns the HTML to display the map. | |
| getJSON (array $params, Parser $parser, $mapName) | |
| Returns the JSON with the maps data. | |
| getJSONObject (array $params, Parser $parser) | |
| Returns a PHP object to encode to JSON with the map data. | |
| handleMarkerData (array &$params, array $queryLocations) | |
| Converts the data in the coordinates parameter to JSON-ready objects. | |
| getMappedParamType ($type) | |
| Takes in an element of the Parameter::TYPE_ enum and turns it into an SMW type (string) indicator. | |
Protected Attributes | |
| $service | |
| $fatalErrorMsg = false | |
Definition at line 13 of file SM_MapPrinter.php.
| SMMapPrinter::__construct | ( | $ | format, | |
| $ | inline, | |||
| iMappingService $ | service | |||
| ) |
Constructor.
| $format | String | |
| $inline | ||
| $service | iMappingService |
Definition at line 36 of file SM_MapPrinter.php.
| SMMapPrinter::getParameterInfo | ( | ) | [protected] |
Returns an array containing the parameter info.
Definition at line 50 of file SM_MapPrinter.php.
References SMWResultPrinter::$params, $smgQPForceShow, $smgQPShowTitle, and $smgQPTemplate.
Referenced by getParameters().
| SMMapPrinter::getResultText | ( | SMWQueryResult $ | res, | |
| $ | outputmode | |||
| ) | [final] |
Builds up and returns the HTML for the map, with the queried coordinate data on it.
| SMWQueryResult | $res | |
| $outputmode |
Reimplemented from SMWResultPrinter.
Definition at line 142 of file SM_MapPrinter.php.
References SMWResultPrinter::$params, getJSON(), getMapHTML(), handleMarkerData(), SMWOutputs::requireHeadItem(), and SMWOutputs::requireResource().
Referenced by getResult().
| SMMapPrinter::getMapHTML | ( | array $ | params, | |
| Parser $ | parser, | |||
| $ | mapName | |||
| ) | [protected] |
Returns the HTML to display the map.
| array | $params | |
| Parser | $parser | |
| string | $mapName |
Definition at line 207 of file SM_MapPrinter.php.
Referenced by getResultText().
| SMMapPrinter::getJSON | ( | array $ | params, | |
| Parser $ | parser, | |||
| $ | mapName | |||
| ) | [protected] |
Returns the JSON with the maps data.
| array | $params | |
| Parser | $parser | |
| string | $mapName |
Definition at line 229 of file SM_MapPrinter.php.
References getJSONObject().
Referenced by getResultText().
| SMMapPrinter::getJSONObject | ( | array $ | params, | |
| Parser $ | parser | |||
| ) | [protected] |
Returns a PHP object to encode to JSON with the map data.
| array | $params | |
| Parser | $parser |
Definition at line 252 of file SM_MapPrinter.php.
Referenced by getJSON().
| SMMapPrinter::handleMarkerData | ( | array &$ | params, | |
| array $ | queryLocations | |||
| ) | [protected] |
Converts the data in the coordinates parameter to JSON-ready objects.
These get stored in the locations parameter, and the coordinates on gets deleted.
| array | &$params | |
| array | $queryLocations |
Definition at line 265 of file SM_MapPrinter.php.
Referenced by getResultText().
| SMMapPrinter::getResult | ( | SMWQueryResult $ | results, | |
| array $ | params, | |||
| $ | outputmode | |||
| ) | [final] |
Reads the parameters and gets the query printers output.
| SMWQueryResult | $results | |
| array | $params | |
| $outputmode |
Reimplemented from SMWResultPrinter.
Definition at line 310 of file SM_MapPrinter.php.
References getResultText(), and SMWResultPrinter::handleParameters().
| SMMapPrinter::getName | ( | ) | [final] |
Returns the internationalized name of the mapping service.
Reimplemented from SMWResultPrinter.
Definition at line 320 of file SM_MapPrinter.php.
| SMMapPrinter::getParameters | ( | ) |
Returns a list of parameter information, for usage by Special:Ask and others.
Reimplemented from SMWResultPrinter.
Definition at line 329 of file SM_MapPrinter.php.
References SMWResultPrinter::$params, and getParameterInfo().
| SMMapPrinter::getMappedParamType | ( | $ | type | ) | [protected] |
Takes in an element of the Parameter::TYPE_ enum and turns it into an SMW type (string) indicator.
| Parameter::TYPE_ | $type |
Definition at line 351 of file SM_MapPrinter.php.
SMMapPrinter::$service [protected] |
Definition at line 20 of file SM_MapPrinter.php.
SMMapPrinter::$fatalErrorMsg = false [protected] |
Definition at line 27 of file SM_MapPrinter.php.
1.5.6