SMMapPrinter Class Reference

Inherits SMWResultPrinter.

List of all members.

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


Detailed Description

Definition at line 13 of file SM_MapPrinter.php.


Constructor & Destructor Documentation

SMMapPrinter::__construct ( format,
inline,
iMappingService $  service 
)

Constructor.

Parameters:
$format String
$inline 
$service iMappingService

Definition at line 36 of file SM_MapPrinter.php.


Member Function Documentation

SMMapPrinter::getParameterInfo (  )  [protected]

Returns an array containing the parameter info.

Since:
1.0
Returns:
array

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.

Parameters:
SMWQueryResult $res
$outputmode 
Returns:
array or string

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.

Since:
1.0
Parameters:
array $params
Parser $parser
string $mapName
Returns:
string

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.

Since:
1.0
Parameters:
array $params
Parser $parser
string $mapName
Returns:
string

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.

Since:
1.0
Parameters:
array $params
Parser $parser
Returns:
mixed

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.

Since:
1.0
Parameters:
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.

Parameters:
SMWQueryResult $results
array $params
$outputmode 
Returns:
array

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.

Returns:
string

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.

Returns:
array

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.

Since:
1.0
Parameters:
Parameter::TYPE_ $type
Returns:
string

Definition at line 351 of file SM_MapPrinter.php.


Member Data Documentation

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.


The documentation for this class was generated from the following file:

Generated on Sun Mar 18 07:15:42 2012 for Semantic MediaWiki by  doxygen 1.5.6