0

shuttle.js starts with a function declaration, the function named to be shuttle accepts an object named config as an argument. I was wondering where does the config object come from to be passed into the function?

2

In service.js, exactly in the function named initCB, when you create a new shuttle, you create it like that

// instantiate shuttle
shuttle = new Shuttle({
    heading: HEADING,
    height: HEIGHT,
    latitude: LATITUDE,
    longitude: LONGITUDE,
    planet: earth,
    seats: SEATS,
    velocity: VELOCITY
});
2
  • and where doe the argument instance passed to initCB comes from? Sep 21 '14 at 4:01
  • @segmentationfaulter initCB is called when the Google Earth Plugin is created and initialized successfully. Apparently an instance of it is passed to initCB so that you can have access to it. For more information, you may read the Creating initialization functions section from the API!
    – kzidane
    Sep 21 '14 at 5:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .