Fixed maxPoint use in kmlocal constructor. Now it's no more hardcoded to 5000 points