Re: [mapserver-users] display feature name beside feature

2009-09-18 Thread Michael Schulz
Hi,

you can use the labeling options mapserver offers. Labeling can be
accomplished by adding a label section to a class of a layer. You can
define the labelitem aka. a fieldname of a shape's attributes or a
database table, that mapserver takes the value from to actually label
a feature.

Read on here:
- http://mapserver.org/introduction.html#label
- http://mapserver.org/mapfile/label.html

If you want to have the labeling as a separate layer, that can be
turned on and off, you should have a look at the annotation layer
type.

Cheers, Michael

2009/9/18 sunny74 :
>
> Hi,
>
> I have  a number of features(Layers) in my map.One of the feature is a Water
> Body.
>
> How can I display the feature name beside the feature?
> Is there anything in the map file which can do this or do I have to do this
> thru' coding in js?
> I am using mapserver v 5.0.0 with openlayers.
>
> If anybody has a solution pls mention in detail.
>
> Thanks for your reply.
> --
> View this message in context: 
> http://n2.nabble.com/display-feature-name-beside-feature-tp3668538p3668538.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
~~~
Besuchen Sie uns auf der INTERGEO 2009: 22.09. - 24.09.2009 in Karlsruhe;
Halle 1, Stand 1.417
~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-akademie.de/
~~~

---
Michael Schulz
msch...@webgis.de

in medias res
Gesellschaft für Informationstechnologie mbH

+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++

Schwimmbadstraße 2
D-79100  Freiburg i. Br.

Tel:  +49 (0)761 705798-102
Tel:  +49 (0)761 705798-0
Fax: +49 (0)761 705798-09

+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++

http://www.webgis.de / http://www.zopecms.de
--
Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] display feature name beside feature

2009-09-20 Thread sunny74

Hi Michael,

Thanks for your reply.
I had gone thru' the links you have given before making this post.But I am
having the problems given in the link below:

http://n2.nabble.com/font-error-while-trying-to-show-Label-on-map-td3654455.html#a3654455
When using truetype I get the error probably bec' I am not able to specify
the fontset file.
So I need to know the following:
1) What kind of file is the fontset file?I think it is a text file
2) Where do I keep the fontset file - in the same folder as the map file or
in different folder.If different folder how do I specify the path in the map
file.
3) Where do I keep the fonts? Is it okay if I keep it in the Windows Font
Folder i.e C:/Windows/Fonts
4)How do I specify the path of the fonts in the fontset file?

Pls give ur answer so as to solve this problem.



After 

Michael Schulz wrote:
> 
> Hi,
> 
> you can use the labeling options mapserver offers. Labeling can be
> accomplished by adding a label section to a class of a layer. You can
> define the labelitem aka. a fieldname of a shape's attributes or a
> database table, that mapserver takes the value from to actually label
> a feature.
> 
> Read on here:
> - http://mapserver.org/introduction.html#label
> - http://mapserver.org/mapfile/label.html
> 
> If you want to have the labeling as a separate layer, that can be
> turned on and off, you should have a look at the annotation layer
> type.
> 
> Cheers, Michael
> 
> 2009/9/18 sunny74 :
>>
>> Hi,
>>
>> I have  a number of features(Layers) in my map.One of the feature is a
>> Water
>> Body.
>>
>> How can I display the feature name beside the feature?
>> Is there anything in the map file which can do this or do I have to do
>> this
>> thru' coding in js?
>> I am using mapserver v 5.0.0 with openlayers.
>>
>> If anybody has a solution pls mention in detail.
>>
>> Thanks for your reply.
>> --
>> View this message in context:
>> http://n2.nabble.com/display-feature-name-beside-feature-tp3668538p3668538.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
> 
> 
> 
> -- 
> ~~~
> Besuchen Sie uns auf der INTERGEO 2009: 22.09. - 24.09.2009 in Karlsruhe;
> Halle 1, Stand 1.417
> ~~~
> Aufwind durch Wissen!
> 
> Qualifizierte Open Source Schulungen bei der
> http://www.foss-akademie.de/
> ~~~
> 
> ---
> Michael Schulz
> msch...@webgis.de
> 
> in medias res
> Gesellschaft für Informationstechnologie mbH
> 
> +++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++
> 
> Schwimmbadstraße 2
> D-79100  Freiburg i. Br.
> 
> Tel:  +49 (0)761 705798-102
> Tel:  +49 (0)761 705798-0
> Fax: +49 (0)761 705798-09
> 
> +++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++
> 
> http://www.webgis.de / http://www.zopecms.de
> --
> Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
> Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/display-feature-name-beside-feature-tp3668538p3681031.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] display feature name beside feature

