Please help: "map context is not enabled"

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Mon Nov 29 01:42:50 EST 2004


This is the MAPSERVER-DEV list. This list is intended for discussions on
mapserver development issues between the developers of the software.
Your questions should go to the MAPSERVER-USERS list.

Daniel


Xiongjiu Liao wrote:
>  Hello, everyone:
>    I am working on a project with Mapserver, but I meet some problems with
>  it,
>  would you please give some ideals? Really appreciate it.
>
>  ###########################
>  a)  here is the error message:
>
>  Warning: [MapServer Error]: msSaveMapContext(): Not implemented since Map
>  Context is not enabled. in /www/htdocs/context_script.php on line 4
>
>  Warning: Failed saving map context from gmap_wms_context_output.xml in
>  /www/htdocs/context_script.php on line 4
>
>
>  #################
>    b) here is the php program I want to test:
>      <?php
>        dl("php_mapscript.so");
>        $oMap = ms_newMapObj("/www/htdocs/tutorial/context_test1.map");
>        $oMap->saveMapContext("gmap_wms_context_output.xml");
>      ?>
>
>
>  ##############
>    c) here is my Mapserver configure output:
>   ./mapserv40 -v
>  MapServer version 4.2.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
>  SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
>  SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL
>  INPUT=SHAPEFILE
>
>
>
>  #############################
>  d) here is my mapfile:
>
>    Map
>    NAME EX3.1_
>    status on
>    PROJECTION
>       "init=epsg:2163"
>    END
>
>  web
>    IMAGEPATH '/www/htdocs/tutorial/data/tmp/'
>    IMAGEURL '/tutorial/data/tmp/'
>    METADATA
>        "WMS_TITLE" "UMN MapServer Upper Great Lakes Application"
>        "WMS_ONLINERESOURCE"
>  "http://localhost/cgi-bin/mapserv40?map=context_test1.map&"
>        "WMS_SRS"  "EPSG:2163 EPSG:4326 EPSG:26915 EPSG:26916"
>    END
>  end
>
>     LAYER
>       NAME         states
>       DATA         states_ugl
>       STATUS       DEFAULT
>       TYPE         POLYGON
>       METADATA
>         "wms_title" "Elevation/Bathymetry"
>         "wms_srs"   "EPSG:42304 EPSG:4269 EPSG:4326"
>       END
>       #CONNECTIONTYPE WMS
>       #CONNECTION
>  "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?#VERSION=1.1.0&LAYERS=bathymet
>  ry&FORMAT=image/png"
>      # PROJECTION
>       #  "init=epsg:42304"
>       #END
>      END
>
>  end
>
>  ##############################
>
>
>    Thank you very much!
>



More information about the mapserver-dev mailing list