Comments (6)
Hi @GeoITwinkle,
We've been looking into this internally. I don't have an answer to share right now, but I've notified the relevant team and they're investigating. I also shared your Esri Community post with the team. Thank you for including the test project.
I'm hoping to share more in a few days. Thanks for your patience and thanks again for letting us know about the problem.
from arcgis-maps-sdk-dotnet-samples.
Hi @GeoITwinkle,
We've been looking into this internally. I don't have an answer to share right now, but I've notified the relevant team and they're investigating. I also shared your Esri Community post with the team. Thank you for including the test project.
I'm hoping to share more in a few days. Thanks for your patience and thanks again for letting us know about the problem.
Thank you for your follow up. It is not urgent at the moment, but I think it is worth looking into. Thanks!
from arcgis-maps-sdk-dotnet-samples.
@GeoITwinkle I confirmed that ArcGIS Runtime currently does not support rotated labels for polygon features. I'll make a note internally to update the sample to make that clearer.
For point features, angles are supported but they need to be specified differently. The following shows an example label definition for point features:
private const string LabelJson =
@"{
""labelExpressionInfo"":{""expression"":""'Label'""},
""labelAngleInfo"":
{
""angleExpressionInfo"": {""expression"":""75"",""returnType"":""number""},
""rotationType"":""arithmetic""
},
""textLayout"":""straight"",
""labelPlacement"":""esriServerPointLabelPlacementAboveRight"",
""symbol"":
{
""borderLineSize"":0,
""color"":[255,0,0,255],
""font"":
{
""decoration"":""none"",
""size"":10,
""style"":""normal"",
""weight"":""normal""
},
""horizontalAlignment"":""center"",
""type"":""esriTS"",
""verticalAlignment"":""middle"",
""xoffset"":0,
""yoffset"":0
}
}";
Note that the textLayout
field is required for label rotation to work in this case, and that labelPlacement
must match the geometry type for the layer. labelingInfo documentation has a list of acceptable values.
from arcgis-maps-sdk-dotnet-samples.
@nCastle1 Thanks Nathan. I will modify the code and see how it goes.
By the way, there is no "LabelAngleInfo" or "textLayout" mentioned in the "labelingInfo documentation" webpage. Probably some kind of update is needed there. Otherwise developers will look into the Angle property of Text Symbol.
from arcgis-maps-sdk-dotnet-samples.
@GeoITwinkle Thanks, I'll let the team know about the lack of documentation for those properties.
Angle rotation appears to work for polylines when using the point labelPlacement
options:
private const string LabelJson =
@"{
""labelExpressionInfo"":{""expression"":""'Label'""},
""labelAngleInfo"":
{
""angleExpressionInfo"": {""expression"":""10"",""returnType"":""number""},
""rotationType"":""arithmetic""
},
""textLayout"":""straight"",
""labelPlacement"":""esriServerPointLabelPlacementAboveRight"",
""symbol"":
{
""borderLineSize"":0,
""color"":[255,0,0,255],
""font"":
{
""decoration"":""none"",
""size"":10,
""style"":""normal"",
""weight"":""normal""
},
""horizontalAlignment"":""center"",
""type"":""esriTS"",
""verticalAlignment"":""middle"",
""xoffset"":0,
""yoffset"":0
}
}";
When using the line labelPlacement options (e.g. esriServerLinePlacementBelowEnd
), the label is aligned with the polyline regardless of the specified angle.
Let me know if you have any other questions and I'll do my best to get them answered.
One more thing: I can't share full details yet, but there are changes to the API for labeling in Runtime planned for a future release. I recommend keeping an eye on the blog for some exciting announcements.
from arcgis-maps-sdk-dotnet-samples.
@nCastle1 Hi Nathan, I tried point and polyline features and they both work. Although the rotation is somehow interesting, it does not matter now. For future changes, I hope it can provide accessible classes/properties to configure instead of json, will keep an eye on the blog. Thanks again for your help!
from arcgis-maps-sdk-dotnet-samples.
Related Issues (20)
- elevation not loaded with WPF HOT 1
- Update scene symbol lead to memory leak HOT 1
- Analyze Viewshed Sample HOT 2
- Exception running ArcGISRuntime.WinUI.Viewer: Unable to load 'Microsoft.ui.xaml.dll' HOT 1
- DisplayUtilityAssociations: AddAssociations is called twice during initialization HOT 1
- IndoorPositioning not showing up under Location HOT 3
- Cannot add credentials to ServiceFeatureTable
- 'Add custom dynamic entity data source' example under Layers not working for WPF application HOT 5
- Does 'IIF arcade expression' supports in Renderer?
- Is there any posibility to hide ENC file frame border?
- This service does not support the Map capability on android xamarin HOT 3
- this is certainly not going to work HOT 1
- oauth authentication through proxy HOT 1
- QueryFeaturesAsync
- public RuntimeImage InfoIcon => new RuntimeImage(new Uri("https://cdn3.iconfinder.com/data/icons/web-and-internet-icons/512/Information-256.png")); HOT 1
- Problem with Animate3DGraphic sample HOT 5
- Could not load file or assembly 'Esri.ArcGISRuntime, Version=100.13.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' HOT 1
- xamarin forms searchview error HOT 1
- File not found. shaders folder doesn't exist HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcgis-maps-sdk-dotnet-samples.