2009-09-20 Thread Lars Lingner
sunny74 schrieb:
> Hi Michael,
> 
> Thanks for your reply.
> I had gone thru' the links you have given before making this post.But I am
> having the problems given in the link below:
> 
> http://n2.nabble.com/font-error-while-trying-to-show-Label-on-map-td3654455.html#a3654455
> When using truetype I get the error probably bec' I am not able to specify
> the fontset file.
> So I need to know the following:
> 1) What kind of file is the fontset file?I think it is a text file

its just a textfile, yes

> 2) Where do I keep the fontset file - in the same folder as the map file or
> in different folder.If different folder how do I specify the path in the map
> file.

as you wish. You have to tell MapServer the place with the keywortd FONTSET.

> 3) Where do I keep the fonts? Is it okay if I keep it in the Windows Font
> Folder i.e C:/Windows/Fonts

yes, you can keep it there. MapServer needs read permissions to the
fonts. In the fonset file you can define the path.

> 4)How do I specify the path of the fonts in the fontset file?
> 

/path/to/fonts/font.ttf


Please have a look at

http://mapserver.org/mapfile/map.html
and
http://mapserver.org/mapfile/fontset.html


Lars


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] display feature name beside feature

2009-09-21 Thread sunny74

Hi Lars,

I have added the fontset file and also the Label and other definitions at
the appropriate places but still the Labels are not being displayed for the
layer RailwayStation.

My map file now looks like this:

# Map file created from QGIS project file D:/QGIS/newwr.qgs
# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)
MAP
  NAME newwr.map
  # Map image size
  SIZE 600 600
  UNITS dd

  EXTENT 67.440106 17.379867 78.390250 25.122977
  FONTSET 'c:/ms4w/Apache/cgi-bin/shape/fonts.txt'
  PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 192 192 192
  IMAGEQUALITY 95
  IMAGETYPE gif
  OUTPUTFORMAT
NAME gif
DRIVER 'GD/GIF'
MIMETYPE 'image/gif'
#IMAGEMODE PC256
EXTENSION 'gif'
  END
  # Legend
  LEGEND
  IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12
LABEL
  TYPE BITMAP
  SIZE MEDIUM
  COLOR 0 0 89
END
  END

  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH '/tmp/'

# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL '/tmp/'

# WMS server settings
METADATA
  'wms_title'   'newwr.map'
  'wms_onlineresource' 
'http://my.host.com/cgi-bin/mapserv?map=wms.map&;'
  'wms_srs' 'EPSG:4326'
END

#Scale range at which web interface will operate
# Template and header/footer settings
# Only the template parameter is required to display a map. See
MapServer documentation
  END

  LAYER
NAME 'STATE'
TYPE POLYGON
DATA 'C:\ms4w\Apache\cgi-bin\Shape\STATE.shp'
LABELITEM 'STATE'
CLASSITEM 'STATE'
METADATA
  'wms_title' 'STATE'
END
STATUS DEFAULT
TRANSPARENCY 100
   
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'STATE' 
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 255 255 127
   END
END
  END

  LAYER
GROUP 'basic1'
NAME 'WaterBody'
TYPE POLYGON
DATA 'C:\ms4w\Apache\cgi-bin\Shape\WaterBody.shp'
METADATA
  'wms_title' 'WaterBody'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'WaterBody' 
   MAXSCALEDENOM 200
   MINSCALEDENOM 150
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 150 123 90
   END
END
  END

  LAYER
GROUP 'basic1'
NAME 'Rail_Buffer'
TYPE POLYGON
DATA 'C:\ms4w\Apache\cgi-bin\Shape\Rail_Buffer.shp'
METADATA
  'wms_title' 'Rail_Buffer'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'Rail_Buffer'
   MAXSCALEDENOM 200
   MINSCALEDENOM 150
 
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 0 0 0
 COLOR 117 232 255
   END
