ajax requests, map redrawing and rails api