You need to return your Google API key as a string
see: https://developers.google.com/maps/documentation/directions/get-api-key
see: https://developers.google.com/maps/documentation/directions/intro#Introduction
( ! ) Notice: Resolving timed out after 4000 milliseconds in /var/www/html/php7cookbook/source/Application/Web/Client/Curl.php on line 45
trigger_error( $message = 'Resolving timed out after 4000 milliseconds' )
.../Curl.php:45
( ! ) Warning: Attempt to read property "routes" on null in /var/www/html/php7cookbook/source/chapter07/chap_07_simple_rest_client_google_maps_curl.php on line 41
( ! ) Warning: Trying to access array offset on null in /var/www/html/php7cookbook/source/chapter07/chap_07_simple_rest_client_google_maps_curl.php on line 41
( ! ) Warning: Attempt to read property "legs" on null in /var/www/html/php7cookbook/source/chapter07/chap_07_simple_rest_client_google_maps_template.php on line 23
( ! ) Warning: foreach() argument must be of type array|object, null given in /var/www/html/php7cookbook/source/chapter07/chap_07_simple_rest_client_google_maps_template.php on line 23
( ! ) Warning: Attempt to read property "bounds" on null in /var/www/html/php7cookbook/source/chapter07/chap_07_simple_rest_client_google_maps_template.php on line 63
( ! ) Warning: Attempt to read property "copyrights" on null in /var/www/html/php7cookbook/source/chapter07/chap_07_simple_rest_client_google_maps_template.php on line 63