本文整理匯總了Java中com.google.android.gms.maps.model.Circle.remove方法的典型用法代碼示例。如果您正苦於以下問題:Java Circle.remove方法的具體用法?Java Circle.remove怎麽用?Java Circle.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.android.gms.maps.model.Circle
的用法示例。
在下文中一共展示了Circle.remove方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: clearPokemonCircles
import com.google.android.gms.maps.model.Circle; //導入方法依賴的package包/類
private void clearPokemonCircles() {
//Check and eventually remove old marker
if (userSelectedPositionMarkers != null && userSelectedPositionCircles != null) {
for (Marker marker : userSelectedPositionMarkers) {
marker.remove();
}
userSelectedPositionMarkers.clear();
for (Circle circle : userSelectedPositionCircles) {
circle.remove();
}
userSelectedPositionCircles.clear();
}
}
示例2: initKnownLocations
import com.google.android.gms.maps.model.Circle; //導入方法依賴的package包/類
private void initKnownLocations() {
if(mMarkerMap != null) {
for(Marker m : mMarkerMap.keySet())
m.remove();
}
if(mCircleMap != null) {
for(Circle c : mCircleMap.keySet())
c.remove();
}
mMarkerMap = HashBiMap.create();
mCircleMap = HashBiMap.create();
if(!mLocations.isEmpty()) {
for(KnownLocation kl : mLocations) {
// Each KnownLocation gives us a MarkerOptions we can use.
Log.d(DEBUG_TAG, "Making marker for KnownLocation " + kl.toString() + " at a range of " + kl.getRange() + "m");
Marker newMark = mMap.addMarker(makeExistingMarker(kl));
Circle newCircle = mMap.addCircle(kl.makeCircle(this));
mMarkerMap.put(newMark, kl);
mCircleMap.put(newCircle, kl);
}
}
}
示例3: removeGeoFences
import com.google.android.gms.maps.model.Circle; //導入方法依賴的package包/類
private void removeGeoFences() {
List<String> requestIdsForRemoval = new ArrayList<String>();
if (mGeoFences.isEmpty())
return;
for (Map.Entry<String, Circle> entry : mGeoFences.entrySet()) {
String requestId = entry.getKey();
Circle circle = entry.getValue();
if (circle != null) {
circle.remove();
id--;
Log.v(LocationActivity.TAG, "RemoveGeoFence requestId == " + requestId);
Circle triggeringCircle = mTriggeringFences.get(requestId);
if (triggeringCircle != null) {
triggeringCircle.remove();
}
requestIdsForRemoval.add(requestId);
}
}
mGeoFences.clear();
mTriggeringFences.clear();
mLocationClient.removeGeofences(requestIdsForRemoval, this);
}
示例4: clearPolygons
import com.google.android.gms.maps.model.Circle; //導入方法依賴的package包/類
public static void clearPolygons(Context context) {
// Remove all polygons from map
for (Polygon polygon : mPolygonsToClear) {
polygon.remove();
}
for (Circle circle : mPolygonsRedToClear) {
circle.remove();
}
for (Marker marker : mIntersectingToClear) {
marker.remove();
}
mIntersecting.clear();
mIntersectingToClear.clear();
mPolygonsRedToClear.clear();
mPolygonsRed.clear();
// Clear ArrayList holding polygons
mPolygonsToClear.clear();
// Clear ArrayList holding polygon point LatLng objects
mPolygonPointsGreen.clear();
DatabaseHelper myDb = DatabaseHelper.getInstance(context);
// Clear ArrayList containing hole LatLng objects
mHoles.clear();
// Reset transparency on all markers
SpawnLocation.markerResetTransparency();
// Remove from database
myDb.removeAllHoles();
myDb.removePolygons();
myDb.removeCircles();
myDb.removeIntersections();
myDb.close();
}
示例5: remove
import com.google.android.gms.maps.model.Circle; //導入方法依賴的package包/類
/**
* Remove the circle
* @param args
* @param callbackContext
* @throws JSONException
*/
@SuppressWarnings("unused")
private void remove(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
String id = args.getString(1);
Circle circle = this.getCircle(id);
if (circle == null) {
this.sendNoResult(callbackContext);
return;
}
circle.remove();
this.objects.remove(id);
this.sendNoResult(callbackContext);
}
示例6: onGeofenceUpdatedEvent
import com.google.android.gms.maps.model.Circle; //導入方法依賴的package包/類
/**
* Removes the existing geofence from the map and redraws it
* @param event
* @see {@link GeofenceUpdateDialogFragment.GeofenceUpdatedEvent}
*/
@Subscribe
public void onGeofenceUpdatedEvent(GeofenceUpdateDialogFragment.GeofenceUpdatedEvent event) {
Geofence geofence = event.getGeofence();
Circle existingCircle = circlesMap.get(geofence.getId());
existingCircle.remove();
circlesMap.remove(existingCircle);
drawGeofence(geofence);
}
示例7: onGeofenceDeletedEvent
import com.google.android.gms.maps.model.Circle; //導入方法依賴的package包/類
/**
* Removes the deleted geofence from the map
* @param event
* @see {@link GeofenceListFragment.GeofenceDeletedEvent}
*/
@Subscribe
public void onGeofenceDeletedEvent(GeofenceListFragment.GeofenceDeletedEvent event){
long id = event.getId();
Circle existingCircle = circlesMap.get(id);
existingCircle.remove();
circlesMap.remove(id);
if(currentLocation != null) {
currentLocation.setTitle("Current Location");
}
}
示例8: addGeoFences
import com.google.android.gms.maps.model.Circle; //導入方法依賴的package包/類
private void addGeoFences() {
List<Geofence> list = new ArrayList<Geofence>();
for (Map.Entry<String, Circle> entry : mGeoFences.entrySet()) {
Circle circle = entry.getValue();
Log.v(LocationActivity.TAG, "points == " +
circle.getCenter().latitude + "," +
circle.getCenter().longitude);
Geofence geofence = new Geofence.Builder()
.setRequestId(entry.getKey())
.setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER |
Geofence.GEOFENCE_TRANSITION_EXIT)
.setCircularRegion(circle.getCenter().latitude,
circle.getCenter().longitude,
(float) circle.getRadius())
.setExpirationDuration(Geofence.NEVER_EXPIRE).build();
list.add(geofence);
}
if (list.isEmpty()) {
return;
}
// Clear off all the currently triggering geo_fences before new
// fences
// are added.
for (Circle triggeringGeoFence : mTriggeringFences.values()) {
triggeringGeoFence.remove();
}
mTriggeringFences.clear();
Log.v(LocationActivity.TAG, "addingGeoFences size = " + list.size());
mLocationClient.addGeofences(list, getPendingIntent(), this);
}
示例9: removeAllMapItems
import com.google.android.gms.maps.model.Circle; //導入方法依賴的package包/類
private void removeAllMapItems() {
for (Marker marker : markers) {
marker.remove();
}
for (Circle circle : circles) {
circle.remove();
}
markers.clear();
circles.clear();
}