[英]Openlayers - How to rotate the base64 image in openlayers map?
[英]Add image to openlayers map
这是我在openlayers地图上添加图片的代码。
var image = new OpenLayers.Layer.Image(
'Image 1',
'http://belocalat.com/wp-content/plugins/openlayers/data/baselayer-img1.png',
//new OpenLayers.Bounds(27.418100,35.771100,28.388000,36.558500),
new OpenLayers.Size(800,255),
{isBaseLayer: false}
);
map.addLayer(image);
但是,我无法在openlayers上显示图像。 谁能给我解决这个问题?
提前致谢。
我试过以下代码,它已经有效了。 从小提琴看 。 别忘了从layerswitcher中选择Image layer。
var osm = new OpenLayers.Layer.OSM();
var graphic = new OpenLayers.Layer.Image(
'Image',
'http://belocalat.com/wp-content/plugins/openlayers/data/baselayer-img1.png',
new OpenLayers.Bounds(27.418100,35.771100,28.388000,36.558500),
new OpenLayers.Size(800,255),
{numZoomLevels: 3}
);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addLayers([osm, graphic]);
map.zoomToExtent(new OpenLayers.Bounds(27.418100,35.771100,28.388000,36.558500));
我希望它可以帮助你......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.