Changeset 4 for trunk/Modules/Map


Ignore:
Timestamp:
Sep 8, 2016, 11:14:39 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: PassengerCount table column usage.
  • Fixed: Google map with empty waypoints.
File:
1 edited

Legend:

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

    r1 r4  
    142142    array_shift($WayPoints);
    143143    array_pop($WayPoints);
     144    if(count($WayPoints) > 0)
     145      $WaypointsQuery = '&waypoints='.implode('|', $WayPoints);
     146      else $WaypointsQuery = '';
    144147
    145148    $Output = '<iframe width="'.$this->Width.'" height="'.$this->Height.'" frameborder="0" scrolling="no" '.
    146149      'marginheight="0" marginwidth="0" src="'.'https://www.google.com/maps/embed/v1/directions'.
    147       '?key='.$this->Key.'&origin='.$this->Path[0].'&waypoints='.implode('|', $WayPoints).
     150      '?key='.$this->Key.'&origin='.$this->Path[0].$WaypointsQuery.
    148151      '&destination='.$this->Path[count($this->Path) - 1].''.
    149152      '" style="border: 1px solid black"></iframe>';
Note: See TracChangeset for help on using the changeset viewer.