0

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);
djordje
  • 1
  • 3
  • Welcome to StackOverflow. Please share at least some code so that we can understand better what are you asking about. – YakovL Jun 23 '16 at 14:13
  • Possible duplicate of [Font Awesome icon not displaying in Safari and iPad](http://stackoverflow.com/questions/29696700/font-awesome-icon-not-displaying-in-safari-and-ipad) – Sleek Geek Jun 23 '16 at 14:14
  • No, that's not my problem. I edited my question. – djordje Jun 23 '16 at 14:30

0 Answers0