当前位置: 首页>>代码示例>>Java>>正文


Java GoogleMap.setOnMapClickListener方法代码示例

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


在下文中一共展示了GoogleMap.setOnMapClickListener方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onMapReady

import com.google.android.gms.maps.GoogleMap; //导入方法依赖的package包/类
@Override
public void onMapReady(GoogleMap googleMap) {
    MapsInitializer.initialize(getActivity());
    final ViewOption viewOption = getViewOption();
    calculateAreaAndLength(viewOption);
    MapUtils.showElements(viewOption, googleMap, getActivity());
    googleMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
        @Override
        public void onMapClick(LatLng latLng) {
            Bundle args = new Bundle();
            args.putParcelable("optionView", viewOption);
            Intent intent = new Intent(getActivity(), MapsActivity.class);
            intent.putExtra("args", args);
            startActivity(intent);
        }
    });
}
 
开发者ID:bkhezry,项目名称:ExtraMapUtils,代码行数:18,代码来源:BasicFragment.java

示例2: onMapReady

import com.google.android.gms.maps.GoogleMap; //导入方法依赖的package包/类
@Override
public void onMapReady(GoogleMap map) {
    mLocationClient = getLocationClient();
    mLocationClient.addListener(this);

    updateMapPosition();

    if (mNew) {
        mMapView.setShowInfoWindow(true);
        mMapView.setShowAccuracy(true);
    }

    map.setOnMapClickListener(new OnMapClickListener() {
        @Override
        public void onMapClick(LatLng loaction) {
            viewMap();
        }
    });

    map.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
        @Override
        public boolean onMarkerClick(Marker marker) {
            viewMap();
            return true;
        }
    });
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-android,代码行数:28,代码来源:EditActivity.java

示例3: onMapReady

import com.google.android.gms.maps.GoogleMap; //导入方法依赖的package包/类
@Override
public void onMapReady(final GoogleMap googleMap) {
    userDataFirebaseCreateFlag.setupMap(googleMap);
    googleMap.setOnMapClickListener(this);

    flagCreateViewHolder.CURRENT_USER_LOCATION_IMAGE_VIEW
            .setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    userDataFirebaseCreateFlag.setupMap(googleMap);
                }
            });
}
 
开发者ID:MohamedNagyMostafa,项目名称:IM_Here,代码行数:14,代码来源:CreateNewFlagFragment.java

示例4: onMapReady

import com.google.android.gms.maps.GoogleMap; //导入方法依赖的package包/类
/**
 * Appena la mappa è disponibile, oltre a settare le funzioni di base riportate nella classe
 * padre, vengono attivate le funzioni specifiche della mappa e avviata una prima ricerca dei
 * parcheggi nella zona di Urbino (di dafault).
 */
@Override
public void onMapReady(GoogleMap googleMap) {
    super.onMapReady(googleMap);
    googleMap.setOnMarkerClickListener(this);
    googleMap.setOnMapClickListener(this);

    // vengono cercati i parcheggi presso urbino all'avvio
    AsyncDownloadParcheggi adp
            = new AsyncDownloadParcheggi(mMainActivity, MappaGoogle.COORD_INIZIALI);
    adp.execute();
}
 
开发者ID:IelloDevTeam,项目名称:IelloAndroidApp,代码行数:17,代码来源:MappaMain.java

示例5: onMapReady

import com.google.android.gms.maps.GoogleMap; //导入方法依赖的package包/类
@Override
public void onMapReady(GoogleMap map) {
    // New entry, track and save gps location.
    if (mEvent != null && mEvent.mLocalId <= 0
            && (mEvent.mLocationSource == null || mEvent.mLocationSource.equals(GameHarvest.LOCATION_SOURCE_GPS))) {
        mMapView.setShowInfoWindow(true);
        mMapView.setShowAccuracy(true);

        if (getActivity() != null) {
            mLocationClient = ((BaseActivity) getActivity()).getLocationClient();
            mLocationClient.addListener(this);
        }
    }

    map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
        @Override
        public void onMapClick(LatLng arg0) {
            viewMap();
        }
    });

    map.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
        @Override
        public boolean onMarkerClick(Marker marker) {
            viewMap();
            return true;
        }
    });
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-android,代码行数:30,代码来源:HarvestFragment.java

