Move part of calculating marker position to Model from View.