When using map.get the 'iconid_on' and 'iconid_off' are switched.
'iconid_on' contains the value (imageid) from 'iconid_off' and 'iconid_off' contains the value from 'iconid_on'
In the attached screenshot the red numbers are the imageid from the images table, when retrieving the values with the zabbix API the numbers for 'iconid_on' and 'iconid_off' are switched.