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