JavaScript implementation of a static spatial grid index in two dimension.