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ö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
Solved! Go to Solution.
Hello Jackie,
Firebug console prints this error:
DigitizePoint is not defined
[Bei diesem Fehler anhalten] DigitizePoint(OnPointDigitized)
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
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