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; /*ww w . j a v a 2 s . c o m*/ import android.graphics.Point; import com.dennytech.smartmap.IGeoPoint; import com.dennytech.smartmap.IProjection; import com.google.android.maps.GeoPoint; import com.google.android.maps.Projection; public class GoogleProjection implements IProjection { Projection real; public GoogleProjection wrap(Projection p) { real = p; return this; } @Override public Projection real() { return real; } @Override public IGeoPoint fromPixels(int x, int y) { return new GoogleGeoPoint().wrap(real.fromPixels(x, y)); } @Override public float metersToPixels(float meters) { return real.metersToEquatorPixels(meters); } @Override public float metersToPixels(float meters, byte zoom) { return real.metersToEquatorPixels(meters); } @Override public Point toPixels(IGeoPoint in, Point out) { return real.toPixels((GeoPoint) in.real(), out); } @Override public Point toPoint(IGeoPoint in, Point out, byte zoom) { return real.toPixels((GeoPoint) in.real(), out); } }