本文整理汇总了Java中com.google.android.gms.maps.model.CircleOptions.strokeColor方法的典型用法代码示例。如果您正苦于以下问题:Java CircleOptions.strokeColor方法的具体用法?Java CircleOptions.strokeColor怎么用?Java CircleOptions.strokeColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.gms.maps.model.CircleOptions
的用法示例。
在下文中一共展示了CircleOptions.strokeColor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: refreshAccuraryIndicator
import com.google.android.gms.maps.model.CircleOptions; //导入方法依赖的package包/类
private void refreshAccuraryIndicator(Location location) {
if (mShowAccuracy) {
// Accuracy circle marker
if (mAccuracyCircle != null) {
mAccuracyCircle.setCenter(new LatLng(location.getLatitude(), location.getLongitude()));
mAccuracyCircle.setRadius(location.getAccuracy());
} else if (mMap != null) {
CircleOptions circleOptions = new CircleOptions().center(new LatLng(location.getLatitude(), location.getLongitude()));
circleOptions.fillColor(getResources().getColor(R.color.accuracy_circle_fill_color));
circleOptions.strokeColor(android.R.color.black);
circleOptions.strokeWidth(1);
circleOptions.radius(location.getAccuracy());
circleOptions.zIndex(2f);
mAccuracyCircle = mMap.addCircle(circleOptions);
}
} else {
if (mAccuracyCircle != null) {
mAccuracyCircle.remove();
mAccuracyCircle = null;
}
}
}
示例2: createCircle
import com.google.android.gms.maps.model.CircleOptions; //导入方法依赖的package包/类
/**
* Create circle
* @param args
* @param callbackContext
* @throws JSONException
*/
@SuppressWarnings("unused")
private void createCircle(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
final CircleOptions circleOptions = new CircleOptions();
int color;
JSONObject opts = args.getJSONObject(1);
if (opts.has("center")) {
JSONObject center = opts.getJSONObject("center");
circleOptions.center(new LatLng(center.getDouble("lat"), center.getDouble("lng")));
}
if (opts.has("radius")) {
circleOptions.radius(opts.getDouble("radius"));
}
if (opts.has("strokeColor")) {
color = PluginUtil.parsePluginColor(opts.getJSONArray("strokeColor"));
circleOptions.strokeColor(color);
}
if (opts.has("fillColor")) {
color = PluginUtil.parsePluginColor(opts.getJSONArray("fillColor"));
circleOptions.fillColor(color);
}
if (opts.has("strokeWidth")) {
circleOptions.strokeWidth(opts.getInt("strokeWidth") * this.density);
}
if (opts.has("visible")) {
circleOptions.visible(opts.getBoolean("visible"));
}
if (opts.has("zIndex")) {
circleOptions.zIndex(opts.getInt("zIndex"));
}
Circle circle = map.addCircle(circleOptions);
String id = "circle_" + circle.getId();
this.objects.put(id, circle);
JSONObject result = new JSONObject();
result.put("hashCode", circle.hashCode());
result.put("id", id);
callbackContext.success(result);
}
示例3: drawCircle
import com.google.android.gms.maps.model.CircleOptions; //导入方法依赖的package包/类
private void drawCircle( LatLng location ) {
CircleOptions options = new CircleOptions();
options.center( location );
//Radius in meters
options.radius( 10 );
options.fillColor( getResources().getColor( R.color.fill_color ) );
options.strokeColor( getResources().getColor( R.color.stroke_color ) );
options.strokeWidth( 10 );
getMap().addCircle(options);
}
示例4: drawCircle
import com.google.android.gms.maps.model.CircleOptions; //导入方法依赖的package包/类
public void drawCircle() {
final CircleOptions circleOptions = new CircleOptions();
circleOptions.center(myDummyLocation);
circleOptions.radius(350);
circleOptions.strokeColor(R.drawable.purple);
circleOptions.fillColor(R.drawable.purple);
final Circle circle = googleMap.addCircle(circleOptions);
}
示例5: dibujarDistancia
import com.google.android.gms.maps.model.CircleOptions; //导入方法依赖的package包/类
public void dibujarDistancia() {
if(getMap() != null && getMap().isMyLocationEnabled() && getMap().getMyLocation() != null) {
CircleOptions dOptions = new CircleOptions();
dOptions.center(new LatLng(getMap().getMyLocation().getLatitude(), getMap().getMyLocation().getLongitude()));
dOptions.radius(DataStorage.filtro.getDistancia());
dOptions.strokeColor(0xFFFF0000);
dOptions.fillColor(0x22FF0000);
if(distanciaCirculo != null) {
distanciaCirculo.remove();
}
distanciaCirculo = getMap().addCircle(dOptions);
}
}