county-of-simcoe-gis/SimcoeCountyWebViewer

"Add to My Maps" not works after identifying a feature from layers added from Services

sjyangkevin opened this issue · 2 comments

Hi,

When I open up the application with the link provided on the homepage, I added a layer from the "Services" by using the Add Data tool. The "Add to My Maps" button in the Reports tab is not working after I identifying a feature from that layer, and the app throws the following error. (It was an issue in the rc/1.2.x branch before, but since now the identify is not working for those layers added via Services in rc/1.2.x, I use the link provided on the home page to open the application, and also found this issues)

Uncaught TypeError: Cannot read property 'getType' of null

image

Thanks,

The layers fetched from Services or URLs are ImageWMS, and the geometry is null, and line 376 trying to get the type of the feature's geometry, resulting in this error.

feature.getGeometry().getType()

added additional check for unavailable geometry when adding geometry from the emitter