Grid Strategy - feedback and few questions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Grid Strategy - feedback and few questions

Ivan Grcic
Hi all,

well i guess this primarly goes to Eric but anyone can jump in :)

Ive just tried gridStrategy from vector-behavior
http://dev.openlayers.org/sandbox/vector-behavior/ and im pretty happy
how it works.
So i just want to drop few lines while impressions are still fresh. i
know its still in develop. so maybe thats the answear to some of my
questions ;)

First improvment one can see beetwen strategies Grid & BBOX is the
similar one to WMS & WMS.Untiled. When you drag the map, features dont
dissapear but only new ones load. Very very nice!

But when you observe XHR traffic, there are much more requests, cuz it
splits big request to 256x256 tiled requests. First thing i did is to
set option tileSize: new OpenLayers.Size(512,512) and I got satisfing
number of 4-8 request per map move. As i used only points features i
put options safe: false.

1)First question, setting tile size different then map is perfectly
ok, right? Doesnt affect anythign else then Grid strategy?

Few words about buffer option:
Setting buffer to lets say 2, i could see that there are much more
requests, and inside strategy-grid-grid object i can see that there
are many more objects (tiles).
But when i move my map just for 20px, new requests are being issued

2) Shouldnt I have at least 512px (tile size) before new requests are made?

And one more question, featuresadded event is triggered for every tile
loaded, thus it makes it little bit harder to see when all the
features are loaded. What would be the right way to do it?

I just saw that inside Grid.js
/* FIXME addTileMonitoringHooks: function(tile) {

that should answear my question. Any tickets for that issue maybe?

That would be all from me, for now :)
Thank you

PS
http://dev.openlayers.org/sandbox/vector-behavior/examples/strategy-grid.html
gives error:
this.format is null
[Break on this error] return this.format.read(doc);

...and i also have one bug, but ill just write it aside, and ask it
later to keep email smaller :)

Cheers


--
Ivan Grcic
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Grid Strategy - feedback and few questions

Ivan Grcic
Eric, i guess that you need to include this to grid strategy also:

http://trac.openlayers.org/ticket/1840

Cheers,

On Mon, Feb 23, 2009 at 12:14 PM, Ivan Grcic <[hidden email]> wrote:

> Hi all,
>
> well i guess this primarly goes to Eric but anyone can jump in :)
>
> Ive just tried gridStrategy from vector-behavior
> http://dev.openlayers.org/sandbox/vector-behavior/ and im pretty happy
> how it works.
> So i just want to drop few lines while impressions are still fresh. i
> know its still in develop. so maybe thats the answear to some of my
> questions ;)
>
> First improvment one can see beetwen strategies Grid & BBOX is the
> similar one to WMS & WMS.Untiled. When you drag the map, features dont
> dissapear but only new ones load. Very very nice!
>
> But when you observe XHR traffic, there are much more requests, cuz it
> splits big request to 256x256 tiled requests. First thing i did is to
> set option tileSize: new OpenLayers.Size(512,512) and I got satisfing
> number of 4-8 request per map move. As i used only points features i
> put options safe: false.
>
> 1)First question, setting tile size different then map is perfectly
> ok, right? Doesnt affect anythign else then Grid strategy?
>
> Few words about buffer option:
> Setting buffer to lets say 2, i could see that there are much more
> requests, and inside strategy-grid-grid object i can see that there
> are many more objects (tiles).
> But when i move my map just for 20px, new requests are being issued
>
> 2) Shouldnt I have at least 512px (tile size) before new requests are made?
>
> And one more question, featuresadded event is triggered for every tile
> loaded, thus it makes it little bit harder to see when all the
> features are loaded. What would be the right way to do it?
>
> I just saw that inside Grid.js
> /* FIXME addTileMonitoringHooks: function(tile) {
>
> that should answear my question. Any tickets for that issue maybe?
>
> That would be all from me, for now :)
> Thank you
>
> PS
> http://dev.openlayers.org/sandbox/vector-behavior/examples/strategy-grid.html
> gives error:
> this.format is null
> [Break on this error] return this.format.read(doc);
>
> ...and i also have one bug, but ill just write it aside, and ask it
> later to keep email smaller :)
>
> Cheers
>
>
> --
> Ivan Grcic
>



--
Ivan Grcic
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Grid Strategy - feedback and few questions

Eric Lemoine
In reply to this post by Ivan Grcic
On Mon, Feb 23, 2009 at 12:14 PM, Ivan Grcic <[hidden email]> wrote:

> Hi all,
>
> well i guess this primarly goes to Eric but anyone can jump in :)
>
> Ive just tried gridStrategy from vector-behavior
> http://dev.openlayers.org/sandbox/vector-behavior/ and im pretty happy
> how it works.
> So i just want to drop few lines while impressions are still fresh. i
> know its still in develop. so maybe thats the answear to some of my
> questions ;)
>
> First improvment one can see beetwen strategies Grid & BBOX is the
> similar one to WMS & WMS.Untiled. When you drag the map, features dont
> dissapear but only new ones load. Very very nice!

You got the concept ;-)


> But when you observe XHR traffic, there are much more requests, cuz it
> splits big request to 256x256 tiled requests. First thing i did is to
> set option tileSize: new OpenLayers.Size(512,512) and I got satisfing
> number of 4-8 request per map move. As i used only points features i
> put options safe: false.

We could make 512x512 if you think that makes more sense.

> 1)First question, setting tile size different then map is perfectly
> ok, right? Doesnt affect anythign else then Grid strategy?

It affects the grid strategy only.


> Few words about buffer option:
> Setting buffer to lets say 2, i could see that there are much more
> requests, and inside strategy-grid-grid object i can see that there
> are many more objects (tiles).
> But when i move my map just for 20px, new requests are being issued
>
> 2) Shouldnt I have at least 512px (tile size) before new requests are made?

This would indeed be expected. There's probably a bug somewhere.


> And one more question, featuresadded event is triggered for every tile
> loaded, thus it makes it little bit harder to see when all the
> features are loaded. What would be the right way to do it?

The loadend event type that you mention in your other email.

>
> I just saw that inside Grid.js
> /* FIXME addTileMonitoringHooks: function(tile) {
>
> that should answear my question. Any tickets for that issue maybe?

The grid strategy not being in trunk it isn't appropriate to create
tickets for it. If you want to work on the grid strategy, feel free to
check out the vector-behavior sandbox and commit changes on the grid
strategy code. It may be worth sync'ing the sandbox with the trunk
before anything.

If you're interested in having this strategy in trunk here's a (non
exhaustive) list of things that need be done:

- move the tileClass in a separate file, OpenLayers/Tile/Vector.js,
and rename the class OpenLayers.Tile.Vector
- change the OpenLayers.Tile.Vector:createFilter method so that it
passes an OpenLayers.Bounds instance instead of an
OpenLayers.Geometry.Rectangle as the BBOX filter value
- review the OpenLayers.Grid class, taking the FIXMEs into account
- make the OpenLayers.Layer.Grid class rely on the OpenLayers.Grid (so
that both OpenLayers.Layer.Grid and OpenLayers.Strategy.Grid use a
OpenLayers.Grid instance internally)
- review the OpenLayers.Strategy.Grid class, and make it support
reprojection (see the Fixed and BBOX strategy), make it trigger
"loadstart" and "loadend"
- add unit tests

I'd be very happy to do reviews and help move the grid strategy into
trunk if you and possibly other people are ok to help out.

Thanks,
--
Eric
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev