place a point in the map
N M
mapserver at HOTMAIL.COM
Wed Jul 13 23:42:40 PDT 2005
Thanks a lot David,
Now it runs perfectly!!! I used de EXTENT coordinates that appears in
ogrinfo and thats all.
Thank you very much.
Nuri
>
>Nuri,
>
>What URL are you using to call your map? If it doesn't include
>'&layer=myvirtuallayer', you should set the LAYER STATUS to DEFAULT in the
>Map file.
>
>Also, the layer name in your map file doesn't match the one in your ogrinfo
>output (mapa21). I realize that you may have renamed the layer, but make
>sure that the names match.
>
>I also don't see a SYMBOLSET or FONTSET line in your map file to tell
>MapServer where to look for symbols or fonts.
>
>David.
>
>David Fawcett
>Minnesota Office of Environmental Assistance
>david.fawcett at moea.state.mn.us
>651.215.0200
>
>
>-----Original Message-----
>From: N M [mailto:mapserver at hotmail.com]
>Sent: Wednesday, July 13, 2005 3:58 AM
>To: David.Fawcett at state.mn.us; MAPSERVER-USERS at lists.umn.edu
>Subject: RE: [UMN_MAPSERVER-USERS] place a point in the map
>
>
>Hi David,
>
>I tested my application with an Access database.
>
>It contains a table named taula
>long lat
>15 28
>25 50
>28 75
>60 100
>
>I created a DSN link named mapa21mdb
>
>My mapa21.ovf file is:
>
><OGRVRTDataSource>
> <OGRVRTLayer name="mapa21">
> <SrcDataSource>ODBC:mapa21mdb</SrcDataSource>
> <SrcLayer>taula</SrcLayer>
> <GeometryField encoding="PointFromColumns" x="long" y="lat"/>
> <GeometryType>wkbPoint</GeometryType>
> </OGRVRTLayer>
></OGRVRTDataSource>
>
>
>
>Then I tryed connection executing: ogrinfo
>d:\webserver\mapserver2\mapa21.ovf -ro
>and result was:
>
>INFO: Open of `d:\webserver\mapserver2\mapa21.ovf'
>using driver `VRT' successful.
>1: mapa21 (Point)
>
>
>
>Later I tried: ogrinfo d:\webserver\mapserver2\mapa21.ovf mapa21 -ro
>and result was:
>
>INFO: Open of `d:\webserver\mapserver2\mapa21.ovf'
>using driver `VRT' successful.
>
>Layer name: mapa21
>Geometry: Point
>Feature Count: 4
>Extent: (15.000000, 28.000000) - (60.000000, 100.000000)
>Layer SRS WKT:
>(unknown)
>long: String (50.0)
>lat: String (50.0)
>OGRFeature(mapa21):0
> long (String) = 15
> lat (String) = 28
> POINT (15 28)
>
>OGRFeature(mapa21):1
> long (String) = 25
> lat (String) = 50
> POINT (25 50)
>
>OGRFeature(mapa21):2
> long (String) = 38
> lat (String) = 75
> POINT (38 75)
>
>OGRFeature(mapa21):3
> long (String) = 60
> lat (String) = 100
> POINT (60 100)
>
>
>
>Then I created my map:
>
>MAP
> IMAGETYPE PNG
> EXTENT 15.000000 28.000000 60.000000 100.000000
> SIZE 500 350
> #SHAPEPATH "data"
> IMAGECOLOR 255 180 0
>
> # Start of LAYER DEFINITIONS
>---------------------------------------------
>
> LAYER
> NAME "MyVirtualLayer"
> TYPE POINT
> CONNECTIONTYPE OGR
> CONNECTION "mapa21.ovf"
> DATA "taula" # the name of the OGRVrtLayer
> STATUS ON
> LABELITEM long #may need to use table.name or just name depending on
>your OVF file.
> PROJECTION
> "init=epsg:4326"
> END
>
> CLASS
> SYMBOL 1
> SIZE 6
> COLOR 255 0 0
> LABEL
> SIZE MEDIUM
> TYPE BITMAP
> COLOR 0 0 0
> END
> END
>END
>
> # End of LAYER DEFINITIONS -------------------------------
>END # end of map file
>
>
>The only thing that appears in the screen is a yellow rectangle, nothing
>else. Could be the wrong extent values?
>
>I thank you for your help.
>
>Nuri
>
>_________________________________________________________________
>Moda para esta temporada. Ponte al día de todas las tendencias.
>http://www.msn.es/Mujer/moda/default.asp
>
_________________________________________________________________
Horóscopo, tarot, numerología... Escucha lo que te dicen los astros.
http://astrocentro.msn.es/
More information about the MapServer-users
mailing list