[refactor] add templates mode for map