moved marker update and map center inside distance check