Java 类com.google.android.gms.maps.model.IndoorBuilding 实例源码

项目:iosched-reader    文件:MapFragment.java   
@Override
public void onIndoorBuildingFocused() {
    IndoorBuilding building = mMap.getFocusedBuilding();

    if (building != null && mMosconeBuilding == null
            && mMap.getProjection().getVisibleRegion().latLngBounds.contains(MOSCONE)) {
        // Store the first active building. This will always be Moscone
        mMosconeBuilding = building;
    }

    if (!mAtMoscone && building != null && building.equals(mMosconeBuilding)) {
        // Map is focused on Moscone Center
        mAtMoscone = true;
        onFocusMoscone();
    } else if (mAtMoscone && mMosconeBuilding != null && !mMosconeBuilding.equals(building)) {
        // Map is no longer focused on Moscone Center
        mAtMoscone = false;
        onDefocusMoscone();
    }
    onIndoorLevelActivated(building);
}
项目:smconf-android    文件:MapFragment.java   
@Override
public void onIndoorBuildingFocused() {
    IndoorBuilding building = mMap.getFocusedBuilding();

    if (building != null && mMosconeBuilding == null
            && mMap.getProjection().getVisibleRegion().latLngBounds.contains(MOSCONE)) {
        // Store the first active building. This will always be Moscone
        mMosconeBuilding = building;
    }

    if (!mAtMoscone && building != null && building.equals(mMosconeBuilding)) {
        // Map is focused on Moscone Center
        mAtMoscone = true;
        onFocusMoscone();
    } else if (mAtMoscone && mMosconeBuilding != null && !mMosconeBuilding.equals(building)) {
        // Map is no longer focused on Moscone Center
        mAtMoscone = false;
        onDefocusMoscone();
    }
    onIndoorLevelActivated(building);
}
项目:PhoneChat    文件:PluginUtil.java   
public static JSONObject convertIndoorBuildingToJson(IndoorBuilding indoorBuilding) {
  if (indoorBuilding == null) {
    return null;
  }
  JSONObject result = new JSONObject();
  try {
    JSONArray levels = new JSONArray();
    for(IndoorLevel level : indoorBuilding.getLevels()){
      JSONObject levelInfo = new JSONObject();
        levelInfo.put("name",level.getName());

        // TODO Auto-generated catch block
      levelInfo.put("shortName",level.getShortName());
      levels.put(levelInfo);
    }
    result.put("activeLevelIndex",indoorBuilding.getActiveLevelIndex());
    result.put("defaultLevelIndex",indoorBuilding.getDefaultLevelIndex());
    result.put("levels",levels);
    result.put("underground",indoorBuilding.isUnderground());
  } catch (JSONException e) {
    e.printStackTrace();
    return null;
  }  
  return result;
}
项目:2015-Google-I-O-app    文件:MapFragment.java   
@Override
public void onIndoorBuildingFocused() {
    IndoorBuilding building = mMap.getFocusedBuilding();

    if (building != null && mMosconeBuilding == null
            && mMap.getProjection().getVisibleRegion().latLngBounds.contains(MOSCONE)) {
        // Store the first active building. This will always be Moscone
        mMosconeBuilding = building;
    }

    if (!mAtMoscone && building != null && building.equals(mMosconeBuilding)) {
        // Map is focused on Moscone Center
        mAtMoscone = true;
        onFocusMoscone();
    } else if (mAtMoscone && mMosconeBuilding != null && !mMosconeBuilding.equals(building)) {
        // Map is no longer focused on Moscone Center
        mAtMoscone = false;
        onDefocusMoscone();
    }
    onIndoorLevelActivated(building);
}
项目:FMTech    文件:MapFragment.java   
@Override
public void onIndoorBuildingFocused() {
    IndoorBuilding building = mMap.getFocusedBuilding();

    if (building != null && mMosconeBuilding == null
            && mMap.getProjection().getVisibleRegion().latLngBounds.contains(MOSCONE)) {
        // Store the first active building. This will always be Moscone
        mMosconeBuilding = building;
    }

    if (!mAtMoscone && building != null && building.equals(mMosconeBuilding)) {
        // Map is focused on Moscone Center
        mAtMoscone = true;
        onFocusMoscone();
    } else if (mAtMoscone && mMosconeBuilding != null && !mMosconeBuilding.equals(building)) {
        // Map is no longer focused on Moscone Center
        mAtMoscone = false;
        onDefocusMoscone();
    }
    onIndoorLevelActivated(building);
}
项目:saarang-iosched    文件:MapFragment.java   
@Override
public void onIndoorBuildingFocused() {
    IndoorBuilding building = mMap.getFocusedBuilding();

    if (building != null && mMosconeBuilding == null
            && mMap.getProjection().getVisibleRegion().latLngBounds.contains(MOSCONE)) {
        // Store the first active building. This will always be Moscone
        mMosconeBuilding = building;
        enableMapElements();
    }

    if (building != null && mMosconeBuilding.equals(building)) {
        // Map is focused on Moscone Center
        mAtMoscone = true;
        onFocusMoscone();
    } else if(mAtMoscone){
        // Map is no longer focused on Moscone Center
        mAtMoscone = false;
        onDefocusMoscone();
    }
}
项目:AppDevFestSudeste2015    文件:MapFragment.java   
@Override
public void onIndoorBuildingFocused() {
    IndoorBuilding building = mMap.getFocusedBuilding();

    if (building != null && mMosconeBuilding == null
            && mMap.getProjection().getVisibleRegion().latLngBounds.contains(MOSCONE)) {
        // Store the first active building. This will always be Moscone
        mMosconeBuilding = building;
        enableMapElements();
    }

    if (building != null && mMosconeBuilding.equals(building)) {
        // Map is focused on Moscone Center
        mAtMoscone = true;
        onFocusMoscone();
    } else if(mAtMoscone){
        // Map is no longer focused on Moscone Center
        mAtMoscone = false;
        onDefocusMoscone();
    }
}
项目:neo4art    文件:PluginUtil.java   
public static JSONObject convertIndoorBuildingToJson(IndoorBuilding indoorBuilding) {
  if (indoorBuilding == null) {
    return null;
  }
  JSONObject result = new JSONObject();
  try {
    JSONArray levels = new JSONArray();
    for(IndoorLevel level : indoorBuilding.getLevels()){
      JSONObject levelInfo = new JSONObject();
        levelInfo.put("name",level.getName());

        // TODO Auto-generated catch block
      levelInfo.put("shortName",level.getShortName());
      levels.put(levelInfo);
    }
    result.put("activeLevelIndex",indoorBuilding.getActiveLevelIndex());
    result.put("defaultLevelIndex",indoorBuilding.getDefaultLevelIndex());
    result.put("levels",levels);
    result.put("underground",indoorBuilding.isUnderground());
  } catch (JSONException e) {
    e.printStackTrace();
    return null;
  }  
  return result;
}
项目:neo4art    文件:PluginUtil.java   
public static JSONObject convertIndoorBuildingToJson(IndoorBuilding indoorBuilding) {
  if (indoorBuilding == null) {
    return null;
  }
  JSONObject result = new JSONObject();
  try {
    JSONArray levels = new JSONArray();
    for(IndoorLevel level : indoorBuilding.getLevels()){
      JSONObject levelInfo = new JSONObject();
        levelInfo.put("name",level.getName());

        // TODO Auto-generated catch block
      levelInfo.put("shortName",level.getShortName());
      levels.put(levelInfo);
    }
    result.put("activeLevelIndex",indoorBuilding.getActiveLevelIndex());
    result.put("defaultLevelIndex",indoorBuilding.getDefaultLevelIndex());
    result.put("levels",levels);
    result.put("underground",indoorBuilding.isUnderground());
  } catch (JSONException e) {
    e.printStackTrace();
    return null;
  }  
  return result;
}
项目:neo4art    文件:PluginUtil.java   
public static JSONObject convertIndoorBuildingToJson(IndoorBuilding indoorBuilding) {
  if (indoorBuilding == null) {
    return null;
  }
  JSONObject result = new JSONObject();
  try {
    JSONArray levels = new JSONArray();
    for(IndoorLevel level : indoorBuilding.getLevels()){
      JSONObject levelInfo = new JSONObject();
        levelInfo.put("name",level.getName());

        // TODO Auto-generated catch block
      levelInfo.put("shortName",level.getShortName());
      levels.put(levelInfo);
    }
    result.put("activeLevelIndex",indoorBuilding.getActiveLevelIndex());
    result.put("defaultLevelIndex",indoorBuilding.getDefaultLevelIndex());
    result.put("levels",levels);
    result.put("underground",indoorBuilding.isUnderground());
  } catch (JSONException e) {
    e.printStackTrace();
    return null;
  }  
  return result;
}
项目:devfestnorte-app    文件:MapFragment.java   
@Override
public void onIndoorBuildingFocused() {
    IndoorBuilding building = mMap.getFocusedBuilding();

    if (building != null && mMosconeBuilding == null
            && mMap.getProjection().getVisibleRegion().latLngBounds.contains(MOSCONE)) {
        // Store the first active building. This will always be Moscone
        mMosconeBuilding = building;
        enableMapElements();
    }

    if (building != null && mMosconeBuilding.equals(building)) {
        // Map is focused on Moscone Center
        mAtMoscone = true;
        onFocusMoscone();
    } else if(mAtMoscone){
        // Map is no longer focused on Moscone Center
        mAtMoscone = false;
        onDefocusMoscone();
    }
}
项目:saarang-iosched    文件:MapFragment.java   
@Override
public void onIndoorBuildingFocused() {
    IndoorBuilding building = mMap.getFocusedBuilding();

    if (building != null && mMosconeBuilding == null
            && mMap.getProjection().getVisibleRegion().latLngBounds.contains(MOSCONE)) {
        // Store the first active building. This will always be Moscone
        mMosconeBuilding = building;
        enableMapElements();
    }

    if (building != null && mMosconeBuilding.equals(building)) {
        // Map is focused on Moscone Center
        mAtMoscone = true;
        onFocusMoscone();
    } else if(mAtMoscone){
        // Map is no longer focused on Moscone Center
        mAtMoscone = false;
        onDefocusMoscone();
    }
}
项目:HereAStory-Android    文件:IndoorDemoActivity.java   
/**
 * Called when the focused building info is clicked.
 */
