MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




processing pushpins within a zip code

This is a discussion on processing pushpins within a zip code within the Development forums, part of the MapPoint 2006/2009 Discussion category; I read code in a .net book about MP that told you how to loop through a circle of given ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion > Development

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 02-08-2008
Junior Member
White Belt
 
Join Date: Feb 2008
Posts: 6
processing pushpins within a zip code

I read code in a .net book about MP that told you how to loop through a circle of given radius around a given center and process the pushpins within (e.g. calculate directions).

My project, however, needs to process pushpins within given zip codes - no circles involved. How would I compose such code?

I'm planning on writing the directions to a word file.

Thanks much,

Gary
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 02-09-2008
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Re: processing pushpins within a zip code

Hi,

A pushpin has a Location property and this has a StreetAddress property with a PostalCode property. Is that what you wants ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 02-11-2008
Junior Member
White Belt
 
Join Date: Feb 2008
Posts: 6
Re: processing pushpins within a zip code

Are you telling me I should loop through all my push pins and test in an if statement for those whose postal property = the zip code I'm interested in?

How do you loop through all push pins?

Gary
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 02-15-2008
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Re: processing pushpins within a zip code

Hi,

Yes that's how to do it. Here is example in C#:

Code:
object o = 1;
Recordset rs = MP.ActiveMap.DataSets.get_Item(ref o).QueryAllRecords();
while (!rs.EOF) {
    if (rs.Pushpin.Location.StreetAddress != null)
        ; // etc..
    rs.MoveNext();
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 02-15-2008
Junior Member
White Belt
 
Join Date: Feb 2008
Posts: 6
Re: processing pushpins within a zip code

That code tests if there's a street address, I wanted to test of the push pins zip code equaled the one I'm interested in.

WE're actually doing it in VBA.

Thanks, though - it still is helpful.

gary
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Re: processing pushpins within a zip code

Hi,

Yes but you have to check if Streetaddress property is not null. the Postal code property is one of the StreetAddress.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 02-19-2008
lfdmike's Avatar
Member
Yellow Belt
 
Join Date: May 2004
Posts: 49
Blog Entries: 7
Re: processing pushpins within a zip code

Gary

Wilfried gave you a good start to your goal, you just need to fill in the whatever functionality you need to do with it. I expanded on the provided code for a sample, which will need to be syntaxed for whatever language you are working with

Quote:
Recordset rs = MP.ActiveMap.DataSets.get_Item(ref o).QueryAllRecords();
while (!rs.EOF) {
if (rs.Pushpin.Location.StreetAddress != null)
then
retrieve postal code information from StreetAddress

if zipAddress = zipWanted
then
place pushpin data into matching set
else
place pushpin data into foreign set (if desired)
end if

else
place pushpin data into unkown set (if desired)
end if


rs.MoveNext()
}
__________________
Mike Mueller
Lannon Fire Department
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
code, processing, pushpins, zip


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/processing-pushpins-within-zip-code-7107.html

Posted By For Type Date
The Magazine for MapPoint - MP2K Magazine This thread Refback 02-10-2008 03:18 PM
Working With Excel and MapPoint - MP2K Magazine This thread Refback 02-10-2008 12:27 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
mappoint pushpins and zip code heavy hitters tvsmvp MapPoint 2006/2009 Discussion 1 10-10-2005 01:01 PM
Batch Processing Anonymous MapPoint 2006/2009 Discussion 0 08-27-2004 12:31 AM
Records matched to Zip Code don't have Pushpins Anonymous MapPoint 2006/2009 Discussion 0 08-26-2004 03:12 PM
Pushpins missing when matched by Zip Code Frielink MapPoint 2006/2009 Discussion 0 06-23-2004 11:15 AM
Zip code distances from pushpins? mschoonmaker MapPoint 2006/2009 Discussion 0 08-14-2003 07:05 AM


All times are GMT -5. The time now is 06:38 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Catered Chalet
Book a catered chalet online through Holiday Hypermarket. It's easy to use the ski holidays search to find the right holiday for you.

Spain Holidays
Find and book Spain Holidays with Travel Counsellors. Holiday destinations around the world including Spain.

Turkey Holidays
Istanbul is Turkey's prime attraction as it has the most beautiful mosques and palaces of the country; it has Byzantine churches and Roman temples. Book Turkey Holidays online.

Holidays to Bahamas
Choose from a number of extraordinary holidays to the Bahamas at The Holiday Place. See pictures of these beautiful islands online.

Canaries
Find out all about the Canaries when you check out the ulookubook.com travel guides. Not only can you get a great holiday deal but you can find out useful information about potential holiday destinations.

Holiday
For the holiday of your life, that is easy to plan, visit Travel.co.uk to see all the options.

Cheap holidays in Cyprus
Stunning coastline! Beautiful beaches! Cheap holidays in Cyprus, available at On The Beach.


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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52