示例6: MapsManager

import com.google.android.gms.maps.GoogleMap; //导入方法依赖的package包/类
MapsManager(Activity context, GoogleMap map) {
    mContext = context;

    // 地圖
    mMaps.add(MAP_CODE_MAIN, map);
    mMapTiles.add(MAP_CODE_MAIN, null);

    mZoomNumber = (TextView) context.findViewById(R.id.zoom_number);

    // 顯示準心座標
    mCrossCoor = (TextView) context.findViewById(R.id.tvCoord);
    mCrossCoor.setOnClickListener((MapsActivity) mContext);

    // 加入比例尺
    RelativeLayout container = (RelativeLayout) context.findViewById(R.id.layout_container);
    RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(800, 800);
    mScaleBar = new ScaleBar(mContext, getMap(MAP_CODE_MAIN));
    mScaleBar.setLayoutParams(params);
    container.addView(mScaleBar);

    // 註冊畫面縮放的監聽
    map.setOnCameraMoveListener(this);

    // Set the Listener
    map.setOnMapClickListener(this);
    map.setOnMapLongClickListener(this);
    map.setOnInfoWindowClickListener(this);
    map.setOnMarkerDragListener(this);
    map.setOnCameraIdleListener(this);

    // 在Activity和Map物件註冊ClusterManager
    mClusterManagers.add(MAP_CODE_MAIN, new ClusterManager<CustomMarker>(mContext, map));
    // The Rule about Cluster Managing
    mClusterManagers.get(MAP_CODE_MAIN).setRenderer(
            new CustomRenderer(mContext, map, mClusterManagers.get(MAP_CODE_MAIN)));
    mClusterManagers.get(MAP_CODE_MAIN).setOnClusterClickListener(
            (CustomRenderer) mClusterManagers.get(MAP_CODE_MAIN).getRenderer());
    // Click on marker to open infoWindow
    map.setOnMarkerClickListener(mClusterManagers.get(MAP_CODE_MAIN));
    // POI in Google map
    map.setOnPoiClickListener(this);

    // Test for new info window
    map.setInfoWindowAdapter(new CustomAdapter(mContext));
}
 
开发者ID:typebrook,项目名称:FiveMinsMore,代码行数:46,代码来源:MapsManager.java

示例7: onMapReady

import com.google.android.gms.maps.GoogleMap; //导入方法依赖的package包/类
@Override
public void onMapReady(GoogleMap googleMap) {
    super.onMapReady(googleMap);
    googleMap.setOnMapClickListener(this);
    googleMap.setOnMarkerClickListener(this);
}
 
开发者ID:IelloDevTeam,项目名称:IelloAndroidApp,代码行数:7,代码来源:MappaSegnalazione.java

示例8: onMapReady

import com.google.android.gms.maps.GoogleMap; //导入方法依赖的package包/类
@Override
public void onMapReady(GoogleMap googleMap) {
    map = googleMap;
    googleMap.setOnMapClickListener(this);
}
 
开发者ID:drfonfon,项目名称:android-geohash,代码行数:6,代码来源:MapFragment.java

示例9: initMap

import com.google.android.gms.maps.GoogleMap; //导入方法依赖的package包/类
@Override
protected void initMap(GoogleMap map) {
    super.initMap(map);
    map.setOnMarkerClickListener(this);
    map.setOnMapClickListener(this);
}
 
开发者ID:WorldBank-Transport,项目名称:RoadLab-Pro,代码行数:7,代码来源:PopupMeasurementMapFragment.java


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