Dave, This is on a Windows localhost, so the fonts specified exist. It looks like it's using ZDingbats in my case... The experiment was really to see if it will look at an expression in the FontName element like it will for the size or label. It appears that it will not. Andy From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Wilson Sent: Monday, September 15, 2008 10:19 AM To: MapGuide Users Mail List Subject: RE: [mapguide-users] Dynamically specify colour and font of labels This behavior sounds similar to an issue we saw a while back where if the server can't find the font requested it defaulted to the last font in the list which was wingdings or webdings. In your case does the font you specified exist on your client machine and not your server or are they the same box? Dave From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Morsell Sent: Monday, September 15, 2008 11:08 AM To: 'MapGuide Users Mail List' Subject: RE: [mapguide-users] Dynamically specify colour and font of labels I did a little playing around with this. I modified the layer XML and then uploading that modified XML for that layer resource via the mapagent. I created a field in a table called Font and populated that with the various fonts I wanted. Then I saved the layer XML from Autodesk MapGuide Studio, modified it in Notepad++ and then uploaded via the mapagent. The result was that the label font for all labels was some odd symbol font, not one of the names I had in the table. <Label> <Unit>Inches</Unit> <SizeContext>DeviceUnits</SizeContext> <SizeX>0.3</SizeX> <SizeY>ToInt32 (Height)</SizeY> <Text>Camera_ID</Text> <FontName>"Font"</FontName> <ForegroundColor>ff000000</ForegroundColor> <BackgroundColor>ffffffff</BackgroundColor> <BackgroundStyle>Ghosted</BackgroundStyle> <AdvancedPlacement> <ScaleLimit>0.5</ScaleLimit> </AdvancedPlacement> </Label> So, based on this, it looks like the font cannot be dynamically driven on a label by label basis. A good question is, at the core of MGOS, is it using one font and color value for an entire layer or theme category or is it on an object by object basis? If the latter, then it seems like it might not be too large of a task to modify the core code with this change. This would be a good item for an enhancement request. Andy Morsell, P.E. Spatial Integrators, Inc. www.SpatialGIS.com From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gary Morin Sent: Monday, September 15, 2008 2:59 AM To: 'MapGuide Users Mail List' Subject: RE: [mapguide-users] Dynamically specify colour and font of labels Hi As I have had no response, do I take it the answer is no, it can't be done? Thanks Gary _____
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gary Morin Sent: 12 September 2008 15:54 To: [email protected] Subject: [mapguide-users] Dynamically spicfiy colour and font of labels Hi I know it possible to specify the height, rotation and justification of feature labels dynamically, using attribute data. But is there a way to do if for font and colour, i.e. have the font and colour of a label stored as an attribute? Thanks Gary
_______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
