Mappoint + COM + PHP

Anonymous
05-10-2005, 12:01 PM
Hi,

Struggling a bit here so wonder if anywone can help.

I have a php script that needs to call on a route object. I think i can work it into mappoint.

However, i cannot get the script to work for a pretty basic task:


$ex = new COM("MapPoint.application");
$ex->visible = true;
$ex->NewMap();
$ex->ActiveMap;
$ex->AddPushpin;
$res = $ex->FindAddressResults("", "", "", "London", "", "");


I get error:
Fatal error: Call to undefined method com::FindAddressResults() in c:\Inetpub\wwwroot\map2.php on line 18

I have trawled the web and cannot find any real support for mappoint & php - this site seems to be the best.

Can anyone point me in the right direction?

Many Thanks

ChaosT

Wilfried
05-10-2005, 01:25 PM
Hi,

FindAddressResults is a method from Mappoint.Map, and ActiveMap is of that type. So I think you have to do:

$res = $ex->ActiveMap->FindAddressResults("", "", "", "London", "", "");


Or something similar, because I dont know the exact syntax of PHP :(

Winwaed
05-10-2005, 01:35 PM
Regarding lack of support for PHP and MapPoint, one has to ask "Why?"!

Why are you trying to use MapPoint and PHP?
The EULA restricts MapPoint use for Internet (or Intranet) applications. Basically it boils down to a license per user. And a limit on web images per license (1000 I think - enough for most people, but not for automated maps)


Richard

 
Web mp2kmag.com
mapforums.com