How would one find out why the Google script is not loading in the header of the page?
I don’t think this part of my script is executing:
//register scripts
$modx->regClientScript($script);
$modx->regClientStartupScript("http://maps.google.com/maps?file=api&v=2&key=".$apiKey);
Why? because this is what I receive when executing the snippet:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example</title>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="float:left; width: 350px; height: 350px;">Loading map...</div>
<div id="maplinks" style="margin-left: 10px; padding-right: 10px; float: left; display: block; height: 350px; overflow: auto;"></div>
</body>
</html>
As you can see above the built-in error msgs are not showing so it must be executing the
if($apiKey != "" && $modx->getChunk($dittoChunk) != "") { correctly?
I am using modx 9.6.0 and followed your instructions and cannot find anything I have left out. Any ideas would be greatly appreciated.
Hoping to get this snippet working soon, so I can say good things about it, lol!
Mark