Makes map service check style compliant

I'm sure this method is not checkstyle compliant. First of all it is very long and I'm sure that the cyclomatic complexity also is high.