[Cartoweb-users] How can i put a text inside a polygon
VenuGopal Papasani
venu.papasani at gmail.com
Wed Mar 29 00:55:59 EST 2006
Dear List,
I have a map which consists of various districts.Now I want to place the
names of each district in each polygon.But i am not able to get the
documentation how to put a text inside a polygon.If any one know the
solution please help me in solving this.I am giving my map file here and can
you please give me an example how to put an example text "XXXX" inside a
polygon of this map so that i can put the text.
Here is the map file (To get the extents for you)
MAP
NAME "demoPlugins"
EXTENT 78.06729100692377 12.622787007093203 80.05293299314805
13.993528992744805
IMAGETYPE PNG
IMAGECOLOR 255 255 255
STATUS ON
UNITS METERS
FONTSET "fonts.txt"
SYMBOLSET "symbols.txt"
SHAPEPATH "data"
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE PC256
EXTENSION "png"
FORMATOPTION "INTERLACE=OFF"
TRANSPARENT ON
END
OUTPUTFORMAT
NAME jpeg
DRIVER "GD/JPEG"
MIMETYPE "image/jpeg"
IMAGEMODE RGB
EXTENSION "jpg"
FORMATOPTION "INTERLACE=OFF"
FORMATOPTION "QUALITY=80"
END
REFERENCE
IMAGE images/keymap.png
EXTENT 142776 4757331 1083562 5409260
STATUS ON
COLOR -1 -1 -1
OUTLINECOLOR 200 200 200
SIZE 140 97
END
SCALEBAR
POSTLABELCACHE TRUE
STYLE 0
UNITS kilometers
SIZE 350 3
TRANSPARENT TRUE
COLOR 77 77 88
IMAGECOLOR 242 255 195
BACKGROUNDCOLOR 222 222 222
LABEL
TYPE BITMAP
SIZE SMALL
COLOR 0 0 0
POSITION UR
BUFFER 10
END
END
PROJECTION
"init=epsg:4326"
END
LEGEND
KEYSIZE 20 15
END
##########
# LAYERS #
##########
LAYER
NAME "chittoor"
TYPE POLYGON
DATA "DIST_Chittoor_Ver0_011205"
TEMPLATE "ttt"
METADATA
"exported_values" "recenter_name_string,id_attribute_string"
"recenter_name_string" "NAM"
"id_attribute_string" "OGC_FID|string"
"query_returned_attributes" "NAM"
END
CLASS
STYLE
COLOR 80 160 74
OUTLINECOLOR 86 86 74
END
END
END
###########
# outline #
###########
LAYER
NAME "cartoweb_point_outline"
TYPE POINT
CLASS
STYLE
SYMBOL "circle"
COLOR 0 0 205
SIZE 10
END
LABEL
TYPE TRUETYPE
FONT "Vera"
SIZE 7
COLOR 0 0 0
OUTLINECOLOR 255 255 255
POSITION lc
END
END
END
LAYER
NAME "cartoweb_line_outline"
TYPE LINE
TRANSPARENCY 100
CLASS
STYLE
OUTLINECOLOR 255 0 0
SYMBOL "line-dashed"
SIZE 3
END
LABEL
TYPE TRUETYPE
FONT "Vera"
SIZE 7
COLOR 0 0 0
OUTLINECOLOR 255 255 255
ANGLE auto
POSITION uc
END
END
END
LAYER
NAME "cartoweb_polygon_outline"
TYPE POLYGON
TRANSPARENCY 60
CLASS
STYLE
COLOR 255 153 0
OUTLINECOLOR 0 0 0
END
LABEL
TYPE TRUETYPE
FONT "Vera"
SIZE 7
OUTLINECOLOR 255 255 255
COLOR 0 0 0
POSITION cc
END
END
END
END
Thanks in advance,
Regards,
venu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20060329/14320b17/attachment.html
More information about the Cartoweb-users
mailing list