Have questions? Call us toll-free at 1-866-847-7510 (outside North America, call 1-785-727-4133)

Map Suite Desktop Edition Labeling Samples

From ThinkGeo Wiki

Jump to: navigation, search

Contents

Decimal Degrees Formatting

Screenshot Sample Product Description
Map Suite Desktop Edition Sample Decimal Degrees Formatting.jpg C# Download

Need it in another language?
Services

Applies To: Desktop
Web
Silverlight
Services
Wpf
The purpose of this project is to complete the static class DecimalDegreesHelper. This class offers functions to go to and from Decimal Degrees but it lacks the functions handling various formats such as Degrees Decimal Minutes and Degrees Minutes Decimal Seconds. Those formats can be output by different GPS devices and it is handy to know how to manipulate them and convert them to Decimal Degrees, the only format that can be input into a GIS or Mapping application.

Label to Show Location

Screenshot Sample Product Description
Map Suite Desktop Edition Sample Label to Show Location.jpg C# Download

Need it in another language?
Services

Applies To: Desktop
Web
Silverlight
Services
Wpf
This project shows how to use layers not for displaying but for getting location information on the current extent of the map. Getting information of the administrative divisions of the current extent of the map is convenient because it gives a spatial clue when the map is zoomed in too close to have any major features recognizable. In this project, we use the WorldMapKit as a background and the shapefiles state and counties are used for displaying the spatial clue.

Labeling Based On Columns

Screenshot Sample Product Description
Map Suite Desktop Edition Sample Labeling Based On Columns.JPG C# Download

Need it in another language?
Services

Applies To: Desktop
Web
Silverlight
Services
Wpf
As a developer developing a mapping application, you may encounter point based shapefile for labeling. All the characteristics for labeling such as font, size, angle, color can be found in the attribute information of the shapefile itself. This project will show how to create a custom TextStyle that will get the value for those different columns and display each feature accordingly.

Labeling based on size

Screenshot Sample Product Description
Map Suite Desktop Edition Sample Labeling based on size.jpg 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.

Multi Column Labeling

Screenshot Sample Product Description
Map Suite Desktop Edition Sample Multi Column Labeling.jpg C# Download

Need it in another language?
Services

Applies To: Desktop
Web
Silverlight
Services
Wpf
In this project, we show some techniques to label features based on various columns. With the CustomStyles property and CustomColumnFetch event, you will see the flexibility you have to label the way you desire in a few lines of code. In this example, we label volcanoes based on four columns on two lines and using two different font styles.

MultiLine Labeling

Screenshot Sample Product Description
Map Suite Wpf Desktop Sample MultiLine Labeling.jpg 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 Sample Product Description
Map Suite Desktop Edition Sample Multiple Labels.png 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

Personal tools
Namespaces
Variants
Actions
Products
Data
Add Ons
Navigation
Toolbox
Learn More About Map Suite, Download a Free Trial, or Buy Now

GIS Developer Components for .NET
Map Suite Extensions & Add-Ons
Map Data Sets & Icons

Try Map Suite Free

Map Suite Online Store
sales@thinkgeo.com
1-866-847-7510 (Toll-Free)
1-785-727-4133 (Outside North America)

ThinkGeo LLC
2801 Network Blvd. Suite 215
Frisco, TX 75034
Map Suite Support Center