END
  END

  LAYER
GROUP 'basic1'
NAME 'Roads'
TYPE LINE
DATA 'C:\ms4w\Apache\cgi-bin\Shape\Roads.shp'
METADATA
  'wms_title' 'Roads'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'Roads'
   MAXSCALEDENOM 200
   MINSCALEDENOM 150
 
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 45 220 182
 COLOR 0 0 0
   END
END
  END

  LAYER
GROUP 'basic2'
NAME 'Diversions'
TYPE LINE
DATA 'C:\ms4w\Apache\cgi-bin\Shape\Diversions.shp'
METADATA
  'wms_title' 'Diversions'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'Diversions'
   MAXSCALEDENOM 150
   MINSCALEDENOM 100
 
 
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 144 50 207
 COLOR 0 0 0
   END
END
  END

  LAYER
GROUP 'basic2'
NAME 'Rail_Side_Line'
TYPE LINE
DATA 'C:\ms4w\Apache\cgi-bin\Shape\Rail_Side_Line.shp'
METADATA
  'wms_title' 'Rail_Side_Line'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
   NAME 'Rail_Side_Line'
   MAXSCALEDENOM 150
   MINSCALEDENOM 100
 
   STYLE
 SYMBOL 0 
 SIZE 2 
 OUTLINECOLOR 170 115 90
 COLOR 0 0 0
   END
END
  END

  LAYER
GROUP 'basic'
NAME 'RailwayLine'
TYPE LINE
 

Re: [mapserver-users] display feature name beside feature

2009-09-21 Thread Steve Lime
And you can see the railway points?

>>> On 9/21/2009 at 7:34 AM, in message 
>>> <1253536453758-3684929.p...@n2.nabble.com>,
sunny74  wrote:

