• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java GroundOverlay类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: placeBootprint

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
private void placeBootprint(LatLng latLng, float direction) {
    if (mMap != null) {
        final BitmapDescriptor bootprint;
        // pick left/right print
        if (mTotalSteps++ % 2 == 0) {
            bootprint = mLeftBootprint;
        } else {
            bootprint = mRightBootprint;
        }


        final GroundOverlay overlay = mMap.addGroundOverlay(
                new GroundOverlayOptions().position(
                        latLng,
                        BOOTPRINT_SIZE_METERS
                ).bearing(
                        (float) (direction / Math.PI * 180d)
                ).image(bootprint)
        );

        mBootprintLocations.add(overlay);
        removeAndUpdateBootprints();
    }
}
 
开发者ID:BloopApp,项目名称:Bloop,代码行数:25,代码来源:BootprintMapFragment.java


示例2: removeAndUpdateBootprints

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
private void removeAndUpdateBootprints() {
    if (mBootprintLocations.size() >= MAX_BOOTPRINTS) {
        final GroundOverlay removedOverlay = mBootprintLocations.remove(0);
        removedOverlay.remove();
    }

    for (int i = 0; i < mBootprintLocations.size(); i++) {
        GroundOverlay bootprint = mBootprintLocations.get(i);

        int footprintsLeft = MAX_BOOTPRINTS - mBootprintLocations.size();

        float transparency = 1f - ((i + footprintsLeft) / (float) MAX_BOOTPRINTS);

        bootprint.setTransparency((2f * transparency / 3f) + .33f);
    }
}
 
开发者ID:BloopApp,项目名称:Bloop,代码行数:17,代码来源:BootprintMapFragment.java


示例3: call

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
@Override public void call(final Subscriber<? super GroundOverlay> subscriber) {
  GoogleMap.OnGroundOverlayClickListener listener = new GoogleMap.OnGroundOverlayClickListener() {
    @Override public void onGroundOverlayClick(GroundOverlay groundOverlay) {
      if (!subscriber.isUnsubscribed()) {
        subscriber.onNext(groundOverlay);
      }
    }
  };

  map.setOnGroundOverlayClickListener(listener);

  subscriber.add(Subscriptions.create(new Action0() {
    @Override public void call() {
      map.setOnGroundOverlayClickListener(null);
    }
  }));
}
 
开发者ID:aaronhe42,项目名称:RxGoogleMapsBinding,代码行数:18,代码来源:GroundOverlayClickOnSubscribe.java


示例4: addGroundOverlayToMap

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
/**
 * Adds ground overlays from a given URL onto the map
 *
 * @param groundOverlayUrl url of ground overlay
 * @param groundOverlays   hashmap of ground overlays to add to the map
 */
private void addGroundOverlayToMap(String groundOverlayUrl,
        HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays, boolean containerVisibility) {
    BitmapDescriptor groundOverlayBitmap = BitmapDescriptorFactory
            .fromBitmap(mImagesCache.get(groundOverlayUrl));
    for (KmlGroundOverlay kmlGroundOverlay : groundOverlays.keySet()) {
        if (kmlGroundOverlay.getImageUrl().equals(groundOverlayUrl)) {
            GroundOverlayOptions groundOverlayOptions = kmlGroundOverlay.getGroundOverlayOptions()
                    .image(groundOverlayBitmap);
            GroundOverlay mapGroundOverlay = mMap.addGroundOverlay(groundOverlayOptions);
            if (containerVisibility == false) {
                mapGroundOverlay.setVisible(false);
            }
            groundOverlays.put(kmlGroundOverlay, mapGroundOverlay);
        }
    }
}
 
开发者ID:josegury,项目名称:AndroidMarkerClusteringMaps,代码行数:23,代码来源:KmlRenderer.java


