implementing js for post-map relationship filtering