com.google.android.gms.maps.model.Marker.showInfoWindow()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中com.google.android.gms.maps.model.Marker.showInfoWindow()方法的一些代码示例,展示了Marker.showInfoWindow()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marker.showInfoWindow()方法的具体详情如下:
包路径:com.google.android.gms.maps.model.Marker
类名称:Marker
方法名:showInfoWindow

Marker.showInfoWindow介绍

暂无

代码示例

代码示例来源:origin: commonsguy/cw-omnibus

@Override
 public void onSuccess() {
  if (marker != null && marker.isInfoWindowShown()) {
   marker.showInfoWindow();
  }
 }
}

代码示例来源:origin: googlemaps/android-samples

@Override
  public void onCheckedChanged(RadioGroup group, int checkedId) {
    if (mLastSelectedMarker != null && mLastSelectedMarker.isInfoWindowShown()) {
      // Refresh the info window when the info window's content has changed.
      mLastSelectedMarker.showInfoWindow();
    }
  }
});

代码示例来源:origin: car2go/AnyMaps

@Override
public void showInfoWindow() {
  marker.showInfoWindow();
}

代码示例来源:origin: mg6maciej/android-maps-extensions

public void showInfoWindow() {
  if (marker != null) {
    marker.showInfoWindow();
  }
}

代码示例来源:origin: mg6maciej/android-maps-extensions

@Override
  public void showInfoWindow() {
    if (virtual == null && markers.size() > 1) {
      refresh();
    }
    if (virtual != null) {
      virtual.showInfoWindow();
    }
  }
}

代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android

public void openModeMarker(String tripId){
  if (mModeMarkers != null && tripId != null){
    for (Map.Entry<Marker, TripInfo> entry : mModeMarkers.entrySet()) {
      if (tripId.equals(entry.getValue().getTripId())){
        entry.getKey().showInfoWindow();
        break;
      }
    }
  }
}

代码示例来源:origin: mitchtabian/Google-Maps-Google-Places

@Override
  public void onClick(View view) {
    Log.d(TAG, "onClick: clicked place info");
    try{
      if(mMarker.isInfoWindowShown()){
        mMarker.hideInfoWindow();
      }else{
        Log.d(TAG, "onClick: place info: " + mPlace.toString());
        mMarker.showInfoWindow();
      }
    }catch (NullPointerException e){
      Log.e(TAG, "onClick: NullPointerException: " + e.getMessage() );
    }
  }
});

代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android

entry.getKey().showInfoWindow();

代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android

entry.getValue().setDelayInSeconds(leg.departureDelay);
if (entry.getKey().isInfoWindowShown()){
  entry.getKey().showInfoWindow();

代码示例来源:origin: google-developer-training/android-advanced

@Override
  public void onPoiClick(PointOfInterest poi) {
    Marker poiMarker = map.addMarker(new MarkerOptions()
        .position(poi.latLng)
        .title(poi.name));
    poiMarker.showInfoWindow();
    poiMarker.setTag(getString(R.string.poi));
  }
});

代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android

if (animateCamera == 1){
  if (firstTransitMarker != null){
    firstTransitMarker.showInfoWindow();

代码示例来源:origin: car2go/AnyMaps

@Test
public void testDelegateMethods() throws Exception {
  // Given
  Marker marker = mock(Marker.class);
  BitmapDescriptor descriptor = mock(BitmapDescriptor.class);
  BitmapDescriptorAdapter adapter = new BitmapDescriptorAdapter(descriptor);
  MarkerAdapter markerAdapter = new MarkerAdapter(marker);
  // When
  markerAdapter.setVisible(true);
  markerAdapter.setIcon(adapter);
  markerAdapter.getPosition();
  markerAdapter.showInfoWindow();
  markerAdapter.remove();
  // Then
  verify(marker).setVisible(eq(true));
  verify(marker).setIcon(refEq(descriptor));
  verify(marker).getPosition();
  verify(marker).showInfoWindow();
  verify(marker).remove();
}

代码示例来源:origin: Attriumph/Place-Search-Service

Marker marker2 = googleMap.addMarker(marker1);
googleMap.addMarker(marker);
marker2.showInfoWindow();

代码示例来源:origin: Attriumph/Place-Search-Service

@Override
  public void onMapReady(GoogleMap googleMap) {
    double latitude = Double.valueOf(obj.getGeometry().getLocation().getLat());
    double longitude = Double.valueOf(obj.getGeometry().getLocation().getLng());
    MarkerOptions marker = new MarkerOptions().position(
        new LatLng(latitude, longitude)).title(obj.getName());
    // Changing marker icon
    marker.icon(BitmapDescriptorFactory
        .defaultMarker(BitmapDescriptorFactory.HUE_ROSE));
    // Perform any camera updates here
    Marker marker1 = googleMap.addMarker(marker);
    marker1.showInfoWindow();
    CameraPosition cameraPosition = new CameraPosition.Builder()
        .target(new LatLng(latitude, longitude)).zoom(15).build();
    googleMap.animateCamera(CameraUpdateFactory
        .newCameraPosition(cameraPosition));
    googleMap.getUiSettings().setZoomControlsEnabled(true);
    googleMap.getUiSettings().setZoomGesturesEnabled(true);
    PlaceSearchItemMapFragment.this.googleMap = googleMap;
  }
});

相关文章