public void onFocusedBuildingInfo(View view) {
  IndoorBuilding building = mMap.getFocusedBuilding();
  if (building != null) {
    String s = "";
    for (IndoorLevel level : (List<IndoorLevel>) building.getLevels()) {
      s = s + level.getName() + " ";
    }
    if (building.isUnderground()) {
      s += "is underground";
    }
    setText(s);
  } else {
    setText("No visible building");
  }
}
项目:HereAStory-Android    文件:IndoorDemoActivity.java   
/**
 * Called when the activate higher level is clicked.
 */
public void onHigherLevel(View view) {
  IndoorBuilding building = mMap.getFocusedBuilding();
  if (building != null) {
    List<IndoorLevel> levels = building.getLevels();
    if (!levels.isEmpty()) {
      int currentLevel = building.getActiveLevelIndex();
      // The levels are in 'display order' from top to bottom,
      // i.e. higher levels in the building are lower numbered in the array.
      int newLevel = currentLevel - 1;
      if (newLevel == -1) {
        newLevel = levels.size() - 1;
      }
      IndoorLevel level = levels.get(newLevel);
      setText("Activiating level " + level.getName());
      level.activate();
    } else {
      setText("No levels in building");
    }
  } else {
    setText("No visible building");
  }
}
项目:PhoneChat    文件:GoogleMaps.java   
@SuppressWarnings("unused")
private void getFocusedBuilding(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
  IndoorBuilding focusedBuilding = map.getFocusedBuilding();
  if (focusedBuilding != null) {
    JSONObject result = PluginUtil.convertIndoorBuildingToJson(focusedBuilding);
    callbackContext.success(result);
  } else {
    callbackContext.success(-1);
  }
}
项目:PhoneChat    文件:GoogleMaps.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding building) {
  String jsonStr = "null";
  JSONObject result = PluginUtil.convertIndoorBuildingToJson(building);
  if (result != null) {
    jsonStr = result.toString();
  }
  webView.loadUrl("javascript:plugin.google.maps.Map._onMapEvent('indoor_level_activated', " + jsonStr + ")");
}
项目:saarang-iosched    文件:MapFragment.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding indoorBuilding) {
    if (indoorBuilding.equals(mMosconeBuilding)) {
        // Show map elements for this floor if at Moscone
        showFloorElementsIndex(indoorBuilding.getActiveLevelIndex());
    }
}
项目:AppDevFestSudeste2015    文件:MapFragment.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding indoorBuilding) {
    if (indoorBuilding.equals(mMosconeBuilding)) {
        // Show map elements for this floor if at Moscone
        showFloorElementsIndex(indoorBuilding.getActiveLevelIndex());
    }
}
项目:neo4art    文件:GoogleMaps.java   
@SuppressWarnings("unused")
private void getFocusedBuilding(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
  IndoorBuilding focusedBuilding = map.getFocusedBuilding();
  if (focusedBuilding != null) {
    JSONObject result = PluginUtil.convertIndoorBuildingToJson(focusedBuilding);
    callbackContext.success(result);
  } else {
    callbackContext.success(-1);
  }
}
项目:neo4art    文件:GoogleMaps.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding building) {
  String jsonStr = "null";
  JSONObject result = PluginUtil.convertIndoorBuildingToJson(building);
  if (result != null) {
    jsonStr = result.toString();
  }
  webView.loadUrl("javascript:plugin.google.maps.Map._onMapEvent('indoor_level_activated', " + jsonStr + ")");
}
项目:neo4art    文件:GoogleMaps.java   
@SuppressWarnings("unused")
private void getFocusedBuilding(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
  IndoorBuilding focusedBuilding = map.getFocusedBuilding();
  if (focusedBuilding != null) {
    JSONObject result = PluginUtil.convertIndoorBuildingToJson(focusedBuilding);
    callbackContext.success(result);
  } else {
    callbackContext.success(-1);
  }
}
项目:neo4art    文件:GoogleMaps.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding building) {
  String jsonStr = "null";
  JSONObject result = PluginUtil.convertIndoorBuildingToJson(building);
  if (result != null) {
    jsonStr = result.toString();
  }
  webView.loadUrl("javascript:plugin.google.maps.Map._onMapEvent('indoor_level_activated', " + jsonStr + ")");
}
项目:neo4art    文件:GoogleMaps.java   
@SuppressWarnings("unused")
private void getFocusedBuilding(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
  IndoorBuilding focusedBuilding = map.getFocusedBuilding();
  if (focusedBuilding != null) {
    JSONObject result = PluginUtil.convertIndoorBuildingToJson(focusedBuilding);
    callbackContext.success(result);
  } else {
    callbackContext.success(-1);
  }
}
项目:neo4art    文件:GoogleMaps.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding building) {
  String jsonStr = "null";
  JSONObject result = PluginUtil.convertIndoorBuildingToJson(building);
  if (result != null) {
    jsonStr = result.toString();
  }
  webView.loadUrl("javascript:plugin.google.maps.Map._onMapEvent('indoor_level_activated', " + jsonStr + ")");
}
项目:devfestnorte-app    文件:MapFragment.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding indoorBuilding) {
    if (indoorBuilding.equals(mMosconeBuilding)) {
        // Show map elements for this floor if at Moscone
        showFloorElementsIndex(indoorBuilding.getActiveLevelIndex());
    }
}
项目:saarang-iosched    文件:MapFragment.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding indoorBuilding) {
    if (indoorBuilding.equals(mMosconeBuilding)) {
        // Show map elements for this floor if at Moscone
        showFloorElementsIndex(indoorBuilding.getActiveLevelIndex());
    }
}
项目:HereAStory-Android    文件:IndoorDemoActivity.java   
/**
 * Called when the focused level info is clicked.
 */
