Hi,
We have a number of symbols that contain text internal to the symbol. When these are used in creating the Runtime replica they display with all the text on top of each other. So, VPI would have all three letters stacked on top of each other. IS there something special we need to do to get this type of symbol to display properly?
Thanks
-Joe
Hi Joe,
Can you share the code that shows how you are creating the symbols and adding them to the layer/overlay/view?
Cheers
Mike
Thanks for the reply Michael
It occurs in the map display, that is just loaded from the replica. The below symbol is a square with the letter LB inside, but the letter stand on top of each other.
The same symbol when looking at the service definition on a web page (i.e, /featureserver/0)
Layers are added to the map by opening the table and creating a feature layer to add to the map.
foreach (var featureTable in gdb.GeodatabaseFeatureTables) { await featureTable.LoadAsync(); var featureLayer = new FeatureLayer(featureTable) { //set some properties }; map.OperationalLayers.Add(featureLayer); //... }
In the views that I display the symbol to show the user for editing the following is used (ImageSource is bound property to display image). Which is basically the same as is done in the Symbol Display control
RuntimeImage runtimeImage = await LegendInfo.Symbol.CreateSwatchAsync(24, 24, 128f, Colors.Transparent, new MapPoint(0,0)); ImageSource source = await runtimeImage.ToImageSourceAsync(); //http://stackoverflow.com/questions/26361020/error-must-create-dependencysource-on-same-thread-as-the... source.Freeze(); Dispatcher.CurrentDispatcher.Invoke(() => ImageSource = source);
When placed as a temp graphic I just grab it from the LegendInfo
LegendInfo.Symbol
So pretty much any way it is retrieved the result is always the same. Letters stacked on top of each other. This happens with every symbol that contains letters. They are all simple shape with letters inside.
Hi Joe,
We'll need to see the JSON representation/definition for the symbols.
Please can you:
- Open the .geodatabase file in a SQLite app (e.g. `DB Browser for SQLite`)
- Open the GDB_ServiceItems table
- Find the row for the table that is not rendering correctly
- Copy the contents of the AdvancedDrawingInfo cell
- Post here or email mbranscomb@esri.com
Cheers
Mike
See below
{
"drawingInfo": {
"renderer": {
"type": "simple",
"symbol": {
"type": "CIMSymbolReference",
"symbol": {
"type": "CIMPointSymbol",
"symbolLayers": [{
"type": "CIMVectorMarker",
"enable": true,
"colorLocked": true,
"anchorPointUnits": "Relative",
"scaleStrokesAndFills": true,
"size": 5,
"dominantSizeAxis3D": "Z",
"frame": {
"xmin": 0,
"ymin": 0,
"xmax": 6.9921259842519685,
"ymax": 6.9921259842519685
},
"markerGraphics": [{
"type": "CIMMarkerGraphic",
"geometry": {
"rings": [[[4.0,
0.36],
[6.54,
7.36],
[5.66,
7.36],
[3.93,
2.27],
[3.57,
1.13],
[3.24,
2.27],
[1.57,
7.36],
[0.64,
7.36],
[3.13,
0.36],
[4.0,
0.36]]],
"spatialReference": {
"wkid": null
}
},
"symbol": {
"type": "CIMPolygonSymbol",
"symbolLayers": [{
"type": "CIMFill",
"enable": true,
"colorLocked": true,
"pattern": {
"type": "CIMSolidPattern",
"color": [0,
0,
0,
255]
}
}]
}
}]
},
{
"type": "CIMVectorMarker",
"enable": true,
"colorLocked": true,
"anchorPointUnits": "Relative",
"scaleStrokesAndFills": true,
"size": 5,
"dominantSizeAxis3D": "Z",
"frame": {
"xmin": 0,
"ymin": 0,
"xmax": 6.0094488188976385,
"ymax": 6.9921259842519685
},
"markerGraphics": [{
"type": "CIMMarkerGraphic",
"geometry": {
"rings": [[[1.94,
6.36],
[3.48,
6.36],
[4.23,
6.31],
[4.75,
5.98],
[4.94,
5.38],
[4.61,
4.63],
[3.51,
4.36],
[1.94,
4.36],
[1.94,
6.36]],
[[1.94,
0.36],
[1.94,
3.36],
[3.56,
3.36],
[4.18,
3.4],
[4.7,
3.51],
[5.11,
3.7],
[5.42,
3.96],
[5.94,
5.39],
[5.74,
6.32],
[5.22,
6.97],
[4.4,
7.28],
[3.4,
7.36],
[0.94,
7.36],
[0.94,
0.36],
[1.94,
0.36]]],
"spatialReference": {
"wkid": null
}
},
"symbol": {
"type": "CIMPolygonSymbol",
"symbolLayers": [{
"type": "CIMFill",
"enable": true,
"colorLocked": true,
"pattern": {
"type": "CIMSolidPattern",
"color": [0,
0,
0,
255]
}
}]
}
}]
},
{
"type": "CIMVectorMarker",
"enable": true,
"colorLocked": true,
"anchorPointUnits": "Points",
"size": 10,
"dominantSizeAxis3D": "Z"
},
{
"type": "CIMVectorMarker",
"enable": true,
"colorLocked": true,
"anchorPointUnits": "Relative",
"scaleStrokesAndFills": true,
"size": 12,
"dominantSizeAxis3D": "Z",
"frame": {
"xmin": 0,
"ymin": 0,
"xmax": 15.987401574803147,
"ymax": 15.987401574803147
},
"markerGraphics": [{
"type": "CIMMarkerGraphic",
"geometry": {
"rings": [[[1.7,
14.11],
[15.3,
14.11],
[15.3,
1.86],
[1.7,
1.86],
[1.7,
14.11]],
[[15.7,
0.99],
[15.7,
14.99],
[1.3,
14.99],
[1.3,
0.99],
[15.7,
0.99]]],
"spatialReference": {
"wkid": null
}
},
"symbol": {
"type": "CIMPolygonSymbol",
"symbolLayers": [{
"type": "CIMFill",
"enable": true,
"colorLocked": true,
"pattern": {
"type": "CIMSolidPattern",
"color": [0,
0,
0,
255]
}
}]
}
}]
},
{
"type": "CIMVectorMarker",
"enable": true,
"colorLocked": true,
"anchorPointUnits": "Relative",
"scaleStrokesAndFills": true,
"size": 12,
"dominantSizeAxis3D": "Z",
"frame": {
"xmin": 0,
"ymin": 0,
"xmax": 15.987401574803147,
"ymax": 15.987401574803147
},
"markerGraphics": [{
"type": "CIMMarkerGraphic",
"geometry": {
"rings": [[[15.59,
1.19],
[15.59,
15.19],
[2.0,
15.19],
[2.0,
1.19],
[15.59,
1.19]]],
"spatialReference": {
"wkid": null
}
},
"symbol": {
"type": "CIMPolygonSymbol",
"symbolLayers": [{
"type": "CIMFill",
"enable": true,
"colorLocked": true,
"pattern": {
"type": "CIMSolidPattern",
"color": [255,
255,
255,
255]
}
}]
}
}]
}],
"anchorPointUnits": "Relative",
"scaleX": 1
},
"symbolName": "Symbol_7"
},
"label": "",
"description": ""
},
"transparency": 0,
"labelingInfo": null
}
}