Get map giving address

jparker
01-15-2007, 07:43 AM
Quick question:

I'm new to Mappoint and would like to get a map based on an address.

For example generate a map using the address:

'123 Any Street, My City, My State'.

I use Delphi for development and Mappoint 2004/Mappoint 2006.

thanks in advance for the help.

Jarod

Wilfried
01-15-2007, 12:30 PM
Hi Jarod,

FindAddressResults will give you a collection of Location objects where you can use the Goto method on.

jparker
01-16-2007, 02:13 PM
Wilfred,

Thanks for the response. I must be missing something...

Do you (or anyone else) have a snippet to? It can be in VB or C#.. doesn't need to be in Delphi.. I read all.

Just need to position the map at an address, zoom and then copy the map.

The zoom and copy i found the functions.. .just need to move the application object to the new address and make it take effect...

thanks in advance (to anyone) for the help.

jarod

Mohamed
01-16-2007, 04:34 PM
Hi,

Try to Search your address using FindAddressResults or AddPushPin or FindResults... and GOTO method

This function does the job in VB6

Sub ZoomToLocation()

Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objectal As MapPoint.Location

'Configure l'application
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True

'Obtient un lieu, puis effectue un zoom sur la meilleure vue de carte de ce lieu

Set objectal = objMap.FindResults("Seattle, WA").Item(1)
objectal.GoTo

End Sub


Ciao

 
Web mp2kmag.com
mapforums.com