> Hi Lars,
> 
> I have added the fontset file and also the Label and other definitions at
> the appropriate places but still the Labels are not being displayed for the
> layer RailwayStation.
> 
> My map file now looks like this:
> 
> # Map file created from QGIS project file D:/QGIS/newwr.qgs
> # Edit this file to customize for your map interface
> # (Created with PyQgis MapServer Export plugin)
> MAP
>   NAME newwr.map
>   # Map image size
>   SIZE 600 600
>   UNITS dd
> 
>   EXTENT 67.440106 17.379867 78.390250 25.122977
>   FONTSET 'c:/ms4w/Apache/cgi-bin/shape/fonts.txt'
>   PROJECTION
> 'proj=longlat'
> 'ellps=WGS84'
> 'datum=WGS84'
> 'no_defs'
> ''
>   END
> 
>   # Background color for the map canvas -- change as desired
>   IMAGECOLOR 192 192 192
>   IMAGEQUALITY 95
>   IMAGETYPE gif
>   OUTPUTFORMAT
> NAME gif
> DRIVER 'GD/GIF'
> MIMETYPE 'image/gif'
> #IMAGEMODE PC256
> EXTENSION 'gif'
>   END
>   # Legend
>   LEGEND
>   IMAGECOLOR 255 255 255
> STATUS ON
> KEYSIZE 18 12
> LABEL
>   TYPE BITMAP
>   SIZE MEDIUM
>   COLOR 0 0 89
> END
>   END
> 
>   # Web interface definition. Only the template parameter
>   # is required to display a map. See MapServer documentation
>   WEB
> # Set IMAGEPATH to the path where MapServer should
> # write its output.
> IMAGEPATH '/tmp/'
> 
> # Set IMAGEURL to the url that points to IMAGEPATH
> # as defined in your web server configuration
> IMAGEURL '/tmp/'
> 
> # WMS server settings
> METADATA
>   'wms_title'   'newwr.map'
>   'wms_onlineresource' 
> 'http://my.host.com/cgi-bin/mapserv?map=wms.map&;'
>   'wms_srs' 'EPSG:4326'
> END
> 
> #Scale range at which web interface will operate
> # Template and header/footer settings
> # Only the template parameter is required to display a map. See
> MapServer documentation
>   END
> 
>   LAYER
> NAME 'STATE'
> TYPE POLYGON
> DATA 'C:\ms4w\Apache\cgi-bin\Shape\STATE.shp'
> LABELITEM 'STATE'
> CLASSITEM 'STATE'
> METADATA
>   'wms_title' 'STATE'
> END
> STATUS DEFAULT
> TRANSPARENCY 100
>
> PROJECTION
> 'proj=longlat'
> 'ellps=WGS84'
> 'datum=WGS84'
> 'no_defs'
> ''
> END
> CLASS
>NAME 'STATE' 
>STYLE
>  SYMBOL 0 
>  SIZE 2 
>  OUTLINECOLOR 0 0 0
>  COLOR 255 255 127
>END
> END
>   END
> 
>   LAYER
> GROUP 'basic1'
> NAME 'WaterBody'
> TYPE POLYGON
> DATA 'C:\ms4w\Apache\cgi-bin\Shape\WaterBody.shp'
> METADATA
>   'wms_title' 'WaterBody'
> END
> STATUS OFF
> TRANSPARENCY 100
> PROJECTION
> 'proj=longlat'
> 'ellps=WGS84'
> 'datum=WGS84'
> 'no_defs'
> ''
> END
> CLASS
>NAME 'WaterBody' 
>MAXSCALEDENOM 200
>MINSCALEDENOM 150
>STYLE
>  SYMBOL 0 
>  SIZE 2 
>  OUTLINECOLOR 0 0 0
>  COLOR 150 123 90
>END
> END
>   END
> 
>   LAYER
> GROUP 'basic1'
> NAME 'Rail_Buffer'
> TYPE POLYGON
> DATA 'C:\ms4w\Apache\cgi-bin\Shape\Rail_Buffer.shp'
> METADATA
>   'wms_title' 'Rail_Buffer'
> END
> STATUS OFF
> TRANSPARENCY 100
> PROJECTION
> 'proj=longlat'
> 'ellps=WGS84'
> 'datum=WGS84'
> 'no_defs'
> ''
> END
> CLASS
>NAME 'Rail_Buffer'
>MAXSCALEDENOM 200
>MINSCALEDENOM 150
>  
>STYLE
>  SYMBOL 0 
>  SIZE 2 
>  OUTLINECOLOR 0 0 0
>  COLOR 117 232 255
>END
> END
>   END
> 
>   LAYER
> GROUP 'basic1'
> NAME 'Roads'
> TYPE LINE
> DATA 'C:\ms4w\Apache\cgi-bin\Shape\Roads.shp'
> METADATA
>   'wms_title' 'Roads'
> END
> STATUS OFF
> TRANSPARENCY 100
> PROJECTION
> 'proj=longlat'
> 'ellps=WGS84'
> 'datum=WGS84'
> 'no_defs'
> ''
> END
> CLASS
>NAME 'Roads'
>MAXSCALEDENOM 200
>MINSCALEDENOM 150
>  
>STYLE
>  SYMBOL 0 
>  SIZE 2 
>  OUTLINECOLOR 45 220 182
>  COLOR 0 0 0
>END
> END
>   END
> 
>   LAYER
> GROUP 'basic2'
> NAME 'Diversions'
> TYPE LINE
> DATA 'C:\ms4w\Apache\cgi-bin\Shape\Diversions.shp'
> METADATA
>   'wms_title' 'Diversions'
> END
> STATUS OFF
> TRANSPARENCY 100
> PROJECTION
> 'proj=longlat'
> 'ellps=WGS84'
> 'datum=WGS84'
> 'no_defs'
> ''
> END
> CLASS
>NAME 'Diversions'
>MAXSCALEDENOM 150
>MINSCALEDENOM 100
>  
>  
>STYLE
>  SYMBOL 0 
>  SIZE 2 
>  OUTLINECOLOR 144 50 207
>  COLOR 0 0 0
>END
> END
>   END
> 
>   LAYER

Re: [mapserver-users] display feature name beside feature

2009-09-22 Thread sunny74

Hi Steve,

Thanks for your reply.
Regarding the railway points I was able to see the points before doing all
this.
I did all this just to see the Labels i.e names of the railway stations
beside the points
But I am not able to see this.
Can u tell me where the problem is?

