Ignore:
Timestamp:
Nov 20, 2020, 12:08:12 AM (4 years ago)
Author:
chronos
Message:
  • Added: Static types added to almost all classes, methods and function. Supported by PHP 7.4.
  • Fixed: Various found code issues.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Map/MapAPI.php

    r874 r887  
    33class MapMarker
    44{
    5   var $Position;
    6   var $Text;
     5  public array $Position;
     6  public string $Text;
    77}
    88
    99class MapPolyLine
    1010{
    11   var $Points = array();
    12   var $Color = 'black';
     11  public array $Points = array();
     12  public string $Color = 'black';
    1313}
    1414
    1515class Map extends Model
    1616{
    17   var $Position;
    18   var $Zoom;
    19   var $Key;
     17  public array $Position;
     18  public int $Zoom;
     19  public string $Key;
    2020  var $OnClickObject;
    21   var $MarkerText;
    22   var $Markers;
    23   var $PolyLines;
     21  public string $MarkerText;
     22  public array $Markers;
     23  public array $PolyLines;
    2424
    25   function __construct($System)
     25  function __construct(System $System)
    2626  {
    2727    parent::__construct($System);
     
    3535  }
    3636
    37   function Show()
     37  function Show(): string
    3838  {
    3939    return '';
     
    4343class MapGoogle extends Map
    4444{
    45   function ShowPage($Page)
     45  function ShowPage(Page $Page): string
    4646  {
    4747    $Page->Load = 'initialize()';
     
    113113class MapOpenStreetMaps extends Map
    114114{
    115   function GetPageHeader()
     115  function GetPageHeader(): string
    116116  {
    117117    $Output = '<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css"
     
    124124  }
    125125
    126   function ShowPage($Page)
     126  function ShowPage(Page $Page): string
    127127  {
    128128    $this->System->PageHeaders[] = array($this, 'GetPageHeader');
Note: See TracChangeset for help on using the changeset viewer.