1
0

Auto-load the google map fix.

This commit is contained in:
rWatcher 2009-07-24 01:37:59 -04:00
parent b1a55e2fc1
commit d711c84876

View File

@ -1,10 +1,10 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?=$google_map_key ?>&sensor=false"
type="text/javascript">
</script>
<script src="http://www.google.com/jsapi?key=<?=$google_map_key ?>" type="text/javascript"></script>
<script type="text/javascript">
google.load("maps", "2");
<script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
@ -45,12 +45,11 @@
}
}
}
google.setOnLoadCallback(initialize);
</script>
<a href="#" onclick="javascript:initialize();">Load Map</a>
<div id="map_canvas" style="width: 600px; height: 480px"></div>