Yii2 未找到传单扩展名和地理搜索目录

Yii2 未找到传单扩展名和地理搜索目录,yii2,leaflet,Yii2,Leaflet,我对Yii框架比较陌生。我正在设法让传单分机在我的项目上工作。我通过composer安装了它,所有内容似乎都安装正确,但当我尝试将其插入activeForm时,它会抛出以下错误: The file or directory to be published does not exist: /vendor/bower/leaflet/dist 我正试图用地图建立一个地理搜索领域。 我安装的扩展包括: “2 Migos/yii2传单扩展版”:“~1.0”, “2amigos/yii2传单地理编码器插

我对Yii框架比较陌生。我正在设法让传单分机在我的项目上工作。我通过composer安装了它,所有内容似乎都安装正确,但当我尝试将其插入activeForm时,它会抛出以下错误:

The file or directory to be published does not exist: /vendor/bower/leaflet/dist
我正试图用地图建立一个地理搜索领域。 我安装的扩展包括:

“2 Migos/yii2传单扩展版”:“~1.0”, “2amigos/yii2传单地理编码器插件”:“~1.0”, “2amigos/yii2传单地理搜索插件”:“~1.0”

这是我在ActiveForm上的代码(与GitHub上提供的代码完全相同):

使用dosamigos\传单\layers\tillelayer;
使用dosamigos\传单\传单;
使用dosamigos\传单\types\LatLng;
使用dosamigos\传单\plugins\geosearch\geosearch;
使用dosamigos\传单\widgets\Map;
我有什么遗漏或做错了吗?
感谢advanced

您的问题是,Bower不再提供原始传单js和css文件,2amigos也没有更改其composer文件以反映这些更改。Yii正试图从请求的位置发布css文件,但该文件尚不存在,因此出现错误消息。您需要转到并将相关文件复制到所需的目录中,或者更新composer文件以指向GitHub上的原始文件。对不起,我对作曲家的了解还不够,不能帮上忙

use dosamigos\leaflet\layers\TileLayer; 
use dosamigos\leaflet\LeafLet; 
use dosamigos\leaflet\types\LatLng; 
use dosamigos\leaflet\plugins\geosearch\GeoSearch; 
use dosamigos\leaflet\widgets\Map; 

<?php
    $center = new LatLng(['lat' => 39.67442740076734, 'lng' => 2.9347229003906246]); 

    $geoSearchPlugin = new GeoSearch([ 
        'service' => GeoSearch::SERVICE_OPENSTREETMAP 
    ]); 

    $tileLayer = new TileLayer([ 
        'urlTemplate' => 'link not allowed because its one of my first posts...', 
        'clientOptions' => [ 
            'attribution' => 'Tiles Courtesy of MapQuest ' . ', ' . 'Map data © OpenStreetMap contributors, ' . 'CC-BY-SA', 'subdomains' => '1234' 
        ] 
    ]); 

    $leafLet = new LeafLet([ 
        'name' => 'geoMap', 
        'tileLayer' => $tileLayer, 
        'center' => $center, 
        'zoom' => 10, 
        'clientEvents' => [ // setting up one of the geo search events for fun 
            'geosearch_showlocation' => 'function(e){ console.log(e.target); }' 
        ] 
    ]); 

    // add the plugin 
    $leafLet->installPlugin($geoSearchPlugin); 
    // run the widget (you can also use Map::widget([...])) 
    echo $leafLet->widget(); 
?>