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


Java Marker.remove方法代碼示例

本文整理匯總了Java中com.google.android.gms.maps.model.Marker.remove方法的典型用法代碼示例。如果您正苦於以下問題:Java Marker.remove方法的具體用法?Java Marker.remove怎麽用?Java Marker.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.android.gms.maps.model.Marker的用法示例。


在下文中一共展示了Marker.remove方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: settaMarkersGiaPresenti

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
/**
 * Imposta un marker per ogni parcheggio già presente in zona
 */
void settaMarkersGiaPresenti() {
    // rimuovi tutti i markers
    for(Marker m : mMarkerListPresenti)
        m.remove();
    mMarkerListPresenti.clear();

    // aggiungi un marker per ogni posizione
    for (Parcheggio p : ElencoParcheggi.getInstance().getListParcheggi()) {
        LatLng coordParcheggio = p.getCoordinate();

        Marker marker = mMappa.addMarker(new MarkerOptions()
                .position(coordParcheggio)
                .title(p.getIndirizzo())
                .icon(BitmapDescriptorFactory.defaultMarker(138)));

        // Associo al marker un tag che corrisponde al parcheggio in questo modo posso
        // poi eliminarlo direttamente
        marker.setTag(p);

        mMarkerListPresenti.add(marker);
    }
    mMainActivity.modificaTxtMarkerPresenti(ElencoParcheggi.getInstance().getListParcheggi().size());
}
 
開發者ID:IelloDevTeam,項目名稱:IelloAndroidAdminApp,代碼行數:27,代碼來源:MappaGoogle.java

示例2: removeMarker

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
/**
 * Removes the given marker from the map layout
 *
 * @param marker marker to remove
 * @return true if marker has been removed, false if it has not been found
 */
public boolean removeMarker(Marker marker) {
    synchronized (customMarkersMap) {
        if (customMarkersMap.containsValue(marker)){
            Iterator<com.ubudu.gmaps.model.Marker> iterator = customMarkersMap.keySet().iterator();
            while(iterator.hasNext()) {
                com.ubudu.gmaps.model.Marker m = iterator.next();
                Marker googleMarker = customMarkersMap.get(m);
                if(googleMarker.equals(marker)) {
                    googleMarker.remove();
                    iterator.remove();
                    return true;
                }
            }
        }
    }
    return false;
}
 
開發者ID:Ubudu,項目名稱:GoogleMapsLayout-Android,代碼行數:24,代碼來源:MapLayout.java

示例3: onToggleAction

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
@Override
protected void onToggleAction() {
    if (shouldShow()) {
        for (final LatLng latLng : this.boatSpawns) {
            final MarkerOptions markerOptions = createMarkerOptions();
            markerOptions.position(latLng);
            this.boatMarkers.add(this.mapController.addMarker(markerOptions));
        }
    } else {
        for (final Marker marker : this.boatMarkers) {
            marker.remove();
        }
        this.boatMarkers.clear();
    }
}
 
開發者ID:ZafraniTechLLC,項目名稱:Companion-For-PUBG-Android,代碼行數:16,代碼來源:BoatAction.java

示例4: onToggleAction

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
@Override
protected void onToggleAction() {
    if (shouldShow()) {
        for (final LatLng latLng : this.vehicleSpawns) {
            final MarkerOptions markerOptions = createMarkerOptions();
            markerOptions.position(latLng);
            this.vehicleMarkers.add(this.mapController.addMarker(markerOptions));
        }
    } else {
        for (final Marker marker : this.vehicleMarkers) {
            marker.remove();
        }
        this.vehicleMarkers.clear();
    }
}
 
開發者ID:ZafraniTechLLC,項目名稱:Companion-For-PUBG-Android,代碼行數:16,代碼來源:VehicleAction.java

示例5: removeMarkerFromMap

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
private void removeMarkerFromMap(PharmacyObjectMap pharmacy) {

        Marker marker = getKeyFromValue(pharmacy);
        if (marker != null) {
            marker.remove();
        }
    }
 
開發者ID:cahergil,項目名稱:Farmacias,代碼行數:8,代碼來源:MapTabPresenter.java

示例6: clearPolygons

import com.google.android.gms.maps.model.Marker; //導入方法依賴的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

示例7: removePhoto

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
@Override
public void removePhoto(Photo photo) {
	for (Map.Entry<Marker, Photo> entry : markers.entrySet()) {
		Photo currentPhoto = entry.getValue();
		Marker currentMarker = entry.getKey();
		if (currentPhoto.getId().equals(photo.getId())) {
			currentMarker.remove();
			markers.remove(currentMarker);
			break;
		}
	}
}
 
開發者ID:micromasterandroid,項目名稱:androidadvanced,代碼行數:13,代碼來源:PhotoMapFragment.java

示例8: removeZone

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
public void removeZone(String name) {
    synchronized (zoneVsMarkerAndPolygonMap) {
        for (Zone zone : zoneVsMarkerAndPolygonMap.keySet()) {
            if (zone.getName().equals(name)) {
                Pair<Marker, Polygon> markerAndPolygon = zoneVsMarkerAndPolygonMap.get(zone);
                Marker m = markerAndPolygon.first;
                Polygon p = markerAndPolygon.second;
                m.remove();
                p.remove();
                zoneVsMarkerAndPolygonMap.remove(zone);
                break;
            }
        }
    }
}
 
