yii2-google-maps-library and polylines


I’m pretty new to yii 2 and trying out the yii2-google-maps-library extension.

The example works and I can see the map in my yii example project.

I want to generate a map with a recorded gps track from my database.

I tried to use polylines to generate the track on the map.

If I use the the example and modify it from polygones to polylines.

Yii always throws an exception, when I use the "$map->addOverlay($polyline);" call.

What do I need to change?!

// Now lets write a polygon

$coords = [

new LatLng(['lat' => 25.774252, 'lng' => -80.190262]),

new LatLng(['lat' => 18.466465, 'lng' => -66.118292]),

new LatLng(['lat' => 32.321384, 'lng' => -64.75737]),

new LatLng(['lat' => 25.774252, 'lng' => -80.190262])


$polyline = new Polyline([

'path' => $coords


// Add it now to the map


No help yet? But I would like to say our developer developed a Bluetooth beacon app with a great map which is very helpful for all types of tracking.