# For those WMS layers that only supports geographic projection (e.g. epsg:4326)
# You can still use them by having MapServer reproject them on the fly.
# You then have the option to serve it via MapServer's WMS service or
# call it as a normal MapServer layer.
# This example cascades the OnEarth (JPL) MODIS and Landsat layers through the
# local MapServer service.

MAP
  NAME 'OnEarth'
  SIZE 800 650
  STATUS ON
  EXTENT 189783.560000 4816309.330000 761653.524114 5472346.500000
  UNITS METERS
  IMAGETYPE JPEG
  TRANSPARENT TRUE

	WEB
		INCLUDE "../temp_directory.map"
	END

  PROJECTION
    'init=epsg:26915'
  END

  #http://geoint.lmic.state.mn.us/cgi-bin/wms?LAYERS=fsa&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application/vnd.ogc.se_inimage&amp;FORMAT=image/jpeg&amp;SRS=EPSG:26915&amp;BBOX=%MINX%,%MINY%,%MAXX%,%MAXY%&amp;WIDTH=%WIDTH%&amp;HEIGHT=%HEIGHT%
  # This layer comes from LMIC and is enabled only when the map scale
  # is at or above 1:24,000
  LAYER
    #NAME         lmic_fsa
    NAME         onearth
    TYPE         RASTER
    OFFSITE      0 0 0
    STATUS       OFF
    CONNECTIONTYPE WMS
    CONNECTION "http://geoint.lmic.state.mn.us/cgi-bin/wms?"

    MINSCALE      1000 # only display down to this scale
    MAXSCALE     24000

    METADATA
      "wms_srs" "EPSG:26915"
      "wms_name" "fsa"
      "wms_server_version" "1.1.1"
      "wms_format" "image/jpeg"
      "wms_styles" ""
      "wms_exceptions" "application/vnd.ogc.se_inimage"
    END

    PROJECTION
      "init=epsg:26915"
    END

  END

  # This layer comes from Onearth (JPL) and is enabled only when the map scale
  # is between 1:24,000 and 1:1,500,000
  LAYER # MODIS WMS map from JPL
    #GROUP        onearth
    #NAME         landsat
    NAME         onearth
    TYPE         RASTER
    OFFSITE      0 0 0
    STATUS       OFF
    CONNECTIONTYPE WMS
    CONNECTION "http://onearth.jpl.nasa.gov/wms.cgi?"

    MINSCALE        24001 # only display down to this scale
    MAXSCALE      1500000

    METADATA
      "wms_srs" "EPSG:4326"
      "wms_name" "global_mosaic"
      "wms_server_version" "1.1.1"
      "wms_format" "image/jpeg"
      "wms_style" "pseudo"
    END

    PROJECTION
      "init=epsg:4326"
    END
  END # Modis WMS image ends here

  # This layer comes from Onearth (JPL) and is enabled only when the map scale
  # is between 1:1,500,000 and 1:10,000,000
  LAYER # MODIS WMS map from JPL
    #GROUP        onearth
    #NAME         modis
    NAME         onearth
    TYPE         RASTER
    OFFSITE      0 0 0
    STATUS       OFF
    CONNECTIONTYPE WMS
    CONNECTION "http://onearth.jpl.nasa.gov/wms.cgi?"

    MINSCALE      1500001 # only display down to this scale
    MAXSCALE     10000000

    METADATA
      "wms_srs" "EPSG:4326"
      "wms_name" "BMNG"
      "wms_server_version" "1.1.1"
      "wms_format" "image/jpeg"
      "wms_style" "Jun"
    END

    PROJECTION
      "init=epsg:4326"
    END
  END # Modis WMS image ends here
END