If you have 'maggots' in your compost heap, you might check closely to see if they are actually the larva of Black Soldier fly. These are a really good source of calcium for your chameleon. Black Soldier flies are notorious for laying their eggs around compost piles. You can even make homemade compost buckets to attract them. I have one hanging in my back yard and it is quite productive. Search for pictures of Black Soldier fly larva or 'Phoenix worms'. They look different than your average fly maggot and are easy to identify.