Summary

Classes


Class deCarta.Mobile.EventManager

The EventManager is a global object which is used to receive / issue notifications regarding the status of the map. Events that are currently supported are :

Class Summary
Constructor Attributes Constructor Name and Description
 
Implements Listen and Trigger methods for event notification.
Field Summary
Field Attributes Field Name and Description
<static>  
deCarta.Mobile.EventManager.events
List of supported events
Method Summary
Method Attributes Method Name and Description
<static>  
deCarta.Mobile.EventManager.listen(event:, callback:)
Registers a callback function with a specific event.
<static>  
deCarta.Mobile.EventManager.trigger(event:, params:)
Triggers an event, executing all callbacks registered for it
Class Detail
deCarta.Mobile.EventManager()
Implements Listen and Trigger methods for event notification.
Field Detail
<static> deCarta.Mobile.EventManager.events
List of supported events
Method Detail
<static> deCarta.Mobile.EventManager.listen(event:, callback:)
Registers a callback function with a specific event.
Parameters:
{string} event:
the event you wish to listen for.
{function} callback:
callback function that will be invoked when the event occurs When defining the callback function, the callback function takes a single parameter, the contents of which depends on the event being triggered. Here is a list of each type of event, and the data structure passed to the callback function for each: zoomchange, zoomend
  • deCarta.Mobile.Map map: A pointer to the map
  • (int) zoom: The starting zoom level
  • (int) targetZoom: The new zoom level
movestart, move, moveend
  • deCarta.Mobile.Position center: Geographic position at the center of the map at the start, during, or after a move operation (respectively)
  • (int) zoom: The current zoom level of the map
  • deCarta.Mobile.Map map: A pointer to the map
resize
  • deCarta.Mobile.Map map: A pointer to the map
  • (int) zoom: The current zoom level of the map
  • deCarta.Mobile.Position center: Geographic position at the center of the map
  • size:
    • (int) width: The new width of the map window after a resize operation, in pixels
    • (int) height: The new height of the map window after a resize operation, in pixels
showpintext, hidepintext
  • {deCarta.Mobile.Pin} pin: A pointer to the pin object which is being shown or hidden
longtouch
  • deCarta.Mobile.Position position: Geographic position on which the user long-touched. This value, in turn, is comprised of:
    • (int) x: Latitude
    • (int) y: Longitude
  • deCarta.Mobile.Position center: Geographic position at the center of the map
  • (int) zoom: The current zoom level of the map
  • deCarta.Mobile.Map map: A pointer to the map
doubletap, doubleclick

<static> deCarta.Mobile.EventManager.trigger(event:, params:)
Triggers an event, executing all callbacks registered for it
Parameters:
{string} event:
the event you wish to trigger.
{object} params:
an object which will be passed to the registered callback with event parameters.

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Nov 04 2011 12:27:12 GMT-0700 (PDT)