Being a strict follower of Islam, Dubai sticks to its rules and regulations stringently. So, if you are caught taking photos of military sites or in mapping activities such as creating a map of some place, you are likely to get arrested. Also, refrain from taking photographs of Muslim women as it is considered extremely rude in Muslim religion and culture.
Errr, anywhere in the world if someone is caught near a military site taking pictures and/or drawing maps would be seen as suspicious. It has nothing to do with religion.
In Dubai, it is extremely rule and can be an offense taking pictures of women and/or children regardless of nationality, but more so for Muslim women.
You are right by saying "Errr, anywhere in the world if someone is caught near a military site taking pictures and/or drawing maps would be seen as suspicious. It has nothing to do with religion." I am too careless.