Kartographer
Extension that adds maps to wiki pages
Loading...
Searching...
No Matches
Kartographer\Tag\MapTagArgumentValidator Class Reference

Validator and preprocessor for all arguments that can be used in <mapframe> and <maplink> tags. More...

+ Collaboration diagram for Kartographer\Tag\MapTagArgumentValidator:

Public Member Functions

 __construct (string $tag, array $args, Config $config, Language $defaultLanguage, LanguageNameUtils $languageCodeValidator=null)
 
 hasCoordinates ()
 
 usesAutoPosition ()
 
 getLanguageCodeWithDefaultFallback ()
 
 setFirstMarkerProperties (?string $fallbackText, stdClass $properties)
 
 getTextWithFallback ()
 

Public Attributes

StatusValue $status
 
float $lat
 
float $lon
 
int $zoom
 
string $mapStyle
 
string $width = null
 
int $height
 
string $align
 
bool $frameless
 
string $cssClass
 
string $specifiedLangCode = null
 
string $text
 Empty string when text="" was given, null when the attribute was missing.
 
string $alt
 
string $firstMarkerColor = ''
 
string $groupId = null
 
array $showGroups = []
 

Detailed Description

Validator and preprocessor for all arguments that can be used in <mapframe> and <maplink> tags.

As of now this class intentionally knows everything about both tags.

@license MIT

Constructor & Destructor Documentation

◆ __construct()

Kartographer\Tag\MapTagArgumentValidator::__construct ( string $tag,
array $args,
Config $config,
Language $defaultLanguage,
LanguageNameUtils $languageCodeValidator = null )
Parameters
string$tagTag name, e.g. "maplink"
array<string,string>$args
Config$config
Language$defaultLanguage
LanguageNameUtils | null$languageCodeValidator

Member Function Documentation

◆ hasCoordinates()

Kartographer\Tag\MapTagArgumentValidator::hasCoordinates ( )
Returns
bool If a complete pair of coordinates is given, e.g. to render a <maplink> label

◆ usesAutoPosition()

Kartographer\Tag\MapTagArgumentValidator::usesAutoPosition ( )
Returns
bool If the map relies on Kartotherian's auto-position feature (extracting a bounding box from the GeoJSON) instead of the arguments alone (coordinates and zoom)

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