Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 14 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
| CargoLeafletFormat | |
0.00% |
0 / 14 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| allowedParameters | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| getScripts | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| getStyles | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @author Yaron Koren |
| 5 | * @ingroup Cargo |
| 6 | */ |
| 7 | class CargoLeafletFormat extends CargoMapsFormat { |
| 8 | |
| 9 | public function __construct( $output ) { |
| 10 | parent::__construct( $output ); |
| 11 | self::$mappingService = "Leaflet"; |
| 12 | } |
| 13 | |
| 14 | public static function allowedParameters() { |
| 15 | $allowedParams = parent::allowedParameters(); |
| 16 | $allowedParams['image'] = [ 'type' => 'string' ]; |
| 17 | return $allowedParams; |
| 18 | } |
| 19 | |
| 20 | public static function getScripts() { |
| 21 | return [ |
| 22 | "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js", |
| 23 | "https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js" |
| 24 | ]; |
| 25 | } |
| 26 | |
| 27 | public static function getStyles() { |
| 28 | return [ |
| 29 | "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css", |
| 30 | "https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.Default.css", |
| 31 | "https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.css" |
| 32 | ]; |
| 33 | } |
| 34 | |
| 35 | } |