domoritz/leaflet-maskcanvas — pull request #4 by bozdoz (2013-04-19 15:33:38+00:00)
Title: Implicit conditional for loop

This pull request is optimal: instead of an if statement, have a regular for loop that has the condition `i < coordinates.length`. Eliminating the _drawPoints function, and adding a comment, is probably all you need for clarity-sake. Passing the coordinates[i] object once to _tilePoint(), instead of passing an array of object values simplifies the transformation from what quadtree gives you and what you need. This should perform better.