Community of VE/MapPoint Users and Developers
This is a discussion on QueryCircle within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi I am using MP2001 and am trying to write a bit of code that will find all pushpins within ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| QueryCircle The problem I have is marked with a '<---------------- I cannot use my found pushpin location to run the QueryCircle... I can only use long/lat cords. (Which seem not to tie up with my found pushpin either..) Can someone please help? Here is my code: Private Sub Command0_Click() Dim oApp As MapPoint.Application Dim oMap As MapPoint.DataSet Dim oRS As MapPoint.Recordset Dim oLoc As MapPoint.Location Dim oField As MapPoint.Field Dim FindLoc(1 To 1) As Object Set oApp = CreateObject("MapPoint.Application") Set oMap = oApp.OpenMap("C:\test.ptm").DataSets("Contacts") Set FindLoc(1) = oApp.ActiveMap.FindPushpin(Company) 'Finds pushpin from current selected contact. FindLoc(1).BalloonState = 1 If Not FindLoc(1) Is Nothing Then MsgBox "Found: " & FindLoc(1).Name Set oLoc = oApp.ActiveMap.GetLocation(51.74619, 0.3337) '<--------------- 'Set oLoc = oApp.ActiveMap.GetLocation(FindLoc(1)) '<---------------- Set oRS = oMap.QueryCircle(oLoc, 20) FindLoc(1).Goto Dim temp As String temp = "Locations within 20 Miles of " & Company & vbCrLf & vbCrLf oRS.MoveFirst Do Until oRS.EOF 'oRS.Pushpin.BalloonState = 1 temp = temp & oRS.Pushpin.Name & vbCrLf oRS.Pushpin.Highlight = True oRS.MoveNext Loop MsgBox temp oApp.ActiveMap.CopyMap Box1.Action = acOLEPaste Else MsgBox "Error: Could not find " & Company End If Set oMap = Nothing Set oApp = Nothing Set oLoc = Nothing Set oPin = Nothing End Sub Thanks Pete |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FindNearby or QueryCircle | RickS | MapPoint 2006/2009 Discussion | 1 | 12-27-2005 09:53 AM |
| Drawing an Oval Using The Toolbar - QueryCircle? | Steve Wenck | MapPoint 2006/2009 Discussion | 1 | 08-16-2004 12:49 PM |
| Find Addresses in Querycircle | Anonymous | MapPoint 2006/2009 Discussion | 0 | 04-02-2004 02:45 AM |
| QueryCircle Question | Anonymous | MapPoint 2006/2009 Discussion | 0 | 09-05-2003 09:12 AM |
| QueryCircle | Anonymous | MapPoint 2006/2009 Discussion | 1 | 04-24-2003 10:12 AM |
Flights to Funchal
Magnificent Madeira provides panoramic views for you. See for yourself and book cheap flights to the capital, Funchal.
European City Breaks
Book European city breaks with Travel Counsellors. A personal travel counselor will help plan your European city break.
Cuba Holiday
A Cuba Holiday has so much to offer with numerous different cultures affecting the sights, sounds and tastes. Visit this fascinating country with dealchecker.co.uk.
Holidays to Mauritius
Visit the paradise island in your holidays to Mauritius. Enjoy the friendliness of the locals, the warm of the sun and the beauty of the views!
Cheap Cyprus Holidays
Finding cheap Cyprus holidays can be difficult unless you know where to look and where to book. With ulookubook.com you can conduct a simple search to find the latest holiday deals to your particular destination.
Compare Holidays
Compare holidays online where you can see all the amazing possibilities at Travel.co.uk
Holidays in Cyprus
Visit the tombs of the island kings! Visit On The Beach for information on holidays in Cyprus.