User Tools

Site Tools


map_suite_wpf_desktop_edition_labeling_samples

This is an old revision of the document!


Map_Suite_Wpf_Desktop_Edition_Labeling_Samples

<noinclude> article_rating </noinclude>

Draggable Labels

Screenshot width=78Sample width=66Product Description
map_suite_wpf_desktop_edition_sample_draggable_labels.jpg View Source

C# Download

Need it in another language?
Wpf \\ \\ Applies To: Web \\ Wpf \\ In this wpf project, we are going to show how to place labels from a shapefile into a SimpleMarkerOverlay. Using the DragMode property of the SimpleMarkerOverlay, the user can then drag the labels to place them at the desired location for the most pleasing labeling effect. This project will be later completed to show how to save the state of the dragged labels from the SimpleMarkerOverlay and reload them.

Labeling based on size

Screenshot width=78Sample width=66Product Description
map_suite_wpf_desktop_edition_sample_labeling_based_on_size.jpg View Source

C# Download

Need it in another language?
Desktop \\ \\ Applies To: Desktop \\ Web \\ Silverlight \\ Services \\ Wpf \\ In the sample app “Draw thematic features” of the “How Do I” samples, we show how to use the ClassBreakStyle to display countries based of what population range they belong to. In today’s project, we show some more advanced uses of ClassBreakStyle to show how to label countries based on the area. You will notice that we also take advantage of the various zoom level sets for labeling purposes. The result is an eyed pleasing labeling of the countries with the size proportional to the countries’ area with more labels of smaller countries appearing as you zoom in.

MultiLine Labeling

Screenshot width=78Sample width=66Product Description
map_suite_wpf_desktop_sample_multiline_labeling.jpg View Source

C# Download

Need it in another language?
Desktop \\ \\ Applies To: Desktop \\ Web \\ Silverlight \\ Services \\ Wpf \\ For labeling purpose, TextStyle has a property called LabelAllPolygonParts that will label all the parts making up a polygon based feature. Unfortunately, we don’t have an equivalent API for labeling all the parts of a line based feature. But thanks to the flexible framework of Map Suite, we show in this Wpf sample how easily you can expand the TextStyle class to allow this labeling capability. Look at the custom class MultiLinetextStyle and how DrawCore function is overridden to have the expected labeling behavior.

Multiple Labels

Screenshot width=78Sample width=66Product Description
View Source

C# Download

Need it in another language?
Desktop \\ \\ Applies To: Desktop \\ Web \\ Silverlight \\ Services \\ Wpf \\ This sample shows how you can display multiple labels for a given point or feature. You can do this by setting a single TextStyle or multiple TextStyles. If you use a single TextStyle, you can simply use a pattern like “ColumnName1[ColumnName2]…” and when Map Suite displays the text it will combine the values of the columns in your pattern. If you use a different styling method, you will need to manually control the offset of each piece of text to avoid overlapping.

For more information you can see the discussion forum post below:
http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/6955/afv/topic/Default.aspx

map_suite_services_edition_labeling_samples

map_suite_wpf_desktop_edition_labeling_samples.1440040124.txt.gz · Last modified: 2015/09/07 09:45 (external edit)