MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Zoom to selection?

This is a discussion on Zoom to selection? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello all, In "interactive" Mappoint you can draw a shape, select it and then 'zoom to selection'. I would like ...


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 12-09-2003
Junior Member
Yellow Belt
 
Join Date: Dec 2003
Posts: 12
Zoom to selection?

Hello all,
In "interactive" Mappoint you can draw a shape, select it and then 'zoom to selection'. I would like to do this in VB with a shape I am creating but the zooming methods seem limited. I would also like to do it without changing the contents or ordering of the current route. Any thoughts on how to do this?

The code:
'waypoints have been added and the route has been optimized
' now add a circle of diam 0.75 miles on the second stop
Set objShape = MPMap.Shapes.AddShape(geoShapeRadius,_
MPMap.ActiveRoute.Waypoints.Item(2).Location, 0.75, 0.75)
' now query contents of circle, select circle and zoom on circle:
Set objRecordset = objDataSet.QueryShape(objShape)
objShape.Select
???

many thanks,
sthurlock
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 12-09-2003
Member
Yellow Belt
 
Join Date: Feb 2003
Posts: 48
Dont think you need to select shape, just use objRecordset.ZoomTo

M.
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 12-09-2003
Junior Member
Yellow Belt
 
Join Date: Dec 2003
Posts: 12
That actually doesn't work. According the programming guide, ZoomTo only applies to DataSets, but this is a RecordSet. I tried it and it gives a "method not found". Any other thoughts?
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 12-10-2003
Member
Yellow Belt
 
Join Date: Feb 2003
Posts: 48
Ooops.

Try:

objShape.Location.GoTo

M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 12-10-2003
Junior Member
Yellow Belt
 
Join Date: Dec 2003
Posts: 12
That is very close to what I'm looking for! I'd like to be able to control the closeness of the zoom by drawing a circle of radius r, zooming to it, then removing the circle and printing a map. In 'interactive' mode, drawing a circle with r=0.75, selecting the circle and then zooming 'to selected' gives a certain zoom. Going to a circle with r=0.5 gives a closer zoom, r=0.25 is closer still. Really, I'm trying to work around the fact that the .zoomIn and .zoomOut methods have very large steps in their zoom. More thoughts?

sthurlock
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 12-10-2003
Member
Yellow Belt
 
Join Date: Feb 2003
Posts: 48
Instead of using ZoomIn and ZoomOut, try using the Altitude property of the map:

objApp.ActiveMap.Altitude = <a number suitable for the size of circle>

M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 12-10-2003
Junior Member
Yellow Belt
 
Join Date: Dec 2003
Posts: 12
Brilliant! That appears to do exactly what I'm looking for! I need to play around a little to get the exact right altitude. Thank you very much for your help!!

sthurlock
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
selection, 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
Pushpin Selection EdB MapPoint 2006/2009 Discussion 2 08-14-2005 10:25 AM
Getting dataset from user selection mic6399 MapPoint 2006/2009 Discussion 1 09-23-2004 11:59 AM
Zoom In and Zoom Out event detection victorf MapPoint 2006/2009 Discussion 2 10-22-2003 01:56 AM
Identifying Selection with Mouse MapPointJim MapPoint 2006/2009 Discussion 3 08-20-2002 05:39 PM
Have successfully exported a map selection from Ma.... Anonymous MapPoint 2006/2009 Discussion 1 09-05-2001 05:14 AM


All times are GMT -5. The time now is 02:50 AM.


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