add js functions for working marker