Generating a map with mapfile context document

Pagurek,Debbie [NCR] Debbie.Pagurek at EC.GC.CA
Thu Jul 20 07:08:02 PDT 2006


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%20ser
ver
 
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/tes
tmap.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.
<http://us.rd.yahoo.com/evt=40762/*http://www.yahoo.com/preview>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060720/ea46350f/attachment.htm>


More information about the MapServer-users mailing list