MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Zooming to a fixed number

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


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 07-13-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Zooming to a fixed number

Can I programmingly zoom the map to a fixed nymber such 1:25000?
I see there is a slidebar for zooming. But how to do it in code?
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 07-14-2004
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 37
Use the altitude property.
Quote:
Returns or sets the altitude of the current map view, in GeoUnits (miles or kilometers). Lower altitudes zoom closer to the map, showing a smaller area with more detail. Higher altitudes zoom out from the map, showing a larger area with less detail. Read/write Double.
Example
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
[/quote]
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 07-14-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Thank you

But what is the relationship between pixelSize and Altitude? Is there a formula between them?
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 07-14-2004
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 37
I'm not sure if there is some sort of formula or what, in the help file under PixelSize I found:
Quote:
The scale is never uniform across the screen, especially for flat maps. As the altitude is lower, the scale is more uniform.
What is it that you are trying to do?
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 07-14-2004
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 890
Blog Entries: 9
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
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 07-15-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Thank you

Thank you
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 07-15-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Great

Winwaed offers is just what I want.

Thank you again.

Chester
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 09-08-2004
Junior Member
White Belt
 
Join Date: May 2004
Posts: 9
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
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
fixed, number, zooming


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


All times are GMT -5. The time now is 01:36 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