MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How to find the right

This is a discussion on How to find the right within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, I've got a really simple question but it's a real problem for me to find a solution. I'd like ...


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-08-2002
Vincent BENNER's Avatar
Member
Yellow Belt
 
Join Date: Sep 2002
Posts: 41
How to find the right

Hello,

I've got a really simple question but it's a real problem
for me to find a solution.

I'd like to put a pushpin into a map with the FindAddressResults
or FindResults methods.

What I know : the STREET, the ZIP CODE and the CITY.

When I make such a test :

Dim objPIN As MapPoint.Pushpin
Dim objFR As MapPoint.FindResults

Set objFR = Me.ctrlMAPPOINT.ActiveMap.FindAddressResults("RUE DE LA MAIRIE", "DIJON", , , "21000", "FRANCE")
Set objPIN = Me.ctrlMAPPOINT.ActiveMap.AddPushpin(objFR.Item(1) , "TEST")
objPIN.Symbol = 5



The street named "RUE DE LA MAIRIE" doesn't exist in the DIJON city. So, mapPoint puts a PushPin to about 300 kms for the DIJON city !!!!

What's wrong in my code ?

Regards,

Vincent BENNER
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-09-2002
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Vincent,

Give this sample a try, hopefully it will get you on the right track...

in this example I have 2 forms. Form1 has the map, this code is in a
command button on form2 along with 4 textboxes. a command button on
form1 opens form2.

text1 - Street Address
text2 - City
text3 - State
text4 - Zip

Dim objmap As MapPointctl.Map
Set objmap = Form1.MappointControl1.ActiveMap
Dim objFR As MapPointctl.FindResults


Set objFR = objmap.FindAddressResults(Text1.Text, Text2.Text, ,
Text3.Text, Text4.Text, geoCountryUnitedStates)

If objFR.ResultsQuality = geoFirstResultGood Then
objmap.AddPushpin objFR.Item(1), "Good Result"
Else

'show other matches if any
For i = 1 To objFR.Count
MsgBox objFR.Item(i).Name
Next
End If

Insted of showing the msgboxes you could make the textboxes on form2
combo boxes, then in the for next loop take the "objFR.Item(i).Name"
and parse it with ParseStreetAddress method and fill the combo boxes
with the results.
__________________
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
Reply

Tags
find


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


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