I'm working with esri arcgis map. And I can't set icons on picture symbol. First I set picturesymbol, and then on the same position put the textSymbol. That works fine on all devices, except iOS. There is no icons on iOS. Only pictureMarkerSymbol. Does anyone know answer on this question? Thanks
This is function which detect what icon shuld be display...
function getPinIcon(locationType) {
var faStyle = null;
for(var i = 0; i < document.styleSheets.length; i++) {
if (document.styleSheets[i].href != null && document.styleSheets[i].href.indexOf("font-awesome.css") != -1) {
faStyle = document.styleSheets[i];
}
}
if (faStyle == null) {
return "";
}
var classes = faStyle.rules || faStyle.cssRules;
var locationTypeClass = ".fa-" + locationType + "::before";
for(var j = 0; j < classes.length; j++) {
if (classes[j].selectorText == locationTypeClass) {
var content = classes[j].style.content;
return content.substr(1, content.length - 2);
}
}
return "";
}
Well, here i'm creating picture and text symbol
var pinImg = new TextSymbol(getPinIcon(obj.location_type_icon), iconFont, new Color([255, 255, 255]));
var graphicSymbol = new Graphic(newPoint, greenPin, infoTemplate);
var imgSymbol = new Graphic(newPoint, pinImg);
imgSymbol.setInfoTemplate(infoTemplate);
graphicSymbol.setInfoTemplate(infoTemplate);
map.graphics.add(graphicSymbol);
map.graphics.add(imgSymbol);