调整土地利用图展示

This commit is contained in:
wlx 2015-01-30 02:18:18 +00:00
parent 119978c5a0
commit f7114a3358
5 changed files with 55 additions and 54 deletions

View File

@ -2316,5 +2316,14 @@ order by m.title";
view::addPaginator($visual->getVisualMetadata(),$this,10);
return true;
}
public function landuseAction()
{
$ac = $this->_request->getParam('ac');
if (!empty($ac) && ($ac=='compare'))
{
$this->_helper->viewRenderer('landuse-compare');
}
}
}

View File

@ -1,10 +0,0 @@
<?php
class MapController extends Zend_Controller_Action {
function indexAction () {
}
function syncAction () {
}
}

View File

@ -1,16 +1,13 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('在线地图 sync');
$this->headTitle('土地利用图');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/map">关于本站</a>');
$this->breadcrumb('在线地图 sync');
$this->breadcrumb()->setSeparator(' > ');
$this->headLink()->appendStylesheet('/css/map.css');
$this->headScript()->appendFile('/js/lib/openlayers/ol.js');
$this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
$this->nav[] = array('link'=>"/data/landuse",'title'=>'三江源多期土地利用图');
?>
<?= $this->render('breadcrumbs.phtml') ?>
<div class="container">
<div class="row mapsync">
<div class="span6">
@ -96,7 +93,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2012年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
@ -107,7 +104,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2011年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2011/{z}/{x}/{y}.png'
@ -117,7 +114,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2010年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2010/{z}/{x}/{y}.png'
@ -127,7 +124,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2009年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2009/{z}/{x}/{y}.png'
@ -137,7 +134,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2008年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2008/{z}/{x}/{y}.png'
@ -147,7 +144,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2007年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2007/{z}/{x}/{y}.png'
@ -157,7 +154,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2006年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2006/{z}/{x}/{y}.png'
@ -165,7 +162,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
}),
new ol.layer.Tile({
title: '2005年',
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2005/{z}/{x}/{y}.png'
@ -179,8 +176,12 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
view: new ol.View({
center: ol.proj.transform([97.3, 33.4], 'EPSG:4326', 'EPSG:3857'),
zoom: 11
})
zoom: 9
}),
controls: ol.control.defaults().extend([
new ol.control.Zoom()
])
})
@ -242,7 +243,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2012年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
@ -253,7 +254,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2011年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2011/{z}/{x}/{y}.png'
@ -263,7 +264,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2010年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2010/{z}/{x}/{y}.png'
@ -273,7 +274,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2009年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2009/{z}/{x}/{y}.png'
@ -283,7 +284,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2008年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2008/{z}/{x}/{y}.png'
@ -293,7 +294,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2007年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2007/{z}/{x}/{y}.png'
@ -302,8 +303,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2006年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2006/{z}/{x}/{y}.png'
@ -311,7 +311,8 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
}),
new ol.layer.Tile({
title: '2005年',
opacity: 0.4,
visible: false,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2005/{z}/{x}/{y}.png'
@ -325,10 +326,12 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
view: new ol.View({
center: ol.proj.transform([97.3, 33.4], 'EPSG:4326', 'EPSG:3857'),
zoom: 11
zoom: 9
})
})
mapR.bindTo('view', mapL);
$(document).ready(function () {
var layerSwitcher = new ol.control.LayerSwitcher({
@ -340,7 +343,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
mapL.addControl(layerSwitcher);
mapR.addControl(layerSwitcherR);
mapL.getView().bindTo('center', mapR.getView());
//mapL.getView().bindTo('center', mapR.getView());
});
</script>

View File

@ -1,17 +1,16 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('在线地图');
$this->headTitle('土地利用图');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('在线地图');
$this->breadcrumb()->setSeparator(' > ');
$this->headLink()->appendStylesheet('/js/lib/openlayers/ol.css');
$this->headLink()->appendStylesheet('/css/map.css');
$this->headScript()->appendFile('/js/lib/openlayers/ol.js');
$this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
$this->nav[] = array('link'=>"/data/landuse",'title'=>'三江源土地利用地图');
?>
<?= $this->render('breadcrumbs.phtml') ?>
<div class="row">
<div class="span12">
<div id="map" class="map"></div>
</div>
@ -28,6 +27,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
var resolutions = new Array(19);
var matrixIds = new Array(19);
var mapExtentQH = [89.3, 31.8, 102.3, 36.3];
var myextent=ol.extent.applyTransform(mapExtentQH, ol.proj.getTransform("EPSG:4326", "EPSG:3857"));
var res = 156543.03392804096153584694438047;
for (var z = 1; z <= 19; z++) {
@ -134,7 +134,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2012年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
@ -145,7 +145,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2011年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2011/{z}/{x}/{y}.png'
@ -155,7 +155,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2010年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2010/{z}/{x}/{y}.png'
@ -165,7 +165,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2009年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2009/{z}/{x}/{y}.png'
@ -175,7 +175,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2008年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2008/{z}/{x}/{y}.png'
@ -185,7 +185,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2007年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2007/{z}/{x}/{y}.png'
@ -194,8 +194,7 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
new ol.layer.Tile({
title: '2006年',
visible: false,
opacity: 0.4,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2006/{z}/{x}/{y}.png'
@ -203,7 +202,8 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
}),
new ol.layer.Tile({
title: '2005年',
opacity: 0.4,
visible: false,
opacity: 0.6,
source: new ol.source.XYZ({
extent: mapExtentQH,
url: 'http://qherc.sanjiangyuan.org.cn/tile/landuse2005/{z}/{x}/{y}.png'
@ -216,8 +216,8 @@ $this->headScript()->appendFile('/js/lib/openlayers/ol-layerswitcher.js');
target: 'map',
view: new ol.View({
center: ol.proj.transform([97.3, 33.4], 'EPSG:4326', 'EPSG:3857'),
zoom: 11
center: ol.proj.transform([95.7, 33.4], 'EPSG:4326', 'EPSG:3857'),
zoom: 7
}),
controls: ol.control.defaults().extend([

View File

@ -10,7 +10,6 @@ $this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
#data_canvas .well {background:#FFF;}
</style>
<div class="row-fluid">
<?= $this->render('breadcrumbs.phtml'); ?>
<?= $this->partial('data/tools.phtml'); ?>
<div class="row-fluid">
<form class="form-search pull-right">