[mapguide-users] How to embed the website into the widget?

Chris Claydon chris.claydon at autodesk.com
Fri Mar 20 18:22:01 EDT 2009

So, if I understand correctly, you want to add a button to a flexible web layout that will launch a website in a new browser window?

You should be able to do that really easily using an InvokeScript widget. Just set the script to be something like: window.open('http://mapguide.osgeo.org', null);

If you have a copy of MapGuide Studio, it should be easy to create the new widget using the UI.
If you don't have MapGuide Studio, here's the XML for the widget instance:

    <Widget xsi:type="UiWidgetType">
      <Location />
        <Script>window.open('http://mapguide.osgeo.org', null);</Script>
        <Target />
      <ImageUrl />
      <ImageClass />
      <Label>MG Website</Label>
      <Tooltip />
      <StatusText />

(That needs to go into the <WidgetSet> section of the flexible web layout definition)

Then you just need to reference it from one of your toolbars, e.g.

      <Item xsi:type="WidgetItemType">

(That needs to go into the <Container> corresponding to the toolbar.)

e.g. for the 'ToolbarSecondary' toolbar...

    <Container xsi:type="UiItemContainerType">
      <Extension />
      <Item xsi:type="WidgetItemType">
      <Item xsi:type="WidgetItemType">
      <Item xsi:type="WidgetItemType">
Etc, etc, etc.

I hope that helps,


-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of achectl
Sent: Thursday, March 19, 2009 10:02 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] How to embed the website into the widget?

Hi All,

Can the widget (Flexible web layout) be embedded a website? I would like to
make a button, it will used for opening a widget. The widget will open and
display the website. Can it do that? Thanks in advance.

View this message in context: http://n2.nabble.com/How-to-embed-the-website-into-the-widget--tp2503767p2503767.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

mapguide-users mailing list
mapguide-users at lists.osgeo.org

More information about the mapguide-users mailing list