I'm trying to make a simple leaflet map with a popup but I'm having trouble with the field name in the popup.
Following the example Custom Popup with Dynamic Map Layer | Esri Leaflet you can see the popup is based on featureCollection.features.properties.FIELDNAME, my issue is my data is in SDE and I get this:
DOHGIS.NYSDOH_CI_DATA.NAME ( type: esriFieldTypeString , alias: Facility Name , length: 250 )
featureCollection.features.properties.DOHGIS.NYSDOH_CI_DATA.NAME doesn't work because of the periods in the name.
featureCollection.features.properties.NAME doesn't work..
If I use the alias I get
featureCollection.features.properties."Facility Name" this doesn't work because of the quotes and space.
var temp = "Facility Name"
featureCollection.features.properties.temp; also fails.
Of course fieldnames with an underscore instead of a space work.
Beyond adding new fields to fix the database any ideas?
Solved! Go to Solution.
I am experiencing this problem and I have tried the solution you are suggesting here but it can't seem to work for me. Did you find something else along this line that can help me
I have put mine this way featureCollection.features.properties['PLOTNO_1'] I have also tried " " but I still get undefined.
Sorry i was never notified of your question, did you ever figure this out?
I know upper/lower case makes a difference, and in GeoJSON without SDE it's features.properties.FIELDNAME