For me, the problem had to do with extra line breaks that were inserted in the code when I copied and pasted an example from Google’s website.
This line was the problem:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE&sensor=false">
Make sure to squeeze everything right together, nice and neat, or it won’t parse the code correctly.