[mapguide-users] Tooltip and URL Layer Definition Parsing
Kenneth, GEOGRAF A/S
ks at geograf.dk
Wed Feb 6 10:20:49 EST 2008
If you want to parse a general tooltip string, you have to find
documentation on which FDO SQL constructs are avalible.
You will most likely spend a lot of time on this, since it includes
tokenization, operator precedence and other parsing aspects.
It is not parsed by the javascript.
The FDO library can be imported in C# (.Net 2.0+), and you should be
able to get the FDO library to parse it for you.
An easier approach would be to try giving the expression to a select
statement executed on the datasource.
I have not tried this.
If you get it to work, it would be great if you shared your findings.
Regards, Kenneth, GEOGRAF A/S
BruceWeston skrev:
> Hi folks,
>
> I have a .NET application using mapguide and I want to get the information
> from a layer tooltip field out as a string and parse it. I have now got to
> the stage where I can read the XML definition of the layer and pull out the
> ToolTip and URL as strings in my C# code
>
> So, as an example, in the XML layer definition I have
> <ToolTip>concat('http://www.testurl.com/Documents/PDFs/', concat("Name",
> '.pdf'))</ToolTip> and I want to display
> http://www.testurl.com/Documents/PDFs/blah.pdf in my code. (yes I know
> that's a URL but you get the point).
>
> Has anyone written a function in c# to parse this? I'm assuming it's some
> kind of FDO language that has the concat functions etc, but now I think on
> it, could it be that javascript parses it automatically?
>
> Any help much appreciated!
>
> Ross
>
>
>
>
>
>
>
More information about the mapguide-users
mailing list