[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
[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 - Follow-Up on Sample Code not running
Page 1 of 1

Follow-Up on Sample Code not running

PostPosted: Mon Jan 23, 2012 1:46 pm
by LarryWilton
I was just wondering is using VS-2010 may be my problem. On the older system I was using VS-2008. When I opened the sample in VS-2010, on the new system, it went through an automatic conversion, which didn't happened with the VS-2008, so I am wondering if the conversion may have introduced some error. Scratching my head, but nothing :-(

Re: Follow-Up on Sample Code not running

PostPosted: Mon Jan 23, 2012 2:34 pm
by FletcherJ
Larry,

I too am running 2010. Have you tried chaning the compile settings to see if that helped?

me

Re: Follow-Up on Sample Code not running

PostPosted: Mon Jan 23, 2012 3:13 pm
by FletcherJ
Larry,

I just did a quick check.

After making sure I had the 2 ocxs in the VS 21010 toolbar, I opened a fresh copy of the sample code. Changed the compile mode to x86 (you actually have to add x64 and x86 settings), changed the target framework to 4 (I don't know if this is critical for getting the OCX to work, but it's the framework we are using for our other apps), set the startup program to "program.cs", and compiled.

It did convert one file when I tried to open it in 2010, but that was it.

The program now runs without error for me. But it won't show me any map details other than a very large, very rough outline of the US. So there is still something missing. But at least no more error...

Take care,
me

Re: Follow-Up on Sample Code not running

PostPosted: Tue Jan 24, 2012 10:45 pm
by Gyrotech
It sounds like you are not setting the datapaths correctly. The COM object needs to know *where* to find the data it needs to render the maps.

Re: Follow-Up on Sample Code not running

PostPosted: Tue Jan 24, 2012 11:03 pm
by ROstmeyer
FletcherJ wrote:Larry,

I just did a quick check.

After making sure I had the 2 ocxs in the VS 21010 toolbar, I opened a fresh copy of the sample code. Changed the compile mode to x86 (you actually have to add x64 and x86 settings), changed the target framework to 4 (I don't know if this is critical for getting the OCX to work, but it's the framework we are using for our other apps), set the startup program to "program.cs", and compiled.

It did convert one file when I tried to open it in 2010, but that was it.

The program now runs without error for me. But it won't show me any map details other than a very large, very rough outline of the US. So there is still something missing. But at least no more error...

Run the sample program, select File, Configure and in the Data Paths tab, make sure each of the datapaths is pointing to the appropriate folders on your system. Also make sure you set the datasource to US,CA.

Once you do that, you should be able to see all the map data, streets, etc.

Re: Follow-Up on Sample Code not running

PostPosted: Wed Jan 25, 2012 10:06 am
by LarryWilton
FletcherJ wrote:Larry,

I too am running 2010. Have you tried chaning the compile settings to see if that helped?


It turns out it had nothing to do with the VS-2010 conversion. I missed a little thing, that the sample program couldn't run properly since the controls were not part of the VS toolbox. I had forgotten to add them, duh - for some reason, I thought that he installation would have done that automatically, or the sample code would have created the instances at run time, on its own.

In any case, it all sort-of makes sense now and I can proceed with my work.

Re: Follow-Up on Sample Code not running

PostPosted: Wed Jan 25, 2012 10:10 am
by LarryWilton
Gyrotech wrote:It sounds like you are not setting the datapaths correctly. The COM object needs to know *where* to find the data it needs to render the maps.

Yup, been caught but that many times. I used to set the datapaths at design time, by right-clicking on a visual instance of the OCX on my form and then selecting "Properties". Then, after that, I didn't have to worry about the datapaths and the datasource. However, once-in-a-while, I would forget to do that and then would spend 15 minutes trying to figure out what broke and my maps wouldn't appear :-)

You are right, if you don;t tell the OCX where the data is, there is no way for it to paint the maps.