I have been using Studio to create my symbol definitions, and in its current form, your symbol gave an error. However, removing the <SimpleSymbol> and <RenderingPass> tags allowed me to save the symbol definition. Yet, I got the same result with this--nothing showed up on screen when I created the line. So, I tried substituting this into a <CompoundSymbolDefinition> along with some lines drawn representing a road, and only the road lines showed up on screen.

I have tried encoding my image as well, using a site I found that converts a file to base64, and that hasn't worked for me either. One question though: when I encoded my image, the base64 string was a lot longer, probably 10x or more as long. Does that seem normal? The image itself is under 6k.

Thanks for your help.


Martin Morrison wrote:

I encode the image directly in the XML. Try substituting your symbol for this one.

Thanks,

Martin

  <SimpleSymbol>

                <SimpleSymbolDefinition>

                  <Name>Shield</Name>

                  <Graphics>

    <Image>

      <Content>

iVBORw0KGgoAAAANSUhEUgAAAE0AAAA2CAMAAAC1MuSAAAAALHRFWHRDcmVhdGlvbiBUaW1lAEZy

aSAzMCBNYXkgMjAwOCAxMzo0OTo0NyAtMDUwMBH+gTkAAAAHdElNRQfYBR4ROShsSnc5AAAACXBI

WXMAAAsSAAALEgHS3X78AAAABGdBTUEAALGPC/xhBQAAACpQTFRFxt7G///3////pc73hITGAAD/

Y2PG56WE/wAA52NC56XG50JC54SE52OEjX+r1gAAAAF0Uk5TAEDm2GYAAAFcSURBVHja1dfbkoMg

DAZgf0KVtd33f91FTgUUAZObzU2diX6TgFRYFhdY7qOTR5GHUgCat6KXt+lSO+J4DjUUcp00Cuz7

zEUUZuOWAjN74wlg/zU2tgbo8nmr9to9YD47qvBSjO2c94m90GCY8S3OXn0kNXZp5p04pXa2loqz

v5uI5jiJRo35EdViqyKNRg1h/bHDtpoWvEhAXnuJBP0DbZXS3PumRTQEjYQ0v7JktLROJTCKmsjA

+UmQGjiE/16RVrVKmkCrsVGZ4pA+qALFkco1bnEoNyK8aaVqkwTO0tfn/RtDOz4t1ebyea/V1pLH

0QljcFfYgodv3SXmZ2Keo3oGOFwT89zU2K2qjfmxm+D0Lea54W6pg8VuR1aZrk4wN+V1213RL2zU

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>0</StartOffset>

                                <EndOffset>0</EndOffset>

                                <Repeat>50</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>

*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Jonathan Manafi
*Sent:* Thursday, August 07, 2008 11:18 AM
*To:* MapGuide Users Mail List
*Subject:* Re: [mapguide-users] trouble replicating interstate symbol definition

Jonathan Manafi wrote:

As far as I know, yes. So far, I have had all other composite symbols I have created work for me. But this is the first one where I am trying to include an image in the symbol, and I have apparently not figured out how that is supposed to work.


Martin Morrison wrote:

Just wondering aloud here...are composite symbol definitions supported
in 1.2?  I know I have them working in 2.x.
Thanks,
Martin
-----Original Message-----
From: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan
Manafi
Sent: Thursday, August 07, 2008 11:07 AM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] trouble replicating interstate symbol
definition
Has anyone else tried to implement interstate signs? Thanks. J Manafi wrote:
    I have been reading RFC 14 to understand composite features, and so

far, it
    has gone well. However, up until now, I haven't used any images in the

    symbol definition. I tried replicating the interstate using a highway

badge,
    stored as a .png file in a symbol library, and I am having no luck. I

simply
    copied and pasted the xml for the symbol, changing my library paths,

and I
    only get the text to show up. Here's what I did:

    -downloaded image of highway badges

    -cropped image to one I needed

    -uploaded to symbol library through studio 2008

    -copy/pasted code for symbol definition and changed path

    -tried creating layer using pointing to symbol

    I first tried only the highway badge. But after that, I tried a

    CompoundSymbolDefinition that included 2 paths to draw the road in

yellow
    and black. Everything but the badge showed up. I thought maybe editing

the
    image caused some issues, but I was able to use the image as a W2D

stream in
    a PointSymbolization2D layer.

    Can anyone help me determine what I have done wrong here? My setup is

MGOS
    1.2, win XP, apache + php.

    I am including the files that I used to go through this process.

http://www.nabble.com/file/p18820020/Symbol%2BDef.txt Symbol Def.txt http://www.nabble.com/file/p18820020/Layer%2BDef.txt Layer Def.txt http://www.nabble.com/file/p18820020/interstate.png interstate.png
_______________________________________________
mapguide-users mailing list
[email protected] <mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to