MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Finding nearest pushpins in dataset

This is a discussion on Finding nearest pushpins in dataset within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am writing a vb application using mappoint and currently have it so that the user can enter an address, ...


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 10-16-2003
Senior Member
Green Belt
 
Join Date: Sep 2003
Posts: 103
Finding nearest pushpins in dataset

I am writing a vb application using mappoint and currently have it so that the user can enter an address, the map template i have created then zooms to the location on the map and adds a pushpin. I would like mappoint to then return the location of the nearest pushpin in a seperate dataset, is this possible.

I am currently using

objPushPin.Location.FindNearby(2).Item(1).Name

where objpushpin is the location the user has typed in, however this returns nearest places of interest (i.e. hotels, airports etc.) is it possible to have it locating nearest pushpins instead.

Thanks in advance for your help.

Dazzer
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 10-16-2003
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Look at the "QueryCircle" method. Using your new pushpin as the center you can enumerate other pushpins within the circle.
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
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 10-17-2003
Senior Member
Green Belt
 
Join Date: Sep 2003
Posts: 103
Thanks for your help, I did try this before but couldn't get it to work.
I put in the following line to add the query results to a recordset

objRecords = objMap.DataSets.Item("Pushpins").QueryCircle(objPu shPin.Location, 200)

Where objRecords is a recordset, objMap the active map, objPushpin the pushpin entered by the user and the dataset 'pushpins' contains the pushpins I wish to search for.

However when I try to run this I get the error 'Object variable or with block variable not set' which would seem to indicate it can't find the dataset (or that i am doing something very wrong!).

What the program is intended to be used for is to find the nearest store to our customers.
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 10-17-2003
Senior Member
Green Belt
 
Join Date: Sep 2003
Posts: 103
Its ok figured it out, it was my rather eratic typing that had caused a problem earlier on in the code!!!

In fact the queryCircle idea now works really well, thanks for your help.
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
dataset, finding, nearest, pushpins


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
Finding the nearest road given a lat long. Anonymous MapPoint 2006/2009 Discussion 6 18 Hours Ago 06:54 PM
Finding the center of a group of pushpins Anonymous MapPoint 2006/2009 Discussion 3 04-07-2004 04:51 PM
Nearest pushpins Anonymous MapPoint 2006/2009 Discussion 2 01-07-2004 07:57 AM
More efficient search capabilities - finding Pushpins Anonymous Wish List 0 08-12-2003 09:42 AM
Finding Nearest Gas Station based on brand names- shell Anonymous MapPoint 2006/2009 Discussion 0 04-09-2003 02:09 PM


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


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 53 54 55