MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Finding closest 10 locations

This is a discussion on Finding closest 10 locations within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am trying to find a way to pass in our employees and their addresses, and have it return the ...


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

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



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-17-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Finding closest 10 locations

I am trying to find a way to pass in our employees and their addresses, and have it return the 10 closest to a given customer address. I have come accross some functionality that is close, but I cannot find anything that does this exactly.

Any ideas?
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 11-19-2003
Senior Member
Green Belt
 
Join Date: Sep 2003
Posts: 103
You can do something along these lines with VB, you could import all of your employees into a given dataset and then use QueryCircle to find all employees in within a set radius of the customer.

eg.

Code:
dim objRecords As MapPoint.Recordset

Set objRecords = objMap.DataSets.Item(1).QueryCircle(objPushPin.Location, 2)
This would pull all of the employees in the dataset within in a 2 Mile (or kilometer depending on what unit your using) radius from objPushPin.Location (where objPushPin.Location in your customer) into the recordset objRecords.

You will need to programatically set objPushpin as your customer.

Code:
Dim objloc As MapPoint.Location
Dim onjPushPin As MapPoint.Pushpin
Dim GappMp As Mappoint.Application
DimObjMap As Mappoint.Map

Set gappmp = CreateObject("MapPoint.Application")

gappmp.Visible = True

Set objMap = gappmp.ActiveMap

        Set objloc = objMap.FindAddressResults("StreetNo Street, Town, Village, County, PostCode")(1)
        Set objPushPin = objMap.AddPushpin(objloc, Street)
        objPushPin.Name = "PinName"
        objPushPin.BalloonState = geoDisplayBalloon
        objPushPin.Symbol = 77
        objPushPin.Highlight = True
        objPushPin.Select
I'm not sure i've explained this very well but these articles proved helpful to me.

http://www.mp2kmag.com/articles.asp?ArticleID=74
http://www.mp2kmag.com/a46--find.fro....mappoint.html
http://www.mp2kmag.com/a39--word.acc....mappoint.html
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
closest, finding, locations


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
Find closest between two sets of addresses? mksql MapPoint 2006/2009 Discussion 2 08-22-2005 11:49 AM
Find 3 closest matches eblubber MapPoint 2006/2009 Discussion 5 02-09-2005 09:45 AM
Finding USA Data everblader MapPoint 2006/2009 Discussion 1 01-19-2005 12:41 PM
finding locations SimonPearse MapPoint 2006/2009 Discussion 0 09-23-2004 08:56 AM
finding a pushpin from a .dll blackmap MapPoint 2006/2009 Discussion 1 01-10-2003 02:11 PM


All times are GMT -5. The time now is 07:03 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

Orlando Flights
Holidays in Orlando are fantastic for families. There are a massive range of spectacular theme parks. Let Holiday Hypermarket book you great value Orlando flights and hotels.

City Breaks
Book a city break with Travel Counsellors. A personal travel advisor will help you make the most of your city break.

Cheap Holidays to Turkey
If you’re looking for cheap holidays to Turkey then dealchecker.co.uk is the place for you! Our search helps you see real prices from the UK’s top holiday companies all in one go.

Holidays to St Lucia
Holidays to St Lucia will leave you smiling. The spectacular scenery and the warmth of the locals make holidays to St Lucia unforgettable.

Cheap Balearics Holidays
Cheap Balearics holidays are available if you know when to book and who to book with. The Balearics have many fascinating places to visit all year round. The partying never stops.

Comparison Holidays
Travel.co.uk is a travel comparison service which makes it easy for you to find and plan the best holidays.

Fuerteventura Holidays
Visit one of the closest Canary Islands to Africa! Book Fuerteventura holidays 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