public MapView() { super(); this.model = new Model(); this.fpsCounter = new FpsCounter(GRAPHIC_FACTORY, this.model.displayModel); this.frameBuffer = new FrameBufferHA2(this.model.frameBufferModel, this.model.displayModel, GRAPHIC_FACTORY); this.frameBufferController = FrameBufferController.create(this.frameBuffer, this.model); this.layerManager = new LayerManager(this, this.model.mapViewPosition, GRAPHIC_FACTORY); this.layerManager.start(); LayerManagerController.create(this.layerManager, this.model); MapViewController.create(this, this.model); this.mapScaleBar = new DefaultMapScaleBar(this.model.mapViewPosition, this.model.mapViewDimension, GRAPHIC_FACTORY, this.model.displayModel); this.mapViewProjection = new MapViewProjection(this); addListeners(); }
public static LayerManagerController create(LayerManager layerManager, Model model) { LayerManagerController layerManagerController = new LayerManagerController(layerManager); model.mapViewDimension.addObserver(layerManagerController); model.mapViewPosition.addObserver(layerManagerController); return layerManagerController; }
public AwtGraphicMapView() { super(); this.model = new Model(); this.fpsCounter = new FpsCounter(GRAPHIC_FACTORY, model.displayModel); this.frameBuffer = new FrameBuffer(model.frameBufferModel, model.displayModel, GRAPHIC_FACTORY); this.frameBufferController = FrameBufferController.create(frameBuffer, model); this.layerManager = new LayerManager(this, model.mapViewPosition, GRAPHIC_FACTORY); this.layerManager.start(); LayerManagerController.create(layerManager, model); MapViewController.create(this, model); this.mapScaleBar = new DefaultMapScaleBar(model.mapViewPosition, model.mapViewDimension, GRAPHIC_FACTORY, model.displayModel); this.mapViewProjection = new MapViewProjection(this); }
public static LayerManagerController create(LayerManager layerManager, Model model) { LayerManagerController layerManagerController = new LayerManagerController(layerManager); model.mapViewDimension.addObserver(layerManagerController); model.mapViewPosition.addObserver(layerManagerController); return layerManagerController; }
public MapView(Context context, AttributeSet attributeSet) { super(context, attributeSet); setDescendantFocusability(FOCUS_BLOCK_DESCENDANTS); setWillNotDraw(false); this.model = new Model(); this.fpsCounter = new FpsCounter(GRAPHIC_FACTORY, this.model.displayModel); this.frameBuffer = new FrameBufferHA2(this.model.frameBufferModel, this.model.displayModel, GRAPHIC_FACTORY); this.frameBufferController = FrameBufferController.create(this.frameBuffer, this.model); this.layerManager = new LayerManager(this, this.model.mapViewPosition, GRAPHIC_FACTORY); this.layerManager.start(); LayerManagerController.create(this.layerManager, this.model); MapViewController.create(this, this.model); this.touchGestureHandler = new TouchGestureHandler(this); this.gestureDetector = new GestureDetector(context, touchGestureHandler); this.scaleGestureDetector = new ScaleGestureDetector(context, touchGestureHandler); this.mapZoomControls = new MapZoomControls(context, this); this.addView(this.mapZoomControls, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); this.mapScaleBar = new DefaultMapScaleBar(this.model.mapViewPosition, this.model.mapViewDimension, GRAPHIC_FACTORY, this.model.displayModel); this.mapViewProjection = new MapViewProjection(this); model.mapViewPosition.addObserver(this); }
public MapView() { super(); this.model = new Model(); this.fpsCounter = new FpsCounter(GRAPHIC_FACTORY, this.model.displayModel); this.frameBuffer = new FrameBufferHA2(this.model.frameBufferModel, this.model.displayModel, GRAPHIC_FACTORY); this.frameBufferController = FrameBufferController.create(this.frameBuffer, this.model); this.layerManager = new LayerManager(this, this.model.mapViewPosition, GRAPHIC_FACTORY); this.layerManager.start(); LayerManagerController.create(this.layerManager, this.model); MapViewController.create(this, this.model); this.mapScaleBar = new DefaultMapScaleBar(this.model.mapViewPosition, this.model.mapViewDimension, GRAPHIC_FACTORY, this.model.displayModel); this.mapViewProjection = new MapViewProjection(this); addListeners(); }