Implemented mattbostock's suggestion for degrading the javascript map to a static image for older browsers.
This commit is contained in:
parent
e4dfed129e
commit
5cd1fc9d03
@ -1,4 +1,8 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<?
|
||||
$latitude = 0;
|
||||
$longitude = 0;
|
||||
?>
|
||||
<script type="text/javascript" src="http://www.google.com/jsapi?key=<?= module::get_var("exif_gps", "googlemap_api_key"); ?>"></script>
|
||||
<script type="text/javascript">
|
||||
google.load("maps", "3",{"other_params":"sensor=false"});
|
||||
@ -20,6 +24,8 @@
|
||||
<? if (!isset($currLat)) { ?>
|
||||
<? $currLat = $item_coordinates->latitude; ?>
|
||||
<? $currLong = $item_coordinates->longitude; ?>
|
||||
<? $latitude = $item_coordinates->latitude; ?>
|
||||
<? $longitude = $item_coordinates->longitude; ?>
|
||||
var marker<?=$counter; ?> = new google.maps.Marker({
|
||||
position: new google.maps.LatLng(<?=$item_coordinates->latitude; ?>,<?=$item_coordinates->longitude; ?>),
|
||||
map: map
|
||||
@ -56,4 +62,4 @@
|
||||
|
||||
</script>
|
||||
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"></div>
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"><img src="http://maps.google.com/maps/api/staticmap?center=<?=$latitude; ?>,<?=$longitude; ?>&zoom=<?= module::get_var("exif_gps", "sidebar_zoom"); ?>&size=205x214&maptype=<?=$sidebar_map_type ?>&markers=color:red|color:red|<?=$latitude; ?>,<?=$longitude; ?>&sensor=false"></div>
|
||||
|
@ -19,4 +19,4 @@
|
||||
google.setOnLoadCallback(initialize);
|
||||
|
||||
</script>
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"></div>
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"><img src="http://maps.google.com/maps/api/staticmap?center=<?=$latitude; ?>,<?=$longitude; ?>&zoom=<?= module::get_var("exif_gps", "sidebar_zoom"); ?>&size=205x214&maptype=<?=$sidebar_map_type ?>&markers=color:red|color:red|<?=$latitude; ?>,<?=$longitude; ?>&sensor=false"></div>
|
||||
|
@ -1,4 +1,8 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<?
|
||||
$latitude = 0;
|
||||
$longitude = 0;
|
||||
?>
|
||||
<script type="text/javascript" src="http://www.google.com/jsapi?key=<?= module::get_var("exif_gps", "googlemap_api_key"); ?>"></script>
|
||||
<script type="text/javascript">
|
||||
google.load("maps", "3",{"other_params":"sensor=false"});
|
||||
@ -20,6 +24,8 @@
|
||||
<? if (!isset($currLat)) { ?>
|
||||
<? $currLat = $item_coordinates->latitude; ?>
|
||||
<? $currLong = $item_coordinates->longitude; ?>
|
||||
<? $latitude = $item_coordinates->latitude; ?>
|
||||
<? $longitude = $item_coordinates->longitude; ?>
|
||||
var marker<?=$counter; ?> = new google.maps.Marker({
|
||||
position: new google.maps.LatLng(<?=$item_coordinates->latitude; ?>,<?=$item_coordinates->longitude; ?>),
|
||||
map: map
|
||||
@ -56,4 +62,4 @@
|
||||
|
||||
</script>
|
||||
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"></div>
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"><img src="http://maps.google.com/maps/api/staticmap?center=<?=$latitude; ?>,<?=$longitude; ?>&zoom=<?= module::get_var("exif_gps", "sidebar_zoom"); ?>&size=205x214&maptype=<?=$sidebar_map_type ?>&markers=color:red|color:red|<?=$latitude; ?>,<?=$longitude; ?>&sensor=false"></div>
|
||||
|
@ -19,4 +19,4 @@
|
||||
google.setOnLoadCallback(initialize);
|
||||
|
||||
</script>
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"></div>
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"><img src="http://maps.google.com/maps/api/staticmap?center=<?=$latitude; ?>,<?=$longitude; ?>&zoom=<?= module::get_var("exif_gps", "sidebar_zoom"); ?>&size=205x214&maptype=<?=$sidebar_map_type ?>&markers=color:red|color:red|<?=$latitude; ?>,<?=$longitude; ?>&sensor=false"></div>
|
||||
|
Reference in New Issue
Block a user