示例5: addGroundOverlay

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
public final GroundOverlay addGroundOverlay(GroundOverlayOptions paramGroundOverlayOptions)
{
  try
  {
    com.google.android.gms.maps.model.internal.c localc = this.Br.addGroundOverlay(paramGroundOverlayOptions);
    if (localc != null)
    {
      GroundOverlay localGroundOverlay = new GroundOverlay(localc);
      return localGroundOverlay;
    }
    return null;
  }
  catch (RemoteException localRemoteException)
  {
    throw new RuntimeRemoteException(localRemoteException);
  }
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:18,代码来源:GoogleMap.java


示例6: addGroundOverlayToMap

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
/**
 * Adds ground overlays from a given URL onto the map
 *
 * @param groundOverlayUrl url of ground overlay
 * @param groundOverlays   hashmap of ground overlays to add to the map
 */
private void addGroundOverlayToMap(String groundOverlayUrl,
        HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays, boolean containerVisibility) {
    BitmapDescriptor groundOverlayBitmap = BitmapDescriptorFactory
            .fromBitmap(getImagesCache().get(groundOverlayUrl));
    for (KmlGroundOverlay kmlGroundOverlay : groundOverlays.keySet()) {
        if (kmlGroundOverlay.getImageUrl().equals(groundOverlayUrl)) {
            GroundOverlayOptions groundOverlayOptions = kmlGroundOverlay.getGroundOverlayOptions()
                    .image(groundOverlayBitmap);
            GroundOverlay mapGroundOverlay = attachGroundOverlay(groundOverlayOptions);
            if (!containerVisibility) {
                mapGroundOverlay.setVisible(false);
            }
            groundOverlays.put(kmlGroundOverlay, mapGroundOverlay);
        }
    }
}
 
开发者ID:googlemaps,项目名称:android-maps-utils,代码行数:23,代码来源:KmlRenderer.java


示例7: addOverlay

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
public void addOverlay(LatLng place) {
    GroundOverlay groundOverlay = mMap.addGroundOverlay(new
            GroundOverlayOptions()
            .position(place, 100)
            .transparency(0.5f)
            .zIndex(3)
            .image(BitmapDescriptorFactory.fromBitmap(drawableToBitmap(getActivity().getResources().getDrawable(R.drawable.map_overlay)))));

    startOverlayAnimation(groundOverlay);
}
 
开发者ID:aliumujib,项目名称:Nibo,代码行数:11,代码来源:BaseNiboFragment.java


示例8: remove

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
/**
 * Remove this tile layer
 * @param args
 * @param callbackContext
 * @throws JSONException 
 */
protected void remove(JSONArray args, CallbackContext callbackContext) throws JSONException {
  String id = args.getString(1);
  GroundOverlay groundOverlay = (GroundOverlay)this.objects.get(id);
  if (groundOverlay == null) {
    this.sendNoResult(callbackContext);
    return;
  }

  String propertyId = "gOverlay_property_" + id;
  this.objects.remove(propertyId);
  groundOverlay.remove();
  this.sendNoResult(callbackContext);
}
 
开发者ID:AdrianBZG,项目名称:PhoneChat,代码行数:20,代码来源:PluginGroundOverlay.java


示例9: setVisible

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
/**
 * Set visibility for the object
 * @param args
 * @param callbackContext
 * @throws JSONException 
 */
protected void setVisible(JSONArray args, CallbackContext callbackContext) throws JSONException {
  boolean visible = args.getBoolean(2);
  
  String id = args.getString(1);
  GroundOverlay groundOverlay = (GroundOverlay)this.objects.get(id);
  if (groundOverlay == null) {
    this.sendNoResult(callbackContext);
    return;
  }
  groundOverlay.setVisible(visible);
  this.sendNoResult(callbackContext);
}
 
开发者ID:AdrianBZG,项目名称:PhoneChat,代码行数:19,代码来源:PluginGroundOverlay.java


示例10: setImage

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
/**
 * Set image of the ground-overlay
 * @param args
 * @param callbackContext
 * @throws JSONException 
 */
@SuppressWarnings("unused")
private void setImage(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
  String id = args.getString(1);
  GroundOverlay groundOverlay = (GroundOverlay)this.objects.get(id);
  String url = args.getString(2);
  
  String propertyId = "gOverlay_property_" + id;
  JSONObject opts = (JSONObject) this.objects.get(propertyId);
  opts.put("url", url);
  
  _createGroundOverlay(opts, callbackContext);
}
 
开发者ID:AdrianBZG,项目名称:PhoneChat,代码行数:19,代码来源:PluginGroundOverlay.java


示例11: setBounds

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
/**
 * Set bounds
 * @param args
 * @param callbackContext
 * @throws JSONException
 */
@SuppressWarnings("unused")
private void setBounds(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
  String id = args.getString(1);
  GroundOverlay groundOverlay = (GroundOverlay)this.objects.get(id);
  
  JSONArray points = args.getJSONArray(2);
  LatLngBounds bounds = PluginUtil.JSONArray2LatLngBounds(points);
  groundOverlay.setPositionFromBounds(bounds);

  this.sendNoResult(callbackContext);
}
 
开发者ID:AdrianBZG,项目名称:PhoneChat,代码行数:18,代码来源:PluginGroundOverlay.java


示例12: shouldEmmitGroundOverlay

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
@Test
public void shouldEmmitGroundOverlay() throws Exception {
    TestSubscriber<GroundOverlay> testSubscriber = new TestSubscriber<>();
    new GroundOverlayClickFunc().call(googleMap)
            .subscribe(testSubscriber);
    verify(googleMap).setOnGroundOverlayClickListener(argumentCaptor.capture());
    argumentCaptor.getValue().onGroundOverlayClick(null);
    testSubscriber.assertNoErrors();
    testSubscriber.assertValueCount(1);
    testSubscriber.assertValue(null);
}
 
开发者ID:sdoward,项目名称:RxGoogleMaps,代码行数:12,代码来源:GroundOverlayClickFuncTest.java


示例13: KmlContainer

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
KmlContainer(HashMap<String, String> properties, HashMap<String, KmlStyle> styles,
        HashMap<KmlPlacemark, Object> placemarks, HashMap<String, String> styleMaps,
        ArrayList<KmlContainer> containers, HashMap<KmlGroundOverlay, GroundOverlay>
        groundOverlay, String Id) {
    mProperties = properties;
    mPlacemarks = placemarks;
    mStyles = styles;
    mStyleMap = styleMaps;
    mContainers = containers;
    mGroundOverlays = groundOverlay;
    mContainerId = Id;
}
 
开发者ID:josegury,项目名称:AndroidMarkerClusteringMaps,代码行数:13,代码来源:KmlContainer.java


示例14:

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
/**
 * Stores all given data and adds it onto the map
 *
 * @param styles         hashmap of styles
 * @param styleMaps      hashmap of style maps
 * @param placemarks     hashmap of placemarks
 * @param folders        array of containers
 * @param groundOverlays hashmap of ground overlays
 */
/* package */ void storeKmlData(HashMap<String, KmlStyle> styles,
        HashMap<String, String> styleMaps,
        HashMap<KmlPlacemark, Object> placemarks, ArrayList<KmlContainer> folders,
        HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays) {
    mStyles = styles;
    mStyleMaps = styleMaps;
    mPlacemarks = placemarks;
    mContainers = folders;
    mGroundOverlays = groundOverlays;
}
 
开发者ID:josegury,项目名称:AndroidMarkerClusteringMaps,代码行数:20,代码来源:KmlRenderer.java


示例15: addGroundOverlays

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
/**
 * Adds a ground overlay adds all the ground overlays onto the map and recursively adds all
 * ground overlays stored in the given containers
 *
 * @param groundOverlays ground overlays to add to the map
 * @param kmlContainers  containers to check for ground overlays
 */
private void addGroundOverlays(HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays,
        Iterable<KmlContainer> kmlContainers) {
    addGroundOverlays(groundOverlays);
    for (KmlContainer container : kmlContainers) {
        addGroundOverlays(container.getGroundOverlayHashMap(),
                container.getContainers());
    }
}
 
开发者ID:josegury,项目名称:AndroidMarkerClusteringMaps,代码行数:16,代码来源:KmlRenderer.java


示例16:

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
/**
 * Creates a new KmlParser object
 *
 * @param parser parser containing the KML file to parse
 */
/* package */ KmlParser(XmlPullParser parser) {
    mParser = parser;
    mPlacemarks = new HashMap<KmlPlacemark, Object>();
    mContainers = new ArrayList<KmlContainer>();
    mStyles = new HashMap<String, KmlStyle>();
    mStyleMaps = new HashMap<String, String>();
    mGroundOverlays = new HashMap<KmlGroundOverlay, GroundOverlay>();
}
 
开发者ID:josegury,项目名称:AndroidMarkerClusteringMaps,代码行数:14,代码来源:KmlParser.java


示例17: bind

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
public GetStopResponseListener bind(String stopId, Marker marker,
                                    GoogleMap map, SpiceManager spiceManager,
                                    List<GroundOverlay> busMarkers) {
    mStopId = stopId;
    mMarker = marker;
    mMap = map;
    mSpiceManager = spiceManager;
    mIconGenerator = new IconGenerator(mContext);
    mBusMarkers = busMarkers;
    return this;
}
 
开发者ID:runningcode,项目名称:CUMtd,代码行数:12,代码来源:GetStopResponseListener.java


示例18: onRequestSuccess

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
@Override
public void onRequestSuccess(GetDeparturesResponse getDeparturesResponse) {
    for (GroundOverlay bus : mBusMarkers) {
        bus.remove();
    }
    processResponse(getDeparturesResponse);
}
 
开发者ID:runningcode,项目名称:CUMtd,代码行数:8,代码来源:GetStopResponseListener.java


示例19: addIcon

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
@UiThread
protected void addIcon(String text, LatLng position) {
    GroundOverlayOptions groundOverlay = new GroundOverlayOptions()
            .image(BitmapDescriptorFactory.fromBitmap(mIconGenerator.makeIcon(text)))
            .position(position, 80);

    final GroundOverlay marker = mMap.addGroundOverlay(groundOverlay);
    mBusMarkers.add(marker);
}
 
开发者ID:runningcode,项目名称:CUMtd,代码行数:10,代码来源:GetStopResponseListener.java


示例20: StopPointRenderer

import com.google.android.gms.maps.model.GroundOverlay; //导入依赖的package包/类
public StopPointRenderer(@NotNull Context context, GoogleMap map, ClusterManager<Stop>
        clusterManager, SpiceManager spiceManager, List<GroundOverlay> busMarkers) {
    super(context, map, clusterManager);
    mSpiceManager = spiceManager;
    mContext = context;
    mBusMarkers = busMarkers;
    CUMtdApplication app = (CUMtdApplication) context.getApplicationContext();
    if (app != null) t = app.getTracker();
}
 
开发者ID:runningcode,项目名称:CUMtd,代码行数:10,代码来源:StopPointRenderer.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EclipseLinkJpaVendorAdapter类代码示例发布时间:2022-05-21
下一篇:
Java DestructionAwareBeanPostProcessor类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap