MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




MapPoint ActiveX-Control: Zoom Area

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 ...


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 08-16-2006
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 9
MapPoint ActiveX-Control: Zoom Area

Hi,

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.
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 08-16-2006
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 9
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.
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 08-16-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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 You want to select a part of your pushpins, then you can draw a shape, select the shape, query all pushpins in it, move the selection to another dataset, and also then use ZoomTo() to this dataset. But at this moment the pushpins are removed from the "My Pushpins" dataset.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 08-16-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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();
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
activexcontrol, area, mappoint, zoom


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
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


All times are GMT -5. The time now is 04:59 PM.


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