[mapguide-users] DigitizePoint

dorra2007 dorrdor at yahoo.fr
Fri Oct 19 03:48:07 EDT 2007


Thank you macieksk for your reply;
I have tried the code you gave me but  Ihave this error message when
executing it :

parent.parent.ViewerFrame.mapFrame have the null value or is not an object

I thing that the error is expected beacause the name of the map is not
mentionned.
I don't know how to manipulate frames, can you explain me, please, what
parent.parent.ViewerFrame refers to?!

In some codes that I found in forums, this expression is used:

parent.mapframe.Mymap
to access the map, where Mymap is the name of the map  I want to clic on.

So, what do you think?


macieksk wrote:
> 
> 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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/DigitizePoint-tf4648031s16610.html#a13289844
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list