Esempio n. 1
0
  /**
   * Request to redraw the map when a global state like position, datasource or theme has changed.
   * This will trigger a call to onUpdate() for all Layers.
   *
   * @param requestRender also request to draw a frame
   */
  public void redrawMap(boolean requestRender) {
    if (requestRender && !mClearMap && !mPausing && mInitialized) mGLView.requestRender();

    if (!mWaitRedraw) {
      mWaitRedraw = true;
      post(mRedrawRequest);
    }
  }
Esempio n. 2
0
  /**
   * Update all Layers on Main thread.
   *
   * @param forceRedraw also render frame FIXME (does nothing atm)
   */
  void redrawMapInternal(boolean forceRedraw) {
    boolean changed = forceRedraw;

    if (mPausing || !mInitialized) return;

    if (forceRedraw && !mClearMap) mGLView.requestRender();

    // get the current MapPosition
    changed |= mMapViewPosition.getMapPosition(mMapPosition);

    mLayerManager.onUpdate(mMapPosition, changed, mClearMap);

    // delay redraw until all layers had the chance to clear
    // their state.
    if (mClearMap) {
      mGLView.requestRender();
      mClearMap = false;
    }
  }
Esempio n. 3
0
 /** Request to render a frame. Use this for animations. */
 public void render() {
   if (mClearMap) redrawMap(false);
   else mGLView.requestRender();
 }