[mapserver-dev] Map server

Phalguni Pal phalguni.pal at gmail.com
Mon Feb 23 11:27:41 EST 2009


Hi
I am trying to display few points on the browser using Mapserver. I have
created MySQL database and created connection with mapserver by the help of
.ovf xml file.
-------------------------------------------------

<OGRVRTDataSource>

    <OGRVRTLayer name="nsdb">

             <SrcDataSource>MYSQL:dispro,user=uuuuuu,password=pppp,host=192.170.1.100,port=3306,tables=STATION</SrcDataSource>


        <SrcSQL>SELECT absnum, stlat, stlon, stflag FROM STATION</SrcSQL>

        <GeometryType>wkbPoint</GeometryType>

        <GeometryField encoding="PointFromColumns" x="stlon" y="stlat"/>

    </OGRVRTLayer>

</OGRVRTDataSource>
--------------------------------------------------




When I run the command :
ogrinfo  /mnt/fritjof/wms/nsdb/con.ovf

ogrinfo returns :

ERROR 4: Update access not supported for VRT datasources.

Had to open data source read-only.

INFO: Open of `/mnt/fritjof/wms/nsdb/con.ovf'

      using driver `VRT' successful.
1: nsdb (Point)
.....................................................................................................................................

I have a map file con.map as follows:
-------------------------------------------------------------
MAP
  NAME "MYSQL-TEST"
  EXTENT  -180 -90 180 90
  UNITS dd
  CONFIG "CPL_DEBUG" "ON"

  PROJECTION
  "init=epsg:4326"
  END

  SHAPEPATH "/mnt/fritjof/wms/nsdb"

  LAYER
    DEBUG ON
    METADATA
      "wms_title" "nsdb"
      "wms_srs" "EPSG:4326"
      "wms_extent" "-57.768 64.1842 -51.6283 64.3645"
    END
    NAME "stations"
    STATUS DEFAULT
    TYPE POINT
    CONNECTIONTYPE OGR
    CONNECTION "con.ovf"
    DATA "nsdb"
    PROJECTION
      "init=epsg:4326"
    END
    EXTENT -57.768 64.1842 -51.6283 64.3645
    CLASS
      NAME "MyClass"
      STYLE
        SYMBOL 1
        SIZE 15
        COLOR 255 0 0
          END
    END
 END

END
........................................
And I have another html form:

========================================================

MAPFILE
REQUEST
SERVICE
VERSION
LAYERS
STYLES
SRS
BBOX
WIDTH
HEIGHT
FORMAT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20090223/31be93fe/attachment.html


More information about the mapserver-dev mailing list