Hi everybody,<br><br>we stuck on some problem. We tried to move a marker as shown in the example below but after several zoom-in steps the marker suddenly disappears and reassigns by zooming out.<br><br>Here the entire code. We merged the two examples marker-shadow.html and draw-feature.html to get there. Does anyone have an idea?<br>
<br>&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>  &lt;head&gt;<br>    &lt;title&gt;OpenLayers: Vector Graphics with Shadows&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;../theme/default/style.css&quot; type=&quot;text/css&quot; /&gt;<br>
    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; /&gt;<br>    &lt;style type=&quot;text/css&quot;&gt;<br>        .smallmap {<br>            width: 300px;<br>        }<br>        <br>
        .docs {<br>            padding: 0px 5px;<br>        }<br>        <br>        td {<br>            vertical-align: top;<br>        }<br>        <br>    &lt;/style&gt;<br>    &lt;script src=&quot;../lib/OpenLayers.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br>
    &lt;script type=&quot;text/javascript&quot;&gt;<br>        <br>        var SHADOW_Z_INDEX = 10;<br>        var MARKER_Z_INDEX = 11;<br>        <br>        var DIAMETER = 200;<br>        var NUMBER_OF_FEATURES = 15;<br>
          var features = [];  <br>        var map, layer;   <br>            <br>        function init() {<br>            map = new OpenLayers.Map(&quot;map&quot;);<br>            <br>            layer = new OpenLayers.Layer.Vector(<br>
                &quot;Marker Drop Shadows&quot;,<br>                {<br>                    styleMap: new OpenLayers.StyleMap({<br>                        // Set the external graphic and background graphic images.<br>                        externalGraphic: &quot;../img/marker-gold.png&quot;,<br>
                        backgroundGraphic: &quot;./marker_shadow.png&quot;,<br>                        <br>                        // Makes sure the background graphic is placed correctly relative<br>                        // to the external graphic.<br>
                        backgroundXOffset: 0,<br>                        backgroundYOffset: -7,<br>                        <br>                        // Set the z-indexes of both graphics to make sure the background<br>                        // graphics stay in the background (shadows on top of markers looks<br>
                        // odd; let&#39;s not do that).<br>                        graphicZIndex: MARKER_Z_INDEX,<br>                        backgroundGraphicZIndex: SHADOW_Z_INDEX,<br>                        <br>                        pointRadius: 10<br>
                    }),<br>                    isBaseLayer: false,<br>                    rendererOptions: {yOrdering: true}<br>                }<br>            );<br>            <br>                        var wmsLayer = new OpenLayers.Layer.WMS( &quot;OpenLayers WMS&quot;,<br>
                    &quot;<a href="http://labs.metacarta.com/wms/vmap0">http://labs.metacarta.com/wms/vmap0</a>?&quot;, {layers: &#39;basic&#39;});<br>        <br>            map.addLayers([wmsLayer,layer]);<br>            <br>
            // Add a drag feature control to move features around.<br>            var dragFeature = new OpenLayers.Control.DragFeature(layer);<br>            <br>            map.addControl(dragFeature);<br>         map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
                map.addControl(new OpenLayers.Control.MousePosition());<br>            <br>            dragFeature.activate();<br>                        <br>            map.zoomToMaxExtent();<br>            <br>            drawFeatures();<br>
        }<br>        <br>        function drawFeatures() {<br>            <br>            layer.removeFeatures(layer.features);<br>            <br>            // Create features at random around the center.<br>            var center = map.getViewPortPxFromLonLat(map.getCenter());<br>
            <br>            // Add the ordering features. These are the gold ones that all have the same z-index<br>            // and succomb to y-ordering.<br>            <br>            <br>   <br>                // Calculate a random x/y. Subtract half the diameter to make some<br>
 <br>                var pixel = new OpenLayers.Pixel(center.x, center.y);<br>                <br>                var lonLat = map.getLonLatFromViewPortPx(pixel);<br>                features.push(<br>                    new OpenLayers.Feature.Vector(<br>
                        new OpenLayers.Geometry.Point(lonLat.lon, lonLat.lat)<br>                    )<br>                );<br>            <br>            <br>            layer.addFeatures(features[0]);<br>        features[0].geometry.x = 12;<br>
        features[0].geometry.y = 7;<br>        <br>        }<br>        <br>    &lt;/script&gt;<br>  &lt;/head&gt;<br>  &lt;body onload=&quot;init()&quot;&gt;<br>        &lt;h1 id=&quot;title&quot;&gt;Marker Shadows using Background Graphics/Z-Indexes&lt;/h1&gt;<br>
<br>        &lt;div id=&quot;tags&quot;&gt;<br>        &lt;/div&gt;<br><br>        &lt;p id=&quot;shortdesc&quot;&gt;<br>           This example shows off marker shadows using background graphics and z-indexes. Move the features around to show the shadows&#39; interaction.<br>
        &lt;/p&gt;<br>        <br>        &lt;br&gt;<br><br>        &lt;table&gt;<br>            &lt;tr&gt;<br>                &lt;td&gt;<br>                    &lt;div id=&quot;map&quot; class=&quot;smallmap&quot;&gt;&lt;/div&gt;<br>
                &lt;/td&gt;<br>                &lt;td&gt;<br><br>            &lt;/tr&gt;<br>            &lt;tr&gt;<br>                &lt;td&gt;<br>                    &lt;button onclick=&quot;drawFeatures()&quot;&gt;Redraw Features&lt;/button&gt;<br>
                &lt;/td&gt;<br>            &lt;/tr&gt;<br>        &lt;/table&gt;<br>        <br>        <br>    &lt;/body&gt;<br>&lt;/html&gt;<br><br>Regards, mehmet<br>