How to use Mapbox GL instance members in to Ember Mapbox GL

I need to use some of the Mapbox GL instance members in Ember map application. like addControl() or getZoom(). These are the stack I’m working with:

"ember-cli": "~3.20.0",
"ember-cli-babel": "^7.21.0",
"ember-mapbox-gl": "^1.0.1"

this is the map vonstructor and some events:

{{#mapbox-gl class='map-container full-screen'  initOptions=(hash pitch=10 center=this.center zoom=this.zoom style=this.style boxZoom=true keyboard=true) as |map|}}
    {{map.on 'click' @onMapClick}}
    {{map.on 'mouseover' this.mouseEnter}}
    {{map.on 'mouseout' @mouseLeave}}
    {{map.on 'contextmenu' @rightClick}}
    {{map.addControl ...'}} // not sure if I can do this
{{/mapbox-gl}} 

cheers

@satir1313 it looks like you can pass a mapLoaded action to the component and I’d expect that would give you a reference to the map instance, so you could store the reference and use addControl on it whenever you want.

The map component also yields the map instance map.instance so you could toss that into an action handler and use it that way too though that might be more convoluted depending on what you’re trying to do.