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


Java TileOverlayOptions.zIndex方法代碼示例

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


在下文中一共展示了TileOverlayOptions.zIndex方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createTileOverlay

import com.google.android.gms.maps.model.TileOverlayOptions; //導入方法依賴的package包/類
/**
 * Create tile overlay
 * 
 * @param args
 * @param callbackContext
 * @throws JSONException
 */
@SuppressWarnings("unused")
private void createTileOverlay(final JSONArray args,
  final CallbackContext callbackContext) throws JSONException {

  JSONObject opts = args.getJSONObject(1);
  int tileSize = opts.getInt("tileSize");
  final String tileUrlFormat = opts.getString("tileUrlFormat");
  
  double opacity = 1.0;
  if (opts.has("opacity")) {
    opacity = opts.getDouble("opacity");
  }
  PluginTileProvider tileProvider = new PluginTileProvider(tileUrlFormat, opacity, tileSize);

  TileOverlayOptions options = new TileOverlayOptions();
  options.tileProvider(tileProvider);
  if (opts.has("zIndex")) {
    options.zIndex((float)opts.getDouble("zIndex"));
  }
  if (opts.has("visible")) {
    options.visible(opts.getBoolean("visible"));
  }
  TileOverlay tileOverlay = this.map.addTileOverlay(options);
  String id = "tile_" + tileOverlay.getId();

  this.objects.put(id, tileOverlay);
  this.objects.put(id.replace("tile_", "tileProvider_"), tileProvider);

  JSONObject result = new JSONObject();
  result.put("hashCode", tileOverlay.hashCode());
  result.put("id", id);
  callbackContext.success(result);
}
 
開發者ID:AdrianBZG,項目名稱:PhoneChat,代碼行數:41,代碼來源:PluginTileOverlay.java

示例2: createTileOverlayOptions

import com.google.android.gms.maps.model.TileOverlayOptions; //導入方法依賴的package包/類
/**
 * Create Tile Overlay Options for the Tile Provider using the z index
 * @param tileProvider
 * @param zIndex
 * @return
 */
private TileOverlayOptions createTileOverlayOptions(TileProvider tileProvider, int zIndex){
	TileOverlayOptions overlayOptions = new TileOverlayOptions();
	overlayOptions.tileProvider(tileProvider);
	overlayOptions.zIndex(zIndex);
	return overlayOptions;
}
 
開發者ID:ngageoint,項目名稱:mage-android,代碼行數:13,代碼來源:MapFragment.java

示例3: createTileOverlayOptions

import com.google.android.gms.maps.model.TileOverlayOptions; //導入方法依賴的package包/類
/**
 * Create Tile Overlay Options for the Tile Provider using the z index
 *
 * @param tileProvider
 * @param zIndex
 * @return
 */
private TileOverlayOptions createTileOverlayOptions(TileProvider tileProvider, int zIndex) {
    TileOverlayOptions overlayOptions = new TileOverlayOptions();
    overlayOptions.tileProvider(tileProvider);
    overlayOptions.zIndex(zIndex);
    return overlayOptions;
}
 
開發者ID:ngageoint,項目名稱:disconnected-content-explorer-android,代碼行數:14,代碼來源:GeoPackageMapOverlays.java


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