public static GetMapRequest autoSetMissingProperties(GetMapRequest getMap) {
    // set the defaults
    if (getMap.getFormat() == null) {
      getMap.setFormat(FORMAT);
    }

    if ((getMap.getStyles() == null) || getMap.getStyles().isEmpty()) {
      // set styles to be the defaults for the specified layers
      // TODO: should this be part of core WMS logic? is so lets throw
      // this
      // into the GetMapKvpRequestReader
      if ((getMap.getLayers() != null) && (getMap.getLayers().size() > 0)) {
        ArrayList<Style> styles = new ArrayList<Style>(getMap.getLayers().size());

        for (int i = 0; i < getMap.getLayers().size(); i++) {
          styles.add(getMap.getLayers().get(i).getDefaultStyle());
        }

        getMap.setStyles(styles);
      } else {
        getMap.setStyles(STYLES);
      }
    }

    // auto-magic missing info configuration
    autoSetBoundsAndSize(getMap);

    return getMap;
  }