View Full Version : get Radius of displayed area while using ViewByScale
09-21-2005, 03:15 AM
How to get the Radius of the displayed map area. The map is being rendered using ViewByScale & the image height = 400 & width = 450.
1. map scale = 5000000;
2. Image height = 400;
3. Image widht = 450;
4. Default dpi. (should this be taken into account).
What woud be the radius of the visible area of the map?
Any ideas appreciated.
thanks in advance.
09-21-2005, 01:26 PM
I dont understeand (but I'm learning English :)
The window you display the map in is a rectangular area, and a radius is from a circle, so I'm confused and dont understeand :(
09-22-2005, 01:14 AM
Yes, it is rectangular. I need the approximate radius of the map rendered in that rectangular area.
Let me try & explain again:
1. The height & width of the area where the map is displayed remains constant. And the MapOptions height & width also are set to this same value -
Height = 400;
Width = 450;
mapOptions.Format.Height = Height;
mapOptions.Format.Width = Width;
2. The map is rendered using ViewByScale.
scale = 5000000;
mapViews.CenterPoint = latLong;
mapViews.MapScale = scale;
Now the map is displayed in the rectangular area. I need to know what would be the approximate radius of the map which is rendered with the scale mentioned above. Note: the scale keeps changing.
Hope the query is clear.
09-22-2005, 03:23 PM
I still dont underteand it all. Maybe some other candrop in here ?
10-07-2005, 07:01 AM
See the map image below for an example.
In this map how do i get the distance from the left to the right. I know the image width & scale. How will i be able to determine the actual total distance from the left of the map to the right say from colarado to washington. The map is rendered using View by scale.
10-07-2005, 10:32 PM
I think you mean width not radius - radius is the distance between the center and the outside edge of a circle. When dealing with rectangles like the map above you use the terms Height and Width. Height is the vertical. Width is the horizontal.
Here is a VB6 function that will display a a message box with the height and width of the map window in pixels and GeoUnits.
As with all my code - globally define
Dim myapp as MapPoint.Application 'and
Dim myobj as MapPoint.Map
Public Function getmap_extents() As Integer
Dim wk_istat As Integer
Dim X, Y As Long
wk_istat = 1
If myapp.Units = 0 Then
wk_units = " Miles"
ElseIf myapp.Units = 1 Then
wk_units = " Kilometers"
wk_str = " Map Window Height: " & myobj.Height & vbCrLf
wk_str = wk_str & " Map Window Width: " & myobj.Width & vbCrLf
wk_str = wk_str & " Map Pixel Size: " & myobj.PixelSize & vbCrLf
Y = myobj.Height * myobj.PixelSize
X = myobj.Width * myobj.PixelSize
wk_str = wk_str & " Map Units are:" & wk_units & vbCrLf
wk_str = wk_str & " Height is: " & Y & wk_units & vbCrLf
wk_str = wk_str & " Width is: " & X & wk_units & vbCrLf
wk_rsp = MsgBox(wk_str, vbOKOnly)
getmap_extents = wk_istat
10-10-2005, 02:08 PM
thats what happens if language is alian for both questionar and answernoar (if this word exists :)
10-11-2005, 02:31 PM
thats what happens if language is alian for both questionar and answernoar (if this word exists
You get Mohamed to translate.
That is what happens if the language is alien for both the questioner and the responder.
Where is our French Couscous vendor anyway?
10-23-2005, 09:42 AM
Where is our French Couscous vendor anyway?
Thanks for remembring !
- The Camels are using Mappoint to deliver the couscous in Paris. I hope there is no camels aviary influenza!!!!
- 4 weeks in Morrocco in a place without electricity, without computer and without time to use it ( Pointer 29°27'40" N , 10°05'02" W ) .
- 2 weeks preparing Marketing courses for the high school
- And a lot of travelling in France for my main job
So, not enough time to visit actively this sympathetic forum!
As the last year I will be the sponsor of a marathonman. Any idea to use Mappoint to follow the guy in his marathon of sands in a screen in my stores in Paris? ( ACL? )
oAiC ( = Ciao in Alian language :lol: )
10-23-2005, 03:46 PM
Glad you still here !
I was already thinking you have been eaten by a very hungry camel or eaten yourself too much couscous :)
10-25-2005, 10:13 PM
Here I thought you were fasting... Way to busy to fast! eh?
Best of the season to you Moh. Welcome back.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO