User Tools

Site Tools


map_suite_mvc_edition_labeling_samples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
map_suite_mvc_edition_labeling_samples [2015/09/08 05:51]
admin
map_suite_mvc_edition_labeling_samples [2015/10/10 07:31] (current)
Line 1: Line 1:
-====== Map Suite MVC Edition Labeling Samples ====== +====== ​ Map Suite MVC Edition Labeling Samples ​ ======
- +
- +
-====Draggable Labels====+
 <div sampleitem>​ <div sampleitem>​
-{{mvcedition:​codesamples:​Map Suite Web Edition Sample Draggable Labels.jpg?​300x180}}  +==== Draggable Labels ==== 
-\\ +<div screenshot>​ 
-[[Source_Code_WpfDesktopEditionSample_DraggableLabels CS 101013.zip|View Source]] ​| +{{mvcedition:​codesamples:​Map Suite Web Edition Sample Draggable Labels.jpg?​300x180}} 
-{{:File:​WpfDesktopEditionSample_DraggableLabels_CS_20140617.zip|C#​ Download}} ​+</​div>​ 
-[[Map Suite Samples Alternate Languages|Need it in another language?]] +<div content>​ 
-\\  +<div download_viewsource_buttons>​ 
-\\ +[[Source_Code_WpfDesktopEditionSample_DraggableLabels CS 101013.zip|View Source]] 
 +{{filehistory:​WpfDesktopEditionSample_DraggableLabels_CS_20140617.zip|C#​ Download}} 
 +</​div>​ 
 +<div sample_otherlinks>​
 [[Map Suite Samples Applies To|Applies To: MVC \ Web \ Wpf]] [[Map Suite Samples Applies To|Applies To: MVC \ Web \ Wpf]]
 +\\ 
 +[[Map Suite Samples Alternate Languages | Need it in another language?​]] 
 +</​div>​
 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. 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.
 </​div>​ </​div>​
 +</​div>​
 +
 ---- ----
-====Labeling based on size==== 
 <div sampleitem>​ <div sampleitem>​
 +==== Labeling based on size ====
 +<div screenshot>​
 {{mvcedition:​codesamples:​Map Suite Web Edition Sample Labeling based on size.jpg?​300x180}} {{mvcedition:​codesamples:​Map Suite Web Edition Sample Labeling based on size.jpg?​300x180}}
-\\ +</​div>​ 
-[[Source_Code_DesktopEditionSample_LabelingBasedOnSize_CS_100608.zip|View Source]] ​|{{:File:​DesktopEditionSample_LabelingBasedOnSize_CS_100608.zip|C#​ Download}} ​+<div content>​ 
-[[Map Suite Samples Alternate Languages|Need it in another language?]] +<div download_viewsource_buttons>​ 
-\\  +[[Source_Code_DesktopEditionSample_LabelingBasedOnSize_CS_100608.zip|View Source]] 
-\\ +{{filehistory:​DesktopEditionSample_LabelingBasedOnSize_CS_100608.zip|C#​ Download}} 
 +</​div>​ 
 +<div sample_otherlinks>​
 [[Map Suite Samples Applies To|Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf]] [[Map Suite Samples Applies To|Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf]]
 +\\ 
 +[[Map Suite Samples Alternate Languages | Need it in another language?​]] 
 +</​div>​
 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. 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.
 </​div>​ </​div>​
- +</​div>​
  
 ---- ----
- 
-====MultiLine Labeling==== 
 <div sampleitem>​ <div sampleitem>​
-{{wpfedition:​codesamples:​Map Suite Wpf Desktop Sample MultiLine Labeling.jpg?​300x180}}  +==== MultiLine Labeling ==== 
-\\ +<div screenshot>​ 
-[[Source_Code_WpfDesktopEditionSample MultiLineLabeling CS 110316.zip|View Source]] ​| +{{wpfedition:​codesamples:​Map Suite Wpf Desktop Sample MultiLine Labeling.jpg?​300x180}} 
-{{:File:​WpfDesktopEditionSample MultiLineLabeling CS 110316.zip|C#​ Download}} ​+</​div>​ 
-[[Map Suite Samples Alternate Languages|Need it in another language?]] +<div content>​ 
-\\  +<div download_viewsource_buttons>​ 
-\\ +[[Source_Code_WpfDesktopEditionSample MultiLineLabeling CS 110316.zip|View Source]] 
 +{{filehistory:​WpfDesktopEditionSample MultiLineLabeling CS 110316.zip|C#​ Download}} 
 +</​div>​ 
 +<div sample_otherlinks>​
 [[Map Suite Samples Applies To|Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf]] [[Map Suite Samples Applies To|Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf]]
 +\\ 
 +[[Map Suite Samples Alternate Languages | Need it in another language?​]] 
 +</​div>​
 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. 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.
 </​div>​ </​div>​
- +</​div>​
- +
  
 ---- ----
-====Multiple Labels==== 
 <div sampleitem>​ <div sampleitem>​
 +==== Multiple Labels ====
 +<div screenshot>​
 {{desktopedition:​codesamples:​Map Suite Samples Multiple Labels.png?​300x180}} {{desktopedition:​codesamples:​Map Suite Samples Multiple Labels.png?​300x180}}
-\\ +</​div>​ 
-[[Source_Code_DesktopEditionSample_MultipleLabels_CS_100128.zip|View Source]] ​| +<div content>​ 
-{{:File:​DesktopEditionSample_MultipleLabels_CS_100128.zip|C#​ Download}} ​| +<div download_viewsource_buttons>​ 
-[[Map Suite Samples Alternate Languages|Need it in another language?]] +[[Source_Code_DesktopEditionSample_MultipleLabels_CS_100128.zip|View Source]] 
-\\ \\ +{{filehistory:​DesktopEditionSample_MultipleLabels_CS_100128.zip|C#​ Download}} 
 +</​div>​ 
 +<div sample_otherlinks>​
 [[Map Suite Samples Applies To|Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf]] [[Map Suite Samples Applies To|Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf]]
 +\\ 
 +[[Map Suite Samples Alternate Languages | Need it in another language?​]] 
 +</​div>​
 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 ​ 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 ​
 +</​div>​
 </​div>​ </​div>​
  
 ---- ----
 {{page>​Map Suite Services Edition Labeling Samples}} {{page>​Map Suite Services Edition Labeling Samples}}
map_suite_mvc_edition_labeling_samples.1441691492.txt.gz · Last modified: 2015/09/08 05:51 by admin