working map api seperate controller, does not work if navigated to from a link