What am I doing wrong?

Thanks again.

Steve Lime wrote:
> 
> And you can see the railway points?
> 
 On 9/21/2009 at 7:34 AM, in message
 <1253536453758-3684929.p...@n2.nabble.com>,
> sunny74  wrote:
> 
>> Hi Lars,
>> 
>> I have added the fontset file and also the Label and other definitions at
>> the appropriate places but still the Labels are not being displayed for
>> the
>> layer RailwayStation.
>> 
>> My map file now looks like this:
>> 
>> # Map file created from QGIS project file D:/QGIS/newwr.qgs
>> # Edit this file to customize for your map interface
>> # (Created with PyQgis MapServer Export plugin)
>> MAP
>>   NAME newwr.map
>>   # Map image size
>>   SIZE 600 600
>>   UNITS dd
>> 
>>   EXTENT 67.440106 17.379867 78.390250 25.122977
>>   FONTSET 'c:/ms4w/Apache/cgi-bin/shape/fonts.txt'
>>   PROJECTION
>> 'proj=longlat'
>> 'ellps=WGS84'
>> 'datum=WGS84'
>> 'no_defs'
>> ''
>>   END
>> 
>>   # Background color for the map canvas -- change as desired
>>   IMAGECOLOR 192 192 192
>>   IMAGEQUALITY 95
>>   IMAGETYPE gif
>>   OUTPUTFORMAT
>> NAME gif
>> DRIVER 'GD/GIF'
>> MIMETYPE 'image/gif'
>> #IMAGEMODE PC256
>> EXTENSION 'gif'
>>   END
>>   # Legend
>>   LEGEND
>>   IMAGECOLOR 255 255 255
>> STATUS ON
>> KEYSIZE 18 12
>> LABEL
>>   TYPE BITMAP
>>   SIZE MEDIUM
>>   COLOR 0 0 89
>> END
>>   END
>> 
>>   # Web interface definition. Only the template parameter
>>   # is required to display a map. See MapServer documentation
>>   WEB
>> # Set IMAGEPATH to the path where MapServer should
>> # write its output.
>> IMAGEPATH '/tmp/'
>> 
>> # Set IMAGEURL to the url that points to IMAGEPATH
>> # as defined in your web server configuration
>> IMAGEURL '/tmp/'
>> 
>> # WMS server settings
>> METADATA
>>   'wms_title'   'newwr.map'
>>   'wms_onlineresource' 
>> 'http://my.host.com/cgi-bin/mapserv?map=wms.map&;'
>>   'wms_srs' 'EPSG:4326'
>> END
>> 
>> #Scale range at which web interface will operate
>> # Template and header/footer settings
>> # Only the template parameter is required to display a map. See
>> MapServer documentation
>>   END
>> 
>>   LAYER
>> NAME 'STATE'
>> TYPE POLYGON
>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\STATE.shp'
>> LABELITEM 'STATE'
>> CLASSITEM 'STATE'
>> METADATA
>>   'wms_title' 'STATE'
>> END
>> STATUS DEFAULT
>> TRANSPARENCY 100
>>
>> PROJECTION
>> 'proj=longlat'
>> 'ellps=WGS84'
>> 'datum=WGS84'
>> 'no_defs'
>> ''
>> END
>> CLASS
>>NAME 'STATE' 
>>STYLE
>>  SYMBOL 0 
>>  SIZE 2 
>>  OUTLINECOLOR 0 0 0
>>  COLOR 255 255 127
>>END
>> END
>>   END
>> 
>>   LAYER
>> GROUP 'basic1'
>> NAME 'WaterBody'
>> TYPE POLYGON
>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\WaterBody.shp'
>> METADATA
>>   'wms_title' 'WaterBody'
>> END
>> STATUS OFF
>> TRANSPARENCY 100
>> PROJECTION
>> 'proj=longlat'
>> 'ellps=WGS84'
>> 'datum=WGS84'
>> 'no_defs'
>> ''
>> END
>> CLASS
>>NAME 'WaterBody' 
>>MAXSCALEDENOM 200
>>MINSCALEDENOM 150
>>STYLE
>>  SYMBOL 0 
>>  SIZE 2 
>>  OUTLINECOLOR 0 0 0
>>  COLOR 150 123 90
>>END
>> END
>>   END
>> 
>>   LAYER
>> GROUP 'basic1'
>> NAME 'Rail_Buffer'
>> TYPE POLYGON
>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\Rail_Buffer.shp'
>> METADATA
>>   'wms_title' 'Rail_Buffer'
>> END
>> STATUS OFF
>> TRANSPARENCY 100
>> PROJECTION
>> 'proj=longlat'
>> 'ellps=WGS84'
>> 'datum=WGS84'
>> 'no_defs'
>> ''
>> END
>> CLASS
>>NAME 'Rail_Buffer'
>>MAXSCALEDENOM 200
>>MINSCALEDENOM 150
>>  
>>STYLE
>>  SYMBOL 0 
>>  SIZE 2 
>>  OUTLINECOLOR 0 0 0
>>  COLOR 117 232 255
>>END
>> END
>>   END
>> 
>>   LAYER
>> GROUP 'basic1'
>> NAME 'Roads'
>> TYPE LINE
>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\Roads.shp'
>> METADATA
>>   'wms_title' 'Roads'
>> END
>> STATUS OFF
>> TRANSPARENCY 100
>> PROJECTION
>> 'proj=longlat'
>> 'ellps=WGS84'
>> 'datum=WGS84'
>> 'no_defs'
>> ''
>> END
>> CLASS
>>NAME 'Roads'
>>MAXSCALEDENOM 200
>>MINSCALEDENOM 150
>>  
>>STYLE
>>  SYMBOL 0 
>>  SIZE 2 
>>  OUTLINECOLOR 45 220 182
>>  COLOR 0 0 0
>>END
>> END
>>   END
>> 
>>   LAYER
>> GROUP 'basic2'
>> NAME 'Diversions'
>> 

