|
POST
|
Hi Stuart, We have been trying different ways to reproduce the problem but can't get the problem to occur at our end. Thanks for sharing the code but it's hard because we can't use your code as is. I even tried using FeatureCollection to match closely with your code , but still could not reproduce the problem. If you can tweak code attached in this post to reproduce the problem, we will be more than happy to look into it further. I would also suggest considering to contact esri Technical support to get help in troubleshooting the issue at your app level. private async void addGraphics_Click(object sender, RoutedEventArgs e)
{
SolidStrokeSymbolLayer lineSymbol = new SolidStrokeSymbolLayer(1, Color.Black);
List<SymbolLayer> symbolLayers = new List<SymbolLayer>
{
lineSymbol
};
MultilayerPolylineSymbol multilayerPolylineSymbol = new MultilayerPolylineSymbol(symbolLayers);
List<MapPoint> mapPoints = new List<MapPoint>();
MapPoint[] coordinatesArray = new MapPoint[] { new MapPoint(0, 0), new MapPoint(5, 0), new MapPoint(5, 2), new MapPoint(5, -2) };
foreach (MapPoint coordinate in coordinatesArray)
{
mapPoints.Add(coordinate);
}
VectorMarkerSymbolElement symLyrEl = new VectorMarkerSymbolElement(new Polyline(mapPoints), multilayerPolylineSymbol);
List<VectorMarkerSymbolElement> vectorMarkerSymbolElements = new List<VectorMarkerSymbolElement>();
//add custom element to vectormarker symbol
vectorMarkerSymbolElements.Add(symLyrEl);
SimpleMarkerSymbol pointSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle.Circle, Color.Transparent, 5)
{
Color = Color.Transparent,
Outline = new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, Color.Black, 1)
};
pointSymbol.Style = SimpleMarkerSymbolStyle.Circle;
MultilayerPointSymbol multilayerPointSymbol = pointSymbol.ToMultilayerSymbol();
VectorMarkerSymbolElement vectorMarkerSymbolElement = new VectorMarkerSymbolElement(new MapPoint(0, 10), multilayerPointSymbol);
//add circle symbol to vectormarker symbol
vectorMarkerSymbolElements.Add(vectorMarkerSymbolElement);
VectorMarkerSymbolLayer symLyr = new VectorMarkerSymbolLayer(vectorMarkerSymbolElements);
List<VectorMarkerSymbolLayer> vectorMarkerSymbolLayers = new List<VectorMarkerSymbolLayer>();
vectorMarkerSymbolLayers.Add(symLyr);
MultilayerPointSymbol sym = new MultilayerPointSymbol(vectorMarkerSymbolLayers)
{
AngleAlignment = SymbolAngleAlignment.Map,
};
var sr = SpatialReference.Create(4839);
var map = new Map(BasemapStyle.ArcGISLightGray);
map.ReferenceScale = 445;
mapview.Map = map;
var UVrenderer = new UniqueValueRenderer()
{
RotationExpression = "[RotationField]",
RotationType = RotationType.Arithmetic,
};
UVrenderer.FieldNames.Add("Asset_Type");
UVrenderer.UniqueValues.Add(new UniqueValue("Asset_Type", "Asset_Type", sym, "whatever"));
UVrenderer.DefaultSymbol = new SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.Cross, Color.Red, size: 20);
Field f1 = new Field(FieldType.Int32, "RotationField", "RotationField", 0, null, true, true);
Field f2 = new Field(FieldType.Text, "Asset_Type", "Asset_Type", 16, null, true, true);
var ftable = new FeatureCollectionTable(new Field[] { f1, f2 }, GeometryType.Point,sr );
FeatureCollection fcoll = new FeatureCollection();
fcoll.Tables.Add(ftable);
FeatureCollectionLayer fcollayer = new FeatureCollectionLayer(fcoll);
var f = ftable.CreateFeature();
f.Geometry = new MapPoint(0, 0, ftable.SpatialReference);
f.Attributes["RotationField"] = 140;
f.Attributes["Asset_Type"] = "whatever";
await ftable.AddFeatureAsync(f);
var f0 = ftable.CreateFeature();
f0.Geometry = new MapPoint(10, 10, ftable.SpatialReference);
f0.Attributes["RotationField"] = 240;
f0.Attributes["Asset_Type"] = "whatever2";
await ftable.AddFeatureAsync(f0);
ftable.Renderer = UVrenderer;
await fcoll.LoadAsync();
map.OperationalLayers.Add(fcollayer);
} And here is the output of code : one feature rendering with default symbol and other using the multilayer symbol.
... View more
10-12-2022
03:28 PM
|
0
|
8
|
2382
|
|
POST
|
Priyanka tried in Android and it works. Then in tried in .Net I see above symbol created with exact code you provided, just changed the coordinate collection to an array of MapPoint and added a graphic to graphics overlay that uses this symbol and it all works fine. SolidStrokeSymbolLayer lineSymbol = new SolidStrokeSymbolLayer(1, Color.Black);
List<SymbolLayer> symbolLayers = new List<SymbolLayer>
{
lineSymbol
};
MultilayerPolylineSymbol multilayerPolylineSymbol = new MultilayerPolylineSymbol(symbolLayers);
List<MapPoint> mapPoints = new List<MapPoint>();
MapPoint[] coordinatesArray = new MapPoint[] { new MapPoint(0, 0), new MapPoint(5, 0), new MapPoint(5, 2), new MapPoint(5, -2) };
foreach (MapPoint coordinate in coordinatesArray)
{
mapPoints.Add(coordinate);
}
VectorMarkerSymbolElement symLyrEl = new VectorMarkerSymbolElement(new Polyline(mapPoints), multilayerPolylineSymbol);
List<VectorMarkerSymbolElement> vectorMarkerSymbolElements = new List<VectorMarkerSymbolElement>();
//add custom element to vectormarker symbol
vectorMarkerSymbolElements.Add(symLyrEl);
SimpleMarkerSymbol pointSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle.Circle, Color.Transparent, 5)
{
Color = Color.Transparent,
Outline = new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, Color.Black, 1)
};
pointSymbol.Style = SimpleMarkerSymbolStyle.Circle;
MultilayerPointSymbol multilayerPointSymbol = pointSymbol.ToMultilayerSymbol();
VectorMarkerSymbolElement vectorMarkerSymbolElement = new VectorMarkerSymbolElement(new MapPoint(0, 10), multilayerPointSymbol);
//add circle symbol to vectormarker symbol
vectorMarkerSymbolElements.Add(vectorMarkerSymbolElement);
VectorMarkerSymbolLayer symLyr = new VectorMarkerSymbolLayer(vectorMarkerSymbolElements);
List<VectorMarkerSymbolLayer> vectorMarkerSymbolLayers = new List<VectorMarkerSymbolLayer>();
vectorMarkerSymbolLayers.Add(symLyr);
MultilayerPointSymbol sym = new MultilayerPointSymbol(vectorMarkerSymbolLayers)
{
AngleAlignment = SymbolAngleAlignment.Map,
};
var map = new Map(BasemapStyle.ArcGISLightGray);
mapview.Map = map;
var GO = new GraphicsOverlay();
mapview.GraphicsOverlays.Add(GO);
var g = new Graphic(new MapPoint(10, 10, SpatialReferences.Wgs84), sym);
GO.Graphics.Add(g);
... View more
10-05-2022
11:38 AM
|
0
|
1
|
3220
|
|
POST
|
Hi Stuart, Thanks for providing the code. I will look into this but before I dive in I wanted to check if you have tested in latest version of ArcGIS Runtime SDK For .NET 100.15? --Preeti
... View more
10-04-2022
10:47 AM
|
0
|
1
|
4603
|
|
POST
|
First cast the renderer as UniqueValueRenderer and then get uniquevalues ``` var uvr= layer.Renderer as UniqueValueRenderer; var uv_values= uvr.UniqueValues; ```
... View more
09-30-2022
08:29 AM
|
0
|
0
|
2734
|
|
POST
|
It is difficult to suggest anything without looking at how you are creating your multilayer point symbol. A MultilayerPointSymbol can only be created from a collection of symbollayers. You can not directly add a simple marker symbol to a Multilayer unless you convert that simple marker symbol to a multilayersymbol. I am happy to help further if you can provide some code you are using to create multilayerpointsymbol and perhaps some screenshots when those symbols are rendered on the map. --Preeti
... View more
09-27-2022
10:33 AM
|
0
|
1
|
4618
|
|
POST
|
Hello Joe, 100.15 was released in August and iOS 16 was not available at the time of release. Therefore iOS 16 has not been certified with 100.15. Thanks, Preeti
... View more
09-20-2022
02:51 PM
|
0
|
3
|
2056
|
|
POST
|
Have you tried setting ArcGISRuntimeEnvironment.ServiceCurveGeometryMode ?
... View more
09-06-2022
09:56 AM
|
0
|
1
|
2153
|
|
POST
|
Hi there! I have attempted to answer your question on saving images for symbols in a stylx in this post. https://community.esri.com/t5/arcgis-runtime-sdk-for-net-questions/get-all-symbols-from-a-stylx-file-as-pngs/m-p/1197805 Just curious how is this related to the Unity workflow. Can you please elaborate your use case?
... View more
08-01-2022
11:56 AM
|
0
|
1
|
1126
|
|
POST
|
Hi there! You can not get all symbols in a .stylx file in one call. .stylx is a collection of symbols grouped by categories and have keys. Symbol are searched based on categories or keys. You can follow the workflow listed below to get images for symbols in a stylx. ``` //Open stylx file SymbolStyle symbolstyle = await SymbolStyle.OpenAsync(@"PathToStylx"); // Get all categories and keys in the stylx. SymbolStyleSearchParameters searchParams = await symbolstyle .GetDefaultSearchParametersAsync(); // capture keys in a list var keys_list = searchParams.Keys.ToList(); foreach (var key_item in keys_list) { //for each key get the symbol var sym = await symbolstyle .GetSymbolAsync(keys: new string[] { key_item }); //generate swatch for the symbol var symbol_swatch = await sym.CreateSwatchAsync(); //create a bitmap that can then be saved locally. var bitmap_image = await symbol_swatch.ToImageSourceAsync(); .... // add code to save image locally } I also noticed you also posted same question on ArcGIS Maps SDK for Unity https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/display-symbols-from-stylx-file/m-p/1197803#M64 The ArcGIS Maps SDKs for Unity is different from ArcGIS Runtime SDK, they are two completely distinct SDKs. I was wondering if it just a mix up. If not, can you please explain how this question is related your game engine workflow.
... View more
08-01-2022
11:52 AM
|
0
|
3
|
2792
|
|
POST
|
>I can create a marker layer using VectorMarkerSymbolLayer, but it doesn't have a marker placement property We acknowledge that there is no public API available to set the MarkerPlacement yet. This is on our to do list in one of the future releases. I will add your request to our internal issue to add some weight 🙂 So basically if you are creating symbol programmatically using API classes, you might not be able to do this because markerplacement property is not publicly available. One way around this to get symbol json and create symbol.FromJson() However, a better/recommended workflow is to create a stylx of symbols in ArcGIS Pro, and use SymbolStyle API to open that stylx in runtime and fetch/get desired symbol by searching the associated key. For the most part ArcGIS Pro symbolization and symbol properties are honored in Runtime via authored content, like if you are using a stylx or accessing a mobilemappackage etc. But not all properties are exposed as public APIs. Hope that helps.
... View more
07-26-2022
10:05 AM
|
1
|
0
|
1180
|
|
POST
|
Thanks for trying ArcGIS Runtime SDK Maui preview. It is exciting to see our users transitioning to new technology . For this particular error, are you getting this error when deploying to an iOS simulator?
... View more
07-07-2022
10:03 AM
|
0
|
1
|
2337
|
|
POST
|
Current SketchEditor only rotates by interaction. There are no GeometryEngine method to rotate the geometry.
... View more
06-24-2022
11:28 AM
|
0
|
1
|
1500
|
|
POST
|
I am sure you have already checked it, but I have seen sometimes manifest is different in debug and release build. I suggest select release build and ensure Internet is checked on for release builds in package manifest.
... View more
06-24-2022
10:54 AM
|
0
|
0
|
3804
|
|
POST
|
Hi I am assuming you must have looked at this sample already. Are you saying when you are re-routed the heading on the map continues to be in wrong direction? --Preeti
... View more
05-26-2022
04:57 PM
|
0
|
4
|
2786
|
|
POST
|
Hi, I ported over forms SketchOnMap sample to MAUI and tried deleting the vertex and did not see any crash. Would you like to share your test app with a simple repro? I would be happy to try and see if I can reproduce it as well. Thanks, Preeti
... View more
05-18-2022
05:44 PM
|
0
|
4
|
4387
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-11-2025 03:29 PM | |
| 2 | 09-04-2025 04:44 PM | |
| 1 | 04-14-2025 10:39 AM | |
| 1 | 12-17-2024 01:28 PM | |
| 1 | 01-16-2025 02:56 PM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|