Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

FInd center location of ZipCode area using MP ActiveX (MP 2006)

This is a discussion on FInd center location of ZipCode area using MP ActiveX (MP 2006) within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, How can I obtain the Location object from MP activeX corresponding to the center of the zip code? Actually ...

  1. #1
    Ekas is offline Junior Member White Belt
    Join Date
    Jan 2007
    Posts
    7

    FInd center location of ZipCode area using MP ActiveX (MP 2006)

    Hello,

    How can I obtain the Location object from MP activeX corresponding to the center of the zip code?

    Actually I need to get the Lat/Long for zip area center point. I know how to calculate lat/long from a location object. But I can't see how to obtain the location itself.
    --
    Eugene

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: FInd center location of ZipCode area using MP ActiveX (MP 2006)

    Hi,

    I'm not sure it returns always the real center of the ZIP code because the ZIP area may have irregular form, but this should do it:

    Code:
    FindResults results = MP.ActiveMap.FindAddressResults("", "", "", "", zip, country);
    if (results.ResultsQuality == GeoFindResultsQuality.geoFirstResultGood) {
        object o = 1;
        Location loc = (Location) results.get_Item(ref o);
        Pushpin p = MP.ActiveMap.AddPushpin(loc, loc.Name);
    }

  3. #3
    Ekas is offline Junior Member White Belt
    Join Date
    Jan 2007
    Posts
    7

    Re: Find center location of ZipCode area using MP ActiveX (MP 2006)

    Hi Wilfried,

    Thank you very much - I'll try this way.
    --
    Eugene

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Find center of a polygon
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 11
    Last Post: 05-25-2005, 09:54 AM
  2. Need a count of occurrences in a zipcode Shaded Area
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-29-2005, 04:36 PM
  3. Center pushin only if out of viewable area??
    By Gianmaria in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 03-22-2005, 12:06 PM
  4. Getting Location Object by only the ZipCode
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-30-2003, 04:02 PM
  5. Determining Center of a Zipcode
    By shaistasohail in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 10-21-2002, 11:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27