public byte[] handleMapRequest(Properties requestProperties) throws IOException, MapRequestFormatException {
  Proj projection=ImageServerUtils.createOMProjection(requestProperties,defaultProjection);
  Paint bgPaint=ImageServerUtils.getBackground(requestProperties,getBackground());
  boolean formatFound=false;
  String format=requestProperties.getProperty(FORMAT);
  if (format != null) {
    formatFound=setFormatter(format.toUpperCase());
    formatFound=true;
    Debug.message("imageserver","Format requested " + format);
  }
  if (Debug.debugging("imageserver")) {
    if (format == null || formatFound == false) {
      Debug.output("MRH: no formatter defined, using default");
    }
    Debug.output("Creating image with projection: " + projection);
  }
  byte[] image;
  String strLayers=requestProperties.getProperty(LAYERS);
  if (strLayers != null) {
    Vector<String> layers=PropUtils.parseMarkers(strLayers,",");
    if (Debug.debugging("imageserver")) {
      Debug.output("MRH.handleMapRequest: requested layers >> " + layers);
    }
    image=createImage(projection,-1,-1,layers,bgPaint);
  }
 else {
    if (getUseVisibility()) {
      if (Debug.debugging("imageserver")) {
        Debug.output("MRH.handleMapRequest: Using visibility to determine layers");
      }
      image=createImage(projection,-1,-1,calculateVisibleLayerMask(),bgPaint);
    }
 else {
      Vector<String> layers=PropUtils.parseMarkers(defaultLayers," ");
      if (Debug.debugging("imageserver")) {
        Debug.output("MRH.handleMapRequest: requested layers >> " + layers + " out of "+ getAllLayerNames());
      }
      image=createImage(projection,-1,-1,layers,bgPaint);
    }
  }
  return image;
}

public byte [ ] handleMapRequest ( Properties requestProperties ) throws IOException , MapRequestFormatException { Proj projection = ImageServerUtils . createOMProjection ( requestProperties , defaultProjection ) ; Paint bgPaint = ImageServerUtils . getBackground ( requestProperties , getBackground ( ) ) ; boolean formatFound = false ; String format = requestProperties . getProperty ( FORMAT ) ; if ( format != null ) { formatFound = setFormatter ( format . toUpperCase ( ) ) ; formatFound = true ; Debug . message ( "imageserver" , "Format requested " + format ) ; } if ( Debug . debugging ( "imageserver" ) ) { if ( format == null || formatFound == false ) { Debug . output ( "MRH: no formatter defined, using default" ) ; } Debug . output ( "Creating image with projection: " + projection ) ; } byte [ ] image ; String strLayers = requestProperties . getProperty ( LAYERS ) ; if ( strLayers != null ) { Vector < String > layers = PropUtils . parseMarkers ( strLayers , "," ) ; if ( Debug . debugging ( "imageserver" ) ) { Debug . output ( "MRH.handleMapRequest: requested layers >> " + layers ) ; } image = createImage ( projection , - 1 , - 1 , layers , bgPaint ) ; } else { if ( getUseVisibility ( ) ) { if ( Debug . debugging ( "imageserver" ) ) { Debug . output ( "MRH.handleMapRequest: Using visibility to determine layers" ) ; } image = createImage ( projection , - 1 , - 1 , calculateVisibleLayerMask ( ) , bgPaint ) ; } else { Vector < String > layers = PropUtils . parseMarkers ( defaultLayers , " " ) ; if ( Debug . debugging ( "imageserver" ) ) { Debug . output ( "MRH.handleMapRequest: requested layers >> " + layers + " out of " + getAllLayerNames ( ) ) ; } image = createImage ( projection , - 1 , - 1 , layers , bgPaint ) ; } } return image ; }
handle a map request , and create and image for it .
