The OpenLayers function only redraws after moving the mouse

In this case, I use the Mapcontrols from OpenLayers 2.10. On the map I have a base layer that has OpenLayers.Layer.OSMand OpenLayers.Layer.Vectorwith user-defined functions. Now, when I move the map with the mouse, functions that were not previously visible will not be redrawn until the mouse button is released. I noticed the same problem in all examples OpenLayers. Can someone provide some work to change this behavior? What I want to achieve is to draw functions immediately after the function becomes visible or always attracts all functions (I work with a small number of functions, therefore the performance of managing the map is not critical).

My current idea is to handle some specific events on the map (for example, moving a mouse with a click) and drag and drop functions.

+5
source share
3 answers

Update

SVG2 2.2, v2.12 (. ). OL >= 2.12 layer ratio, . - , "" - , , , , , .

new OpenLayers.Layer.Vector("My Layer", {
    ratio: 2
});

http://lists.osgeo.org/pipermail/openlayers-dev/2011-March/007345.html:

OpenLayers.Renderer.SVG2 , . ( 2.11). , OpenLayers.Layer.Vector :

new OpenLayers.Layer.Vector("My Layer", {
    renderers: ["SVG2", "VML", "Canvas"]
});

:

OpenLayers.Layer.Vector.renderers = ["SVG2", "VML", "Canvas"];

, VML ( IE6,7,8) Canvas ( Android) Renderer.SVG .

+6

, . " " - , (.. ), . . , , , ...

, .: -)

0

- ( ) OpenLayers 2.11 . -, , OL , . -, , !

.

http://trac.osgeo.org/openlayers/wiki/Release/2.11/Notes

This view shows it in action. The best example I could find, I'm afraid: P

http://openlayers.org/dev/examples/rotate-features.html

0
source

All Articles