Back to project page SmartMap.
The source code is released under:
Apache License
If you think the Android project SmartMap listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.dennytech.smartmap.impl.google; /* www. j av a 2s . c om*/ import com.dennytech.smartmap.IGeoPoint; import com.google.android.maps.GeoPoint; public class GoogleGeoPoint implements IGeoPoint { GeoPoint realGP; public GoogleGeoPoint() { } public GoogleGeoPoint(GeoPoint geoPoint) { realGP = geoPoint; } public GoogleGeoPoint(int latitudeE6, int longitudeE6) { realGP = new GeoPoint(latitudeE6, longitudeE6); } public GoogleGeoPoint wrap(GeoPoint gp) { realGP = gp; return this; } @Override public Object real() { return realGP; } public int getLatitudeE6() { if (realGP != null) { return realGP.getLatitudeE6(); } return 0; } public int getLongitudeE6() { if (realGP != null) { return realGP.getLongitudeE6(); } return 0; } @Override public boolean equals(Object o) { if (o instanceof IGeoPoint) { return realGP.getLatitudeE6() == ((IGeoPoint) o).getLatitudeE6() && realGP.getLongitudeE6() == ((IGeoPoint) o) .getLongitudeE6(); } return super.equals(o); } @Override public String toString() { if (realGP != null) { return realGP.toString(); } return super.toString(); } }