Java tutorial
package com.tsroad.map; import android.app.ProgressDialog; import android.support.v4.app.FragmentActivity; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.Spinner; import com.amap.api.maps.AMap; import com.amap.api.maps.model.LatLng; import com.amap.api.maps.model.Marker; import com.amap.api.maps.overlay.PoiOverlay; import com.amap.api.services.core.LatLonPoint; import com.amap.api.services.core.PoiItem; import com.amap.api.services.poisearch.PoiItemDetail; import com.amap.api.services.poisearch.PoiResult; import com.amap.api.services.poisearch.PoiSearch; import com.tsroad.map.util.AMapUtil; import com.tsroad.map.util.ToastUtil; import java.util.List; /** % @authors Keung Charteris & T.s.road CZQ % @version 1.0 ($Revision$) % @addr. GUET, Gui Lin, 540001, P.R.China % @contact : cztsiang@gmail.com % @date Copyright(c) 2016-2020, All rights reserved. % This is an open access code distributed under the Creative Commons Attribution License, which permits % unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. * Created by tsroad on 5/3/15. */ public class AroundHere extends FragmentActivity implements AMap.OnMarkerClickListener, AMap.InfoWindowAdapter, AdapterView.OnItemSelectedListener, PoiSearch.OnPoiSearchListener, AMap.OnMapClickListener, AMap.OnInfoWindowClickListener, View.OnClickListener { private AMap aMap; private ProgressDialog progDialog = null;// ?? private Spinner selectDeep;// private String[] itemDeep = { "", "?", "", "" }; private Spinner selectType;// ? private String[] itemTypes = { "poi", "", "", "" }; private String deepType = "";// poi? private int searchType = 0;// ? private int tsearchType = 0;// ?? private PoiResult poiResult; // poi private int currentPage = 0;// ??0 private PoiSearch.Query query;// Poi? private LatLonPoint lp = new LatLonPoint(39.908127, 116.375257);// ? private Marker locationMarker; // private PoiSearch poiSearch; private PoiOverlay poiOverlay;// poi private List<PoiItem> poiItems;// poi? private Marker detailMarker;// Marker private Button nextButton;// /** * ? */ public void searchButton() { // // keyWord = AMapUtil.checkEditText(searchText); // if ("".equals(keyWord)) { // ToastUtil.show(PoiKeywordSearchActivity.this, "?"); // return; // } else { // doSearchQuery(); // } } @Override public View getInfoWindow(Marker marker) { return null; } @Override public View getInfoContents(Marker marker) { return null; } @Override public void onClick(View v) { } @Override public void onInfoWindowClick(Marker marker) { } @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { } @Override public void onNothingSelected(AdapterView<?> parent) { } @Override public void onMapClick(LatLng latLng) { } @Override public boolean onMarkerClick(Marker marker) { return false; } @Override public void onPoiSearched(PoiResult poiResult, int i) { } @Override public void onPoiItemDetailSearched(PoiItemDetail poiItemDetail, int i) { } }