mapbox-gl
mapbox-gl copied to clipboard
After Updating the mapbox-gl
Uncaught TypeError: Cannot read property 'toggle' of undefined at CustomIControl.onAdd (mapbox-gl-control.html:182) at e.addControl (mapbox-gl.js:495) at HTMLElement._addControl (mapbox-gl-control.html:207) at Object.runMethodEffect [as fn] (property-effects.html:818) at runEffectsForProperty (property-effects.html:162) at runEffects (property-effects.html:128) at HTMLElement._propertiesChanged (property-effects.html:1711) at HTMLElement._flushProperties (properties-changed.html:341) at HTMLElement._flushProperties (property-effects.html:1559) at HTMLElement.__enableOrFlushClients (property-effects.html:1604)
@hirenpatel868
Which control element r u using? Is it a custom icontrol or a mapbox default?
If it is a custom one, I might need some sample codes.
i am using mapbox-gl-control element with mapbox default NavigationControl and GeoLocateControl
@hirenpatel868
A few more questions because i cannot reproduce ur error.
What version of mapbox-gl are u using?
Can I have a code snippet, gist or a git repo which reproduce the error?
i have the same issue
i am working on a project which uses polymer 2, these are my imports:
and i am using mapbox draw controls:

https://github.com/PolymerVis/mapbox-gl/pull/56/commits/010871b3049d6c79c6d643c28d1251c6ae51094c