Problem" Registerjsfile"

code :

$this->registerJsFile(‘leaflet/layer/tile/Google.js’, [yii\web\JqueryAsset::className()], [‘POS_HEAD’]);

result :

<script src="/basic/web/leaflet/layer/tile/Google.js" 0="POS_HEAD"></script>

is there a mistake from my code ??

Why did you put the STATIC POS_HEAD in an array and in quotes?

You may want to read the API Docs. You are calling the position constant wrongly. You may need to try something like this…

use yii\web\View;




    ['position' => View::POS_HEAD]


ok thx