Re: [mapserver-users] display feature name beside feature

2009-09-23 Thread Steve Lime
It's still not clear from your response if you can see the railway points now 
or not. You could
before, but now? Someone else suggested removing the CLASSITEM from the layer 
in question,
did you try that?

Steve

>>> On 9/22/2009 at 11:57 PM, in message
<1253681869217-3697539.p...@n2.nabble.com>, sunny74 
wrote:

> Hi Steve,
> 
> Thanks for your reply.
> Regarding the railway points I was able to see the points before doing all
> this.
> I did all this just to see the Labels i.e names of the railway stations
> beside the points
> But I am not able to see this.
> Can u tell me where the problem is?
> 
> What am I doing wrong?
> 
> Thanks again.
> 
> Steve Lime wrote:
>> 
>> And you can see the railway points?
>> 
> On 9/21/2009 at 7:34 AM, in message
> <1253536453758-3684929.p...@n2.nabble.com>,
>> sunny74  wrote:
>> 
>>> Hi Lars,
>>> 
>>> I have added the fontset file and also the Label and other definitions at
>>> the appropriate places but still the Labels are not being displayed for
>>> the
>>> layer RailwayStation.
>>> 
>>> My map file now looks like this:
>>> 
>>> # Map file created from QGIS project file D:/QGIS/newwr.qgs
>>> # Edit this file to customize for your map interface
>>> # (Created with PyQgis MapServer Export plugin)
>>> MAP
>>>   NAME newwr.map
>>>   # Map image size
>>>   SIZE 600 600
>>>   UNITS dd
>>> 
>>>   EXTENT 67.440106 17.379867 78.390250 25.122977
>>>   FONTSET 'c:/ms4w/Apache/cgi-bin/shape/fonts.txt'
>>>   PROJECTION
>>> 'proj=longlat'
>>> 'ellps=WGS84'
>>> 'datum=WGS84'
>>> 'no_defs'
>>> ''
>>>   END
>>> 
>>>   # Background color for the map canvas -- change as desired
>>>   IMAGECOLOR 192 192 192
>>>   IMAGEQUALITY 95
>>>   IMAGETYPE gif
>>>   OUTPUTFORMAT
>>> NAME gif
>>> DRIVER 'GD/GIF'
>>> MIMETYPE 'image/gif'
>>> #IMAGEMODE PC256
>>> EXTENSION 'gif'
>>>   END
>>>   # Legend
>>>   LEGEND
>>>   IMAGECOLOR 255 255 255
>>> STATUS ON
>>> KEYSIZE 18 12
>>> LABEL
>>>   TYPE BITMAP
>>>   SIZE MEDIUM
>>>   COLOR 0 0 89
>>> END
>>>   END
>>> 
>>>   # Web interface definition. Only the template parameter
>>>   # is required to display a map. See MapServer documentation
>>>   WEB
>>> # Set IMAGEPATH to the path where MapServer should
>>> # write its output.
>>> IMAGEPATH '/tmp/'
>>> 
>>> # Set IMAGEURL to the url that points to IMAGEPATH
>>> # as defined in your web server configuration
>>> IMAGEURL '/tmp/'
>>> 
>>> # WMS server settings
>>> METADATA
>>>   'wms_title'   'newwr.map'
>>>   'wms_onlineresource' 
>>> 'http://my.host.com/cgi-bin/mapserv?map=wms.map&;'
>>>   'wms_srs' 'EPSG:4326'
>>> END
>>> 
>>> #Scale range at which web interface will operate
>>> # Template and header/footer settings
>>> # Only the template parameter is required to display a map. See
>>> MapServer documentation
>>>   END
>>> 
>>>   LAYER
>>> NAME 'STATE'
>>> TYPE POLYGON
>>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\STATE.shp'
>>> LABELITEM 'STATE'
>>> CLASSITEM 'STATE'
>>> METADATA
>>>   'wms_title' 'STATE'
>>> END
>>> STATUS DEFAULT
>>> TRANSPARENCY 100
>>>
>>> PROJECTION
>>> 'proj=longlat'
>>> 'ellps=WGS84'
>>> 'datum=WGS84'
>>> 'no_defs'
>>> ''
>>> END
>>> CLASS
>>>NAME 'STATE' 
>>>STYLE
>>>  SYMBOL 0 
>>>  SIZE 2 
>>>  OUTLINECOLOR 0 0 0
>>>  COLOR 255 255 127
>>>END
>>> END
>>>   END
>>> 
>>>   LAYER
>>> GROUP 'basic1'
>>> NAME 'WaterBody'
>>> TYPE POLYGON
>>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\WaterBody.shp'
>>> METADATA
>>>   'wms_title' 'WaterBody'
>>> END
>>> STATUS OFF
>>> TRANSPARENCY 100
>>> PROJECTION
>>> 'proj=longlat'
>>> 'ellps=WGS84'
>>> 'datum=WGS84'
>>> 'no_defs'
>>> ''
>>> END
>>> CLASS
>>>NAME 'WaterBody' 
>>>MAXSCALEDENOM 200
>>>MINSCALEDENOM 150
>>>STYLE
>>>  SYMBOL 0 
>>>  SIZE 2 
>>>  OUTLINECOLOR 0 0 0
>>>  COLOR 150 123 90
>>>END
>>> END
>>>   END
>>> 
>>>   LAYER
>>> GROUP 'basic1'
>>> NAME 'Rail_Buffer'
>>> TYPE POLYGON
>>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\Rail_Buffer.shp'
>>> METADATA
>>>   'wms_title' 'Rail_Buffer'
>>> END
>>> STATUS OFF
>>> TRANSPARENCY 100
>>> PROJECTION
>>> 'proj=longlat'
>>> 'ellps=WGS84'
>>> 'datum=WGS84'
>>> 'no_defs'
>>> ''
>>> END
>>> CLASS
>>>NAME 'Rail_Buffer'
>>>MAXSCALEDENOM 200
>>>MINSCALEDENOM 150
>>>  
>>>STYLE
>>>  SYMBOL 0 
>>>  SIZE 2 
>>>  OUTLINECOLOR 0 0 0
>>>  COLOR 117 232 255
>>>END
>>> END
>>>   END
>>> 
>>>   LAYER
>>> GROUP 'basic1'
>>> NAME 'Roads'
>>> TYPE LINE
>>> DATA 'C:\ms4w\Apache\cgi-bin\Shape\Roads.shp'
>>> METADAT