[mapguide-internals] RFC 14(CartographicStylizationEngine)comments

Traian Stanev traian.stanev at autodesk.com
Thu Feb 15 12:44:43 EST 2007

No that's not what I'm proposing. You will still be able (in the layer
definition) to specify a scale for the symbol using the ScaleX and
ScaleY elements, which can be an expression based on feature attributes.
You will also be able to specify whether the symbol scales with the map
or stays in device space using the SizeContext element. All of these are
members of the SymbolInstace object. SymbolInstances in turn refer to
actual symbol resources. It is the sizing of stuff inside those symbols
that we are talking about. My proposal is to fix the units *inside*
those (i.e. not allow one to change the units without physically scaling
all geometries in the symbol).

Here is an example. Suppose your symbol is the box defined by
(-1,-1,1,1). This is assumed to be millimeters in the symbol
definitions. If you wanted the symbol to be two meters wide and to get
bigger when you zoom in, you would set the ScaleX and ScaleY to 1000 and
the SizeContext to "Mapping". If you wanted the box to be 20 pixels high
and stay that size as you zoom in or out, you would set ScaleX and
ScaleY to 2.5 (roughly) and SizeContext to "Device".

If we add design units to the symbol and someone used the same box
symbol but set its units to inches, you would need to set ScaleX and
ScaleY to (1/0.0254) (inch to meter factor) in the first case and
(10/96) in the second case. 

Basically adding a field for design units adds an extra scale factor
inside the symbol in addition to the one stored outside. My take is that
if someone wants to design a symbol in inches, whatever UI he is using
will allow them to do so and then in the end when it saves the symbol,
it will convert all sizes to millimeters. Then someone else can go in
and edit the same symbol in millimeters if they wanted to, by flipping a
switch in the UI (which can also be determined from OS locales and
whatnot). The symbol will appear the same size to both people, without
any change to the symbol's definition.


-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Jason
Sent: Thursday, February 15, 2007 12:21 PM
To: MapGuide Internals Mail List
Subject: RE: [mapguide-internals] RFC

Most of this discussion is a bit beyond me, but are you proposing not to
allow users to specify symbol size in the layer definitions?  And/or not
to allow them to specify symbol size in screen units?

It's important to me to be able to specify everything in both screen and
ground units, including some of the properties that can only be
specified in one or the other. (there was an enhancement request around
this in the old system)


-----Original Message-----
From: Traian Stanev
Subject: RE: [mapguide-internals] RFC

We decided to remove use of "px" to specify unit. So now everything in
the symbol uses the same units. If nothing else is specified, those
units will be treated as millimeters. 
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org

More information about the mapguide-internals mailing list