public DefaultClusterRenderer(Context context, GoogleMap map, ClusterManager <T> clusterManager) { if (!InstanceFieldsInitialized) { InitializeInstanceFields(); InstanceFieldsInitialized = true; } mMap = map; mDensity = context.Resources.DisplayMetrics.Density; mIconGenerator = new IconGenerator(context); mIconGenerator.SetContentView(makeSquareTextView(context)); //ContentView = makeSquareTextView(context); mIconGenerator.SetTextAppearance(Resource.Styleable.ClusterIcon.TextAppearance); //TextAppearance = R.style.ClusterIcon_TextAppearance; mIconGenerator.SetBackground(makeClusterBackground()); // Background = makeClusterBackground(); mClusterManager = clusterManager; }
public PersonRenderer(Context context, GoogleMap googleMap, ClusterManager clusterManager) : base(context, googleMap, clusterManager) { this.context = context; iconGenerator = new IconGenerator(context); clusterIconGenerator = new IconGenerator(context); View multiProfile = LayoutInflater.From(context).Inflate(Resource.Layout.MultiProfileView, null); clusterIconGenerator.SetContentView(multiProfile); clusterImageView = multiProfile.FindViewById <ImageView>(Resource.Id.image); imageView = new ImageView(context); dimension = (int)context.Resources.GetDimension(Resource.Dimension.custom_profile_image); imageView.LayoutParameters = new ViewGroup.LayoutParams(dimension, dimension); int padding = (int)context.Resources.GetDimension(Resource.Dimension.custom_profile_padding); imageView.SetPadding(padding, padding, padding, padding); iconGenerator.SetContentView(imageView); }
public PersonRenderer(CustomMarkerClusteringDemoActivity activity) : base(activity.ApplicationContext, activity.getMap(), activity.mClusterManager) { context = activity; mIconGenerator = new IconGenerator(activity.ApplicationContext); mClusterIconGenerator = new IconGenerator(activity.ApplicationContext); View multiProfile = LayoutInflater.From(activity).Inflate(Resource.Layout.multi_profile, null); mClusterIconGenerator.SetContentView(multiProfile); mClusterImageView = multiProfile.FindViewById <ImageView>(Resource.Id.image); mImageView = new ImageView(activity.ApplicationContext); mDimension = (int)activity.Resources.GetDimension(Resource.Dimension.custom_profile_image); mImageView.LayoutParameters = new ViewGroup.LayoutParams(mDimension, mDimension); int padding = (int)activity.Resources.GetDimension(Resource.Dimension.custom_profile_padding); mImageView.SetPadding(padding, padding, padding, padding); mIconGenerator.SetContentView(mImageView); }