User Tools

Site Tools


map_suite_windows_phone_edition_faq_interactiveoverlays

Map Suite Windows Phone Edition FAQ InteractiveOverlays

How do I override the default behavior of the TrackInteractiveOverlay?

This question has a corresponding sample application(s) associated with it.

Sample:Custom Track Line

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.

Sample:Custom Track Polygon

In the project “Custom Track Line”, we saw how to extend the TrackInteractiveOverlay to have the behavior of deleting the last added vertex when right click on a track line. In today’s project, we show how to implement this same behavior for tracking polygon.

How do I prevent a vertex from being dragged within the tolerance of another vertex while editing?

This question has a corresponding sample application(s) associated with it.

Sample:Vertex Tolerance

Basically, this project shows the opposite of yesterday’s project “Snap To Layer”. Instead of having the dragged control point snapping to a vertex if within a tolerance, we show how to not allow a control point get within a set tolerance. This technique can be handy to implement if you have a requirement to have vertices of a shape being no less than a certain distance between each others. To implement that technique, again we use the power and flexibility of the EditInteractiveOverlay of the Desktop edition.

How do I save tracked shapes to WKT (Well Known Text)?

This question has a corresponding sample application(s) associated with it.

Sample:Tracked Shapes to WKT

In today’s project, we show how to save a tracked shape to WKT (Well Known Text). You will notice that we make the distinction between the shape being tracked and the finished tracked shape thanks to two different events of TrackOverlay, TrackEnding and TrackEnded.

How do I snap vertices while editing?

This question has a corresponding sample application(s) associated with it.

Sample:Dragged Point Style

In the Discussion Forum Post “Snapping help needed”, we show the solution to have a dragged vertex snapping to a vertex of another layer. You can see that by default the control point being dragged turns yellow. In this project, we focus our attention on how to have control on the style of the control points. You will see how to override the DrawCore function of EditInteractiveOverlay. This is a project for the Desktop edition.

How do I display dynamic information as track shapes are being drawn?

This question has a corresponding sample application(s) associated with it.

Sample:Dynamic Info On TrackShapes

This project is for the Desktop version and it shows how to handle TrackOverlay to obtain dynamic information about the shape being tracked.

In this example, you will see displayed in a groupbox, properties such as perimeter and area as the shape is being tracked. In this project, you will learn how to handle events such as TrackStarted, MouseMoved and TrackEnded of TrackOverlay for that purpose. Getting dynamic info of a shape being tracked can be handy in situation where before committing to get the completed shape, you want to know more about the shape. For example, if you are tracking a search zone, you get dynamically info about its area. This project will be followed by other related projects. One will show how to create one’s own inherited TrackOverlay for having the possibility to abort tracking by pressing a key. Another project will show how to display dynamic info inside the shape itself instead of using a separate control.

How do I change the style of shapes being edited?

This question has a corresponding sample application(s) associated with it.

Sample:EditOverlay Styles

In today’s Web project, we learn how to control the styles of the EditOverlay for both the default style and the editing style. In order to accomplish this, we write some javascript code. Look at the code in the “script” tag to see how we can control the fill color, the opacity, the border width etc of the features in the EditOverlay.

How do I select features from a layer based on a user drawn track shape?

This question has a corresponding sample application(s) associated with it.

Sample:Select with Track Shape

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.

map_suite_windows_phone_edition_faq_interactiveoverlays.txt · Last modified: 2015/09/11 03:42 by admin