ported maputil for cloud