本文整理匯總了Java中com.google.android.gms.maps.model.Marker.getTitle方法的典型用法代碼示例。如果您正苦於以下問題:Java Marker.getTitle方法的具體用法?Java Marker.getTitle怎麽用?Java Marker.getTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.android.gms.maps.model.Marker
的用法示例。
在下文中一共展示了Marker.getTitle方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setArgs
import com.google.android.gms.maps.model.Marker; //導入方法依賴的package包/類
public void setArgs(Context context, Marker marker) {
this.mTitle = marker.getTitle();
this.mLatLng = marker.getPosition();
}
示例2: 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;
}