[mapguide-users] Invoke Script

anand anand.speck at gmail.com
Fri Aug 19 00:10:55 EDT 2011


hi all,

I've used invoke script to add a button to draw line and i've written the
following code in the script command text window. Now the problem is when i
click the button nothing happens. I don't know what is the problem. The
following is the code which i am using:


function DigitizeLine() {
parent.parent.mapFrame.DigitizeLine(OnLineDigitized);
}

function OnLineDigitized(line)
{
//prompt(line.Point(0).X);
var params = new Array(
"x0", line.Point(0).X,
"y0", line.Point(0).Y,
"x1", line.Point(1).X,
"y1", line.Point(1).Y,
"MAPNAME",parent.mapFrame.GetMapName(),
"SESSION",parent.mapFrame.GetSessionId());
parent.formFrame.Submit("../proj/gis/Draw_Line.aspx",params, "scriptFrame");
//parent.formFrame.Submit("../proj/gis/Draw_Line.aspx",params,
"taskPaneFrame");
}
DigitizeLine()

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Invoke-Script-tp6701807p6701807.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list