QQ发送位置(高德地图)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" > <LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#00b4ef"
android:orientation="horizontal" > <ImageButton
android:id="@+id/mapaddress_back"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="4"
android:background="#00000000"
android:src="@mipmap/left_back" /> <LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
android:layout_weight="1.5"
android:background="@drawable/fillet"
android:orientation="horizontal" > <ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:src="@mipmap/seek" /> <Button
android:id="@+id/mapaddress_search"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:background="#00000000"
android:gravity="center_vertical"
android:hint="搜索小区/学校/大厦" />
</LinearLayout> <Button
android:id="@+id/sendlocation"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3.5"
android:background="#00000000"
android:clickable="true"
android:text="发送" />
</LinearLayout> <FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" > <com.amap.api.maps.MapView
android:id="@+id/mapaddress_map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.5" >
</com.amap.api.maps.MapView> <ImageButton
android:id="@+id/mapaddress_centerpoint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#00000000"
android:src="@mipmap/ingbig" />
</FrameLayout> <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" > <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp" > <ImageView
android:layout_width="20dp"
android:layout_height="10dp"
android:layout_gravity="center_vertical"
android:src="@mipmap/gps" /> <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:orientation="vertical" > <TextView
android:id="@+id/mapaddress_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="请选择地址"
android:textColor="@android:color/holo_red_light"
android:textSize="18dp" /> <TextView
android:id="@+id/mapaddress_miaoshu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textColor="@android:color/holo_red_light"
android:textSize="15dp" />
</LinearLayout>
</LinearLayout> <ListView
android:id="@+id/addresslistview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:dividerHeight="1dp" />
</LinearLayout> </LinearLayout>
mapview
package com.changim.app.ui.chat; import java.io.FileOutputStream;
import java.util.List;
import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClient;
import com.amap.api.location.AMapLocationClientOption;
import com.amap.api.location.AMapLocationClientOption.AMapLocationMode;
import com.amap.api.location.AMapLocationListener;
import com.amap.api.maps.AMap;
import com.amap.api.maps.AMap.OnCameraChangeListener;
import com.amap.api.maps.AMap.OnMapScreenShotListener;
import com.amap.api.maps.CameraUpdateFactory;
import com.amap.api.maps.LocationSource;
import com.amap.api.maps.MapView;
import com.amap.api.maps.model.CameraPosition;
import com.amap.api.maps.model.LatLng;
import com.amap.api.maps.model.MarkerOptions;
import com.amap.api.services.core.LatLonPoint;
import com.amap.api.services.core.PoiItem;
import com.amap.api.services.poisearch.PoiResult;
import com.amap.api.services.poisearch.PoiSearch;
import com.amap.api.services.poisearch.PoiSearch.OnPoiSearchListener;
import com.amap.api.services.poisearch.PoiSearch.SearchBound;
import com.changim.app.R; import com.changim.app.ui.adapter.AddressAdapter;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener; public class MapAddress extends Activity implements LocationSource, OnCameraChangeListener, AMapLocationListener, OnPoiSearchListener,OnClickListener,OnMapScreenShotListener { public AMap aMap;//地图对象
private MapView mapView;//地图控件
private OnLocationChangedListener mListener;//位置移动监听
private AMapLocationClient mlocationClient;
private AMapLocationClientOption mLocationOption;
private static MarkerOptions markerOption;//地图标记设置项 private PoiSearch poiSearch;//关键字搜索
private List<PoiItem> list;//存放位置信息
private ListView addresslistview;//地址选择列表
private double longitude,latitude;//经度,维度;
ImageButton back;
Button search;//关键字搜索按钮
TextView name,miaoshu;//地点名称 位置描述
Button sendlocation;//分享位置按钮
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
setContentView(R.layout.mapview);
info();
mapView.onCreate(savedInstanceState); // 此方法必须重写 init();
addresslistview.setOnItemClickListener(new OnItemClickListener() { @Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
name.setText(list.get(position).getTitle());
miaoshu.setText(list.get(position).getSnippet());
longitude=list.get(position).getLatLonPoint().getLongitude();
latitude=list.get(position).getLatLonPoint().getLatitude();
}
}); } /**
* 控件信息初始化
*/
private void info(){
back=(ImageButton)findViewById(R.id.mapaddress_back);
mapView = (MapView) findViewById(R.id.mapaddress_map);
addresslistview=(ListView) findViewById(R.id.addresslistview);
search=(Button) findViewById(R.id.mapaddress_search);
name=(TextView) findViewById(R.id.mapaddress_name);
miaoshu=(TextView) findViewById(R.id.mapaddress_miaoshu);
sendlocation=(Button) findViewById(R.id.sendlocation);
search.setOnClickListener(this);
sendlocation.setOnClickListener(this);
back.setOnClickListener(this);
} /**
* 初始化AMap对象
*/
private void init() {
if (aMap == null) {
aMap = mapView.getMap();
aMap.moveCamera(CameraUpdateFactory.zoomTo(15));
setUpMap();
}}
private void setUpMap() {
aMap.setLocationSource(MapAddress.this);// 设置定位监听
aMap.getUiSettings().setMyLocationButtonEnabled(true);// 设置默认定位按钮是否显示
aMap.setMyLocationEnabled(true);// 设置为true表示显示定位层并可触发定位,false表示隐藏定位层并不可触发定位,默认是false
// 设置定位的类型为定位模式 ,可以由定位、跟随或地图根据面向方向旋转几种
aMap.setMyLocationType(AMap.LOCATION_TYPE_LOCATE);
aMap.setOnCameraChangeListener(this); }
/**
* 地图移动,经纬度改变的监听
*/
@Override
public void onCameraChange(CameraPosition arg0) {
// TODO Auto-generated method stub } @Override
public void onCameraChangeFinish(CameraPosition arg0) {
// TODO Auto-generated method stub
LatLonPoint latp=new LatLonPoint(arg0.target.latitude,arg0.target.longitude);
PoiSearch(latp);
} public void PoiSearch(LatLonPoint lp){
PoiSearch.Query query = new PoiSearch.Query("","餐饮服务|商务住宅|生活服务","");// 第一个参数表示搜索字符串,第二个参数表示poi搜索类型,第三个参数表示poi搜索区域(空字符串代表全国)
query.setPageSize(15);// 设置每页最多返回多少条poiitem
query.setPageNum(0);// 设置查第一页
poiSearch = new PoiSearch(this,query);
poiSearch.setOnPoiSearchListener(this);
poiSearch.setBound(new SearchBound(lp, 500, true));//
poiSearch.searchPOIAsyn();// 异步搜索
} @Override
public void onPoiSearched(PoiResult arg0, int arg1) {
list=arg0.getPois();
AddressAdapter adapter=new AddressAdapter(MapAddress.this,list);
addresslistview.setAdapter(adapter);
adapter.notifyDataSetChanged();
}
/**
* 方法必须重写
*/ protected void onResume() {
super.onResume();
mapView.onResume();
} /**
* 方法必须重写
*/
@Override
protected void onPause() {
super.onPause();
mapView.onPause();
deactivate();
} /**
* 方法必须重写
*/
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
mapView.onSaveInstanceState(outState);
} /**
* 方法必须重写
*/
@Override
protected void onDestroy() {
super.onDestroy();
mapView.onDestroy();
if(null != mlocationClient){
mlocationClient.onDestroy();
}
}
/**
* 定位成功后回调函数
*/ public void onLocationChanged(AMapLocation arg0) {
// TODO Auto-generated method stub if (mListener != null && arg0 != null) {
if (arg0 != null
&& arg0.getErrorCode() == 0) { mListener.onLocationChanged(arg0);// 显示系统小蓝点 } else {
String errText = "定位失败," + arg0.getErrorCode()+ ": " + arg0.getErrorInfo();
Toast.makeText(this,"定位失败,请点击手动定位",Toast.LENGTH_LONG).show();
Log.e("AmapErr",errText); }
} }
/**
* 激活定位
*/
@Override
public void activate(OnLocationChangedListener arg0) {
// TODO Auto-generated method stub mListener = arg0;
if (mlocationClient == null) {
mlocationClient =new AMapLocationClient(this);
mLocationOption = new AMapLocationClientOption();
//设置定位监听
mlocationClient.setLocationListener(this);
mLocationOption.setInterval(500000);
//设置为高精度定位模式
mLocationOption.setLocationMode(AMapLocationMode.Hight_Accuracy);
//设置定位参数
mlocationClient.setLocationOption(mLocationOption);
// 此方法为每隔固定时间会发起一次定位请求,为了减少电量消耗或网络流量消耗,
// 注意设置合适的定位时间的间隔(最小间隔支持为2000ms),并且在合适时间调用stopLocation()方法来取消定位请求
// 在定位结束后,在合适的生命周期调用onDestroy()方法
// 在单次定位情况下,定位无论成功与否,都无需调用stopLocation()方法移除请求,定位sdk内部会移除
mlocationClient.startLocation();
} }
/**
* 停止定位
*/
@Override
public void deactivate() {
// TODO Auto-generated method stub
mListener = null;
if (mlocationClient != null) {
mlocationClient.stopLocation();
mlocationClient.onDestroy();
}
mlocationClient = null;
} @Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.mapaddress_search:
Intent in=new Intent(this,SearchAddress.class);
startActivityForResult(in,3001);
break;
case R.id.sendlocation:
if(!miaoshu.getText().toString().equals("")){
aMap.getMapScreenShot( this);
}
else{
Toast.makeText(this,"请选择地址后再分享",Toast.LENGTH_LONG).show();
}
break;
case R.id.mapaddress_back:
Intent intent=new Intent();
intent.putExtra("longitude",0);
setResult(6600, intent);
finish();
break;
default:
break;
} }
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
if(!data.getStringExtra("name").equals("")){
LatLng latp=new LatLng(data.getDoubleExtra("latitude",0),data.getDoubleExtra("longitude",0));
aMap.moveCamera(CameraUpdateFactory.newLatLng(latp));
aMap.moveCamera(CameraUpdateFactory.zoomTo(18)); }
} @Override
public void onMapScreenShot(Bitmap arg0) {
// TODO Auto-generated method stub try {
FileOutputStream out = new FileOutputStream(Environment.getExternalStorageDirectory()+"/"+"locationmap.png");
if (null != out) {
arg0.compress(Bitmap.CompressFormat.PNG, 100, out);
out.flush();
out.close();
Toast.makeText(this, "地理位置图片文件已保存至SDCard下", Toast.LENGTH_LONG).show();
Intent intent=new Intent();
intent.putExtra("longitude", longitude);
intent.putExtra("latitude", latitude);
intent.putExtra("name", name.getText().toString());
intent.putExtra("miaoshu", miaoshu.getText().toString());
intent.putExtra("locationimgpath", Environment.getExternalStorageDirectory() + "/" + "locationmap.png");
setResult(6600, intent);
finish();
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
Toast.makeText(this, "没有sdcard或者sdcard不可用", Toast.LENGTH_LONG).show();
} } @Override
public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK
&& event.getRepeatCount() == 0) {
//do something...
Intent intent=new Intent();
intent.putExtra("longitude",0.00);
setResult(6600, intent);
finish();
return true;
}
return super.onKeyDown(keyCode, event);
}
}
MapAddressActivity
package com.changim.app.ui.adapter; import java.util.List; import com.amap.api.services.core.PoiItem;
import com.changim.app.R; import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView; public class AddressAdapter extends BaseAdapter{
private List<PoiItem>tipList;
LayoutInflater flater; Context context; public AddressAdapter (Context context,List<PoiItem> tipList) {
// TODO Auto-generated method stub
flater=LayoutInflater.from(context);
this.tipList=tipList; }
@Override
public int getCount() {
// TODO Auto-generated method stub
return tipList.size();
} @Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return position;
} @Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
} @Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
convertView=flater.inflate(R.layout.mapaddress_left_item,null);
TextView name,miaoshu;
name=(TextView) convertView.findViewById(R.id.mapaddress_left_item_name);
miaoshu=(TextView) convertView.findViewById(R.id.mapaddress_left_item_miaoshu); name.setText(tipList.get(position).getTitle());
miaoshu.setText(tipList.get(position).getSnippet()); if(position==0){
//name.setTextColor(Color.RED);
//miaoshu.setTextColor(Color.RED);
}
return convertView;
} }
AddressAdapter
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp"
android:gravity="center"> <TextView
android:id="@+id/searchaddressname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="gg"
android:textSize="23px"/> <TextView
android:layout_marginTop="15dp"
android:id="@+id/searchaddressmiaoshu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="gg"
android:textSize="16px"/> </LinearLayout>
address_item.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp"> <ImageView
android:layout_width="20dp"
android:layout_height="10dp"
android:layout_gravity="center_vertical"
android:src="@mipmap/gps"/> <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:orientation="vertical" > <TextView
android:id="@+id/mapaddress_left_item_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="gg"
android:textSize="18dp" /> <TextView
android:id="@+id/mapaddress_left_item_miaoshu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="gg"
android:textColor="@android:color/darker_gray"
android:textSize="15dp" /> </LinearLayout>
</LinearLayout>
</LinearLayout>
mapaddress_left_item.xml
package com.changim.app.ui.chat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import com.changim.app.ui.adapter.SearchAddressAdapter;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.TextView; import com.amap.api.maps.AMap;
import com.amap.api.maps.AMap.InfoWindowAdapter;
import com.amap.api.maps.AMap.OnMarkerClickListener;
import com.amap.api.maps.AMapUtils;
import com.amap.api.maps.SupportMapFragment;
import com.amap.api.maps.model.Marker;
import com.amap.api.maps.model.NaviPara;
import com.amap.api.maps.overlay.PoiOverlay;
import com.amap.api.services.core.AMapException;
import com.amap.api.services.core.PoiItem;
import com.amap.api.services.core.SuggestionCity;
import com.amap.api.services.help.Inputtips;
import com.amap.api.services.help.Inputtips.InputtipsListener;
import com.amap.api.services.help.Tip;
import com.amap.api.services.poisearch.PoiResult;
import com.amap.api.services.poisearch.PoiSearch;
import com.amap.api.services.poisearch.PoiSearch.OnPoiSearchListener;
import com.changim.app.R; /**
* AMapV1地图中简单介绍poisearch搜索
*/
public class SearchAddress extends Activity implements
TextWatcher,
OnPoiSearchListener { private AutoCompleteTextView searchText;// 输入搜索关键字
private PoiResult poiResult; // poi返回的结果
private int currentPage = 0;// 当前页面,从0开始计数
private PoiSearch.Query query;// Poi查询条件类
private PoiSearch poiSearch;// POI搜索
private ListView lv;
private List<Tip> list; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.address);
searchText = (AutoCompleteTextView) findViewById(R.id.searchaddress);
lv=(ListView) findViewById(R.id.address_list);
searchText.addTextChangedListener(this);// 添加文本输入框监听事件 lv.setOnItemClickListener(new OnItemClickListener() { @Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// TODO Auto-generated method stub
System.out.println("00000000000000000000000");
System.out.println(list.get(position).getName());
System.out.println(list.get(position).getPoiID());
System.out.println(list.get(position).getPoint());
System.out.println(list.get(position).getAdcode());
Intent intent=new Intent(SearchAddress.this,MapAddress.class);
intent.putExtra("name",list.get(position).getName());
intent.putExtra("miaoshu",list.get(position).getDistrict());
intent.putExtra("latitude",list.get(position).getPoint().getLatitude());
intent.putExtra("longitude",list.get(position).getPoint().getLongitude());
setResult(3001,intent);
finish();
}
}); } public void afterTextChanged(Editable s) { } public void beforeTextChanged(CharSequence s, int start, int count,
int after) { } @Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
String newText = s.toString().trim();
Inputtips inputTips = new Inputtips(SearchAddress.this,
new InputtipsListener() { @Override
public void onGetInputtips(List<Tip> tipList, int rCode) {
if (rCode == 0) {// 正确返回
//List<String> listString = new ArrayList<String>(); /*for (int i = 0; i < tipList.size(); i++) { listString.add(tipList.get(i).getDistrict()); }*/
list=tipList;
SearchAddressAdapter adapter=new SearchAddressAdapter(SearchAddress.this, tipList);
lv.setAdapter(adapter);
adapter.notifyDataSetChanged();
}
}
});
try {
inputTips.requestInputtips(newText,"成都");// 第一个参数表示提示关键字,第二个参数默认代表全国,也可以为城市区号 } catch (AMapException e) {
e.printStackTrace();
}
} @Override
public void onPoiSearched(PoiResult arg0, int arg1) {
// TODO Auto-generated method stub } @Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
Intent intent=new Intent(SearchAddress.this,MapAddress.class);
intent.putExtra("name","");
setResult(3001,intent);
finish();
return super.onKeyDown(keyCode, event);
} }
SearchAddress
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="#00b4ef"
android:orientation="horizontal" > <ImageButton
android:id="@+id/mapaddress_back"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="4"
android:background="#00000000"
android:src="@mipmap/left_back" /> <LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:orientation="horizontal"
android:layout_weight="2"
android:background="@drawable/fillet"> <ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@mipmap/seek"
android:layout_marginLeft="5dp"/> <AutoCompleteTextView
android:id="@+id/searchaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5.0dip"
android:background="@null"
android:completionThreshold="1"
android:dropDownVerticalOffset="1.0dip"
android:hint="请输入关键字"
android:imeOptions="actionDone"
android:inputType="text|textAutoComplete"
android:maxLength="20"
android:paddingRight="37.0dip"
android:singleLine="true"
android:textColor="#000000"
android:textSize="16.0sp" /> </LinearLayout> <Button
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="3.5"
android:layout_marginLeft="10dp"
android:layout_marginTop="8dp"
android:layout_marginRight="5dp"
android:layout_marginBottom="8dp"
android:layout_gravity="center_vertical"
android:textSize="20dp"
android:textColor="@android:color/white"
android:background="@drawable/sure"
android:text="取消"/> </LinearLayout> <ListView
android:id="@+id/address_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView> </LinearLayout>
address.xml
QQ发送位置(高德地图)的更多相关文章
- 高德地图 API 计算两个城市之间的距离
1. 目前在项目中,遇到一个需求不会做,就是要计算两个城市之间的距离,而这两个城市的输入是可变的,如果要使用数据库来先存储两地之间的距离,调用的时候再来调用,那么存数据的时候,要哭的,因为光是省级区域 ...
- iOS的高德地图标注特定位置
在开发时有时候遇到项目里面需要展示公司的位置,这时如果导入百度地图什么的就太浪费资源,而且还占内存 这时只要调用自动高德地图的就行了 自己写一个控制器,导入框架 现在导入系统框架只要多打次就能出来了, ...
- H5高德地图获取当前位置
<!doctype html> <html> <head> <meta charset="utf-8"> <meta http ...
- 高德地图web端笔记;发送http请求的工具类
1.查询所有电子围栏 package com.skjd.util; import java.io.BufferedReader; import java.io.InputStream; import ...
- 安卓开发笔记①:利用高德地图API进行定位、开发电子围栏、天气预报、轨迹记录、搜索周边(位置)
高德地图开发时需要导入的包在下面的网盘链接中:(由于高德地图api更新得太快,官网上最新的包使用起来没有之前的方便,所以以下提供最全面的原始包) 链接:http://pan.baidu.com/s/1 ...
- 根据HTML5 获取当前位置的经纬度【百度地图】【高德地图】
是想让地图的定位用户位置更准确一些. 查看了介绍: http://www.w3school.com.cn/html5/html_5_geolocation.asp 看介绍中拿数据挺简单. <!D ...
- 利用百度地图Android sdk高仿微信发送位置功能
接触了百度地图开发平台半个月了,这2天试着模仿了微信给好友发送位置功能,对百度地图的操作能力又上了一个台阶 (假设须要完整demo.请评论留下邮箱) (眼下源代码已经不发送,假设须要源代码.加qq31 ...
- 【krpano】高德地图导航插件(源码+介绍+预览)
简介 krpano可以利用js调用第三方网页版地图,因此可以实现导航效果,用来帮助用户导航到我们全景所在的位置. 效果截图如下,在手机端点击左侧按钮,便会对用户进行定位,跳转至高德地图进行导航 ...
- java servlet手机app访问接口(三)高德地图云存储及检索
这篇关于高德地图的随笔内容会多一点, 一.业务说明 对应APP业务中的成员有两类,一是服务人员,二是被服务人员, 主要实现功能, 对APP中的服务人员位置进行时时定位, 然后通过被服务人员登 ...
随机推荐
- 经典书Discrete.Mathematics上的大神
版权声明:本文作者靖心,靖空间地址:http://blog.csdn.net/kenden23/,未经本作者同意不得转载. https://blog.csdn.net/kenden23/article ...
- 汽车数据的可视化分析(R)
数据下载:http://www.fueleconomy.gov/feg/epadata/vehicles.csv.zip 将数据导入R中, 1.首先将工作路径设定到本地保存了vehicles.csv的 ...
- requirejs源码分析: define 方法
define = function (name, deps, callback) { var node, context; //Allow for anonymous modules ...
- volume不能挂载mysql permission denied问题
参考 把玩jenkins docker镜像遇到的volume权限问题 docker run -d -v /root/jenkins:/var/jenkins_home -u 0 -P --name j ...
- Incomplete response received from application
RAILS_ENV=production rake secret 将输出的一大串字码粘贴到rails工程中/config/secrets.yml去,替换掉该文件中的<%= ENV["S ...
- Jquery.ScrollLoading图片延迟加载技术
关于分屏加载图片,像天猫.京东等电商图片较多页面很长,就采用了延迟加载技术. 目前很流行的做法就是滚动动态加载,显示屏幕之外的图片默认是不加载的, 随着页面的滚动,显示区域图片才被动态加载. 原理其实 ...
- C# Xml Linq XDocument 基本操作 -- 重新学习
person.xml <?xml version="1.0" encoding="utf-8"?> <MyP> <P1> & ...
- javascript;select动态添加和删除option
<select id="sltCity"></select> //添加Option. var optionObj = new Option(text, va ...
- 如何选择合适的Linux系统进行桌面程序开发?
32 or 64 ? 众所周知,64位的Windows系统可以近乎完美地运行32位的应用程序,微软出于商业考虑做了这样一个兼容层.而Linux系统则划分的很清楚,默认情况下64位的Linux系统无法运 ...
- HibernateQL
查询语言---QL(Query Language) NativeSQL-------功能最强大 HQL--Hibernate QL EJB QL (JP QL)---HQL的一个子集 QBC--- ...