Register  |  Login   Search
ThinkGeo - GPS Tracking and Mapping Solutions  |  Home  |  Cygnus Track  |  Developer Community
 
LivePerson Chat

Discussion Forums

The online community for users of Map Suite GIS components

A way to know then actual zoom?
Last Post 10-04-2008 08:51 PM by Batman. 6 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
AlejandroUser is Offline
Level 1
Level 1
Posts:1

--
02-19-2008 12:36 PM

Hi,

First I apologize for my bad english. I will do my best for explain.

I need to know the zoom in anytime.

When the user pan the map, or zoomin or out I need to know the new zoom value.

Actually I work with MapInfo and the users use the zoom property to know the zoom value.

There are any way to do this in MapSuite Desktop?

Thanks

Alejandro

sunUser is Offline
Level 3
Level 3
Posts:94

--
02-20-2008 09:30 PM
Hi Alejandro,

Here is some information about the zoom value in the Map Suite as I known:
1. You can set the zoompercentage property of Map control (the default value of this property is 40), then the map will zoom in or out by the zoompercentage when the Map control's mode is ZoomIn or ZoomOut;
2. You also can use the ZoomIn(int percentage) or ZoomOut(int percentage) method of Map control to change the zoom value by the percentage in the parameter ;
3. The MouseWheelZoomPercentage and MouseWheelInterval propertys can be used to get the zoom value too.
I believe you can calculate the zoom value easily when you get the information above.

Hope this can help you!

Sun
ValUser is Offline
MVP
MVP
Posts:54
Avatar

--
03-03-2008 12:22 PM
Alejandro,

I am not sure if Sun answered properly your question. Since version 2.39.0, we have the extented API with preset ZoomLevels from ZoomLevel01 to ZoomLevel18. Is your question related to those ZoomLevels and on how to know at any given time on what ZoomLevel, the map is currently at?
TedUser is Offline
Level 1
Level 1
Posts:19

--
10-02-2008 11:51 AM
This is a late reply to this thread, but what Val asked is exactly what I'd like to ask =)

How can I know on what ZoomLevel (1-18) I am currently at? I need this so that I can configure the ZoomLevels for my maps. I'd like to zoom in, see what ZoomLevel I'm at and then modify my code so I get the correct look.

Can it be done?
BatmanUser is Offline
MVP
MVP
Posts:99
Avatar

--
10-02-2008 02:22 PM
Yes, this can be done by comparing the Map1.CurrentScale property to see if it is between the ZoomLevelXX UpperExtent and LowerExtent properties. If the value is between these two values you know what the current zoom level is.

Typcially this is done with a large case statement for each ZoomLevel.

Let us know if you have any other questions.

Thanks!
TedUser is Offline
Level 1
Level 1
Posts:19

--
10-03-2008 03:29 AM
Thx again Batman =)
BatmanUser is Offline
MVP
MVP
Posts:99
Avatar

--
10-04-2008 08:51 PM
No problem, let us know if you have any other questions.
You are not authorized to post a reply.

Active Forums 4.1