MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




ParseStreetAddress method

This is a discussion on ParseStreetAddress method within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Using the following code from MapPoint2002 Help in VB6 for ParseStreetAddress method. I try to parse "avenida talega,san clemente,CA,92673" and ...


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 12-30-2002
Junior Member
White Belt
 
Join Date: Dec 2002
Posts: 1
ParseStreetAddress method

Using the following code from MapPoint2002 Help in VB6 for ParseStreetAddress method. I try to parse "avenida talega,san clemente,CA,92673" and get error "Runtime error:91 Object variable or With block variable not set". This is a valid address in MapPoint 2002. Can somebody please explain. I don't get this error with all other valid addresses. Thanks.


Sub FindAddressFromString()

Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim strAddress As String
Dim objSA As MapPoint.StreetAddress

'Set up the application
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True

'Set a string, then parse it
strAddress = "1 Microsoft Way, Redmond, WA"
Set objSA = objMap.ParseStreetAddress(strAddress)

'Now search on this address and return first result
MsgBox "First found address: " + objMap.FindAddressResults(objSA.Street, _
objSA.City, , objSA.Region).Item(1).Name

End Sub
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 06-26-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Try declaring MapPoint.Application object as follows:
Dim objApp As New MapPoint.Application
Set objApp = CreateObject("MapPoint.Application")

Hope that helps.

Mark
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 07-01-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
I had a similar problem. Set the results to a location object. Then test the object to find out if the function returned a valid location.

Heres a bit code that determines if the full address I provided was found by MP. If not I use on the zipcode to create the Location object.
Good Luck!


Dim oLoc as MapPoint.Location
Set oLoc = objMap.FindAddress(sAddr1, sCity, sState, sZip, geoCountryUnitedStates)
If oLoc Is Nothing Then
Set oLoc = objMap.FindAddress("", "", "", sZip, geoCountryUnitedStates)
End If
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
method, parsestreetaddress


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
Calculate Method Anonymous MapPoint 2006/2009 Discussion 1 05-11-2005 02:20 PM
Problem with ParseStreetAddress pippo MapPoint 2006/2009 Discussion 3 04-29-2005 03:34 PM
DisplayDataMap method c# fletch MapPoint 2006/2009 Discussion 1 04-08-2005 07:26 AM
UpdateLink method Maverick MapPoint 2006/2009 Discussion 1 04-14-2003 02:21 AM
Map PrintOut method blackmap MapPoint 2006/2009 Discussion 1 01-10-2003 03:04 PM


All times are GMT -5. The time now is 02:30 AM.


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