[OpenLayers-Users] Modified Icons and Canvas drawing

Florian Schaetz Florian.Schaetz at Optitool.DE
Tue Jul 23 23:59:02 PDT 2013


Hello,

just a little(?) question before I start painting myself into a corner...

I want use OpenLayers to display a pretty huge amount of information (several thousand icons, lines, etc.). As the icons can vary greatly, using Markers seems to be a little bit inefficient, as there would be much to load and it's difficult (impossible?) to combine several icons to form a new one. So I would prefer to use a canvas to implement a Texture Atlas-like system (putting all the different icons in one big image, loading this image once and then only draw parts of that big image for each icon). This doesn't seem possible with standard markers (correct me, if I'm wrong here). So I thought about using an (HTML 5) Canvas. I see two ways here...

a) Simply add a canvas to the page, position it directly over the OpenLayers map and draw onto it.
b) Add a Vector layer to the map, give it a Canvas Renderer, grab that Canvas and draw onto it. This would have the additional advantage of being able to simple switch it of by using a LayerSwitcher and more than one layer could be made that way more easily than with using my own Canvases.

So, the big question is... Does anyone see a problem with that approach? Something I missed? A better way?

Regards,

Flo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130724/004df751/attachment.html>


More information about the Users mailing list