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

Formats coordinates into human-readable strings. More...

Public Member Functions

 __construct (?float $lat, ?float $lon)
 
 format ( $language)
 Formats coordinates.
 
 formatParsoidSpan (ParsoidExtensionAPI $extAPI, ?string $language)
 Formats coordinates as a Parsoid i18n span.
 

Detailed Description

Formats coordinates into human-readable strings.

@license MIT

Constructor & Destructor Documentation

◆ __construct()

Kartographer\CoordFormatter::__construct ( ?float $lat,
?float $lon )
Parameters
float | null$lat
float | null$lon

Member Function Documentation

◆ format()

Kartographer\CoordFormatter::format ( $language)

Formats coordinates.

Parameters
Language | string$language
Returns
string

◆ formatParsoidSpan()

Kartographer\CoordFormatter::formatParsoidSpan ( ParsoidExtensionAPI $extAPI,
?string $language )

Formats coordinates as a Parsoid i18n span.

This method should not be used to generate content that is added to a tag attribute.

Parameters
ParsoidExtensionAPI$extAPI
string | null$language
Returns
DocumentFragment

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