add debug option to API, integrate it into map page