<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Have you tried putting single quotes around the text?<br>
Like this: 'my nice label !!' <br>
<pre class="moz-signature" cols="72">Regards, Kenneth, GEOGRAF A/S
</pre>
<br>
<br>
Kencana skrev:
<blockquote cite="mid:13702462.post@talk.nabble.com" type="cite">
<pre wrap="">Hi Jackie,
I have one doubt. I was wondering, why i can't put special character in the
tool tip e.g. !@#$ and the white space as well. any idea on how to solve
this?
Thank you
Regards,
Kencana Kesuma
Jackie Ng wrote:
</pre>
<blockquote type="cite">
<pre wrap="">What I mean is that the xml fragment you specified does not constitute a
layer definition document.
Therefore there must be some kind of "outer" xml document that that
fragment would have be merged with to form a valid layer definition
document.
Looking at the php code (and I'm just grabbing thin air here). I'm
guessing $factory->CreateLayerDefinition() is where the outer xml document
comes from. So take a look at that function, as that is probably where you
insert your tooltip tag.
- Jackie
Kencana wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Jacky,
Thanks for the reply.
I don't quite understand what you mean by outer xml. anyway, this is what
i did for drawing the marker. also I have attached 1 layer definition
file, templ file, and also the layerdefinition.php file (the file
consists the function in drawing the marker based on the xml file). I
hope you can help me out. And I am really appreciate that.
Thank you
Regards,
Kencana Kesuma
$factory = new LayerDefinitionFactory();
        // Create a mark symbol
        $resourceId = 'Library://Migrated Files/Stars.SymbolLibrary';
        $symbolName = 'Red';
        $testing = 'Test 123';
        $width = '25'; // points
        $height = '25'; // points
        $color = 'FFFF0000';
        $markSymbol = $factory->CreateMarkSymbol($resourceId, $symbolName,
$width, $height, $color);
        // Create a text symbol
        $text = "ID";
        $fontHeight="12";
        $foregroundColor = 'FF000000';
        $textSymbol = $factory->CreateTextSymbol($text,
        $fontHeight, $foregroundColor);
        // Create a point rule.
        $legendLabel = 'trees';
        $filter = '';
        $pointRule = $factory->CreatePointRule($legendLabel,
        $filter, $textSymbol, $markSymbol);
        // Create a point type style.
        $pointTypeStyle = $factory->
        CreatepointTypeStyle($pointRule);
        // Create a scale range.
        $minScale = '0';
        $maxScale = '1000000000000';
        $pointScaleRange = $factory->CreateScaleRange($minScale,
        $maxScale, $pointTypeStyle);
        $featureName = 'PointSchema:Points';
        $geometry = 'GEOM';
        $layerDefinition = $factory->
        CreateLayerDefinition($featureSourceName, $featureName,
        $geometry, $pointScaleRange);
// Add the layer to the map
$newLayer = add_layer_definition_to_map($layerDefinition, "Points",
"Points of Interest", $sessionId, $resourceService, $map);
add_layer_to_group($newLayer, "Analysis", "Analysis", $map);
Jackie Ng wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Do you have an "outer" xml template that you are merging this with? If
so, that's the one where you'll have to place the <ToolTip> tag under.
- Jackie
Kencana wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Jacky,
Thank you for the reply.
Anyway I can't find the geometry tag under the marksymbol.templ.
this is what i have in markersymbol.templ
<W2D>
<Unit>Points</Unit>
<SizeContext>DeviceUnits</SizeContext>
<SizeX>%s</SizeX>
<SizeY>%s</SizeY>                
<Rotation>0</Rotation>
<MaintainAspect>true</MaintainAspect>
<W2DSymbol>
<ResourceId>%s</ResourceId>
<LibraryItemName>%s</LibraryItemName>
</W2DSymbol>
<FillColor>%s</FillColor>                
<LineColor>FF000000</LineColor>
<TextColor>FF000000</TextColor>
                 <ToolTip>test 123</ToolTip>
</W2D>
I did make some changes to the LayerDefinition-1.0.0.xsd and the error
message has gone. however,
i can't see the tool tip when i mouse over the marker.
any idea of this?
anyway i am still using mapguide opensource 1.1.0.
because the new version (1.2) the marker is not shown on the map.Have
mentioned about this issue in this forum, but so far I havent see any
solution for it yet.
Thank you
Regards,
Kencana
Jackie Ng wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Did you put the tooltip tag in the right location? The <ToolTip> tag
usually follows the <Geometry> tag in a layer definition document.
- Jackie
Kencana wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
Can we modify the markersymbol.templ file to add <ToolTip></ToolTip>
tag into it?
I have try to add it but it returns me such error message.
ERROR: The new XML document is invalid.
.PHP Warning: Element W2D content check failure in C:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\CAN MAP
Files\layer_functions.php on line 27 PHP Fatal error: Call to a
member function SetGroup() on a non-object in C:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\CAN MAP
Files\layer_functions.php on line 66
any idea on how i can make it work?
Thank you
Regards,
Kencana Kesuma
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap=""> <a class="moz-txt-link-freetext" href="http://www.nabble.com/file/p13699701/LayerDefinition-1.0.0.xsd">http://www.nabble.com/file/p13699701/LayerDefinition-1.0.0.xsd</a>
LayerDefinition-1.0.0.xsd
<a class="moz-txt-link-freetext" href="http://www.nabble.com/file/p13699701/layerdefinitionfactory1.php">http://www.nabble.com/file/p13699701/layerdefinitionfactory1.php</a>
layerdefinitionfactory1.php
<a class="moz-txt-link-freetext" href="http://www.nabble.com/file/p13699701/marksymbol.templ">http://www.nabble.com/file/p13699701/marksymbol.templ</a> marksymbol.templ
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>