Welcome to MapForums!

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

get Radius of displayed area while using ViewByScale

This is a discussion on get Radius of displayed area while using ViewByScale within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, How to get the Radius of the displayed map area. The map is being rendered using ViewByScale & the ...

1. Junior Member White Belt
Join Date
Sep 2005
Posts
3

get Radius of displayed area while using ViewByScale

Hi,

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.

ranjith

2. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi,

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

3. Junior Member White Belt
Join Date
Sep 2005
Posts
3

get Radius of displayed area while using ViewByScale

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[0].CenterPoint = latLong;
mapViews[0].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.

4. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi,

I still dont underteand it all. Maybe some other candrop in here ?

5. Junior Member White Belt
Join Date
Sep 2005
Posts
3
Hi,
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.

hey ranjithtellis

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"
End If
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
End Function
ciao,

7. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi,

thats what happens if language is alian for both questionar and answernoar (if this word exists

Funny Wilfried

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?

Ciao,

9. Member Green Belt
Join Date
Mar 2005
Posts
97
Hi,
Where is our French Couscous vendor anyway?
Still alive!
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? )

http://fberahou.club.fr/bledrunner/accueil.html

oAiC ( = Ciao in Alian language )

Mohamed

10. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi Mohamed,

I was already thinking you have been eaten by a very hungry camel or eaten yourself too much couscous

Page 1 of 2 12 Last