Community of VE/MapPoint Users and Developers
This is a discussion on MapPoint ActiveX-Control: Zoom Area within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, i'm working with C# and the AxMapPointControl and want to realize the following problem: I draw several lines on ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| MapPoint ActiveX-Control: Zoom Area i'm working with C# and the AxMapPointControl and want to realize the following problem: I draw several lines on my map at a stretch. After the drawing i add 2 Pushpins to the start- and end-position. Now i want to Zoom-In the wohl drawing (all Lines and the Start- and Stop-Pushpin). Unfortunately i don't know, how to do this. I've tried a little with the SelectedArea.SelectArea(...)-Method, but don't get pretty far with it. Hope, that anybody can help me! mike ps.: Wehre can i find a good help for the MapPoint Active-X-Control? I've searched the MSDN but can't find anything helpfull. |
| |||
|
Ok, after a little trial & error i've managed to select the area i want, but i don't know how to zoom into that area. To help you understand, what i want to do, i've made a little screenshot, of my program, after the painting an selecting: ![]() I know that the selected area is a little small, but it's just a test and it will be larger in real. So how can i zoom into that selected area programmatically? mike edit: Here is a little cut-out from my code: Code: top = minY - 10; height = Math.Max(20, maxY - minY + 20); left = minX - 10; width = Math.Max(20, maxX - minX + 20); activeMap.SelectedArea.SelectArea(top, left, width, height); Last edited by suamikim; 08-16-2006 at 11:37 AM. |
| |||
|
Hi, If you want to zoom to the whole fleet of pushpins you have then it is very simple, just like this: Code: object o = "My Pushpins";
MapPoint.DataSet ds = MP.ActiveMap.DataSets.get_Item(ref o);
ds.ZoomTo();
If the latter is what you want then I puzzle some code as example if you wants. Maybe there are other solutions as whell. this is the one from the top of my head
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, Just thingking on something. To zoom to your area is probably very simple. Try this (not tested so could be syntax or other wierd errors in it): Code: top = minY - 10; height = Math.Max(20, maxY - minY + 20); left = minX - 10; width = Math.Max(20, maxX - minX + 20); SelectedArea area = activeMap.SelectedArea.SelectArea(top, left, width, height); Location loc = area.Location; loc.Goto();
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| activexcontrol, area, mappoint, zoom |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Keyboard control in mappoint activex control | djcapslock | MapPoint 2006/2009 Discussion | 1 | 03-10-2005 11:16 AM |
| mappoint ActiveX control 9.0 | Anonymous | MapPoint 2006/2009 Discussion | 1 | 10-21-2004 07:22 AM |
| How to restrict map area in ActiveX? | ErikS | MapPoint 2006/2009 Discussion | 1 | 07-26-2004 01:34 PM |
| I am using the MapPoint ActiveX control in a VB Ap.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 08-24-2001 07:35 AM |
| How does one get the activeX mappoint control to d.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 07-25-2001 07:26 PM |