Display a graphic

272
1
07-22-2021 04:35 PM
johnmarker
New Contributor III

I have an application that previously used GMap, therefore I used many of the gmap features. One of those features that i used was GMapMarker. This marker has a shape property and I was able to create my own class that pulled a svg file from and would give the marker a few other properties, then it displayed this marker on the map. I'm now trying to convert over to arcgis and am having a hard time converting this part. 

1. Is there a way to display a svg file onto a map?

        It seems that arcgis has a limited amount of symbolmarkers tha can be used. 

2. I know this is most likely not possible, but is there a way to keep the gmapmarker and display it onto the map? I'm sure it would have to be a work around not using a graphics overlay.

0 Kudos
1 Reply
MichaelBranscomb
Esri Frequent Contributor

ArcGIS Runtime doesn't directly support SVG as a marker symbol (supported formats are BMP, GIF, ICO, JPEG, and PNG). You could explore converting the SVG to another format, or even perhaps export to XAML and use RenderTargetBitmap to render the icon in one of the supported formats.

ArcGIS Runtime does support vectorized rendering via the Cartographic Information Model (CIM) specification. If you have access to ArcGIS Pro, you can import the SVG as a marker symbol layer, put your new symbol in a mobile style file, and use that mobile style in ArcGIS Runtime. This "Symbol Editor" demo shows how to use the style file in ArcGIS Runtime: https://github.com/Esri/arcgis-runtime-demos-dotnet/tree/main/src/SymbolEditor.

 

0 Kudos