Points which lie inside the polygon (or on the edges) should be green. Points outside should be red.
This works properly in Firefox. In Chrome, there are patches of red points inside the polygon.
Fixed: Problem was caused by sortUnique() function which sorted array and removed duplicate values.