[OpenLayers-Users] Tile render mechanisms in OL
maven apache
apachemaven0 at gmail.com
Tue Sep 10 23:27:33 PDT 2013
Hi:
I am interesting in OpenLayers although we do not use OL in our project
directly because we have our own library( of course there is a big gap
compared with OL).
Why we do not change to OL is that it may cost too much time to do the
re-build work.
And now the main problem of our library is the performance with more than
one layers added.
For example, I have tried to add 10 layers to an openlayers map, and when I
drag,move,or drog-drop the map, I would not feel any delay while I would
fell it is hardly to drag or move the map with the same operation in our
library.
So I think it may caused by the Tile render mechanisms, and I have tried to
dig in to the source code of OL to find something I have missed.
And I found this in the Grid.js:
initGriddedTiles: function (bounds) {
////////
for (var i = 0, ii = tileData.length; i < ii; ++i) {
tileData[i].tile.draw();
}
}
moveGriddedTiles:function(){
//
}
And it seems that when the layer is added to the map, the
`initGriddedTiles` will be called, and the tile will be render immediately
since the `....tile.draw()`.
And when the `moveTo()` of map is called, the `moveGriddedTiles` will be
called accordingly.
Then I have two question:
1 So Why the `moveGriddedTiles` method does not render the tile?
And When the map is initialized I found a TileManager instance is created
which will register some event listeners to the map.
It seem that The TileManager will be responsible for tile rendering.
2 So which is the real charger of the tile rendering, the `Layer` or the
`TileManager`?
And I will be appreciate if someone can tell me more about the tile
rendering in OL.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130911/bbccdf06/attachment-0001.html>
More information about the Users
mailing list