[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
www.undertowsoftware.com • View topic - mappro80, how to save points

mappro80, how to save points

A forum made available for users of the MapPro OCX SDK to exchange ideas, ask each other questions, etc.

mappro80, how to save points

Postby billrot » Wed Feb 16, 2011 10:04 am

Does anyone have a simple code snippet that shows how to Mark off points on the map and have them stored in a file so they can be loaded later on? I am tracing some big plots of land and I'd like to be able to click on the corners of these plots and then have the information saved to a file so I can then combine them to display a whole area of these plots.
User avatar
billrot
Active User
Active User
 
Posts: 45
Joined: Fri May 14, 2010 8:27 am

Re: mappro80, how to save points

Postby Gyrotech » Wed Feb 16, 2011 4:50 pm

What environment are you developing in? There C# sample code has some routines that do just that! Even if you are using a different environment, it should be easy to convert their sample code.
User avatar
Gyrotech
Frequent User
Frequent User
 
Posts: 52
Joined: Mon May 03, 2010 11:23 pm

Re: mappro80, how to save points

Postby CraigWY » Mon Feb 21, 2011 9:51 am

I've done this in multiple IDEs with v7.1, and I presume i't's the same in v8. It really is very simple. Have a button that turns the user mode on, .mapmode=mduser and sets some global veriable to true (e.g. IamCapturingPoints=True) and some counter to 0 (e.g., NumberOfPointsCaptured=0). Then, in the control's onClick event, check to see if IamCapturingPoints=True and if so, store the values of .Xcord and .Ycord to an array you have already defined (e.f., MyCapturedPoints[i,j])as the coordinates of the point you clicked on and increment NumberOfPointsCaptured by one. When you finish capturing points, have another button that cancels the mode, .mapmode=mdzoom, and writes the array of points you have created MyCapturedPoints[i,j] to a file.

Does that make sense?
User avatar
CraigWY
Casual User
Casual User
 
Posts: 12
Joined: Mon Feb 21, 2011 9:35 am


Return to MapPro OCX

Who is online

Users browsing this forum: No registered users and 1 guest

cron