Hi All,
Inspired by this article , I'm trying to experiment with Map Point, OLE, and Perl. I'm trying to create an array of locations to pass to addPolyLine, with no luck so far. The method addPolyLine requires an array of locations, however, it get confused when I try the code below. I may need to use a variant type, but I'm not sure how I would do that... Any ideas? Thanks
use Win32::OLE qw(in with); use Win32::OLE::Const; use Win32::OLE::Const 'Microsoft MapPoint'; $Win32::OLE::Warn = 3; # die on errors... @states= qw (iraq iran); my $MapPoint = Win32::OLE->new('MapPoint.Application', 'Quit'); my $Map = $MapPoint->NewMap(); my $Results = $Map->FindPlaceResults("Virginia"); my $second = $Map->findPlaceResults("Maryland"); my $Location = $Results->Item(1); $Location->GoTo; my $secLocation = $second->Item(1); my @ary = ($location,$secLocation); my $x = $Map->Shapes->addPolyLine(@ary); # Fails # More below here


----
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 +;

In reply to OLE & Array (MapPoint addPollyLine) by zakzebrowski

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.