Use amap's amap_idx and not amap_id when setting write bmap