kothic / kothic-js

Kothic JS — a full-featured JavaScript map rendering engine using HTML5 Canvas
http://kothic.org
BSD 2-Clause "Simplified" License
451 stars 46 forks source link

scan layers only once for features #57

Closed DerDakon closed 8 years ago

DerDakon commented 8 years ago

The layers are only scanned here and the features are collected in arrays, so it does not matter if e.g. casings are scanned before polygons. The order inside the arrays is kept stable.

I can see no visible difference with or without this patch, and from code inspection it looks like it should be equivalent. I'm just not sure why it wasn't done this way already, maybe it was just an oversight in cdb1121f.