Generating a map with mapfile context document
Allan Doyle
adoyle at EOGEO.ORG
Thu Jul 20 10:29:24 PDT 2006
On Jul 20, 2006, at 10:08, Pagurek,Debbie [NCR] wrote:
> OK - I'll bite...
> you have a lot of different problems here, so I think you should do
> some reading first on the Mapserver web site.
> http://mapserver.gis.umn.edu/
> and
> http://mapserver.gis.umn.edu/docs/reference/mapfile
> double check your imagepath and imageurl.
>
> the main point here is that a CONTEXT document is part of the OGC
> protocols, so it has to point to a Web Map Service (WMS).
> Your current mapfile is not producing a WMS. You have to add some
> additional things to your mapfile to produce a WMS.
> http://mapserver.gis.umn.edu/docs/howto/wms_server/?searchterm=wms%
> 20server
MapBuilder uses WMS Context documents to configure itself to access
WMS servers. There are also some online viewers that can do so. For
instance http://viewer.digitalearth.gov/ does this. You have to first
click on the "More Controls" link. Then you will see a text box you
can enter a URL of a context document. So you have to put your
context xml on the web somewhere, then paste that URL into the box.
Of course, that's after you know the WMS the context points to is
working.
Allan
>
> get those things working first, and then try your context document
> stuff.
> another good source of information on OGC and mapserver is the OGC
> workshop:
> http://mapserver.gis.umn.edu/docs/tutorial/ms_ogc_workshop/ogc-
> workshop-link/?searchterm=ogc
>
> D. Pagurek
> From: UMN MapServer Users List [mailto:MAPSERVER-
> USERS at LISTS.UMN.EDU] On Behalf Of rock well
> Sent: Wednesday, July 19, 2006 6:10 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Generating a map with mapfile
> context document
>
> Hi all, i am trying to generate a map from mapfile context
> document. I have a mapfile with a raster layer,
>
> MAP
> NAME "wallmap"
> SIZE 600 600
> STATUS ON
> EXTENT 610537 5291088 627571 5308122
> IMAGECOLOR 255 255 255
> IMAGETYPE JPEG
> UNITS METERS
>
> WEB
> TEMPLATE "C:\Inetpub\wwwroot\index.html"
> IMAGEPATH "c:\Inetpub\wwwroot\tmp\"
> IMAGEURL "c:\Inetpub\wwwroot\tmp\"
> END
> LAYER
> NAME "raster1"
> TYPE RASTER
> PROJECTION
> "init=epsg:26914"
> END
> DATA "pathtotestfile.sid"
> OFFSITE 0 0 0
> STATUS OFF
> END
> END
>
> The mapcontext document is as follows
>
> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
> <ViewContext version="1.0.0" id="wallmap" xmlns:xsi="http://
> www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/
> 1999/xlink" xmlns="http://www.opengis.net/context"
> xsi:schemaLocation="http://www.opengis.net/context http://
> schemas.opengis.net/context/1.0.0/context.xsd">
> <General>
> <Window width="600" height="600"/>
> <!-- Bounding box corners and spatial reference system -->
> <BoundingBox SRS="EPSG:4269" minx="610537.000000"
> miny="5291088.000000" maxx="627571.000000" maxy="5308122.000000"/>
> <!-- Title of Context -->
> <Title>WMS Demo Server</Title>
> </General>
> <LayerList>
> <Layer queryable="" hidden="0">
> <Server service="WMS" version="1.1.1" title="raster1">
> <OnlineResource xlink:type="simple" xlink:href="http://localhost/
> scripts/mapserv.exe?"/>
> </Server>
> <Name>raster1</Name>
> <Title>raster1</Title>
> <Abstract>Info</Abstract>
> <SRS>EPSG:26914 </SRS>
> <FormatList>
> <Format>image/jpeg</Format>
> </FormatList>
> <StyleList>
> <Style current="1">
> <Name>0xb8d8f6</Name>
> <Title>0xb8d8f6</Title>
> <LegendURL width="16" height="16" format="image/jpeg">
> <OnlineResource xlink:type="simple" xlink:href=""/>
> </LegendURL>
> </Style>
> </StyleList>
> </Layer>
> </LayerList>
> </ViewContext>
>
> when i inlcude this context file in the browser, nothing gets
> displayed, the url is as follows
>
> http://localhost/scripts/mapserv.exe?MODE=map&MAP=c:/Inetpub/
> wwwroot/testmap.map&CONTEXT=c:/Inetpub/wwwroot/
> contextdoc.xml&LAYERS=raster1
>
> What more do i need to add, do i need to add anything else in the
> url, if anyone has generated a map with context file can you
> suggest whats missing ...
>
> Thanks for your time ...
> kris
>
> See the all-new, redesigned Yahoo.com. Check it out.
--
Allan Doyle
allan.doyle at gmail.com
http://think.random-stuff.org/
--
Allan Doyle
+1.781.433.2695
adoyle at eogeo.org
More information about the MapServer-users
mailing list