[OpenLayers-Users] showing image on map
Wolfgang Wienke
wo_wienke at gmx.net
Tue Jun 23 11:46:56 PDT 2015
Hi,
I want to place an image above of a Bing-map. The map is ok, but no
image. It must be something wrong with the projections, which I not
really do understand.
<script>
var apiKey =
"AgBbMqJKmhNhpAAHQBpa4OkUPiq-ipzDOcCG7mDGTm2ORrIFM52j1qdIdixf7SF-"; <!--
key für AhE-->
var extent = [0, 0, 436, 600];
var projection = new ol.proj.Projection({ code: 'EPSG:3857', units:
'pixels', extent: extent });
var bild = new ol.layer.Image({
source: new ol.source.ImageStatic({
url: '../windflaechen/300m.png',
projection: projection,
imageSize: [436, 600],
imageExtent: extent
})
});
var satmap = new ol.layer.Tile({
source: new ol.source.BingMaps({
key: apiKey,
imagerySet: "Aerial"
}),
});
map = new ol.Map({
target: 'map',
layers: [satmap, bild],
view: new ol.View({ center: ol.proj.transform([200, 300],
projection, 'EPSG:3857'), zoom: 2 }),
});
</script>
--
mit freundlichen Grüssen
Wolfgang Wienke
More information about the Users
mailing list