Select to view content in your preferred language

JS: Add Symbols not successful

1083
3
Jump to solution
07-28-2014 06:31 AM
ShaningYu
Honored Contributor

I have a couple of JS applications that used to work very well.  After several months, I re-run them again and got problems in adding symbols on the map.  The related code is below:  

function drawResponseGeometries2(response) {        map.graphics.clear();      // clear graphicsLayer if exists        var pointJson = response.Geometry[0];        var point = new esri.geometry.Point(pointJson);        var symbol = new esri.symbol.SimpleMarkerSymbol({            "color": [255, 0, 0, 128],            "size": 10,            "angle": -30,            "xoffset": 0,            "yoffset": 0,            "type": "esriSMS",            "style": "esriSLSSolid",            "outline": {                "color": [0, 0, 0, 255],                "width": 1,                "type": "esriSLS",                "style": "esriSLSSolid"            }        });        var g = new esri.Graphic(point, symbol);        map.setExtent(initialExtent.expand(0.125));        map.graphics.add(g);        map.centerAt(point);    }

When I run debugger, I could not detect anything wrong.  How can this program be debugged?  Appreciate if you can share your experience.

Remark:  The new format of this forum looks to be not good at all.

0 Kudos
1 Solution

Accepted Solutions
TimothyHales
Esri Notable Contributor

I have moved this discussion to ArcGIS API for JavaScript‌ where you'll get a better response.

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Shaning,

   You will need to post questions in the proper forum space. ArcGIS API for JavaScript‌ You also need to add tags to your discussion posts like "JavaScript" so that it can be searched for. As far as your code not working now when it was working before... What did you change. Are you familiar with web browser development tools in Chrome or Firefox?

TimothyHales
Esri Notable Contributor

I have moved this discussion to ArcGIS API for JavaScript‌ where you'll get a better response.

ShaningYu
Honored Contributor

Thanks.  Will follow the new format style.

I debugged and also monitored the results using Fiddle2.  The results are ALL in '200', which mean no HTTP error.  Even though, the map zooms corrected into the area at the desired extend, however, the symbol is still not displayed.

0 Kudos