python "F:\Apache Software Foundation\Apache2.2\cgi-bin\tilecache_seed.py" road 0 6 //切geoserver发布到图
python "F:\Apache Software Foundation\Apache2.2\cgi-bin\tilecache_seed.py" Mapserver 0 6 //切 mapserver发布到图
【注意】scale = resolution * 72 * 39.3701(1米=39.3701英寸,1英寸=72像素)
<script type="text/javascript">
<!--
var map, layer;
function init(){
var options = {
controls: [],
maxExtent: new OpenLayers.Bounds(589434.8564686741, 4914006.337837095,609527.2102150217, 4928063.398014731),
maxResolution: 78.4857568216703,
projection: "EPSG:26713",
units: 'm'
};
map = new OpenLayers.Map('map', options);
// 有可能读取到404瓦片(/4/2/-1), 出现异常图片区域
OpenLayers.Util.onImageLoadError = function() { this.style.display = "none"; };
// map = new OpenLayers.Map( $('map'), {'maxResolution': 360/512});
layer = new OpenLayers.Layer.WMS( "VMap0", "
http://localhost:80/cgi-bin/tilecache.cgi?", {layers: 'road', format: 'image/png' } );
map.addLayer(layer);
map.addControl(new OpenLayers.Control.PanZoomBar({
position: new OpenLayers.Pixel(2, 15)
}));
map.addControl(new OpenLayers.Control.Navigation());
//map.addControl(new OpenLayers.Control.Permalink());
// if (!map.getCenter()) map.zoomToMaxExtent();
map.zoomToExtent(new OpenLayers.Bounds(589434.8564686741, 4914006.337837095,609527.2102150217, 4928063.398014731));
}
// -->
</script>