Examples of PositionError


Examples of com.eclipsesource.tabris.geolocation.PositionError

  public void handleNotify( String event, JsonObject properties ) {
    if( EVENT_LOCATION_UPDATE_EVENT.equals( event ) ) {
      Position position = getPosition( properties );
      notifyListenersWithPosition( position );
    } else if( EVENT_LOCATION_UPDATE_ERROR_EVENT.equals( event ) ) {
      PositionError error = getPositionError( properties );
      notifyListenersWithError( error );
    }
  }
View Full Code Here

Examples of com.eclipsesource.tabris.geolocation.PositionError

  private PositionError getPositionError( JsonObject properties ) {
    String code = properties.get( PROPERTY_ERROR_CODE ).asString();
    PositionErrorCode errorCode = PositionErrorCode.valueOf( code );
    String message = properties.get( PROPERTY_ERROR_MESSAGE ).asString();
    PositionError positionError = new PositionError( errorCode, message );
    return positionError;
  }
View Full Code Here

Examples of com.eclipsesource.tabris.geolocation.PositionError

  public void handleNotify( String event, Map<String,Object> properties ) {
    if( EVENT_LOCATION_UPDATE_EVENT.equals( event ) ) {
      Position position = getPosition( properties );
      notifyListenersWithPosition( position );
    } else if( EVENT_LOCATION_UPDATE_ERROR_EVENT.equals( event ) ) {
      PositionError error = getPositionError( properties );
      notifyListenersWithError( error );
    }
  }
View Full Code Here

Examples of com.eclipsesource.tabris.geolocation.PositionError

  private PositionError getPositionError( Map<String, Object> properties ) {
    String code = ( String )properties.get( PROPERTY_ERROR_CODE );
    PositionErrorCode errorCode = PositionErrorCode.valueOf( code );
    String message = ( String )properties.get( PROPERTY_ERROR_MESSAGE );
    PositionError positionError = new PositionError( errorCode, message );
    return positionError;
  }
View Full Code Here

Examples of gt.geolocation.w3c.PositionError

      Position pos = acquireLocation(enableHighAccuracy);
      cachedPosition = pos;
      if (pos != null) {
        callback.onSuccess(pos);
      } else {
        callback.onFailure(new PositionError(PositionError.POSITION_UNAVAILABLE));   
      }
    } catch (InterruptedException ie) {
      cachedPosition = null;
      callback.onFailure(new PositionError(PositionError.TIMEOUT));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.