我有一张地图,其中'EPSG:32639'投影用于基本地图,'EPSG:4326'投影用于在基本地图上显示的kml图层。它只显示我的底图,不显示任何kml图层。这有什么不对?
我的源代码是。
function initMap(){
// if this is just a coverage or a group of them, disable a few items,
// and default to jpeg format
format = 'image/png';
var bounds = new OpenLayers.Bounds(
551438.385, 3602649.973,
571430.791, 3627258.571
);
var options = {
controls: [
new OpenLayers.Control.Navigation( {mouseWheelOptions: {interval: 100}}),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.NavToolbar(),
new OpenLayers.Control.LayerSwitcher({'ascending':false}),
new OpenLayers.Control.Permalink(),
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.MousePosition(),
new OpenLayers.Control.Scale($('scale')),
new OpenLayers.Control.OverviewMap(),
new OpenLayers.Control.KeyboardDefaults(),
new OpenLayers.Control.ZoomBox({alwaysZoom:true})
],
maxExtent: bounds,
projection: 'EPSG:32639',
units: 'm',
maxResolution: 136.21203906250003,
numZoomLevels: 10,
};
map = new OpenLayers.Map('map', options);
tiled = new OpenLayers.Layer.TileCache('ESFAHANMAP',
['http://www.memap.ir/map'],'ESFAHANMAP',{'format':'image/jpeg',sphericalMercator: true, buffer: 0 });
kmlLayer = new OpenLayers.Layer.Vector('Points', 'point.kml',{
projection: new OpenLayers.Projection('EPSG:4326')
});
map.addLayers([tiled,kmlLayer]);
map.zoomToExtent(bounds);
}