change to tianditu, fix chinese link problem
This commit is contained in:
parent
2320c27788
commit
ee80c48617
|
@ -853,8 +853,8 @@ class DataController extends Zend_Controller_Action
|
|||
|
||||
$id = (int)$this->_request->getParam('id');
|
||||
|
||||
$sql="select m.*,s.status,g.id as gid,t.filename,i.doi as datadoi,i.author_en,i.publisher_en, date_part('year',i.ts_published) as publish_year from en.normalmetadata m left join en.mdstatus s on m.uuid=s.uuid
|
||||
|
||||
$sql="select m.*,s.status,g.id as gid,md.id as mdid, t.filename,i.doi as datadoi,i.author_en,i.publisher_en, date_part('year',i.ts_published) as publish_year from en.normalmetadata m left join en.mdstatus s on m.uuid=s.uuid
|
||||
left join metadata md on m.uuid=md.uuid
|
||||
left join en.thumbnail t on t.id=m.id left join en.geonetworkmetadata g on m.uuid=g.uuid left join datadoi i on i.uuid=m.uuid where ";
|
||||
|
||||
if (empty($id)) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
$this->headTitle($this->config->title->data);
|
||||
$this->headTitle($this->metadata->title);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->theme->AppendPlus($this,'google_map_v3');
|
||||
$this->theme->AppendPlus($this,'tianditu');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
if(!empty($this->dataService)) {
|
||||
$this->theme->AppendModel($this,"dataservice");
|
||||
|
@ -19,7 +19,7 @@ h3.gs_rt{font-size:110%;}
|
|||
<?php $md=$this->metadata;if ($md):?>
|
||||
<h3><?php echo $this->escape($md->title);
|
||||
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);
|
||||
echo '<a href="http://westdc.westgis.ac.cn/data/'.$md->uuid.'"><img src="/images/china.png" alt="Chinese Version"></a>';?>
|
||||
if ($md->mdid) echo '<a href="http://westdc.westgis.ac.cn/data/'.$md->uuid.'"><img src="/images/china.png" alt="Chinese Version"></a>';?>
|
||||
</h3>
|
||||
<hr />
|
||||
<div class="row">
|
||||
|
@ -407,7 +407,6 @@ endforeach;
|
|||
<script src="/js/metadata-view.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(function() {
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
$(".colorbox").colorbox({photo:"true"});
|
||||
$('.googlesearch').click(function(){googleSearch('<?php echo $ev;?>');});
|
||||
$('.bingsearch').click(function(){bingSearch('<?php echo $ev;?>');});
|
||||
|
@ -460,20 +459,42 @@ function ajaxpage(page){
|
|||
ajaxpage_get(page,'<?= $md->uuid; ?>');
|
||||
}
|
||||
|
||||
var map = null;
|
||||
var mapElementID = "watermap";
|
||||
var bounds = null;
|
||||
var rectangle = null;
|
||||
var zoomlevel = 1;
|
||||
var bound = {
|
||||
lat:<?= ($md->south+$md->north)/2; ?>,
|
||||
lng:<?= ($md->east+$md->west)/2; ?>,
|
||||
zoom:<?php if ($md->north==$md->south) { ?> 10 <?php }else {?> 16 <?php }?>,
|
||||
east:<?= $md->east; ?>,
|
||||
west:<?= $md->west; ?>,
|
||||
south:<?= $md->south; ?>,
|
||||
north:<?= $md->north; ?>
|
||||
}
|
||||
var config = { projection: "EPSG:4326"}
|
||||
var map=new TMap("watermap",config);
|
||||
var lat=<?= ($md->south+$md->north)/2; ?>;
|
||||
var lng=<?= ($md->east+$md->west)/2; ?>;
|
||||
map.centerAndZoom(new TLngLat(lng,lat),12);
|
||||
map.setMapType(TMAP_HYBRID_MAP);
|
||||
<?php if ($md->north==$md->south && $md->east==$md->west) :?>
|
||||
var marker=new TMarker(new TLngLat(lng,lat));
|
||||
map.addOverLay(marker);
|
||||
<?php else :?>
|
||||
var p1=new TLngLat(<?= $md->west ?>,<?= $md->south ?>);
|
||||
var p2=new TLngLat(<?= $md->west ?>,<?= $md->north ?>);
|
||||
var p3=new TLngLat(<?= $md->east ?>,<?= $md->north ?>);
|
||||
var p4=new TLngLat(<?= $md->east ?>,<?= $md->south ?>);
|
||||
map.setViewport(new Array(p1,p2,p3,p4));
|
||||
var bounds = new TBounds(<?= $md->west; ?>,<?= $md->south; ?>,<?= $md->east; ?>,<?= $md->north; ?>);
|
||||
var config = {
|
||||
strokeColor:"blue", //折线颜色
|
||||
fillColor:"#FFFFFF", //填充颜色。当参数为空时,折线覆盖物将没有填充效果
|
||||
strokeWeight:"3px", //折线的宽度,以像素为单位
|
||||
opacity:0.3, //折线的透明度,取值范围0 - 1
|
||||
strokeStyle:"dashed" //折线的样式,solid或dashed
|
||||
};
|
||||
var rect = new TRect(bounds,config);
|
||||
map.addOverLay(rect);
|
||||
//map.zoomOut();
|
||||
<?php endif; ?>
|
||||
var config = {
|
||||
type:"TMAP_NAVIGATION_CONTROL_SMALL", //缩放平移的显示类型
|
||||
anchor:"TMAP_ANCHOR_TOP_LEFT", //缩放平移控件显示的位置
|
||||
offset:[0,0], //缩放平移控件的偏移值 showZoomInfo:true //是否显示级别提示信息,true表示显示,false表示隐藏。
|
||||
};
|
||||
//创建缩放平移控件对象
|
||||
control=new TNavigationControl(config);
|
||||
//添加缩放平移控件
|
||||
map.addControl(control);
|
||||
</script>
|
||||
<?php else: ?>
|
||||
<p>Cannot find the metadata.</p>
|
||||
|
@ -487,36 +508,3 @@ var bound = {
|
|||
<!-- <script src="/js/lib/custom/models/dataservice.geodata.js"></script> -->
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->dataService)) { ?>
|
||||
<?php if($this->dataService['service_type'] == 2) { ?>
|
||||
|
||||
<?php }else if($this->dataService['service_type'] == 3) {?>
|
||||
<!-- Modal -->
|
||||
<div id="selectDataWindow" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="myModalLabel">选择数据范围</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4>按流域</h4>
|
||||
<p>
|
||||
<a href="/data/todownload/?uuid=" class="btn btn-default">黄河流域</a>
|
||||
<a href="/data/todownload/?uuid=<?= $md->uuid?>" class="btn btn-default">长江流域</a>
|
||||
<a href="" class="btn btn-default">黑河流域</a>
|
||||
<a href="" class="btn btn-default">塔里木河流域</a>
|
||||
</p>
|
||||
<hr />
|
||||
<h4>按山脉</h4>
|
||||
<p>
|
||||
<a href="" class="btn btn-default">祁连山脉</a>
|
||||
<a href="" class="btn btn-default">天山山脉</a>
|
||||
<a href="" class="btn btn-default">昆仑山脉</a>
|
||||
<a href="" class="btn btn-default">横断山山脉</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
Loading…
Reference in New Issue