AnsweredAssumed Answered

Leaflet- DynamicMapLayer popup help

Question asked by bill@poconogis.com on Mar 1, 2016
Latest reply on Jul 13, 2016 by bill@poconogis.com

Hi,

 

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[0].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[0].properties.DOHGIS.NYSDOH_CI_DATA.NAME  doesn't work because of the periods in the name.

featureCollection.features[0].properties.NAME  doesn't work..

 

If I use the alias I get

featureCollection.features[0].properties."Facility Name" this doesn't work because of the quotes and space.

 

var temp = "Facility Name"

featureCollection.features[0].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?

 

Thanks,

 

Bill

 

 

 

 

 

Outcomes