• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk MapGuide Enterprise

    Reply
    Contributor
    s.klein
    Posts: 16
    Registered: ‎03-28-2011
    Accepted Solution

    Digitizing Point in Flexible Layout and IE/FF

    733 Views, 4 Replies
    07-14-2011 03:06 AM

    Hello,

    i want to use the digitizing php example of mapguide dev samples in AIMS 2012 with flexible layout in order to show XY-Coordinates of a point in task pane.
    Finally i got it working, but just for flexible layout in internet explorer. When i want to use the widget in firefox 3.6 nothing happens. The standard browser of the company i'm working at is firefox 3.6 so it would be nice if anyone knows something about that problem.

     

    the code i'm using:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>

    <script type="text/javascript" language="javascript" src="\\SRV05\C$\Programme\Autodesk\Autodesk Infrastructure Web Server Extension 2012\www\fusion\layers\MapGuide\MapGuideViewerApi.js"></script>
    <script type="text/javascript">

    function showCoordniate(geomText) {
    document.getElementById('coordResult').innerHTML = geomText;
    }

    function OnDigitizePoint() {
    //ClearDigitization();
    DigitizePoint(OnPointDigitized)
    }

    function OnPointDigitized(point) {
    var geomText = "X: " + point.X + "<br>" + "Y: " + point.Y;
    showCoordniate(geomText);
    }

    </script>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <input type="button" name="" value="Punkt" class="Ctrl" id="pntButton" onclick="OnDigitizePoint()"
    style="width: 30%" />
    <input type="button" name="" value="L&ouml;schen" class="Ctrl" id="clearButton" onclick="ClearDigitization()"
    style="width: 35%" />
    <hr />
    Koordinaten:<br />
    <div id="coordResult" style="height: 50; width: 275; overflow: scroll; color: InfoText">
    </div>
    </div>
    </form>
    </body>
    </html>

     

    I recognized that firefox 3.6 has problems with some kind of javascript, but i couldn't find a solution yet.

     

    best regards,

    S. Klein

    Please use plain text.
    Mentor
    Posts: 242
    Registered: ‎10-06-2008

    Re: Digitizing Point in Flexible Layout and IE/FF

    07-14-2011 06:51 PM in reply to: s.klein

    Do you have firebug installed? Does it raise any errors? 

     

    - Jackie

    Please use plain text.
    Contributor
    s.klein
    Posts: 16
    Registered: ‎03-28-2011

    Re: Digitizing Point in Flexible Layout and IE/FF

    07-15-2011 04:23 AM in reply to: jackie.ng

    Hello Jackie,

     

    Firebug console prints this error:

    DigitizePoint is not defined
    [Bei diesem Fehler anhalten] DigitizePoint(OnPointDigitized)

    (line 15 in XYTool.html)
    But in IE8 the tool works..
    S. Klein

    

    Please use plain text.
    Mentor
    Posts: 242
    Registered: ‎10-06-2008

    Re: Digitizing Point in Flexible Layout and IE/FF

    07-17-2011 05:30 PM in reply to: s.klein

    Does the Net tab in firebug show MapGuideViewerApi.js being successfully downloaded?

     

    Somehow I get the feeling that Firefox doesn't like the fact that your MapGuideViewerApi.js is a UNC path.

     

    - Jackie

    Please use plain text.
    Contributor
    s.klein
    Posts: 16
    Registered: ‎03-28-2011

    Re: Digitizing Point in Flexible Layout and IE/FF

    07-17-2011 11:15 PM in reply to: jackie.ng

    Thanks Jackie, you are right. Firefox is unable to read the UNC path.

    Just changed it and the tool works in firefox, too.

     

    best regards,

    S. Klein

    Please use plain text.