[mapguide-users] Need help with one specific function

Krunoslav a_krunoslav at gmx.net
Wed Jun 6 01:00:03 EDT 2007




Jackie Ng wrote:
> 
> You use the DigitizePoint(func) function of the mapframe.
> 
> For the "func" argument supply a reference to a handler function. 
> 
> The handler function will receive a point object from the user's input,
> which you can then invoke a server-side script passing in your digitized
> point as a parameter
> 
> Then on the server side, create your point object from the parameters and
> add an MgInsertFeatures object containing this point to a feature command
> queue. Call UpdateFeatures() on the command queue and your point should be
> inserted into the Feature Source.
> 
> So step 1 should really be:
> 
> Create a handler function for the DigitizePoint() method. This should
> invoke your php script.
> 
> eg: 
> 
> function PointDigitized(point)
> {
>      //Call your php script passing point.x and point.y
> }
> 
> Step 2 is fine. 
> Step 3 should then be:
> 
> call mapFrame.DigitizePoint(PointDigitized); 
> 
> Which will start the whole process.
> 
> Hope that helps.
> 
> 

Thank you Jackie, it helped a lot. I made a "Pick a point" button in
taskpane, which picks up the coordinates from map.

-- 
View this message in context: http://www.nabble.com/Need-help-with-one-specific-function-tf3863384s16610.html#a10982398
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list