Move automatic marker fitting to general map JS.