[mapguide-users] Custom Symbols...
Martin Morrison
martin.morrison at edsi.com
Mon Jun 2 08:19:55 EDT 2008
THANKS,
Martin
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Traian
Stanev
Sent: Sunday, June 01, 2008 7:35 PM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Custom Symbols...
Hi Martin,
You are using incorrect format for the Content tag. The
"data:image/png;base64," piece is not necessary, just the png content
converted to base64.
Here is an example of correct usage:
<?xml version="1.0" encoding="UTF-8"?>
<SimpleSymbolDefinition
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="SymbolDefinition-1.0.0.xsd"
version="1.0.0">
<Name>Symbol</Name>
<Graphics>
<Image>
<Content>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1B
AACx
jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAMlJ
REFU
SEvtlusOgCAIhe3Ne3MrSIeBaIittRz+ae18ykVYYpi8ABDDGvwtxEP82Lu6OwMECcCXkY5b
ArwY
xBkMMM4oXS0BRhgskBWAjSGlSR3AGPuvFyvSupKEKgAZYLDZwgJCq5RRF0BWR1xmmAGaOmXY
AG31
zDAAetVVhhaDHwBR+baL8IJCAYslbUhTbHNthtpxX/BUzHzsWG9yfa4NQ8aNhmNQxyzqaplm
dYnx
8NgyeHZaa8Lg5ahOfJVc5K6eGCeAjySOXzZKzdKePStlhwAAAABJRU5ErkJggg==
</Content>
<SizeX>8.0</SizeX>
<SizeY>8.0</SizeY>
<SizeScalable>True</SizeScalable>
<Angle>0.0</Angle>
<PositionX>0.0</PositionX>
<PositionY>0.0</PositionY>
</Image>
</Graphics>
<PointUsage>
<AngleControl>'FromAngle'</AngleControl>
<Angle>0.0</Angle>
<OriginOffsetX>0.0</OriginOffsetX>
<OriginOffsetY>0.0</OriginOffsetY>
</PointUsage>
<ParameterDefinition/>
</SimpleSymbolDefinition>
Thanks,
Traian
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Martin
Morrison
Sent: Friday, May 30, 2008 4:17 PM
To: MapGuide Users Mail List
Subject: [mapguide-users] Custom Symbols...
I'm trying to embed a PNG into a custom symbol. When I use the code
below I get the error shown at the bottom. If I remove this section it
works (without my PNG of course). How should the <IMAGE> tag be used?
Any clues?
Thanks,
Martin
****************CODE Snippet*******************
<SimpleSymbol>
<SimpleSymbolDefinition>
<Name>Shield</Name>
<Graphics>
<Image>
<Content>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAAA2CAMAAAC1M
uSAAAAALHRFWHRDcmVhdGlvbiBUaW1lAEZyaSAzMCBNYXkgMjAwOCAxMzo0OTo0NyAtMDUwM
BH+gTkAAAAHdElNRQfYBR4ROShsSnc5AAAACXBIWXMAAAsSAAALEgHS3X78AAAABGdBTUEAA
LGPC/xhBQAAACpQTFRFxt7G///3////pc73hITGAAD/Y2PG56WE/wAA52NC56XG50JC54SE5
2OEjX+r1gAAAAF0Uk5TAEDm2GYAAAFcSURBVHja1dfbkoMgDAZgf0KVtd33f91FTgUUAZObz
U2diX6TgFRYFhdY7qOTR5GHUgCat6KXt+lSO+J4DjUUcp00Cuz7zEUUZuOWAjN74wlg/zU2t
gbo8nmr9to9YD47qvBSjO2c94m90GCY8S3OXn0kNXZp5p04pXa2loqzv5uI5jiJRo35EdViq
yKNRg1h/bHDtpoWvEhAXnuJBP0DbZXS3PumRTQEjYQ0v7JktLROJTCKmsjA+UmQGjiE/16RV
rVKmkCrsVGZ4pA+qALFkco1bnEoNyK8aaVqkwTO0tfn/RtDOz4t1ebyea/V1pLH0QljcFfYg
odv3SXmZ2Keo3oGOFwT89zU2K2qjfmxm+D0Lea54W6pg8VuR1aZrk4wN+V1213RL2zU0zRUW
MYpaoEUTkRjWPKuQJq2Mq8A10DNWt6LR0/Sx1BROvTNWyWYnR8fUgmEjJSLY9If47Y6+jhoA
QAAAAAASUVORK5CYII%3D</Content>
<SizeX>10</SizeX>
<SizeY>10</SizeY>
</Image>
****************Error************************
C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\Php>php.exe
"C:\Mapguide_Road_Symbols\loadresources.php" "C:\Mapguide_Roa
d_Symbols" Library://Mecklenburg_County/Layers/
Reading resources files from 'C:\Mapguide_Road_Symbols'
Writing C:\Mapguide_Road_Symbols\Primary_Road.SymbolDefinition.xml to
Library://Mecklenburg_County/Layers/Primary_Road.SymbolDefinit
ion
Writing C:\Mapguide_Road_Symbols\Roads.LayerDefinition.xml to
Library://Mecklenburg_County/Layers/Roads.LayerDefinition
Writing C:\Mapguide_Road_Symbols\Roads.SymbolDefinition.xml to
Library://Mecklenburg_County/Layers/Roads.SymbolDefinition
An exception occurred in DB XML component.
Error: XML Indexer: Parse error in document at line, 71, char 28.
Parser message: Datatype error: Type:InvalidDatatypeValueExceptio
n, Message:Value
'URI:(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAAA2CAMAAAC1MuSA
AAAALHRFWHRDcmVhdGlvbiBUaW1lAEZyaSAzMCBNYXk
gMjAwOCAxMzo0OTo0NyAtMDUwMBH+gTkAAAAHdElNRQfYBR4ROShsSnc5AAAACXBIWXMAAAs
SAAALEgHS3X78AAAABGdBTUEAALGPC/xhBQAAACpQTFRFxt7G///3////pc7
3hITGAAD/Y2PG56WE/wAA52NC56XG50JC54SE52OEjX+r1gAAAAF0Uk5TAEDm2GYAAAFcSUR
BVHja1dfbkoMgDAZgf0KVtd33f91FTgUUAZObzU2diX6TgFRYFhdY7qOTR5G
HUgCat6KXt+lSO+J4DjUUcp00Cuz7zEUUZuOWAjN74wlg/zU2tgbo8nmr9to9YD47qvBSjO2
c94m90GCY8S3OXn0kNXZp5p04pXa2loqzv5uI5jiJRo35EdViqyKNRg1h/bH
DtpoWvEhAXnuJBP0DbZXS3PumRTQEjYQ0v7JktLROJTCKmsjA+UmQGjiE/16RVrVKmkCrsVG
Z4pA+qALFkco1bnEoNyK8aaVqkwTO0tfn/RtDOz4t1ebyea/V1pLH0QljcFf
Ygodv3SXmZ2Keo3oGOFwT89zU2K2qjfmxm+D0Lea54W6pg8VuR1aZrk4wN+V1213RL2zU0zR
UWMYpaoEUTkRjWPKuQJq2Mq8A10DNWt6LR0/Sx1BROvTNWyWYnR8fUgmEjJS
LY9If47Y6+jhoAQAAAAAASUVORK5CYII%3D)' is not encoded in Base64 .
Exception occurred in method MgResourceDefinitionManager.UpdateDocument
at line 601 in file d:\buildforgeprojects\mapguide_open_sour
ce_v2.0\build_27.16\mgdev\server\src\services\resource\ResourceDefinitio
nManager.cpp
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list