Hi I have a leaflet map consuming a dynamic map layer on ArcGIS server. The service is viewable on the map and exposes the following attributes:
Fields:OBJECTID ( type: esriFieldTypeOID , alias: objectid )cableid ( type: esriFieldTypeInteger , alias: Cable ID )spanid ( type: esriFieldTypeInteger , alias: Span ID )spantypeid ( type: esriFieldTypeInteger , alias: Span Type , Coded Values: [1: 36F] , [2: 6F] , [3: 12F] , ...14 more... )placement ( type: esriFieldTypeString , alias: Placement , length: 50 , Coded Values: [aerial: aerial] , [buried: buried] , [transition: transition] , ...2 more... )comments ( type: esriFieldTypeString , alias: Comments , length: 250 )SHAPE_Length ( type: esriFieldTypeDouble , alias: Length (Ft.) )MI_Style ( type: esriFieldTypeString , alias: MI_Style , length: 254 )When I use the bindPopup() method, the popup works but all the values returned are undefined. I'm not sure why this is the case?
Cable.bindPopup(function(error, featureCollection){ if (error || featureCollection.features.length === 0){ return false; } else { return "Span ID: "+featureCollection.features[0].properties.spanid+"
Span Type: "+featureCollection.features[0].properties.spantypeid+"
Placement: "+featureCollection.features[0].properties.placement+"
Comments: "+featureCollection.features[0].properties.comments+"
Length (Ft.): "+featureCollection.features[0].properties.SHAPE_Length; } });
أكثر...
Fields:OBJECTID ( type: esriFieldTypeOID , alias: objectid )cableid ( type: esriFieldTypeInteger , alias: Cable ID )spanid ( type: esriFieldTypeInteger , alias: Span ID )spantypeid ( type: esriFieldTypeInteger , alias: Span Type , Coded Values: [1: 36F] , [2: 6F] , [3: 12F] , ...14 more... )placement ( type: esriFieldTypeString , alias: Placement , length: 50 , Coded Values: [aerial: aerial] , [buried: buried] , [transition: transition] , ...2 more... )comments ( type: esriFieldTypeString , alias: Comments , length: 250 )SHAPE_Length ( type: esriFieldTypeDouble , alias: Length (Ft.) )MI_Style ( type: esriFieldTypeString , alias: MI_Style , length: 254 )When I use the bindPopup() method, the popup works but all the values returned are undefined. I'm not sure why this is the case?
Cable.bindPopup(function(error, featureCollection){ if (error || featureCollection.features.length === 0){ return false; } else { return "Span ID: "+featureCollection.features[0].properties.spanid+"
Span Type: "+featureCollection.features[0].properties.spantypeid+"
Placement: "+featureCollection.features[0].properties.placement+"
Comments: "+featureCollection.features[0].properties.comments+"
Length (Ft.): "+featureCollection.features[0].properties.SHAPE_Length; } });
أكثر...