Text is moving over the map

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Text is moving over the map

wonk
Hi,
please help a dummy!
Why ist the text moving over the map when zooming?

<div id="map" class="map"></div>
<div style="display:none"><p id="text" >Hallo Welt</p></div>

<script>
var layer    =  new ol.layer.Tile({
        title: 'Luftbild',
        type: 'base',
        source: new ol.source.BingMaps({
                        key: apiKey,
                        imagerySet: "Aerial"
                        }),
        });

var map = new ol.Map({
  layers: [layer],
  target: 'map',
  view: new ol.View({
                        center: [0, 0],
                        zoom: 2})
                });

var Welt = new ol.Overlay({
  positioning: 'center-center',
          position:
        ol.proj.transform([6.0362,50.8134],'EPSG:4326', 'EPSG:3857'),
  element: document.getElementById('text')
                });
map.addOverlay(Welt);
</script>
--
                               mit freundlichen GrĂ¼ssen

                                     Wolfgang Wienke
_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users