[mapguide-users] Re: Images into custom symbols
Steve G
steve.golden at morganhill.ca.gov
Mon Jun 21 18:26:16 EDT 2010
This is an old post with no replies, however, I am pretty much trying to do
the same thing (use an image as a symbol). I reviewed the
http://www.rand.com/imaginit/1/pdfs/technology/software/building_symbol_libraries_with_autodesk_mapguide_enterprise_2009.pdf
Building Symbol Libraries document and it says the image maybe a PNG file
or "in the Reference element as a link to the image stored as Resource Data
within the resource database."
I have been able to use the Symbol Definition below with PNG symbols, but if
I change the file type to something else (EMF, BMP, etc), it doesn't work.
Can someone provide some direciton and perhaps some sample code? I am not
sure what the above documentation means to "link to the image stored as
Resource Data".
Also, can someone confirm what image file types can be used? I saw some
documentation for Mapguide Studio that said Studio supported the following:
Bitmap (BMP), Device Independent Bitmap (DIB), Enhanced Metafile (EMF),
TrueType Fonts (TTF), Windows Metafile (WMF), Portable Network Graphics
(PNG), Joint Photographic Experts Group (JPG/JPEG). Is this Mapguide's
limitation as well? I am using MGOS 2.1 (soon to be on 2.2).
THANKS!!!
<SimpleSymbolDefinition
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:noNamespaceSchemaLocation="SymbolDefinition-1.0.0.xsd" version="1.0.0">
<Name>Police</Name>
<Graphics>
<Image>
<ResizeControl>'ResizeNone'</ResizeControl>
<Reference>
<ResourceId />
<LibraryItemName>'RainHatManhole2.PNG'</LibraryItemName>
</Reference>
<SizeX>4.0</SizeX>
<SizeY>4.0</SizeY>
<SizeScalable>True</SizeScalable>
<Angle>0.0</Angle>
<PositionX>0.0</PositionX>
<PositionY>0.0</PositionY>
</Image>
</Graphics>
<PointUsage>
<Angle>%ROTATION_ANGLE%</Angle>
</PointUsage>
<ParameterDefinition>
<Parameter>
<Identifier>ROTATION_ANGLE</Identifier>
<DefaultValue>0.0</DefaultValue>
<DisplayName>Angle to rotate symbol</DisplayName>
</Parameter>
</ParameterDefinition>
</SimpleSymbolDefinition>
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Images-into-custom-symbols-tp1818670p5206515.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list