I'm also suprised that calling map.getZoom on each feature redraw
comes with a noticeable performance penalty. Might be worth doing some
testing here and comparing
var a = map.getZoom();
for (var i = 0; i < 1000; i++) {
var b = a;
}
with
for (var i = 0; i < 1000; i++) {
var b = map.getZo
Hi Ivan,
you might be right. My application "feels" faster after I tried your
approach. Actually I also discovered something I did wrong in my own
experiments.
So I thank you all.
- mika -
Ivan Grcic kirjoitti:
> Hi all,
>
> On Tue, Nov 25, 2008 at 4:50 PM, Christopher Schmidt
> <[EMAIL PROTECT
Hi all,
On Tue, Nov 25, 2008 at 4:50 PM, Christopher Schmidt
<[EMAIL PROTECTED]> wrote:
> On Tue, Nov 25, 2008 at 10:46:32AM -0500, Alexandre Dube wrote:
>> I'm glad it worked. But to my eyes there seems to be a flaw in this
>> solution : performance. In the example I gave you, there was a need
On Tue, Nov 25, 2008 at 10:46:32AM -0500, Alexandre Dube wrote:
> I'm glad it worked. But to my eyes there seems to be a flaw in this
> solution : performance. In the example I gave you, there was a need of
> calculating the radius for each features because of the cluster
> strategy. But for
I'm glad it worked. But to my eyes there seems to be a flaw in this
solution : performance. In the example I gave you, there was a need of
calculating the radius for each features because of the cluster
strategy. But for you, triggering map.getZoom() for each features that
will end up being
I can't believe my eyes!
You're absolutely right. With this, I get exactly what I wanted to get:
var shpStyle = new OpenLayers.Style({
pointRadius: "${radius}",
strokeColor: "red",
strokeWidth: 1,
strokeOpacity: 1,
fillColor: 'black',
Hi Mika,
Try to remove all listeners, you don't need them. There's no need to
force of a new style, the context should already change the radius
value before drawing each features ( didn't try, but I think it should
do it ).
Best of luck,
Alexandre
Lehtonen, Mika wrote:
> Hi Alexandre,
>
Hi Alexandre,
interesting example.
My problem is that I can't figure out how to force the wfs layer to read
the new style parameters after the user has clicked zoom button. I have
tried all sorts of, occassionaly desperate, methods for make it to do
that. Like mergeNewParams and redraw. I switch
Hi,
Take a look at this example :
http://dev.openlayers.org/sandbox/vector-behavior/examples/strategy-cluster.html
You could try to change the radius : function(feature) using
feature.layer.map.zoom
Alexandre
Lehtonen, Mika wrote:
> Hi,
>
> probably I'm asking something that's been asked for
Hi,
probably I'm asking something that's been asked for several times, but I
just couldn't find the answer.
I have a WFS layer which has points. My intention is to render those
points with a style depending on the zoom level. So more you zoom in,
bigger the points should be. I have styleMap de
10 matches
Mail list logo