merge r1634.
This commit is contained in:
parent
b7f39f466f
commit
1c5d3aa343
|
@ -10,7 +10,7 @@
|
|||
$this->breadcrumb('<a href="/heihe/">'.$this->config->title->heihe.'</a>');
|
||||
$this->breadcrumb('查看元数据');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$this->config->google->maps->api);
|
||||
//$this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$this->config->google->maps->api);
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
|
@ -259,7 +259,18 @@ endforeach;
|
|||
</div>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function(){$(".colorbox").colorbox({photo:"true"});});
|
||||
|
||||
$(window).bind("load", function() { var timeout = setTimeout(function() { initLoader(); }, 100);});
|
||||
//$(window).bind("load", function() { var timeout = setTimeout(function() { gmaploaded(); }, 1000);});
|
||||
function loadMaps() {
|
||||
google.load("maps", "2", {"callback" : gmaploaded,"base_domain": "ditu.google.cn"});
|
||||
}
|
||||
|
||||
function initLoader() {
|
||||
var script = document.createElement("script");
|
||||
script.src = "https://www.google.com/jsapi?key=<?php echo $this->config->google->maps->api; ?>&callback=loadMaps";
|
||||
script.type = "text/javascript";
|
||||
document.getElementsByTagName("head")[0].appendChild(script);
|
||||
}
|
||||
//ajax download
|
||||
function todownload(ft)
|
||||
{
|
||||
|
@ -341,7 +352,9 @@ function getSubFileList(uuid,id,depth){
|
|||
$('#span_'+id).html('-');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function gmaploaded()
|
||||
{
|
||||
//google map
|
||||
var map = new GMap2(document.getElementById("watermap"));
|
||||
var plotbounds=new GLatLngBounds(new GLatLng(<?= $md->south; ?>,<?= $md->west; ?>),new GLatLng(<?= $md->north; ?>,<?= $md->east; ?>));
|
||||
|
@ -352,7 +365,7 @@ zoomlevel--;
|
|||
<?php endif; ?>
|
||||
if (zoomlevel>16) zoomlevel=16;
|
||||
map.setCenter(new GLatLng(<?= ($md->south+$md->north)/2; ?>,<?= ($md->east+$md->west)/2; ?>), zoomlevel);
|
||||
map.setMapType(G_SATELLITE_MAP);
|
||||
map.setMapType(G_HYBRID_MAP);
|
||||
map.setUIToDefault();
|
||||
<?php if ($md->north==$md->south) : ?>
|
||||
var marker=new GMarker(new GLatLng(<?= $md->north; ?>,<?= $md->east; ?>));
|
||||
|
@ -366,7 +379,8 @@ zoomlevel--;
|
|||
new GLatLng(<?= $md->north; ?>,<?= $md->west; ?>)
|
||||
],"#f33f00",5,1,"#ff0000",0.2);
|
||||
map.addOverlay(polygon);
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
}
|
||||
</script>
|
||||
<?php else: ?>
|
||||
<p>Cannot find the metadata.</p>
|
||||
|
|
Loading…
Reference in New Issue