當前位置: 首頁>>代碼示例>>Java>>正文


Java CircleOptions.fillColor方法代碼示例

本文整理匯總了Java中com.google.android.gms.maps.model.CircleOptions.fillColor方法的典型用法代碼示例。如果您正苦於以下問題:Java CircleOptions.fillColor方法的具體用法?Java CircleOptions.fillColor怎麽用?Java CircleOptions.fillColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.android.gms.maps.model.CircleOptions的用法示例。


在下文中一共展示了CircleOptions.fillColor方法的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;
        }
    }
}
 
開發者ID:suomenriistakeskus,項目名稱:oma-riista-android,代碼行數:23,代碼來源:EntryMapView.java

示例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);
}
 
開發者ID:AdrianBZG,項目名稱:PhoneChat,代碼行數:46,代碼來源:PluginCircle.java

示例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);
}
 
開發者ID:tutsplus,項目名稱:Android-GoogleMaps-Part1,代碼行數:11,代碼來源:MapFragment.java

示例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);
}
 
開發者ID:oSoc14,項目名稱:mv_geomarketing_android,代碼行數:9,代碼來源:MyGoogleMapHelper.java

示例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);
}
 }
 
開發者ID:Arasthel,項目名稱:AlmeriBus,代碼行數:14,代碼來源:CustomMapFragment.java


注:本文中的com.google.android.gms.maps.model.CircleOptions.fillColor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。