Merged Osmands code