function DigitizeRectangle()
{
// ShowResults("");
parent.parent.ViewerFrame.mapFrame.DigitizeRectangle(OnRectangleDigitized);
}
function ShowResults4(res2)
{
parent.parent.ViewerFrame.GetScriptFrame().location.href =
"file.php?cord="+res2+"&type=square";
parent.parent.ViewerFrame.mapFrame.Refresh();
}
function OnRectangleDigitized(rect)
{
str = rect.Point1.X + " " + rect.Point1.Y + ",";
str += rect.Point1.X + " " + rect.Point2.Y + ",";
str += rect.Point2.X + " " + rect.Point2.Y + ",";
str += rect.Point2.X + " " + rect.Point1.Y + ",";
str += rect.Point1.X + " " + rect.Point1.Y + ",";
ShowResults4(str);
}
now
1. use DigitizeRectangle() function in onclick event
2. this function call OnRectangleDigitized() who take x1,y1 , x2,y2 coords
3. all is send to ShowResults4() whit res2 option...res2 have x1,y1 ,
x2,y2 coords so whit this you can write ex. point (my code write square)
i don't know when you use script so take a look on
parent.parent.ViewerFrame call.
it that helpful?
maciek
dorra2007 pisze:
Someone can give me a comprehensive javascript code of the DigitizePoint
process.
(the onDigitizedPoint doesnt accept point as argument nor (map,point), !!!!)
My task:I'am trying to pickup a point coordinate when the user clics on the
map and store them into a database.
I will be really grateful if you can help me.
--
,
Maciej Skórczewski
PROCAD SA
Autodesk Authorized Value Added Reseller
www.procad.pl
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users