displaying xy coordinates from database

bino_oetomo bino at INDOAKSES-ONLINE.COM
Tue Jun 14 23:58:06 EDT 2005


----- Original Message -----
From: "Jessica Deegan" <jessica.deegan at STATE.MN.US>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Monday, June 13, 2005 11:33 PM
Subject: [UMN_MAPSERVER-USERS] displaying xy coordinates from database


> Greetings list,
>
> A newbie to PHP/Mapscript, I am trying to display XY coordinates from a
> selected set of points (the XY to be displayed are a different location
from
> selected point).
>
> As a test, I was successful in adding a dynamic point where a user clicks
on
> the map using the sample found at
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint , but
I'm
> at a loss to where to begin this process from a database perspective.  My
> data are stored in a PostgreSQL database.
>

I'm using MS4W with Access-database (*.mdb)
I Use OGR ODBC to access the database.

here is my layer definition
 LAYER #from MDB
  NAME lay-lokasi
  TYPE POINT
  CONNECTIONTYPE OGR
  CONNECTION "lokasi.ovf"
  DATA "ogr-lok"
  STATUS DEFAULT
  LABELITEM lbl
  CLASS
   SYMBOL 6
   SIZE 10
   COLOR 255 0 255
   LABEL
    SIZE MEDIUM
    TYPE BITMAP
    ANTIALIAS TRUE
    POSITION UC
    COLOR 0 100 255
   END
  END
 END

And here is my OVF definition :
<OGRVRTDataSource>
    <OGRVRTLayer name="ogr-lok">
        <SrcDataSource>ODBC:user/pwd at dsn</SrcDataSource>
 <SrcLayer>loktbl</SrcLayer>
 <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>WGS84</LayerSRS>
 <GeometryField encoding="PointFromColumns" x="x" y="y"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

Work like a charm

regards
-bino-



More information about the mapserver-users mailing list