updated comments

This commit is contained in:
fkloft
2014-08-29 18:08:54 +02:00
parent 2229454f8d
commit 25741b5467

View File

@ -78,7 +78,6 @@ plugin.layerCount.pnpoly = function(latlngs, point) {
} }
plugin.layerCount.calculate = function(ev) { plugin.layerCount.calculate = function(ev) {
// TODO: find a geodesic implementation
var point = ev.latlng; var point = ev.latlng;
var fields = window.fields; var fields = window.fields;
var layersRes = layersEnl = 0; var layersRes = layersEnl = 0;
@ -86,6 +85,8 @@ plugin.layerCount.calculate = function(ev) {
for(var guid in fields) { for(var guid in fields) {
var field = fields[guid]; 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(plugin.layerCount.pnpoly(field._latlngs, point)) {
if(field.options.team == TEAM_ENL) if(field.options.team == TEAM_ENL)
layersEnl++; layersEnl++;