public void onVisibleLevelInfo(View view) {
  IndoorBuilding building = mMap.getFocusedBuilding();
  if (building != null) {
    IndoorLevel level = (IndoorLevel) building.getLevels().get(building.getActiveLevelIndex());
    if (level != null) {
      setText(level.getName());
    } else {
      setText("No visible level");
    }
  } else {
    setText("No visible building");
  }
}
项目:iosched-reader    文件:MapFragment.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding indoorBuilding) {
    if (indoorBuilding != null && indoorBuilding.equals(mMosconeBuilding)) {
        onMosconeFloorActivated(indoorBuilding.getActiveLevelIndex());
    }
}
项目:smconf-android    文件:MapFragment.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding indoorBuilding) {
    if (indoorBuilding != null && indoorBuilding.equals(mMosconeBuilding)) {
        onMosconeFloorActivated(indoorBuilding.getActiveLevelIndex());
    }
}
项目:2015-Google-I-O-app    文件:MapFragment.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding indoorBuilding) {
    if (indoorBuilding != null && indoorBuilding.equals(mMosconeBuilding)) {
        onMosconeFloorActivated(indoorBuilding.getActiveLevelIndex());
    }
}
项目:FMTech    文件:MapFragment.java   
@Override
public void onIndoorLevelActivated(IndoorBuilding indoorBuilding) {
    if (indoorBuilding != null && indoorBuilding.equals(mMosconeBuilding)) {
        onMosconeFloorActivated(indoorBuilding.getActiveLevelIndex());
    }
}