Mark, I think that you are close. You can likely simplify your layer a little by dropping out the properties that have a default, e.g. angle, position, etc. You also might want to comment out the FORCE and PARTIALS until you see that you are drawing labels.
You should also be able to put the combine the two classes and have your label and symbol in the same class. Classes are about 'classifying' your data. In some cases you have multiple classes, one for each data range. E.g. where a column value is less than 10, one where it is more than 10 and less than 100, and one where it is greater than 100. Each class would likely have a different symbolization then. At a minimum, you need one class. This is what you need. David. From: Mark Mirrlees [mailto:[email protected]] Sent: Monday, March 18, 2013 3:21 PM To: Fawcett, David (MNIT); [email protected] Subject: RE: [mapserver-users] label issues... Ok so if I understand this is what it should look like? (stuff thats been added is in red) Please correct this if i'm wrong as I am still having a bit of problems... LAYER NAME 'mjcities' TYPE POINT DUMP false EXTENT -143.210462 39.001401 -50.461045 85.911094 DATA '../data/mjcities.shp' METADATA 'ows_title' 'mjcities' END STATUS default MAXSCALE 1000000 TRANSPARENCY 100 CLASS LABEL COLOR 255 255 255 FONT "arial" TYPE "truetype" SIZE 10 ANGLE 0 POSITION cc FORCE false ANTIALIAS false PARTIALS false END PROJECTION 'proj=longlat' 'datum=WGS84' 'no_defs' END CLASS NAME 'mjcities' STYLE SYMBOL "circle" SIZE 15.0 OUTLINECOLOR 0 0 0 COLOR 182 109 194 END ________________________________ From: [email protected]<mailto:[email protected]> To: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]> Subject: RE: [mapserver-users] label issues... Date: Mon, 18 Mar 2013 20:05:55 +0000 You want to create a class in your layer and place it there. http://mapserver.org/mapfile/class.html Like this: MAP LAYER CLASS LABEL END # end of label END # end of class END #end of layer END #end of map From: Mark Mirrlees [mailto:[email protected]] Sent: Monday, March 18, 2013 3:00 PM To: Fawcett, David (MNIT); [email protected]<mailto:[email protected]> Subject: RE: [mapserver-users] label issues... Ok so I want to stick this code into the .map file... where should it be placed in the section that i bolded? LABEL COLOR 255 255 255 FONT "arial" TYPE "truetype" SIZE 10 ANGLE 0 POSITION cc FORCE false ANTIALIAS false PARTIALS false END Thanks, Mark ________________________________ From: [email protected]<mailto:[email protected]> To: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]> Subject: RE: [mapserver-users] label issues... Date: Mon, 18 Mar 2013 19:51:42 +0000 Mark, You will want to add a LABEL block to your mapfile. http://mapserver.org/mapfile/label.html I would also comment out the maxscale until you get the labels working. David. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Mark Mirrlees Sent: Monday, March 18, 2013 2:48 PM To: [email protected]<mailto:[email protected]> Subject: [mapserver-users] label issues... Hi all, Ok so now I have a new problem with the labeling. I would like to get my labels to start showing up at a scale of 1:1000000 but nothing is working... here is a snippet of my mapfile... LAYER NAME 'mjcities' TYPE POINT DUMP false EXTENT -143.210462 39.001401 -50.461045 85.911094 DATA '../data/mjcities.shp' METADATA 'ows_title' 'mjcities' END STATUS default MAXSCALE 1000000 TRANSPARENCY 100 CLASSITEM 'NAME' LABELITEM 'NAME' PROJECTION 'proj=longlat' 'datum=WGS84' 'no_defs' END CLASS NAME 'mjcities' STYLE SYMBOL "circle" SIZE 15.0 OUTLINECOLOR 0 0 0 COLOR 182 109 194 END Thanks, Mark
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
