当前位置: 首页>>代码示例>>Java>>正文


Java Marker.equals方法代码示例

本文整理汇总了Java中com.google.android.gms.maps.model.Marker.equals方法的典型用法代码示例。如果您正苦于以下问题:Java Marker.equals方法的具体用法?Java Marker.equals怎么用?Java Marker.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.gms.maps.model.Marker的用法示例。


在下文中一共展示了Marker.equals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: onMarkerClick

import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
@Override
public boolean onMarkerClick(Marker marker)
{
    if (myLocationMarker != null && marker.equals(myLocationMarker))
    {
        // redirect to map click
        onMapClick(marker.getPosition());
        return true;
    }
    return false;
}
 
开发者ID:rtr-nettest,项目名称:open-rmbt,代码行数:12,代码来源:RMBTMapFragment.java

示例3: isParcheggio

import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
/**
 * distingue i marker riferiti ai parcheggi dal marker riferito alla posizione dell'utente.
 */
private boolean isParcheggio(Marker markerDaTestare) {

    for(Marker markerDaLista : mListMarker) {
        if (markerDaTestare.equals(markerDaLista))
            return true;
    }

    return false;
}
 
开发者ID:IelloDevTeam,项目名称:IelloAndroidApp,代码行数:13,代码来源:MappaMain.java

示例4: tipologiaMarker

import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
/**
 * distingue la tipologia del marker passato in ingresso.
 */
private String tipologiaMarker(Marker mDaTestare) {
    if (mDaTestare.equals(mMarkerProvvisorio))
        return M_PROVVISORIO;
    else {
        Marker result = null;

        for(Marker daInv : mMarkerListDaInviare) {
            if (mDaTestare.equals(daInv))
                result = daInv;
        }

        if (result != null) {
            return M_INVIARE;
        }

        for(Marker pres : mMarkerListPresenti) {
            if (mDaTestare.equals(pres))
                result = pres;
        }

        if (result != null) {
            return M_PRESENTE;
        }

        return M_PRESENTE;
    }
}
 
开发者ID:IelloDevTeam,项目名称:IelloAndroidAdminApp,代码行数:31,代码来源:MappaGoogle.java

示例5: onMarkerClick

import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
@Override
public boolean onMarkerClick(Marker marker) {
    final String title = marker.getTitle();
    final MarkerModel model = mMarkers.get(title);

    // Log clicks on all markers (regardless of type)
    // ANALYTICS EVENT: Click on marker on the map.
    // Contains: Marker ID (for example room UUID)
    AnalyticsHelper.sendEvent("Map", "markerclick", title);

    deselectActiveMarker();

    // The Moscone marker can be compared directly.
    // For all other markers the model needs to be looked up first.
    if (marker.equals(mMosconeMaker)) {
        // Return camera to Moscone
        LOGD(TAG, "Clicked on Moscone marker, return to initial display.");
        centerOnMoscone(true);

    } else if (model != null && MapUtils.hasInfoTitleOnly(model.type)) {
        // Show a basic info window with a title only
        mCallbacks.onInfoShowTitle(model.label, model.type);
        selectActiveMarker(marker);

    } else if (model != null && MapUtils.hasInfoSessionList(model.type)) {
        // Type has sessions to display
        mCallbacks.onInfoShowSessionlist(model.id, model.label, model.type);
        selectActiveMarker(marker);

    } else if (model != null && MapUtils.hasInfoFirstDescriptionOnly(model.type)) {
        // Display the description of the first session only
        mCallbacks.onInfoShowFirstSessionTitle(model.id, model.label, model.type);
        selectActiveMarker(marker);

    } else {
        // Hide the bottom sheet for unknown markers
        mCallbacks.onInfoHide();
    }

    return true;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:42,代码来源:MapFragment.java


注:本文中的com.google.android.gms.maps.model.Marker.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。