From 25741b5467051daece36e50bef85dc059fa9c4d7 Mon Sep 17 00:00:00 2001 From: fkloft Date: Fri, 29 Aug 2014 18:08:54 +0200 Subject: [PATCH] updated comments --- plugins/layer-count.user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/layer-count.user.js b/plugins/layer-count.user.js index c5bccc21..72538947 100644 --- a/plugins/layer-count.user.js +++ b/plugins/layer-count.user.js @@ -78,7 +78,6 @@ plugin.layerCount.pnpoly = function(latlngs, point) { } plugin.layerCount.calculate = function(ev) { - // TODO: find a geodesic implementation var point = ev.latlng; var fields = window.fields; var layersRes = layersEnl = 0; @@ -86,6 +85,8 @@ plugin.layerCount.calculate = function(ev) { for(var guid in fields) { var field = fields[guid]; + // we don't need to check the field's bounds first. pnpoly is pretty simple math. the bounds is about 50 times + // slower than just using pnpoly if(plugin.layerCount.pnpoly(field._latlngs, point)) { if(field.options.team == TEAM_ENL) layersEnl++;