Hi I am currently exploring ARCGIS Javascript API. I have my own map services and feature services up on my local server. I would want to use the FeatuerLayer to select and highlight feature on the map. But when i add my feature service i get the following error.
TypeError: Unable to draw graphic (geometry:null, symbol:null): _14 is undefined**
I am not able to figure out what this could be. And I am not sure if the feature layer has been added to the map or not. How could I check if it has been added? I tried using a dojo.connect method with the FeatureLayer with an onClick event. But this doesn't seem to work. Have placed the code below
var map; var selectionToolbar; var infoTemplate = new esri.InfoTemplate(); infoTemplate.setTitle("${ROADNAME}"); infoTemplate.setContent( "ROAD NAME: ${LINK_ID} " + "CAT${CAT}");
function init() {
try {
var initExtent = new esri.geometry.Extent({"xmin":103.55,"ymin":1.13,"xmax":104.16,"ymax":1.56,"spatialReference":{"wkid":4326}}); map = new esri.Map("map",{extent:esri.geometry.geographicToWebMercator(initExtent)});