Problem with locations

Anonymous
09-09-2004, 08:00 AM
Hi all

I have the following problem:

I wrote a VB application that has two map objects that are placed on top of each other, each map has the same pushpins with different symbols.

I need that each time the user flips between them he will see the same zoom level and the same status (to the user eyes it will be as if there is only one map whos pushpins changed symbols)

how can i pass the zoom level and place between the maps

Thanks in advance

Kobi

Matrices
09-09-2004, 08:12 AM
its been a while since i've had anything open programming but i think something along the lines of


objmap1.location = objmap2.location
objmap1.height= objmap2.height

should set things the same and then just switch the view to the other map :)

Anonymous
09-12-2004, 02:48 AM
10x for your fast reply Matrices, but this solution does not work

I get an error message saying "Method '_Location' of object '_Map' falied"

does anyone knows how to do it?

10x in advance

Kobi

Eric Frost
09-12-2004, 09:34 AM
Hi Kobe,

Check the help file, I think to set the zoom level the property you will want to use is Altitude.

Here's the sample for the Location property (Map):

Sub ZoomToLocation()

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

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

'Zoom in on map by setting map location
Set objMap.Location = objMap.FindResults("Seattle, WA")(1)

End Sub

Eric

 
Web mp2kmag.com
mapforums.com