Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: OLE & Array (MapPoint addPollyLine)

by zakzebrowski (Curate)
on Oct 09, 2003 at 16:57 UTC ( [id://297994]=note: print w/replies, xml ) Need Help??


in reply to Re: OLE & Array (MapPoint addPollyLine)
in thread OLE & Array (MapPoint addPollyLine)

Sweet! The following code produces the following maps...:
use Win32::OLE qw(in with); use Win32::OLE::Const; use Win32::OLE::Const 'Microsoft MapPoint'; use Win32::OLE::Variant; $Win32::OLE::Warn = 3; # die on errors... my $MapPoint = Win32::OLE->new('MapPoint.Application', 'Quit'); my $Map = $MapPoint->NewMap(); my $Results = $Map->FindPlaceResults("California"); my $second = $Map->findPlaceResults("Massachusetts"); my $Location = $Results->Item(1); $Location->GoTo; my $secLocation = $second->Item(1); my @ary = ($Location,$secLocation); my $x = $Map->Shapes->addPolyLine(\@ary); $x->{Line}->{EndArrowhead}=True; $Map->{Altitude} = $Map->{Altitude}*4; # adjust zoom $Map->SaveAs("yahoox", 2); # saves in /mydocuments/yahoox.htm /mydocum +ents/yahoox_files/image_map.jpg & /my documents/yahoox_files/image_ov +erview.jpg (image_overview.jpg seems to always be the same image...) $Map->{Altitude} = $Map->{Altitude}*40; $Map->SaveAs("yahoo", 2); $Map->{Saved} = -1;
map1
map2


----
Zak
undef$/;$mmm="J\nutsu\nutss\nuts\nutst\nuts A\nutsn\nutso\nutst\nutsh\ +nutse\nutsr\nuts P\nutse\nutsr\nutsl\nuts H\nutsa\nutsc\nutsk\nutse\n +utsr\nuts";open($DOH,"<",\$mmm);$_=$forbbiden=<$DOH>;s/\nuts//g;print +;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://297994]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-19 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found