1
有沒有人有代碼示例如何將圖像疊加添加到Ordnance Survey OpenSpace地圖?在英國彈道勘測OpenSpace地圖上添加地圖疊加
The documentation是不完全的綜合:)
謝謝!
有沒有人有代碼示例如何將圖像疊加添加到Ordnance Survey OpenSpace地圖?在英國彈道勘測OpenSpace地圖上添加地圖疊加
The documentation是不完全的綜合:)
謝謝!
開敞空間使用openlayers,這是非常強大的,有據可查的
This may be the page you are looking for,也有樣本here。
下面的代碼從樣品那兒剽竊
<script type="text/javascript">
var map;
function init(){
map = new OpenLayers.Map('map');
var options = {numZoomLevels: 3};
var graphic = new OpenLayers.Layer.Image(
'City Lights',
'http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif',
new OpenLayers.Bounds(-180, -88.759, 180, 88.759),
new OpenLayers.Size(580, 288),
options
);
graphic.events.on({
loadstart: function() {
OpenLayers.Console.log("loadstart");
},
loadend: function() {
OpenLayers.Console.log("loadend");
}
});
var jpl_wms = new OpenLayers.Layer.WMS("NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"}, options);
map.addLayers([graphic, jpl_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
}
</script>