当前位置: 首页>>代码示例>>Java>>正文


Java PolylineOptions.visible方法代码示例

本文整理汇总了Java中com.google.android.gms.maps.model.PolylineOptions.visible方法的典型用法代码示例。如果您正苦于以下问题:Java PolylineOptions.visible方法的具体用法?Java PolylineOptions.visible怎么用?Java PolylineOptions.visible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.gms.maps.model.PolylineOptions的用法示例。


在下文中一共展示了PolylineOptions.visible方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawPath

import com.google.android.gms.maps.model.PolylineOptions; //导入方法依赖的package包/类
private void drawPath()
{
    if ( mMap == null)
        return;
    PolylineOptions options = new PolylineOptions();
    options.color(Color.parseColor("#CC0000FF"));
    options.width(4);
    options.visible(true);
    options.add(new LatLng(currentLAT, currentLONG));
    options.add(new LatLng(lat, lng));
    mMap.addPolyline(options);
}
 
开发者ID:smerkousdavid,项目名称:myva-Home,代码行数:13,代码来源:MapsActivity.java

示例2: addUphillSectionsToMap

import com.google.android.gms.maps.model.PolylineOptions; //导入方法依赖的package包/类
public void addUphillSectionsToMap(GoogleMap mMap) {
    Log.i("Info:", "addUphillSectionsToMap");
    uphillPolylines = new ArrayList<>();
    for (PolylineOptions line : uphillSections) {
        line.visible(false);
        uphillPolylines.add(mMap.addPolyline(line));
    }
}
 
开发者ID:nogalavi,项目名称:Bikeable,代码行数:9,代码来源:ColorizeUphillSections.java

示例3: addBikePathToMap

import com.google.android.gms.maps.model.PolylineOptions; //导入方法依赖的package包/类
public void addBikePathToMap(GoogleMap mMap) {
    if (isBikePathPolylinesAdded)
        return;
    bikePathPolyLineInRoute = new ArrayList<>();
    for (PolylineOptions line : bikePathInRoute) {
        line.visible(false);
        bikePathPolyLineInRoute.add(mMap.addPolyline(line));
    }
    isBikePathPolylinesAdded = true;
}
 
开发者ID:nogalavi,项目名称:Bikeable,代码行数:11,代码来源:BikeableRoute.java

示例4: addBikePathToMap

import com.google.android.gms.maps.model.PolylineOptions; //导入方法依赖的package包/类
public static void addBikePathToMap (GoogleMap mMap) {
    if (isBikePathPolylinesAdded)
        return;
    bikePathsPolylines = new ArrayList<>();
    for (PolylineOptions line : bikePathPolylinesOpts) {
        line.zIndex(20); // TODO: not hard coded
        line.width(5); // TODO: not hard coded
        line.visible(false);
        bikePathsPolylines.add(mMap.addPolyline(line));
    }
    isBikePathPolylinesAdded = true;
}
 
开发者ID:nogalavi,项目名称:Bikeable,代码行数:13,代码来源:IriaData.java

示例5: toPolylineOptions

import com.google.android.gms.maps.model.PolylineOptions; //导入方法依赖的package包/类
/**
 * Gets a new PolylineOptions object containing styles for the GeoJsonLineString
 *
 * @return new PolylineOptions object
 */
public PolylineOptions toPolylineOptions() {
    PolylineOptions polylineOptions = new PolylineOptions();
    polylineOptions.color(mPolylineOptions.getColor());
    polylineOptions.geodesic(mPolylineOptions.isGeodesic());
    polylineOptions.visible(mPolylineOptions.isVisible());
    polylineOptions.width(mPolylineOptions.getWidth());
    polylineOptions.zIndex(mPolylineOptions.getZIndex());
    return polylineOptions;
}
 
开发者ID:josegury,项目名称:AndroidMarkerClusteringMaps,代码行数:15,代码来源:GeoJsonLineStringStyle.java

示例6: createPolyline

import com.google.android.gms.maps.model.PolylineOptions; //导入方法依赖的package包/类
/**
 * Create polyline
 * @param args
 * @param callbackContext
 * @throws JSONException 
 */
@SuppressWarnings("unused")
private void createPolyline(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
  final PolylineOptions polylineOptions = new PolylineOptions();
  int color;
  LatLngBounds.Builder builder = new LatLngBounds.Builder();
  
  JSONObject opts = args.getJSONObject(1);
  if (opts.has("points")) {
    JSONArray points = opts.getJSONArray("points");
    List<LatLng> path = PluginUtil.JSONArray2LatLngList(points);
    int i = 0;
    for (i = 0; i < path.size(); i++) {
      polylineOptions.add(path.get(i));
      builder.include(path.get(i));
    }
  }
  if (opts.has("color")) {
    color = PluginUtil.parsePluginColor(opts.getJSONArray("color"));
    polylineOptions.color(color);
  }
  if (opts.has("width")) {
    polylineOptions.width(opts.getInt("width") * this.density);
  }
  if (opts.has("visible")) {
    polylineOptions.visible(opts.getBoolean("visible"));
  }
  if (opts.has("geodesic")) {
    polylineOptions.geodesic(opts.getBoolean("geodesic"));
  }
  if (opts.has("zIndex")) {
    polylineOptions.zIndex(opts.getInt("zIndex"));
  }
  
  Polyline polyline = map.addPolyline(polylineOptions);
  String id = "polyline_" + polyline.getId();
  this.objects.put(id, polyline);

  String boundsId = "polyline_bounds_" + polyline.getId();
  this.objects.put(boundsId, builder.build());
  
  JSONObject result = new JSONObject();
  result.put("hashCode", polyline.hashCode());
  result.put("id", id);
  callbackContext.success(result);
}
 
开发者ID:AdrianBZG,项目名称:PhoneChat,代码行数:52,代码来源:PluginPolyline.java

示例7: setPolylineOptions

import com.google.android.gms.maps.model.PolylineOptions; //导入方法依赖的package包/类
/**
 * Set the polyline options
 *
 * @param style           shape style
 * @param polylineOptions polyline options
 * @param visible         visible flag
 */
private void setPolylineOptions(ObservationShapeStyle style, PolylineOptions polylineOptions, boolean visible) {
    polylineOptions.width(style.getStrokeWidth());
    polylineOptions.color(style.getStrokeColor());
    polylineOptions.visible(visible);
    polylineOptions.geodesic(MapShapeObservation.GEODESIC);
}
 
开发者ID:ngageoint,项目名称:mage-android,代码行数:14,代码来源:MapObservationManager.java


注:本文中的com.google.android.gms.maps.model.PolylineOptions.visible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。