[mapguide-users] Custom Symbols...
Martin Morrison
martin.morrison at edsi.com
Wed Jun 4 08:01:36 EDT 2008
I have pasted the relevant parts of each file below. I have both (line
and symbol) on the same layer with I thought the same scales.
>From the layer definition...
<VectorScaleRange>
<MinScale>100</MinScale>
<CompositeTypeStyle>
<CompositeRule>
<LegendLabel>'Interstate Highways'</LegendLabel>
<CompositeSymbolization>
<SymbolInstance>
<ResourceId>Library://Mecklenburg_County/Layers/Interstate_Highway.Symbo
lDefinition</ResourceId>
<ParameterOverrides>
<Override>
<SymbolName>Shield</SymbolName>
<ParameterIdentifier>ROADNAME</ParameterIdentifier>
<ParameterValue>ROUTE</ParameterValue>
</Override>
</ParameterOverrides>
</SymbolInstance>
</CompositeSymbolization>
</CompositeRule>
</CompositeTypeStyle>
</VectorScaleRange>
>From the symbol definition...
<SimpleSymbol>
<SimpleSymbolDefinition>
<Name>Outline</Name>
<Graphics>
<Path>
<Geometry>M 0.0,0.0 H 5.0 Z</Geometry>
<LineColor>FF000000</LineColor>
<LineWeight>2.0</LineWeight>
</Path>
</Graphics>
<LineUsage>
<VertexControl>'OverlapWrap'</VertexControl>
<StartOffset>0</StartOffset>
<Repeat>5.0</Repeat>
<VertexAngleLimit>180.0</VertexAngleLimit>
</LineUsage>
<ParameterDefinition/>
</SimpleSymbolDefinition>
<RenderingPass>0</RenderingPass>
</SimpleSymbol>
<SimpleSymbol>
<SimpleSymbolDefinition>
<Name>Inner</Name>
<Graphics>
<Path>
<Geometry>M 0.0,0.0 H 5.0 Z</Geometry>
<LineColor>FF800000</LineColor>
<LineWeight>0.9</LineWeight>
</Path>
</Graphics>
<LineUsage>
<VertexControl>'OverlapWrap'</VertexControl>
<StartOffset>0</StartOffset>
<Repeat>5.0</Repeat>
</LineUsage>
<ParameterDefinition/>
</SimpleSymbolDefinition>
<RenderingPass>1</RenderingPass>
</SimpleSymbol>
<SimpleSymbol>
<SimpleSymbolDefinition>
<Name>Shield</Name>
<Graphics>
<Image>
<Content>
iVBORw0KGgoAAAANSUhEUgAAAE0AAAA2CAMAAAC1MuSAAAAALHRFWHRDcmVhdGlvbiBUaW1l
AEZy
aSAzMCBNYXkgMjAwOCAxMzo0OTo0NyAtMDUwMBH+gTkAAAAHdElNRQfYBR4ROShsSnc5AAAA
CXBI
WXMAAAsSAAALEgHS3X78AAAABGdBTUEAALGPC/xhBQAAACpQTFRFxt7G///3////pc73hITG
AAD/
Y2PG56WE/wAA52NC56XG50JC54SE52OEjX+r1gAAAAF0Uk5TAEDm2GYAAAFcSURBVHja1dfb
koMg
DAZgf0KVtd33f91FTgUUAZObzU2diX6TgFRYFhdY7qOTR5GHUgCat6KXt+lSO+J4DjUUcp00
Cuz7
zEUUZuOWAjN74wlg/zU2tgbo8nmr9to9YD47qvBSjO2c94m90GCY8S3OXn0kNXZp5p04pXa2
loqz
v5uI5jiJRo35EdViqyKNRg1h/bHDtpoWvEhAXnuJBP0DbZXS3PumRTQEjYQ0v7JktLROJTCK
msjA
+UmQGjiE/16RVrVKmkCrsVGZ4pA+qALFkco1bnEoNyK8aaVqkwTO0tfn/RtDOz4t1ebyea/V
1pLH
0QljcFfYgodv3SXmZ2Keo3oGOFwT89zU2K2qjfmxm+D0Lea54W6pg8VuR1aZrk4wN+V1213R
L2zU
0zRUWMYpaoEUTkRjWPKuQJq2Mq8A10DNWt6LR0/Sx1BROvTNWyWYnR8fUgmEjJSLY9If47Y6
+jho
AQAAAAAASUVORK5CYII=
</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>
<Text>
<ResizeControl>'AddToResizeBox'</ResizeControl>
<Content>%ROADNAME%</Content>
<FontName>'Arial'</FontName>
<Height>4</Height>
<PositionX>0</PositionX>
<PositionY>0</PositionY>
<HorizontalAlignment>'Center'</HorizontalAlignment>
<VerticalAlignment>'Halfline'</VerticalAlignment>
<TextColor>FFFFFFFF</TextColor>
</Text>
</Graphics>
<ResizeBox>
<SizeX>6</SizeX>
<SizeY>6</SizeY>
<PositionX>0</PositionX>
<PositionY>0</PositionY>
<GrowControl>'GrowInX'</GrowControl>
</ResizeBox>
<LineUsage>
<AngleControl>'FromAngle'</AngleControl>
<VertexControl>'OverlapNoWrap'</VertexControl>
<Angle>0</Angle>
<StartOffset>50</StartOffset>
<EndOffset>50</EndOffset>
<Repeat>100</Repeat>
<VertexAngleLimit>180.0</VertexAngleLimit>
</LineUsage>
<ParameterDefinition>
<Parameter>
<Identifier>ROADNAME</Identifier>
<DefaultValue>5</DefaultValue>
<DisplayName>ROADNAME</DisplayName>
<Description>ROADNAME</Description>
<DataType>Integer</DataType>
</Parameter>
</ParameterDefinition>
</SimpleSymbolDefinition>
<RenderingPass>2</RenderingPass>
</SimpleSymbol>
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Traian
Stanev
Sent: Tuesday, June 03, 2008 5:08 PM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Custom Symbols...
There is not enough information to answer this. Is the rest of the road
drawn using the same symbol definition, or is it a separate one (or even
a separate layer?). Normally the scale range for visibility is specified
for the whole layer, so if you are seeing this with data on the same
layer, it could be a bug.
Traian
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-
> bounces at lists.osgeo.org] On Behalf Of Martin Morrison
> Sent: Tuesday, June 03, 2008 3:38 PM
> To: MapGuide Users Mail List
> Subject: RE: [mapguide-users] Custom Symbols...
>
> Ok, next question...
>
> I have the symbols working, they look great. The road symbols just
> turn
> off when I zoom out past about 7000 even though the road still shows
up
> with it's style. I don't see a parameter that controls how far in and
> out the symbol displays. Where should this be changed at?
>
> 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>
>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1
> B
> AACx
>
jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAMl
> J
> REFU
>
SEvtlusOgCAIhe3Ne3MrSIeBaIittRz+ae18ykVYYpi8ABDDGvwtxEP82Lu6OwMECcCXkY5
> b
> ArwY
>
xBkMMM4oXS0BRhgskBWAjSGlSR3AGPuvFyvSupKEKgAZYLDZwgJCq5RRF0BWR1xmmAGaOmX
> Y
> AG31
>
zDAAetVVhhaDHwBR+baL8IJCAYslbUhTbHNthtpxX/BUzHzsWG9yfa4NQ8aNhmNQxyzqapl
> m
> 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,iVBORw0KGgoAAAANSUhEUgAAAE0AAAA2CAMAAAC1
> M
>
uSAAAAALHRFWHRDcmVhdGlvbiBUaW1lAEZyaSAzMCBNYXkgMjAwOCAxMzo0OTo0NyAtMDUw
> M
>
BH+gTkAAAAHdElNRQfYBR4ROShsSnc5AAAACXBIWXMAAAsSAAALEgHS3X78AAAABGdBTUEA
> A
>
LGPC/xhBQAAACpQTFRFxt7G///3////pc73hITGAAD/Y2PG56WE/wAA52NC56XG50JC54SE
> 5
>
2OEjX+r1gAAAAF0Uk5TAEDm2GYAAAFcSURBVHja1dfbkoMgDAZgf0KVtd33f91FTgUUAZOb
> z
>
U2diX6TgFRYFhdY7qOTR5GHUgCat6KXt+lSO+J4DjUUcp00Cuz7zEUUZuOWAjN74wlg/zU2
> t
>
gbo8nmr9to9YD47qvBSjO2c94m90GCY8S3OXn0kNXZp5p04pXa2loqzv5uI5jiJRo35EdVi
> q
>
yKNRg1h/bHDtpoWvEhAXnuJBP0DbZXS3PumRTQEjYQ0v7JktLROJTCKmsjA+UmQGjiE/16R
> V
>
rVKmkCrsVGZ4pA+qALFkco1bnEoNyK8aaVqkwTO0tfn/RtDOz4t1ebyea/V1pLH0QljcFfY
> g
>
odv3SXmZ2Keo3oGOFwT89zU2K2qjfmxm+D0Lea54W6pg8VuR1aZrk4wN+V1213RL2zU0zRU
> W
>
MYpaoEUTkRjWPKuQJq2Mq8A10DNWt6LR0/Sx1BROvTNWyWYnR8fUgmEjJSLY9If47Y6+jho
> A
> 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,iVBORw0KGgoAAAANSUhEUgAAAE0AAAA2CAMAAAC1MuS
> A
> AAAALHRFWHRDcmVhdGlvbiBUaW1lAEZyaSAzMCBNYXk
>
gMjAwOCAxMzo0OTo0NyAtMDUwMBH+gTkAAAAHdElNRQfYBR4ROShsSnc5AAAACXBIWXMAAA
> s
> SAAALEgHS3X78AAAABGdBTUEAALGPC/xhBQAAACpQTFRFxt7G///3////pc7
>
3hITGAAD/Y2PG56WE/wAA52NC56XG50JC54SE52OEjX+r1gAAAAF0Uk5TAEDm2GYAAAFcSU
> R
> BVHja1dfbkoMgDAZgf0KVtd33f91FTgUUAZObzU2diX6TgFRYFhdY7qOTR5G
>
HUgCat6KXt+lSO+J4DjUUcp00Cuz7zEUUZuOWAjN74wlg/zU2tgbo8nmr9to9YD47qvBSjO
> 2
> c94m90GCY8S3OXn0kNXZp5p04pXa2loqzv5uI5jiJRo35EdViqyKNRg1h/bH
>
DtpoWvEhAXnuJBP0DbZXS3PumRTQEjYQ0v7JktLROJTCKmsjA+UmQGjiE/16RVrVKmkCrsV
> G
> Z4pA+qALFkco1bnEoNyK8aaVqkwTO0tfn/RtDOz4t1ebyea/V1pLH0QljcFf
>
Ygodv3SXmZ2Keo3oGOFwT89zU2K2qjfmxm+D0Lea54W6pg8VuR1aZrk4wN+V1213RL2zU0z
> R
> 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\ResourceDefiniti
> o
> nManager.cpp
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
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