Java 类com.google.android.gms.maps.model.PatternItem 实例源码

项目:ExtraMapUtils    文件:MapUtils.java   
private static List<PatternItem> getStrokePattern(UiOptions.StrokePatternDef strokePatternDef) {
    List<PatternItem> patternItems = new ArrayList<>();
    switch (strokePatternDef) {
        case DEFAULT:
            patternItems = null;
            break;
        case DASHED:
            patternItems = PATTERN_DASHED;
            break;
        case DOTTED:
            patternItems = PATTERN_DOTTED;
            break;
        case MIXED:
            patternItems = PATTERN_MIXED;
            break;
    }
    return patternItems;
}
项目:SpaceRace    文件:MapActivity.java   
/**
 * Updates all UI fields.
 */
private void updateUI(final Location oldLocation) {
    if (!isLocationEnabled && map != null) {
        mRequestingLocationUpdates = true;
        zoom = map.getCameraPosition().zoom;
        Log.i("CAMERA_ZOOM", "zoom:" + zoom);
        if (mCurrentLocation != null) {

            marker = placeMarker(PiecePicker.getPiece(new PieceSquareShape(PIECE_SIZE), piece), mCurrentLocation);
        }
    }

    if (mCurrentLocation != null) {
        if (oldLocation!= null) {
            // refresh ogni 2 sec -> record mondiale 8,33m/s => ~16 ogni 2 sec => 15
            // per essere sicuri
            if (CoordinatesUtility.distance(mCurrentLocation, oldLocation)<MAX_DIFFERENCE_UPDATE_POLYLINE) {

                List<PatternItem> dashItems = new ArrayList<>();
                // 5 and 10 pixel long dash
                dashItems.add(new Dash(5));
                dashItems.add(new Gap(25));
                dashItems.add(new Dash(15));

                map.addPolyline(new PolylineOptions()
                        .add(new LatLng(oldLocation.getLatitude(),
                                        oldLocation.getLongitude()),
                                new LatLng(mCurrentLocation.getLatitude(),
                                        mCurrentLocation.getLongitude()))
                        .endCap(new RoundCap())
                        .startCap(new RoundCap())
                        .pattern(dashItems)
                        .width(30)
                        .color(Color.CYAN));
                if (marker == null) {
                    PieceShape markerPic = new PieceSquareShape(PIECE_SIZE);
                    marker = placeMarker(PiecePicker.getPiece(markerPic, piece), mCurrentLocation);
                }
                marker.setPosition(new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude()));
            }
            if (drawer != null) {

                showHintIfNear();
            }
        }
        map.moveCamera(CameraUpdateFactory.newLatLngZoom(
                new LatLng(mCurrentLocation.getLatitude(),
                        mCurrentLocation.getLongitude()), map.getCameraPosition().zoom));
    }
}
项目:referendum_1o_android    文件:PolygonOptions.java   
public List<PatternItem> getStrokePattern() {
    return real.getStrokePattern();
}
项目:referendum_1o_android    文件:PolygonOptions.java   
public PolygonOptions strokePattern(List<PatternItem> pattern) {
    real.strokePattern(pattern);
    return this;
}
项目:referendum_1o_android    文件:PolylineOptions.java   
public List<PatternItem> getPattern() {
    return real.getPattern();
}
项目:referendum_1o_android    文件:CircleOptions.java   
public List<PatternItem> getStrokePattern() {
    return real.getStrokePattern();
}
项目:referendum_1o_android    文件:CircleOptions.java   
public CircleOptions strokePattern(List<PatternItem> pattern) {
    real.strokePattern(pattern);
    return this;
}
项目:referendum_1o_android    文件:DelegatingCircle.java   
@Override
public List<PatternItem> getStrokePattern() {
    return real.getStrokePattern();
}
项目:referendum_1o_android    文件:DelegatingCircle.java   
@Override
public void setStrokePattern(List<PatternItem> strokePattern) {
    real.setStrokePattern(strokePattern);
}
项目:referendum_1o_android    文件:DelegatingPolyline.java   
@Override
public List<PatternItem> getPattern() {
    return real.getPattern();
}
项目:referendum_1o_android    文件:DelegatingPolyline.java   
@Override
public void setPattern(List<PatternItem> pattern) {
    real.setPattern(pattern);
}
项目:referendum_1o_android    文件:DelegatingPolygon.java   
@Override
public List<PatternItem> getStrokePattern() {
    return real.getStrokePattern();
}
项目:referendum_1o_android    文件:DelegatingPolygon.java   
@Override
public void setStrokePattern(List<PatternItem> strokePattern) {
    real.setStrokePattern(strokePattern);
}
项目:referendum_1o_android    文件:Polygon.java   
List<PatternItem> getStrokePattern();
项目:referendum_1o_android    文件:Polygon.java   
void setStrokePattern(List<PatternItem> strokePattern);
项目:referendum_1o_android    文件:Circle.java   
List<PatternItem> getStrokePattern();
项目:referendum_1o_android    文件:Circle.java   
void setStrokePattern(List<PatternItem> strokePattern);
项目:referendum_1o_android    文件:Polyline.java   
List<PatternItem> getPattern();
项目:referendum_1o_android    文件:Polyline.java   
void setPattern(List<PatternItem> pattern);