In the very simple piece of HTML below, I pass google an API Key generated by using "http://localhost".
This piece of code works fine when I save it as a HTML file outside of PhpED. However, within PhpED, google rejects the API Key.
I have tried this both with a project created as "simple" using PhpED's own server and with a project using my local Apache server. Both fail. I have tried generating API key with localhost and also my IP address and all combinations fail.
Any ideas?
Thanks
Phil
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAARo3rnDjrzH4zIx_1B6s0yxTjI_THA_xlM7PXOf6NbLN5MiNtkRRhFTjChNow-W7fm9EPSLlmpDlRRg"></script>
<script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
map.setMapType(G_NORMAL_MAP);
map.setCenter(new GLatLng(33.48844,-117.71739), 8);
map.addControl(new GSmallMapControl());
}
}
</script>
</head>
<body onload="initialize()" onunload="GUnload()" >
<div id="map_canvas" style="width: 450px; height: 500px">
</div>
</body>
</html>
|