merge sanjiangyuan-sub r5210 into sjy-water

This commit is contained in:
wlx 2015-01-31 07:30:36 +00:00
parent c309c9561d
commit 9a1d8075c4
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->config->title->data);
$this->headTitle('时空导航'); $this->headTitle('时空导航');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
//$this->headLink()->appendStylesheet('/css/metadata.css'); //$this->theme->AppendPlus($this,'google_map_v3');
$this->theme->AppendPlus($this,'google_map_v3'); //$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'colorbox'); $this->headScript()->appendFile('/js/OpenLayers.js');
$this->headScript()->appendFile('/js/timeline_var.js'); $this->headScript()->appendFile('/js/timeline_var.js');
$this->headScript()->appendFile('/js/timeline_js/timeline-api.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->headScript()->appendFile('/js/timemap.2.0.1/timemap.pack.js');
$this->nav[] = array('link'=>"/data/timemap",'title'=>'时空导航'); $this->nav[] = array('link'=>"/data/timemap",'title'=>'时空导航');
?> ?>
<style> <style>
img{max-width:none} img{max-width:none}
</style> </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="timemap">
<div id="timeline" style="height:500px;border-right:1px solid #abc;width:50%;float:left;"></div> <div id="timeline" style="height:400px;border-bottom:1px solid #abc;"></div>
<div id="map" style="height:500px;"></div> <div id="map" style="height:400px;"></div>
</div> </div>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$('#map').height($(window).height()); $('#map').height($(window).height()/2);
$('#timeline').height($(window).height()); $('#timeline').height($(window).height()/2);
$("html,body").animate({scrollTop:$('#timemap').offset().top},600); $("html,body").animate({scrollTop:$('#timemap').offset().top},600);
var tm; var tm;
$(function() { $(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({ tm = TimeMap.init({
mapId: "map", // Id of map div element (required) mapId: "map", // Id of map div element (required)
timelineId: "timeline", // Id of timeline div element (required) timelineId: "timeline", // Id of timeline div element (required)
scrollTo:"2012-01-01",
options: { options: {
eventIconPath: "../images/" eventIconPath: "../images/"
}, },
datasets: [ datasets: [
{ {
id: "artists", id: "metadata",
title: "Artists", title: "Metadata",
theme: "orange", theme: "orange",
// note that the lines below are now the preferred syntax // note that the lines below are now the preferred syntax
type: "basic", type: "basic",
@ -78,8 +58,7 @@ $(function() {
}, },
"title" : "<?php echo htmlspecialchars($row['title']); ?>", "title" : "<?php echo htmlspecialchars($row['title']); ?>",
"options" : { "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>", "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>",
"theme":"orange"
} }
}, },
<?php endforeach; ?> <?php endforeach; ?>
@ -89,14 +68,10 @@ $(function() {
], ],
bandIntervals: [ bandIntervals: [
Timeline.DateTime.MONTH, 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> </script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

File diff suppressed because one or more lines are too long