WEB开发网
开发学院手机开发Android 开发 Android 数据库与MapView总结 阅读

Android 数据库与MapView总结

 2010-11-05 00:54:34 来源:WEB开发网   
核心提示:(gp,R.drawable.hipposmall);List overlays = mMapView01.getOverlays();overlays.add(mLocationOverlay01);}@Overrideprotected boolean isRouteDisplayed() {// TODO Aut

(

gp,

R.drawable.hipposmall

);

List overlays = mMapView01.getOverlays();

overlays.add(mLocationOverlay01);

}

@Override

protected boolean isRouteDisplayed() {

// TODO Auto-generated method stub

return false;

}

}

5。工具方法:

Java代码

package irdc.ex10_06;

import android.graphics.Bitmap;

import android.graphics.BitmapFactory;

import android.graphics.Canvas;

import android.graphics.Paint;

import android.graphics.Point;

import android.location.Location;

import com.google.android.maps.GeoPoint;

import com.google.android.maps.MapView;

import com.google.android.maps.Overlay;

import com.google.android.maps.Projection;

public class GeoPointImageOverlay extends Overlay

{

private Location mLocation;

private int drawableID;

private double geoLatitude,geoLongitude;

/* 建构方法一,传入Location对象 */

public GeoPointImageOverlay(Location location, int drawableID)

{

this.mLocation = location;

this.drawableID = drawableID;

/* 取得Location的经纬度 */

this.geoLatitude = this.mLocation.getLatitude()*1E6;

this.geoLongitude = this.mLocation.getLongitude()*1E6;

}

public GeoPointImageOverlay

(Double geoLatitude, Double geoLongitude, int drawableID)

{

this.geoLatitude = geoLatitude*1E6;

this.geoLongitude = geoLongitude*1E6;

this.drawableID = drawableID;

}

public GeoPointImageOverlay(GeoPoint gp, int drawableID)

{

this.geoLatitude = gp.getLatitudeE6();

this.geoLongitude = gp.getLongitudeE6();

上一页  21 22 23 24 25 26 27 28 29 30 31  下一页

Tags:Android 数据库 MapView

编辑录入:coldstar [复制链接] [打 印]
赞助商链接