update marker offset function