You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling map.getLayoutProperty should not throw an undefined error when layer name doesn't exist.
Design Alternatives
It should return null.
Design
I thought I was having issues with my map object because an undefined error was being thrown.
Implementation
javascript
I was using version 0.50.0
The text was updated successfully, but these errors were encountered:
donnyv
changed the title
Calling map.getLayoutProperty will throw an undefined error when layer doesn't exists
Calling map.getLayoutProperty will throw an undefined error when layer doesn't exist
Nov 1, 2018
Thanks for reporting this @donnyvgetLayoutProperty definitely shouldn't crash the map in this situation. setLayoutProperty handles this exact situation by throwing a non-fatal error warning that the layer doesn't exist so I submitted a PR to allow getLayoutProperty to do the same thing. The call to getLayoutProperty will then return undefined.
Motivation
Calling map.getLayoutProperty should not throw an undefined error when layer name doesn't exist.
Design Alternatives
It should return null.
Design
I thought I was having issues with my map object because an undefined error was being thrown.
Implementation
javascript
I was using version 0.50.0
The text was updated successfully, but these errors were encountered: