Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thinkgeo/applydirectionpointstyleforlinestyle-forwpf
The Map Suite WPF ApplyDirectionPointStyleForLineStyle sample will guide you to draw lineStyle's direction Point on map. The direction Point can be an image or a glyph, it not only rotates the icon accross the angle of the road, but also provides a way to customize the rotation of the direction point. The arrows highlighted in the red circle in the following screenshot are customized based on the line's attributes. Please check out the source for detail. This sample supports Map Suite 10.5.8 and higher.
https://github.com/thinkgeo/applydirectionpointstyleforlinestyle-forwpf
direction linestyle thinkgeo wpf
Last synced: 4 days ago
JSON representation
The Map Suite WPF ApplyDirectionPointStyleForLineStyle sample will guide you to draw lineStyle's direction Point on map. The direction Point can be an image or a glyph, it not only rotates the icon accross the angle of the road, but also provides a way to customize the rotation of the direction point. The arrows highlighted in the red circle in the following screenshot are customized based on the line's attributes. Please check out the source for detail. This sample supports Map Suite 10.5.8 and higher.
- Host: GitHub
- URL: https://github.com/thinkgeo/applydirectionpointstyleforlinestyle-forwpf
- Owner: ThinkGeo
- Created: 2019-11-08T09:08:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-25T15:30:34.000Z (almost 5 years ago)
- Last Synced: 2024-11-20T19:11:40.430Z (2 months ago)
- Topics: direction, linestyle, thinkgeo, wpf
- Language: C#
- Homepage:
- Size: 4.9 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Apply DirectionPointStyle for LineStyle for Wpf
### Description
The Map Suite WPF ApplyDirectionPointStyleForLineStyle sample will guide you to draw lineStyle's direction Point on map. The direction Point can be an image or a glyph, it not only rotates the icon accross the angle of the road, but also provides a way to customize the rotation of the direction point. The arrows highlighted in the red circle in the following screenshot are customized based on the line's attributes. Please check out the source for detail. This sample supports Map Suite 10.5.8 and higher.
Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.
![Screenshot](https://github.com/ThinkGeo/ApplyDirectionPointStyleForLineStyle-ForWpf/blob/master/Screenshot.png)
### About the Code
``` csharp
// Set up the line style with white inner pen and black center pen.
var lineStyle = new LineStyle(new GeoPen(GeoColors.Black, 16) { StartCap = DrawingLineCap.Round, EndCap = DrawingLineCap.Round }, new GeoPen(GeoColors.White, 13) { StartCap = DrawingLineCap.Round, EndCap = DrawingLineCap.Round });
// Set up the required column name for the style. We will customize the line style based on this column value.
lineStyle.RequiredColumnNames.Add("FENAME");
// Set up the style for Direction Point and set up the event for customization.
lineStyle.DirectionPointStyle = new PointStyle(new GeoImage("AppData\\Arrow.png"));
lineStyle.DrawingDirectionPoint += LineStyle_DrawingPointStyle;
private void LineStyle_DrawingPointStyle(object sender, DrawingDirectionPointEventArgs e)
{
// Customize the direction point for the line feature whose "FENAME" column equals to "Mo-Pac".
if (e.Line.ColumnValues["FENAME"] == "Mo-Pac")
{
e.RotationAngle = 0;
}
}
```### Getting Help
[Map Suite Desktop for Wpf Wiki Resources](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf)
[Map Suite Desktop for Wpf Product Description](https://thinkgeo.com/ui-controls#desktop-platforms)
[ThinkGeo Community Site](http://community.thinkgeo.com/)
[ThinkGeo Web Site](http://www.thinkgeo.com)
### About ThinkGeo
ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.