Copyright (c) 2004 Gordon D. Carrie. All rights reserved.
Licensed under the Open Software License version 2.1
Please address questions and feedback to user0@tkgeomap.org
@(#) $Id: tkgeomap.n,v 1.23 2009/10/23 20:37:25 tkgeomap Exp $
.so man.macros
-refpoint {lat lon} This option specifies the reference point of the item, which is the {lat lon} at the x, y coordinates given as the item's coords. Note that the reference point is not necessarily the location of the place in a geomap_place item, nor is it necessarily a point on the linearray displayed in a geomap_lnarr item. It only helps define the map in which the item is displayed. Other lat-lon's are positioned relative to the reference point. A map can be shifted by changing the reference point with the -refpoint option, or by changing the item's coordinates with the canvas coords or move command. A useful convention is to keep all item coords at the center of the canvas. Then the refpoint value is the lat-lon at the center of the canvas, which is presumably a point of interest.
-projection projId Specifies the geographic projection for converting {lat lon} values to map coordinates. projId must be the name of a command returned by the geomap::projection command. See the tclgeomap man page for information on how to create and manipulate projections. If no projection is specified, the item is not drawn.
-rotation doubleValueORdirection Specifies the map's orientation. A value of 0.0 or north means the top of the map is north. A double value gives the number of degrees the map is rotated clockwise from the conventional north-is-up orientation. A value of north, nneast, neast, eneast, east, eseast, seast, sseast, south, sswest, swest, wswest, west, wnwest, nwest, or nnwest gives the direction at the top of the map.
-scale doubleValue Specifies the cartographic scale for converting distances on the projection plane to distances on the printed or displayed map.
The actual canvas coordinates of a geomap_lnarr or geomap_place item can be retrieved by adding the keyword dump to the coords command.
pathName create geomap_lnarr x y ?option value option value ...?
-fill
-stipple
-outline
-tags
-lnarr arrayName Specifies the name of a linearray to display in the item. arrayName should be the name of a linearray, usually created by the geomap::lnarr command. See the tclgeomap (n) man page for information on how to create linearrays. When setting the linearray to display, arrayName MUST BE FULLY QUALIFIED unless the array command is global. If arrayName is an empty string, no linearray will be displayed in the item. When this option is used to retrieve the array name, such as with cget, only the base name (without any :: namespace qualifiers) is returned. If linearray arrayName is deleted, the item disappears from the canvas, although the item continues to exist, and the value for this option becomes an empty string.
-width outlineWidth Specifies the width of lines to draw. outlineWidth can be a coordinate specifier as described in the canvas (n) man page, or it can be none, "", or a negative number to indicate no lines should be drawn.
-linestyle style Specifies a linestyle, either LineSolid or LineOnOffDash.
-dashes dashLength Specifies the length of dashes it line style is LineOnOffDash.
-smooth boolean Specifies whether to smooth the outline. boolean must have one of the forms accepted by Tk_GetBoolean. Currently, only bezier smoothing is available. If set, the line will be rendered as a set of parabolic splines: one spline is drawn for the first and second line segments, one for the second and third, and so on. Straight-line segments can be generated within a curve by duplicating the end-points of the desired line segment.
-splinesteps number Specifies the degree of smoothness desired for curves: each spline will be approximated with number line segments. This option is ignored unless the -smooth option is true.
-shape polygonType Tells the type of shape to be filled in when using the -fill option. This option is usually unnecessary, but might improve performance. Shape must be one of Convex, Nonconvex, or Complex. Convex means any segment connecting two points on the polygon does not cross the polygon. This type of shape can be faster to draw. Nonconvex means the shape is not convex, but it does not cross itself. Complex means the shape might cross itself. Results are undefined if a shape is given as convex when it is not, or nonconvex when it is complex. Note that the assumption must apply for all projections used.
-dotsize number Specifies size in pixels of dots to draw at the segment ends. If number is greater than 0 and the -width and -fill options are set to 0, the linearray will be displayed as a collection of dots, which can be useful for making density plots or simple images.
pathName create geomap_place x y ?option value option value ...?
-place placeName Specifies the name of a geoplace to display in the item. placeName should be the name of a geoplace created with either the geomap::place new or geomap::place set command. See the tclgeomap (n) man page for information on how to create places. When setting the place to display, placeName MUST BE FULLY QUALIFIED unless the place command is global. If placeName is an empty string, no place will be displayed in the item. When this option is used to retrieve the place name, such as with cget, only the base name (without any :: namespace qualifiers) is returned. If geoplace placeName is deleted, the item disappears from the canvas, although the item continues to exist, and the value for this option becomes an empty string.
-dotcolor color Specifies the color of a dot drawn at the place. color may have any of the forms accepted by Tk_GetColor. If color is an empty string, no dot is drawn at the place.
-dotsize integer Specifies the size of dot to draw at the place. If integer is <= 0, no dot is drawn at the place.
-bitmap bitmap Specifies a bitmap to draw at the place. bitmap may have any of the forms accepted by Tk_GetBitmap. If bitmap is an empty string, no bitmap is drawn.
-bitmapcolor color Specifies the bitmap color. color specifies the bitmap foreground color, which is used for bitmap pixels whose value is 1. color may have any of the forms accepted by Tk_GetColor. If color is an empty string, no bitmap is drawn at the place.
-text string Specifies a string of text to display at the place.
-textcolor color Specifies the text color. color may have any of the forms accepted by Tk_GetColor.
-font fontName Specifies the font to use for the text item. fontName may be any string acceptable to Tk_GetFontStruct.
-anchor anchorPos Tells how to position the text relative to the place. It may have any of the forms accepted by Tk_GetAnchor. For example, if anchorPos is center then the text is centered on the place; if anchorPos is n then the North end of the text will be at the place.
-arrow {azimuth shaft_len tip_len} Draws an arrow at the place. The arrow will be oriented azimuth degrees clockwise from true north. The shaft will be shaft_len pixels long. The tip will have edges 'shaft_len * tip_len' pixels long, i.e. tip_len is a fraction of shaft_len.
-arrowcolor color Specifies the arrow color. color may have any of the forms accepted by Tk_GetColor.
-tags tagList Standard tags option to identify the item in canvas widget commands.
canvas (n)
tclgeomap (n)
The code for the bezier spline computation was shamelessly lifted from tkTrig.c and tkUtil.c of the Tk8.3.0 source distribution.