I've been browsing these forums for a while, and have got quite a few good bits of info from them. I can't seem to find anything relating to my question though, so I've decided to post it.
I am trying to implement a way to display a smaller map, exactly like the Overview map in my custom vb.net application. I don't want to use the overview & legend toolbar, it's bulky and contains information that I do not require for my application. What I am wondering is: has anyone tried to display the overview map unattached as a sidebar in the mappoint control? If not, how can I go about adding a second MapPoint control to my form and keeping the view the same as the main map when panning around and such? Here is some code I've tried, but it hangs up about 90% of the time when trying to process the XYToLocation method. "mp" is my main MapPoint control, and mpMini is the overview mappoint control. oMap is just a pointer for mp.ActiveMap for easier typing. And I have tried the same code in both the AfterRedraw and AfterViewChange events.
Any help will be greatly appreciated.Code:mpMini.ActiveMap.Altitude = mp.ActiveMap.Altitude Dim temp As MapPoint.Pushpin, miniTemp As MapPoint.Pushpin, getLoc As MapPoint.Location Dim mpX As Integer = CInt(mp.Width / 2), mpY As Integer = CInt(mp.Height / 2) getLoc = oMap.XYToLocation(mpX, mpY) temp = oMap.AddPushpin(getLoc) miniTemp = mpMini.ActiveMap.AddPushpin(getLoc) miniTemp.Location.GoTo() temp.Delete() miniTemp.Delete() mpMini.ZoomOut():mpMini.ZoomOut() 'goes out 2 levels (for an overview)