Dec 4, 2016
0
Level 11
call method on/send event to custom component in Spark
I am trying to use the Google Maps API in conjunction with a custom component in Spark. I want to invoke the map initializer methods in the component based on the callback registered in the maps API, e.g.:
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
async defer></script>
I want the callback to initMap to call/signal to the component. What is correct way to do this with VueJS 2 and Spark? Is it possible to access the Spark app and component from global scope, or to emit an event that will travel down to the component? Have tried several approaches, none are working. Any input greatly appreciated.
Please or to participate in this conversation.