本文整理汇总了Java中com.google.maps.android.ui.IconGenerator.setBackground方法的典型用法代码示例。如果您正苦于以下问题:Java IconGenerator.setBackground方法的具体用法?Java IconGenerator.setBackground怎么用?Java IconGenerator.setBackground使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.maps.android.ui.IconGenerator
的用法示例。
在下文中一共展示了IconGenerator.setBackground方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CustomRenderer
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
public CustomRenderer(Activity activity, GoogleMap map, ClusterManager<CustomMarker> clusterManager) {
super(activity, map, clusterManager);
mActivity = activity;
mMap = map;
// Define Custom icon
mIconGenerator = new IconGenerator(activity);
mIconGenerator.setBackground(activity.getResources().getDrawable(R.drawable.ic_waypt));
}
示例2: getLabelIconGenerator
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
/**
* Creates a new IconGenerator for labels on the map.
*/
public static IconGenerator getLabelIconGenerator(Context c) {
IconGenerator iconFactory = new IconGenerator(c);
iconFactory.setTextAppearance(R.style.MapLabel);
iconFactory.setBackground(null);
return iconFactory;
}
示例3: NodeClusterRenderer
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
public NodeClusterRenderer(Context context, GoogleMap map, NodeClusterManager<T> clusterManager) {
mMap = map;
mDensity = context.getResources().getDisplayMetrics().density;
mIconGenerator = new IconGenerator(context);
mIconGenerator.setContentView(makeSquareTextView(context));
mIconGenerator.setTextAppearance(com.google.maps.android.R.style.ClusterIcon_TextAppearance);
mIconGenerator.setBackground(makeClusterBackground());
mClusterManager = clusterManager;
shouldAnimate = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
}
示例4: createLabelMarker
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
/**
* Creates a marker for a label.
*
* @param iconFactory Reusable IconFactory
* @param id Id to be embedded as the title
* @param position
* @param label Text to be shown on the label
* @return
*/
public static MarkerOptions createLabelMarker(IconGenerator iconFactory, String id, LatLng position, String label) {
final String snippet = MapFragment.TYPE_LABEL;
iconFactory.setTextAppearance(com.saarang.samples.apps.iosched.R.style.MapLabel);
iconFactory.setBackground(null);
final BitmapDescriptor icon =
BitmapDescriptorFactory.fromBitmap(iconFactory.makeIcon(label));
return new MarkerOptions().position(position).title(id)
.snippet(snippet).icon(icon)
.anchor(iconFactory.getAnchorU(), iconFactory.getAnchorV())
.visible(true);
}
示例5: createLabelMarker
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
/**
* Creates a marker for a label.
*
* @param iconFactory Reusable IconFactory
* @param id Id to be embedded as the title
* @param position
* @param label Text to be shown on the label
* @return
*/
public static MarkerOptions createLabelMarker(IconGenerator iconFactory, String id, LatLng position, String label) {
final String snippet = MapFragment.TYPE_LABEL;
iconFactory.setTextAppearance(R.style.MapLabel);
iconFactory.setBackground(null);
final BitmapDescriptor icon =
BitmapDescriptorFactory.fromBitmap(iconFactory.makeIcon(label));
return new MarkerOptions().position(position).title(id)
.snippet(snippet).icon(icon)
.anchor(iconFactory.getAnchorU(), iconFactory.getAnchorV())
.visible(false);
}
示例6: DefaultClusterRenderer
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
public DefaultClusterRenderer(Context context, GoogleMap map, ClusterManager<T> clusterManager) {
mMap = map;
mDensity = context.getResources().getDisplayMetrics().density;
mIconGenerator = new IconGenerator(context);
mIconGenerator.setContentView(makeSquareTextView(context));
mIconGenerator.setTextAppearance(R.style.ClusterIcon_TextAppearance);
mIconGenerator.setBackground(makeClusterBackground());
mClusterManager = clusterManager;
}
示例7: getIcon
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
public Bitmap getIcon(RoomMetaData room, String title) {
IconGenerator iconGenerator = new IconGenerator(context);
iconGenerator.setTextAppearance(R.style.MapLabel);
iconGenerator.setContentPadding(3,3,3,3);
iconGenerator.setBackground(new ColorDrawable(room.color));
return iconGenerator.makeIcon(title);
}
示例8: getLabelIconGenerator
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
/**
* Creates a new IconGenerator for labels on the map.
*/
private static IconGenerator getLabelIconGenerator(Context c) {
IconGenerator iconFactory = new IconGenerator(c);
iconFactory.setTextAppearance(R.style.TextApparance_Map_Label);
iconFactory.setBackground(null);
return iconFactory;
}
示例9: DefaultClusterRenderer
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
public DefaultClusterRenderer(Context context, GoogleMap map, ClusterManager<T> clusterManager) {
mMap = map;
mAnimate = true;
mDensity = context.getResources().getDisplayMetrics().density;
mIconGenerator = new IconGenerator(context);
mIconGenerator.setContentView(makeSquareTextView(context));
mIconGenerator.setTextAppearance(R.style.amu_ClusterIcon_TextAppearance);
mIconGenerator.setBackground(makeClusterBackground());
mClusterManager = clusterManager;
}