Detailed information can be found on the Spanish page.
Where to apply for a Schengen visa?
Representation agreement
If a State does not have its proper visa section in a country or region, the delivery of a Schengen visa can be delegated to another Schengen State member with an agreement between both countries concerned.
The agreement allows the appointed representation to represent and handle Schengen visa applications within its own competence without consulting the other represented State.