當前位置: 首頁>>代碼示例>>Java>>正文


Java Circle.remove方法代碼示例

本文整理匯總了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();
        }
    }
 
開發者ID:shivarajp,項目名稱:LivePokemonFinder,代碼行數:17,代碼來源:MapWrapperFragment.java

示例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);
        }
    }
}
 
開發者ID:CaptainSpam,項目名稱:geohashdroid,代碼行數:26,代碼來源:KnownLocationsPicker.java

示例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);
}
 
開發者ID:saxman,項目名稱:maps-android-codelabs,代碼行數:23,代碼來源:LocationActivity.java

示例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();
}
 
開發者ID:kav0rka,項目名稱:VennTracker,代碼行數:34,代碼來源:Circles.java

示例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);
}
 
開發者ID:AdrianBZG,項目名稱:PhoneChat,代碼行數:19,代碼來源:PluginCircle.java

示例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);
}
 
開發者ID:contexthub,項目名稱:boundaries-android,代碼行數:14,代碼來源:GeofencesMapFragment.java

示例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");
    }
}
 
開發者ID:contexthub,項目名稱:boundaries-android,代碼行數:16,代碼來源:GeofencesMapFragment.java

示例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);
}
 
開發者ID:saxman,項目名稱:maps-android-codelabs,代碼行數:31,代碼來源:LocationActivity.java

示例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();

}
 
開發者ID:n3utrino,項目名稱:CoinmApp,代碼行數:15,代碼來源:MapEntryManager.java


注:本文中的com.google.android.gms.maps.model.Circle.remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。