開發者ID:Ubudu,項目名稱:GoogleMapsLayout-Android,代碼行數:16,代碼來源:MapLayout.java

示例9: removeZones

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
/**
 * Removes all zones
 */
public void removeZones() {
    synchronized (zoneVsMarkerAndPolygonMap) {
        for (Zone zone : zoneVsMarkerAndPolygonMap.keySet()) {
            Pair<Marker, Polygon> markerAndPolygon = zoneVsMarkerAndPolygonMap.get(zone);
            Marker m = markerAndPolygon.first;
            Polygon p = markerAndPolygon.second;
            m.remove();
            p.remove();
            zoneVsMarkerAndPolygonMap.remove(zone);
        }
    }
}
 
開發者ID:Ubudu,項目名稱:GoogleMapsLayout-Android,代碼行數:16,代碼來源:MapLayout.java

示例10: settaMarkers

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
/**
 * Imposta un marker per ogni parcheggio e, se disponibile, per la posizione attuale
 */
public void settaMarkers() {

    // rimuovi tutti i markers già presenti nella mappa
    for(Marker m : mListMarker)
        m.remove();
    mListMarker.clear();
    mMarkerSelezionato = null;

    if(mPosizioneUtente != null)
        mPosizioneUtente.remove();
    mPosizioneUtente = null;

    // aggiungi un marker per ogni parcheggio
    for (Parcheggio p : ElencoParcheggi.getInstance().getListParcheggi()) {
        LatLng coordParcheggio = p.getCoordinate();

        Marker marker = getMappaGoogle().addMarker(new MarkerOptions()
                .position(coordParcheggio)
                .title(p.getIndirizzoUI())
                .icon(BitmapDescriptorFactory.defaultMarker(54)));

        mListMarker.add(marker);
    }

    // aggiungi un marker nella posizione dell'utente. Se le coordinate riportate sono
    // esattamente quelle iniziali (ovvero siamo nella ricerca all'avvio) non viene mostrato
    // il marker nella posizione dell'utente
    if(ElencoParcheggi.getInstance().getCoordAttuali() != COORD_INIZIALI) {
        mPosizioneUtente = getMappaGoogle().addMarker(new MarkerOptions()
                .position(ElencoParcheggi.getInstance().getCoordAttuali())
                .title(mMainActivity.getString(R.string.tua_posizione)));
    }
}
 
開發者ID:IelloDevTeam,項目名稱:IelloAndroidApp,代碼行數:37,代碼來源:MappaMain.java

示例11: eliminaTuttiMarkers

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
/**
 * Metodo per eliminare tutti i marker dalla mappa, oltre ai relativi riferimenti
 */
public void eliminaTuttiMarkers() {
    if (mMarkerProvvisorio != null)
        mMarkerProvvisorio.remove();

    for(Marker m : mMarkerListDaInviare)
        m.remove();
    mMarkerListDaInviare.clear();
    mMarkerProvvisorio = null;

    mMainActivity.modificaTxtMarkerInSospeso(false);
    mMainActivity.modificaTxtMarkerDaCaricare(mMarkerListDaInviare.size());
    mMainActivity.creaToast(R.string.markers_eliminati);
}
 
開發者ID:IelloDevTeam,項目名稱:IelloAndroidAdminApp,代碼行數:17,代碼來源:MappaGoogle.java

示例12: remove

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
/**
 * Remove from the map
 */
public void remove() {
    if (polygon != null) {
        polygon.remove();
        polygon = null;
    }
    for (Marker marker : markers) {
        marker.remove();
    }
    for (PolygonHoleMarkers hole : holes) {
        hole.remove();
    }
}
 
開發者ID:ngageoint,項目名稱:geopackage-android-map,代碼行數:16,代碼來源:PolygonMarkers.java

示例13: eliminaMarkersVerdi

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
/**
 * Elimina i markers 'verdi' e i loro riferimenti dalla mappa
 */
void eliminaMarkersVerdi() {
    for (Marker m : mMarkerListPresenti)
        m.remove();
    mMarkerListPresenti.clear();

    mMainActivity.modificaTxtMarkerPresenti(0);
}
 
開發者ID:IelloDevTeam,項目名稱:IelloAndroidAdminApp,代碼行數:11,代碼來源:MappaGoogle.java

示例14: remove

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
/**
 * Remove from the map
 */
public void remove() {
    if (polyline != null) {
        polyline.remove();
        polyline = null;
    }
    for (Marker marker : markers) {
        marker.remove();
    }
}
 
開發者ID:ngageoint,項目名稱:geopackage-android-map,代碼行數:13,代碼來源:PolylineMarkers.java

示例15: delete

import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public void delete(Marker marker) {
    if (markers.remove(marker)) {
        marker.remove();
        update();
    }
}
 
開發者ID:ngageoint,項目名稱:geopackage-android-map,代碼行數:11,代碼來源:PolylineMarkers.java


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