forked from mapnik/mapnik
-
Notifications
You must be signed in to change notification settings - Fork 1
PointSymbolizer
davidsvantesson edited this page Oct 16, 2012
·
9 revisions
A PointSymbolizer specifies the rendering of a "graphic symbol" at a point.
If you want to draw a graphic symbol and a text you would better use a ShieldSymbolizer.
Some options described here are not available in mapnik versions < 2.0.
| parameter | value | default |
|---|---|---|
| file | path to image file | none |
| width (removed) | px | 4 |
| height (removed) | px | 4 |
| type (removed) | png tiff svg | none |
| allow-overlap | allow text to overlap the point image; true/false | false |
| opacity | Opacity of the symbolizer: 0.0 - 1.0 | 1.0 |
| transform | SVG transform | identity |
| ignore-placement | allow subsequent point/shield symbolizers to overlap this symbol; true/false | false |


<PointSymbolizer/> sym = PointSymbolizer() using mapnik::point_symbolizer;
point_symbolizer sym;[[/images/point_symbolizer_2.png]]
<PointSymbolizer file="/tmp/pub.png" width="16" height="16" type="png" /> sym = PointSymbolizer("/tmp/pub.png", "png", 16, 16)
# args are file, type, height, width
sym.allow_overlap = True
sym.opacity = .5 using mapnik::point_symbolizer;
point_symbolizer sym("/tmp/pub.png","png",16,16);
<PointSymbolizer allow-overlap="yes" file="/Users/artem/projects/
openstreetmap/mapnik/symbols/station_small.png" type="png" width="5"
height="5" />
<PointSymbolizer allow-overlap="no" file="/Users/artem/projects/
openstreetmap/mapnik/symbols/station_small.png" type="png" width="5"
height="5" />
<PointSymbolizer file="/Users/artem/Desktop/svg/lion.svg" opacity="1.0" transform="scale(0.2,0.2)" />
<PointSymbolizer file="/Users/artem/Desktop/svg/lion.svg" opacity="1.0" transform="rotate(45) scale(0.4,0.4)" />