I'm using an empty provider, so I'm not getting any state/country names in my maps. Is there a way to add text to each shape in the shapefiles so I can get the state names to show up? Maybe somehow in the PreviewReadCompleted method?
Donna
2 Answers, 1 is accepted
0
Andrey
Telerik team
answered on 30 Jun 2011, 09:54 AM
Hi Donna,
New CaptionLocation and CaptionTemplate properties which allow to specify shape caption will be available in the 2011.Q2 release.
Currently, you can add captions as TextBlock objects from the code behind using the PreviewReadCompleted event. If your DBF file contains the state name field, then you can use the ExtendedData element for each shape to get the state name. The property of ExtendedData which contains the state name will have the same name as the field in the DBF file. Also, I would recommend to add new latitude and longitude fields (for example "LABEL_LAT" and "LABEL_LON") to the DBF file for specifying the location of state name label.
The sample code is the following:
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items