[OpenLayers-Trac] [OpenLayers] #3553: Vectorlayer, Marker-Features shifted after Layer.redraw()

OpenLayers trac-20090302 at openlayers.org
Tue Oct 18 15:34:07 EDT 2011


#3553: Vectorlayer,Marker-Features shifted after Layer.redraw()
-----------------------+----------------------------------------------------
 Reporter:  Byterider  |       Owner:              
     Type:  feature    |      Status:  new         
 Priority:  minor      |   Milestone:  2.11 Release
Component:  general    |     Version:  2.11        
 Keywords:             |       State:              
-----------------------+----------------------------------------------------
 Hi,

 since I updated to OpenLayers 2.11 I´ve this
 problem:

 I create a map with OpenStreetMap-Tiles (z/x/y).
 I add a OpenLayers.Layer.Vector to the map.
 Than I add some Marker with

 var feature = new OpenLayers.Feature.Vector(
               new OpenLayers.Geometry.Point(SetLon, SetLat),
               { id: id},
                {
                 externalGraphic: iconPfad,
                   graphicHeight: iconHeight,
                    graphicWidth: iconWidth,
                  graphicXOffset: HotspotX,
                  graphicYOffset: HotspotY,
                  graphicOpacity: 1  }   );
    layer.addFeatures([feature]);

 NOW I MOVE THE MAP WITH THE MOUSE.
 (All seems to be right, marker + map move right)

 Now I redraw the layer with
 Layer.redraw();

 The Marker are shiftet by side in the same range, as the
 mapmove was ! So I think map and layer moves different ways
 after redraw!
 When I now open a popup, it starts at the right position! (not the shifted
 position).

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3553>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list