/** * Removes all ground overlays in the given hashmap * * @param groundOverlays hashmap of ground overlays to remove */ private void removeGroundOverlays(HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays) { for (GroundOverlay groundOverlay : groundOverlays.values()) { groundOverlay.remove(); } }
/** * Removes all ground overlays in the given hashmap * * @param groundOverlays hashmap of ground overlays to remove */ private void removeGroundOverlays(HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays) { for (GroundOverlay groundOverlay : groundOverlays.values()) { groundOverlay.remove(); } }
@Override public void remove() { manager.onRemove(real); real.remove(); }
@Override public void onEnterRegion(IARegion region) { if (region.getType() == IARegion.TYPE_FLOOR_PLAN) { Log.d(TAG, "enter floor plan " + region.getId()); mCameraPositionNeedsUpdating = true; // entering new fp, need to move camera if (mGroundOverlay != null) { mGroundOverlay.remove(); mGroundOverlay = null; } mOverlayFloorPlan = region; // overlay will be this (unless error in loading) fetchFloorPlanBitmap(region.getFloorPlan()); } }
@Override public void onEnterRegion(IARegion region) { if (region.getType() == IARegion.TYPE_FLOOR_PLAN) { final String newId = region.getId(); // Are we entering a new floor plan or coming back the floor plan we just left? if (mGroundOverlay == null || !region.equals(mOverlayFloorPlan)) { mCameraPositionNeedsUpdating = true; // entering new fp, need to move camera if (mGroundOverlay != null) { mGroundOverlay.remove(); mGroundOverlay = null; } mOverlayFloorPlan = region; // overlay will be this (unless error in loading) fetchFloorPlanBitmap(region.getFloorPlan()); } else { mGroundOverlay.setTransparency(0.0f); } mShowIndoorLocation = true; showInfo("Showing IndoorAtlas SDK\'s location output"); } showInfo("Enter " + (region.getType() == IARegion.TYPE_VENUE ? "VENUE " : "FLOOR_PLAN ") + region.getId()); }
/** * Sets bitmap of floor plan as ground overlay on Google Maps */ private void setupGroundOverlay(IAFloorPlan floorPlan, Bitmap bitmap) { if (mGroundOverlay != null) { mGroundOverlay.remove(); } if (mMap != null) { BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(bitmap); IALatLng iaLatLng = floorPlan.getCenter(); LatLng center = new LatLng(iaLatLng.latitude, iaLatLng.longitude); GroundOverlayOptions fpOverlay = new GroundOverlayOptions() .image(bitmapDescriptor) .zIndex(0.0f) .position(center, floorPlan.getWidthMeters(), floorPlan.getHeightMeters()) .bearing(floorPlan.getBearing()); mGroundOverlay = mMap.addGroundOverlay(fpOverlay); } }
/** * Sets bitmap of floor plan as ground overlay on Google Maps */ private void setupGroundOverlay(IAFloorPlan floorPlan, Bitmap bitmap) { if (mGroundOverlay != null) { mGroundOverlay.remove(); } if (mMap != null) { BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(bitmap); IALatLng iaLatLng = floorPlan.getCenter(); LatLng center = new LatLng(iaLatLng.latitude, iaLatLng.longitude); GroundOverlayOptions fpOverlay = new GroundOverlayOptions() .image(bitmapDescriptor) .zIndex(0.0f) .position(center, floorPlan.getWidthMeters(), floorPlan.getHeightMeters()) .bearing(floorPlan.getBearing()); mGroundOverlay = mMap.addGroundOverlay(fpOverlay); } }