Well, all is in the title isn't it ?
Patrick.
Well, all is in the title isn't it ?
Patrick.
Patrick,
I think you have something mixed up between V3.0 and V2.0. The property you mentioned is just in V2.0. I think you won’t mind if we move this post to the Map Suite 2.0 forums, right :)
What happened after you set the property to ModeType.TrackZoomIn is:
1. We store the ModeType in a module variable.
2. In the mouse down / move / up events are raised, we will check the ModeType and if it’s TrackZoomIn, we will draw a rectangles shape as the track zoom in rectangle. When mouse up occurs, the drawn rectangle will be adjusted to fit the map control width and height.
3. Set the CurrentExtent as the adjusted rectangle and refresh the map.
Hope it helps.
Thanks,
ThinkGeo Support
Let me clarify.
I’m currently migrating from v2 to v3 … so the question is for v3.
How should I implement this v2 feature in v3 … I did not found any similar API.
Regards
Patrick.
Patrick,
Sorry for misunderstanding.
You don’t need to specify the Map Mode before doing any mouse operations in V3.0.
The TrackZoomIn and Pan are controlled by the map. If you drag on the map with Ctrl key pressed, map control will track zoom in with drawing a rectangle to represent the extent which you are going to zoom into. If you drag on the map without any key pressed, map control will pan instead. You can see that the V3.0 is smarter and easier to use than V2.0 :)
Also in the upcoming version you will have more controls on mouse operations. You can Enable / Disable mouse pan, or use another key instead of Ctrl key as the TrackZoomIn key.
Following is a list to show how to replace the ModeType in V3.0
For example in V2.0 you set propertymap1.Mode = ModeType.Center
to center a map.
In V3.0 you need to call winformsMap1.winformsMap1.CenterAt()
V2.0 V3.0
ModeType.Center winformsMap1.winformsMap1.CenterAt ()
ModeType.ZoomIn winformsMap1.ZoomIn();
ModeType.ZoomOut winformsMap1.ZoomOut();
ModeType.Pan By default it will pan the map when you drag on it.
ModeType.TrackCircle winformsMap1.EditOverlay.TrackMode = TrackMode.Circle
ModeType.TrackEllipse winformsMap1.EditOverlay.TrackMode = TrackMode.Ellipse
ModeType.TrackFreehand winformsMap1.EditOverlay.TrackMode = TrackMode.Freehand
ModeType.TrackLine winformsMap1.EditOverlay.TrackMode = TrackMode.Line
ModeType.TrackPoint winformsMap1.EditOverlay.TrackMode = TrackMode.Point
ModeType.TrackPolygon winformsMap1.EditOverlay.TrackMode = TrackMode.Polygon
ModeType.TrackRectangle winformsMap1.EditOverlay.TrackMode = TrackMode.Rectangle
ModeType.TrackStraightLine winformsMap1.EditOverlay.TrackMode = TrackMode.StraightLine
ModeType.TrackZoomIn Press Ctrl key and drag on the map.
Hope it helps.
Thanks,
ThinkGeo Support
I am also converting and am having issues with converting the following menu option fromV2 to V3
ModeType.TrackZoomIn
ModeType.Pan
so that I can change modes as MapSuite Explorer does.
I also cannot seems to trackzoomin when I hold the CTRL button (not on MapSuite Explorer either
Regards
Ewan
Ewan,
Thanks for your post!
The MapSuiteExplorer is built based on Service Edition without any use of Desktop Edition Map Control, so it contains tons of redundant codes.
In Desktop Edition Map Control, it is built in Mouse & Key operations based on the ExtentInterativeOverlay. If you want, you can write your own ExtentInterativeOveraly to change its behavior.
Let me know if any more questions.
Thanks.
Yale