本文整理汇总了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;
}
示例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));
}
}
示例3: getStrokePattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
public List<PatternItem> getStrokePattern() {
return real.getStrokePattern();
}
示例4: strokePattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
public PolygonOptions strokePattern(List<PatternItem> pattern) {
real.strokePattern(pattern);
return this;
}
示例5: getPattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
public List<PatternItem> getPattern() {
return real.getPattern();
}
示例6: strokePattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
public CircleOptions strokePattern(List<PatternItem> pattern) {
real.strokePattern(pattern);
return this;
}
示例7: getStrokePattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
@Override
public List<PatternItem> getStrokePattern() {
return real.getStrokePattern();
}
示例8: setStrokePattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
@Override
public void setStrokePattern(List<PatternItem> strokePattern) {
real.setStrokePattern(strokePattern);
}
示例9: getPattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
@Override
public List<PatternItem> getPattern() {
return real.getPattern();
}
示例10: setPattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
@Override
public void setPattern(List<PatternItem> pattern) {
real.setPattern(pattern);
}
示例11: getStrokePattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
List<PatternItem> getStrokePattern();
示例12: setStrokePattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
void setStrokePattern(List<PatternItem> strokePattern);
示例13: getPattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
List<PatternItem> getPattern();
示例14: setPattern
import com.google.android.gms.maps.model.PatternItem; //导入依赖的package包/类
void setPattern(List<PatternItem> pattern);