本文整理匯總了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);
}
示例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;
}
示例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;
}