当前位置: 首页>>代码示例>>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;未经允许,请勿转载。