/src/com/google/maps/extras/arcgislink/NetworkService.as

http://gmaps-utility-library-flash.googlecode.com/ · ActionScript · 38 lines · 24 code · 7 blank · 7 comment · 0 complexity · b257cf2b0f5d8f1075609630bac8ba46 MD5 · raw file

  1. /*
  2. * ArcGIS for Google Maps Flash API
  3. *
  4. * License http://www.apache.org/licenses/LICENSE-2.0
  5. */ /**
  6. * @author nianwei at gmail dot com
  7. */
  8. package com.google.maps.extras.arcgislink {
  9. import flash.events.*;
  10. public class NetworkService implements IEventDispatcher {
  11. public function NetworkService() {
  12. dispatcher_=new EventDispatcher(this);
  13. }
  14. private var dispatcher_:EventDispatcher;
  15. public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void {
  16. dispatcher_.addEventListener(type, listener, useCapture, priority);
  17. }
  18. public function dispatchEvent(evt:Event):Boolean {
  19. return dispatcher_.dispatchEvent(evt);
  20. }
  21. public function hasEventListener(type:String):Boolean {
  22. return dispatcher_.hasEventListener(type);
  23. }
  24. public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void {
  25. dispatcher_.removeEventListener(type, listener, useCapture);
  26. }
  27. public function willTrigger(type:String):Boolean {
  28. return dispatcher_.willTrigger(type);
  29. }
  30. }
  31. }