[OpenLayers-Dev] Game development problem - speed with lot of
objects
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Thu Jan 8 13:47:45 EST 2009
Hi,
SVG is scalable vector graphics, see:
http://nl.wikipedia.org/wiki/Scalable_Vector_Graphics
and is the default renderer for vector features in e.g. Firefox for
OpenLayers.
VML is vector markup language and is IE only:
http://en.wikipedia.org/wiki/Vector_Markup_Language
Depending on your browser requirements, I would suggest looking at the
canvas renderer (but no IE support without Google ExCanvas, see
http://excanvas.sourceforge.net/). Chris notes here
http://trac.openlayers.org/ticket/1512 that it won't do any good for IE
performancy anyway since it boils down to slow VML in the end any way.
lib\OpenLayers\Renderer\Canvas.js
and an example here:
http://www.openlayers.org/dev/examples/wfs-reprojection.html
Best regards,
Bart
Abuki wrote:
>
> rldhont wrote:
>
>> Abuki a écrit :
>>
>>> Hello,
>>> I´m not expert on OpenLayers and also English (I´m from Czech).
>>> I´m just trying to make my own browser-based game and I want to use
>>> OpenLayers for world map.
>>> Now the problem:
>>> I want to put on the base layer some object (coordinates from mysql)
>>> represented by png images (eg house) and I do it like this: make polygons
>>> (circles), make features and make featureLayer (I dont want use markers,
>>> because I would like have the clickable area not always square). Then add
>>> control onmouseclick, so i have clickable object - thats ok. But I dont
>>> know
>>> how to put there a lot of images, the only way I understand is to make
>>> image
>>> layer for every single PNG image, its ok BUT: When I put in mysql 1000
>>> objects a make this for all of them, it is slow (it takes about 10sec
>>> loading and browsing is not smooth), and i´m afraid that this is simple
>>> so
>>> what if would come something complicated...
>>> I dont uderstand mapservers and i want to find the way to not use them,
>>> because i will run the game on hosted site, so I cant install it there.
>>> Also
>>> when I try only vector or images layer alone it was slow.
>>> So could anyone help me to get it work faster? And is it possible without
>>> mapserver?
>>> Thanks
>>> Abuki
>>>
>>>
>>>
>> The problem comes form the vectorial image (SVG,VML) implementation by
>> the browsers. For example SVG with images is slower than div with
>> images. If you have more than 1000 objects marker layer is faster than
>> vector layer.
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>>
>>
>>
> Thanks for replying, but I cant still understand that. What is SVG and VML..
> And how can I do the same as I done, but faster?
>
>
--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl
More information about the Dev
mailing list