merge sanjiangyuan-sub r5210 into sjy-forest

This commit is contained in:
wlx 2015-01-31 07:29:28 +00:00
parent 55198dbe26
commit 0b2fb4bcef
3 changed files with 16 additions and 41 deletions

View File

@ -3,62 +3,42 @@ $this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('时空导航');
$this->headTitle()->setSeparator(' - ');
//$this->headLink()->appendStylesheet('/css/metadata.css');
$this->theme->AppendPlus($this,'google_map_v3');
$this->theme->AppendPlus($this,'colorbox');
//$this->theme->AppendPlus($this,'google_map_v3');
//$this->theme->AppendPlus($this,'colorbox');
$this->headScript()->appendFile('/js/OpenLayers.js');
$this->headScript()->appendFile('/js/timeline_var.js');
$this->headScript()->appendFile('/js/timeline_js/timeline-api.js');
$this->headScript()->appendFile('/js/timemap.2.0.1/lib/mxn/mxn.js?(googlev3)');
$this->headScript()->appendFile('/js/timemap.2.0.1/lib/mxn/mxn.js?(openlayers)');
$this->headScript()->appendFile('/js/timemap.2.0.1/timemap.pack.js');
$this->nav[] = array('link'=>"/data/timemap",'title'=>'时空导航');
?>
<style>
img{max-width:none}
</style>
<div class="row-fluid"><?= $this->partial('data/tools.phtml'); ?></div>
<div class="row-fluid"><?= $this->render('breadcrumbs.phtml'); ?><?= $this->partial('data/tools.phtml'); ?></div>
<div id="timemap">
<div id="timeline" style="height:500px;border-right:1px solid #abc;width:50%;float:left;"></div>
<div id="map" style="height:500px;"></div>
<div id="timeline" style="height:400px;border-bottom:1px solid #abc;"></div>
<div id="map" style="height:400px;"></div>
</div>
<script type="text/javascript" charset="utf-8">
$('#map').height($(window).height());
$('#timeline').height($(window).height());
$('#map').height($(window).height()/2);
$('#timeline').height($(window).height()/2);
$("html,body").animate({scrollTop:$('#timemap').offset().top},600);
var tm;
$(function() {
// make a custom map style
var styledMapType = new google.maps.StyledMapType([
{
featureType: "water",
elementType: "all",
stylers: [
{ saturation: 0 },
{ lightness: 100 }
]
},
{
featureType: "all",
elementType: "all",
stylers: [
{ saturation: -100 }
]
}
], {
name: "white"
});
tm = TimeMap.init({
mapId: "map", // Id of map div element (required)
timelineId: "timeline", // Id of timeline div element (required)
scrollTo:"2012-01-01",
options: {
eventIconPath: "../images/"
},
datasets: [
{
id: "artists",
title: "Artists",
id: "metadata",
title: "Metadata",
theme: "orange",
// note that the lines below are now the preferred syntax
type: "basic",
@ -78,8 +58,7 @@ $(function() {
},
"title" : "<?php echo htmlspecialchars($row['title']); ?>",
"options" : {
"infoHtml": "<div class='info'><a href=/heihe/view/uuid/<?php echo $row['uuid']; ?>><?php echo htmlspecialchars($row['title']); ?></a><hr /><img src=/service/thumb/id/<?php echo $row['id']; ?> onclick='$.colorbox({photo:\"true\",href:\"/service/bigthumb/id/<?php echo $row['id']; ?>\"});' /></div>",
"theme":"orange"
"infoHtml": "<div class='info'><a href=/data/view/uuid/<?php echo $row['uuid']; ?>><?php echo htmlspecialchars($row['title']); ?></a><hr /><img src=/service/thumb/id/<?php echo $row['id']; ?> onclick='$.colorbox({photo:\"true\",href:\"/service/bigthumb/id/<?php echo $row['id']; ?>\"});' /></div>",
}
},
<?php endforeach; ?>
@ -89,14 +68,10 @@ $(function() {
],
bandIntervals: [
Timeline.DateTime.MONTH,
Timeline.DateTime.DECADE
Timeline.DateTime.YEAR
]
});
// set the map to our custom style
var gmap = tm.getNativeMap();
gmap.mapTypes.set("white", styledMapType);
gmap.setMapTypeId("white");
});
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

File diff suppressed because one or more lines are too long