Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mappoint in Canada

Status
Not open for further replies.

JaneJantz

Programmer
Sep 13, 2000
55
US
I am using MS Mappoint 2002 inside my VFP application for dispatching.. This works very well for companies in the United States, however when I try to plot points in Toronto Canada, it gives me an error message saying that it cannot parse addresses in this country.

The Mappoint application does plot Canadian addresses if you use their combo box, but I need to feed addresses to it through my application using their FindAddressResults() command.

Has anyone tried this? If it is a problem with Microsoft Mappoint, how do I post a problem report to them? There was an article in the Fox Advisor on Mappoint several years ago, but have not seen any since.

Any help would be appreciated.
 
That's very interesting considering that Microsoft Streets and Trips, which I'm pretty sure uses Mappoint as its mapping engine, has maps of the US and Canada in it.

What is the exact error message you are getting when you try to feed the address in?

Ian
 
Hi Ian,
I get an OLE IDispatch exception code 0 from MapPoint Applicaton NA.9: Cannot parse an address within the specified country.... Cancel, Suspend, Ignore, Help.

Eg I am using:
oLoc=oMap.FindAddressResults("44 Torra St","Toronto",,"Ontario",,"geoCountryCanada")

If I put this address into their combo box in the stand-alone application, it comes right up. So I know they have all the streets for Canada in there.

Thanks.
 
Just for kicks, try this instead:

oLoc=oMap.FindAddressResults("44 Torra St","Toronto",,"Ontario",,geoCountryCanada)

The difference is that I didn't enclose "geoCountryCanada" in quotes. Does that give the same error?

Ian
 
Hmm...assuming you made a typo (you typed "county" instead of "country"), then it looks like you don't have the constants file #included. For a test, do this:
[tt]
oLoc=oMap.FindAddressResults("44 Torra St","Toronto",,"Ontario",,39)
[/tt]
The constant "geoCountryCanada" is 39.

This should work.

Ian
 
Well, that does not give me an error, however it puts me in Hymer Kansas... wherever that is...(I suspect the center of the USA). All I did was replace "geoCountryCanada" with 39 as you suggested.

Did you get it to actually map in Canada?
Appreciate your help.
 
Odd. Honestly, I actually don't have MapPoint myself. I pulled that information from this page:


In order to be able to use the constant "geoCountryCanada" instead of the number, you have to include a file. It's probably "mappoint.h" (or something similar) and would be somewhere on your computer. For any form that uses MapPoint, you must go to the Form menu and select "Include file..." then select "Mappoint.h".

It's possible (however unlikely) that the constant has changed, and 39 isn't Canada anymore. I don't think they would have done that, though...

On a side note, I put the address "44 Torra St, Toronto, Ontario, Canada" into Microsoft Streets and Trips 2002, and the address doesn't come up with a match. Are you sure it's in there?

Hope that helps.

Ian
 
I put the same address in the combo box on Mappoint 2002 and it comes right up. It is a valid address. My customer is at that address and is wanting to use my dispatch application with the mapping interface. For some reason, I cannot get Canada to map via the code.

How would I report this problem to Microsoft to see if they have any patches for the Mappoint application? Does anyone know?

Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top