Community of VE/MapPoint Users and Developers
This is a discussion on Zooming to a fixed number within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Can I programmingly zoom the map to a fixed nymber such 1:25000? I see there is a slidebar for zooming. ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
|
Use the altitude property. Quote:
Code: Sub ZoomInBySettingAltitude() Dim objApp As New MapPoint.Application 'Set up the application objApp.Visible = True objApp.UserControl = True 'Zoom in by setting the map altitude objApp.ActiveMap.Altitude = 10 End Sub |
| |||
|
I'm not sure if there is some sort of formula or what, in the help file under PixelSize I found: Quote:
|
| ||||
|
MS have written up some code about how to convert "zoom to show X miles width" to altitude: http://support.microsoft.com/?kbid=297348 They require screen size and resolution. Also note the aspect ratio calculation. I preferred to use a rule-of-thumb calculation which seems to work pretty well. Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
| |||
|
Hmm.. that's odd. I'll have to play with MS's stuff sometime. I just created a tool that programatically finds all the pushpins within a certain radius of a location, draws a circle showing the radius searched and zooms to emcompass the circle drawn. You can find my complete writeup at: http://www.mp2kmag.com/mappoint/disc...?p=10457#10457 Basically, the altitude calculation I came up with was: objMap.Altitude = Round(radius + (radius * 3.25)) Seems a lot simpler than MS's monitor size and all that. But maybe their thing makes sense. I havn't tested mine on multiple monitor sizes. If this information is useful and as accurate as MS's info, it can save you a lot of gobbledegook code. -TG |
![]() |
| Tags |
| fixed, number, zooming |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Glitch in GPS Magic Fixed | P_Hairy | News and Announcements | 0 | 10-10-2005 08:49 AM |
| FIXED: Type Mismatch in DisplayDataMap | gavin | MapPoint 2006/2009 Discussion | 5 | 08-22-2005 04:50 AM |
| Zooming question | Anonymous | MapPoint 2006/2009 Discussion | 3 | 09-29-2003 05:41 PM |
| Zooming Mappoint with VB6 | Anonymous | MapPoint 2006/2009 Discussion | 2 | 07-23-2003 02:52 PM |
| geoShowByZoomLevel - Not zooming? | mikechayes | MapPoint 2006/2009 Discussion | 0 | 02-13-2003 03:45 PM |