Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 4
CRAP
0.00% covered (danger)
0.00%
0 / 18
CargoLeafletFormat
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 4
20
0.00% covered (danger)
0.00%
0 / 18
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
 allowedParameters
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 4
 getScripts
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 5
 getStyles
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 6
<?php
/**
 * @author Yaron Koren
 * @ingroup Cargo
 */
class CargoLeafletFormat extends CargoMapsFormat {
    public function __construct( $output ) {
        parent::__construct( $output );
        self::$mappingService = "Leaflet";
    }
    public static function allowedParameters() {
        $allowedParams = parent::allowedParameters();
        $allowedParams['image'] = [ 'type' => 'string' ];
        return $allowedParams;
    }
    public static function getScripts() {
        return [
            "https://unpkg.com/leaflet@1.7.1/dist/leaflet.js",
            "https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js"
        ];
    }
    public static function getStyles() {
        return [
            "https://unpkg.com/leaflet@1.7.1/dist/leaflet.css",
            "https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.Default.css",
            "https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.css"
        ];
    }
}