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


Java PatternItem类代码示例

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


PatternItem类属于com.google.android.gms.maps.model包,在下文中一共展示了PatternItem类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getStrokePattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
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;
}
 
开发者ID:bkhezry,项目名称:ExtraMapUtils,代码行数:19,代码来源:MapUtils.java

示例2: updateUI

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
/**
 * 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));
    }
}
 
开发者ID:Augugrumi,项目名称:SpaceRace,代码行数:53,代码来源:MapActivity.java

示例3: getStrokePattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
public List<PatternItem> getStrokePattern() {
    return real.getStrokePattern();
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:4,代码来源:PolygonOptions.java

示例4: strokePattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
public PolygonOptions strokePattern(List<PatternItem> pattern) {
    real.strokePattern(pattern);
    return this;
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:5,代码来源:PolygonOptions.java

示例5: getPattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
public List<PatternItem> getPattern() {
    return real.getPattern();
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:4,代码来源:PolylineOptions.java

示例6: strokePattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
public CircleOptions strokePattern(List<PatternItem> pattern) {
    real.strokePattern(pattern);
    return this;
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:5,代码来源:CircleOptions.java

示例7: getStrokePattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
@Override
public List<PatternItem> getStrokePattern() {
    return real.getStrokePattern();
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:5,代码来源:DelegatingCircle.java

示例8: setStrokePattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
@Override
public void setStrokePattern(List<PatternItem> strokePattern) {
    real.setStrokePattern(strokePattern);
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:5,代码来源:DelegatingCircle.java

示例9: getPattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
@Override
public List<PatternItem> getPattern() {
    return real.getPattern();
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:5,代码来源:DelegatingPolyline.java

示例10: setPattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
@Override
public void setPattern(List<PatternItem> pattern) {
    real.setPattern(pattern);
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:5,代码来源:DelegatingPolyline.java

示例11: getStrokePattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
List<PatternItem> getStrokePattern(); 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:2,代码来源:Polygon.java

示例12: setStrokePattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
void setStrokePattern(List<PatternItem> strokePattern); 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:2,代码来源:Polygon.java

示例13: getPattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
List<PatternItem> getPattern(); 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:2,代码来源:Polyline.java

示例14: setPattern

import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
void setPattern(List<PatternItem> pattern); 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:2,代码来源:Polyline.java


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