public function init_plugin_sources()
 {
     //general css
     //can be completed below by inline css
     wp_register_style('mapboxadvcss', plugins_url('/assets/css/mapboxadv-min.css', __FILE__));
     wp_enqueue_style('mapboxadvcss');
     //legend
     $defaultmaplegendcontentcss = get_option('mapbox_default_maplegendcontentcss', '');
     wp_add_inline_style('mapboxadvcss', Mapboxadv::minify($defaultmaplegendcontentcss));
 }
 public function getstyle()
 {
     //add  all custom legends css (plugin)
     foreach ($this->params["maplegends"] as $key => $legend) {
         $css .= $legend['css'];
     }
     $css .= ' #mapbox-canvas-' . $this->params["mapinternid"] . ' {
         width:' . $this->params["mapwidth"] . ';
         height:' . $this->params["mapheight"] . ';
     }';
     $css .= ' #mapbox-canvas-' . $this->params["mapinternid"] . ' .map-legends, #mapbox-' . $this->params["mapinternid"] . ' .mapboxadv-legend.staticmap { background-color:' . $this->params['maplegendbackgroundcolor'] . ';';
     if (strcmp($this->params['maplegendbackgroundcolor'], 'transparent') == 0) {
         $css .= 'box-shadow:none';
         $css .= 'border:none';
     }
     $css .= '}';
     return Mapboxadv::minify($css);
 }