Upvote:1
Rules on the residence requirements vary between the competent authorities of a given country. That being said, most require you to apply for visas from your country of legal residence. This generally prevents visitors from applying while on vacation, UNLESS you can prove to them that it is an extraordinary circumstance.
All in all, you'll likely have to apply when you get back home.