A spatial hashmap implementation in javascript