我正在加载具有高分辨率的Openlayers(JavaScript)中的地图。 (9149 by 7700)
当我加载页面时,它显示为空白(所有控件/地图/所有内容都缺失),直到我放大。我很好奇是什么原因造成的,以及我如何能够解决这个问题。 我已经粘贴了下面的一些代码,希望能够解决这个问题(或者我缺少的东西)。
function initMap() {
OpenLayers.ImgPath = "Openlayers/img/";
map = new OpenLayers.Map('map', options);
var osm = new OpenLayers.Layer.OSM();
var graphic = new OpenLayers.Layer.Image('Foo', 'images/LargeMap.jpg',
new OpenLayers.Bounds(2616634.1736111115, 179682.0532407412, 2625783.173611111,187382.0532407412),
new OpenLayers.Size(9149,7700), { isBaseLayer: true });
和
var options = {
zoom: 5,
theme: null,
projection: PASouthPlane,
displayProjection: PASouthPlane,
units: "ft",
resolutions: [19.1088,9.5544,4.7772,2.3886, 1.19432, 0.5971, 0.29855, 0.149275],
scales:[54168,27084,13542,6771,3385.5, 1692.75, 846.375, 423.1875],
//resolutions: [4.7772,2.3886, 1.19432, 0.5971, 0.29855, 0.149275],
//scales:[13542,6771,3385.5, 1692.75, 846.375, 423.1875],
//maxExtent: new OpenLayers.Bounds(-8.39794e+006, 4.83761e+006, -8.394873e+006, 4.840365e+006) //-8.39802e+006, 4.83753e+006, -8.39479e+006, 4.84045e+006
maxExtent: new OpenLayers.Bounds(2616634.1736111115, 179682.0532407412, 2625783.173611111,187382.0532407412)
};
-
Proj4js.defs["EPSG:2272"] = "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs";
var PASouthPlane = new OpenLayers.Projection("EPSG:2272");