User Tools

Site Tools


map_suite_desktop_for_winforms_interactiveoverlays_samples

WinForms Samples

Custom Track Polygon Sample for WinForms

Learn how to extend the TrackInteractiveOverlay to add behaviors, like deleting the last added vertex when right-clicking the track line.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Drag Point Sample for WinForms

In this project, we focus our attention on how to control the style of the control points. You will see how to override the DrawCore function of EditInteractiveOverlay.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Snapping To Vertex Sample for WinForms

This project is the first one of a series that will be dedicated to snapping using InteractiveOverlay. In this project, we show how to snap the mouse pointer to the closest vertex of an editable polygon if it is within a set tolerance. The tolerance is shown as a circle around the vertices. This technique can also be applied to snapping vertices within the same shape, between different shapes or even based on a layer. Those different types of snapping will be the subject of future projects related to snapping using InteractiveOverlay.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Drag Vertex Sample for WinForms

The purpose of today’s project is not so much as show a new technology as to show an improvement in an existing one. We are already familiar with EditInteractiveOverlay with projects such as “Dragged PointStyle with Label”, “Snap To Layer” and “Snapping to Vertex”. But those projects showed EditInteractiveOverlay on small shapes. Using EditIntercticeOverlay on complex shapes became not very responsive. We improved that and now you can drag, resize, rotate and drag individual vertex of a complex polygon made of thousand of vertices with good responsiveness as you can see in this example.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Drag Icon Sample for WinForms

In today’s sample, we show how to drag icons representing vehicle on the map. This is a handy feature if you want to give your users the ability to drag and drop some non stationary features such as vehicles. You can see that to accomplish this functionality, you can use EditInteractiveOverlay as it already has all the necessary logic for dragging purposes. Look at the code to see how to set up that overlay to have the expected behavior.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Track Overlay With Esc Sample for WinForms

This project shows how to implement aborting a trackshape with Esc key as you could do it in MapSuite 2.x.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Snap To Layer Sample for WinForms

This project shows how you can apply snapping to an EditInteractiveOverlay. There are many aspects to snapping. Previously, we showed a project with the mouse pointer snapping to the closest vertex of an editable polygon. Today, we show the technique to drag a control point and have it snap to the closest vertex of a layer if within tolerance. The tolerance can be set in world (meter, feet etc) or screen (pixels) coordinates. Notice that we are also using the technique showed in the previous project “Dragged Point Style”.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Select And Drag Feature Sample for Wpf

In this Wpf project, we show how to select a feature from a shapefile based on a column value using the GetFeaturesByColumnValue. We also show to setup the EditOverlay to give the user the ability to drag the selected feature. In this project, you can also see how to get the world coordinates at the mouse move event. Notice that the code for doing this is quite different in Wpf compared to the winforms edition.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Edit Rectangles Sample for WinForms

This sample shows how to extend the EditInteractiveOverlay rectangles as shapes, rather than polygon shapes, by setting special column values. For features (both *Well Known Text* and *Well Known Binary*), the concept of a rectangle is not supported and typically rectangles are handled as polygons. This feature allows users to modify the rectangle but requires that the modification keep a rectangular form. The rectangle doesn't need to be straight as long as all of the corner angles are at 90 degrees relative to each other.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Select At Track Shape Sample for WinForms

In today’s Desktop project, we combine the skills we learned in the samples “Spatial Query A Feature Layer” and “Track And Edit Shapes”. You can see how we use the event TrackEnded to get the RectangleShape from the tracked shape of TrackOverlay to do the spatial query. In this example, we use a Rectangle but you could also very easily use another shape such as Polygon, Circle, etc.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Drag Point Advanced Sample for WinForms

This project is an example of how extensible EditInteractiveOverlay is for the editing needs of the user. You can see how to change the styles of the vertex being dragged based on the Shift key, and how to have the vertex snap to any feature.

Thanks to the protected override functions such as KeyDownCore, KeyUpCore, MouseUpCore and DrawCore, these functionalities can easily be implemented by inheriting from EditInteractiveOverlay.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Drag Point With Label Sample for WinForms

In this project, dedicated to EditInteractiveOverlay, you will see how easy it is to add some labeling to your dragged control point, showing dynamic information. Here we show how to display the distance from the dragged control point to the closest point of a reference shape. Also, to augment the user experience, the closest point of the reference shape is also shown varying as the control point is dragged around.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Custom Track Line Sample for WinForms

In today’s project, we are going to see how to extend the TrackInteractiveOverlay in the Desktop edition to have the desired behavior when tracking a line. In this case, we show how to override the MouseDownCore function to have the line being tracked at left mouse click and have the last vertex added deleted at right mouse click.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Dynamic Track Shapes Sample for WinForms

This Desktop project shows how to handle TrackOverlay to obtain dynamic information about the shape being tracked.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Track Zoom In Without Shift Key Sample for WinForms

This project is for DesktopEdition users. In Map Suite 2.x, different modes of the map are offered to the developer to choose what kind of behavior the map has at a mouse action. In Map Suite 3.x, we went away from modes to have a more flexible model using InteracticeOverlay. By default, track zoom in is done by clicking and dragging the mouse on the map while holding the Shift key. This is very convenient but what if you want to offer the users the same experience as with 2.x, where the same mouse action has different behavior such as TrackZoomIn and Pan through the use of modes.

In this project, we show how to build your own InteractiveOverlay to emulate in Map Suite 3.x the mode behavior 2.x has.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Preset Vertex To Tracked Polygon Sample for WinForms

This Desktop sample shows how to extend TrackInteractiveOverlay to give the ability to add a preset vertex to a track polygon while tracking. This can be handy in the situations where you need to add a vertex outside the current extent of the map or when you need to add a vertex with precise X and Y values. In the custom PresetVertexTrackInteractiveOverlay, you can see how the protected function GetTrackingShapeCore was overridden to implement this tracking behavior of the polygon.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

Dragging Icon Advanced Sample for WinForms

This project is a more complete version of a previous project “Dragging Icon”. In addition to showing how to use EditInteractiveOverlay for dragging and dropping features represented by an icon, we also show how to add new features on the map by left double clicking on the map. You will also see how to remove a feature by right double clicking on its icon.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_winforms) for the details.

Screenshot

View this sample on Github

map_suite_desktop_for_winforms_interactiveoverlays_samples.txt · Last modified: 2020/03/08 06:37 (external edit)