Android Open Source - SmartMap I Projection






From Project

Back to project page SmartMap.

License

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.

Java Source Code

package com.dennytech.smartmap;
/*www  . ja v  a  2 s  .co m*/
import android.graphics.Point;

public interface IProjection {

  public Object real();

  /**
   * Translates the given screen coordinates to a {@link NVGeoPoint}. If the
   * corresponding MapView has no valid dimensions (width and height > 0),
   * null is returned.
   * 
   * @param x
   *            the pixel x coordinate on the screen.
   * @param y
   *            the pixel y coordinate on the screen.
   * @return a new {@link NVGeoPoint} or null, if the corresponding MapView has
   *         no valid dimensions.
   */
  IGeoPoint fromPixels(int x, int y);

  /**
   * Converts the given distance in meters to the corresponding number of
   * horizontal pixels. The calculation is carried out at the current latitude
   * coordinate and zoom level.
   * 
   * @param meters
   *            the distance in meters.
   * @return the number of pixels at the current map position and zoom level.
   */
  float metersToPixels(float meters);

  /**
   * Converts the given distance in meters at the given zoom level to the
   * corresponding number of horizontal pixels. The calculation is carried out
   * at the current latitude coordinate.
   * 
   * @param meters
   *            the distance in meters.
   * @param zoom
   *            the zoom level at which the distance should be calculated.
   * @return the number of pixels at the current map position and the given
   *         zoom level.
   */
  float metersToPixels(float meters, byte zoom);

  /**
   * Translates the given {@link NVGeoPoint} to relative pixel coordinates on
   * the screen. If the corresponding MapView has no valid dimensions (width
   * and height > 0), null is returned.
   * 
   * @param in
   *            the geographical point to convert.
   * @param out
   *            an already existing object to use for the output. If this
   *            parameter is null, a new Point object will be created and
   *            returned.
   * @return a Point which is relative to the top-left of the MapView or null,
   *         if the corresponding MapView has no valid dimensions.
   */
  Point toPixels(IGeoPoint in, Point out);

  /**
   * Translates the given {@link NVGeoPoint} to absolute pixel coordinates on
   * the world map.
   * 
   * @param in
   *            the geographical point to convert.
   * @param out
   *            an already existing object to use for the output. If this
   *            parameter is null, a new Point object will be created and
   *            returned.
   * @param zoom
   *            the zoom level at which the point should be converted.
   * @return a Point which is relative to the top-left of the world map.
   */
  Point toPoint(IGeoPoint in, Point out, byte zoom);
}




Java Source Code List

com.dennytech.smartmap.IGeoPoint.java
com.dennytech.smartmap.IItemizedOverlay.java
com.dennytech.smartmap.IMapController.java
com.dennytech.smartmap.IMapFragment.java
com.dennytech.smartmap.IMapViewLayoutParams.java
com.dennytech.smartmap.IMapView.java
com.dennytech.smartmap.IMyLocationOverlay.java
com.dennytech.smartmap.IOverlayItem.java
com.dennytech.smartmap.IOverlay.java
com.dennytech.smartmap.IProjection.java
com.dennytech.smartmap.ItemizedOverlayCallBack.java
com.dennytech.smartmap.MapUtils.java
com.dennytech.smartmap.MapViewCallback.java
com.dennytech.smartmap.OverlayCallBack.java
com.dennytech.smartmap.SMItemizedOverlay.java
com.dennytech.smartmap.SMMapFragment.java
com.dennytech.smartmap.SMMyLocationOverlay.java
com.dennytech.smartmap.SMOverlay.java
com.dennytech.smartmap.impl.autonavi.ANGeoPoint.java
com.dennytech.smartmap.impl.autonavi.ANItemizedOverlay.java
com.dennytech.smartmap.impl.autonavi.ANMapActivity.java
com.dennytech.smartmap.impl.autonavi.ANMapController.java
com.dennytech.smartmap.impl.autonavi.ANMapViewLayoutParams.java
com.dennytech.smartmap.impl.autonavi.ANMapView.java
com.dennytech.smartmap.impl.autonavi.ANMyLocationOverlay.java
com.dennytech.smartmap.impl.autonavi.ANOverlayItem.java
com.dennytech.smartmap.impl.autonavi.ANOverlay.java
com.dennytech.smartmap.impl.autonavi.ANProjection.java
com.dennytech.smartmap.impl.autonavi.myANMapView.java
com.dennytech.smartmap.impl.google.GoogleGeoPoint.java
com.dennytech.smartmap.impl.google.GoogleItemizedOverlay.java
com.dennytech.smartmap.impl.google.GoogleMapActivity.java
com.dennytech.smartmap.impl.google.GoogleMapController.java
com.dennytech.smartmap.impl.google.GoogleMapView.java
com.dennytech.smartmap.impl.google.GoogleMyLocationOverlay.java
com.dennytech.smartmap.impl.google.GoogleOverlayItem.java
com.dennytech.smartmap.impl.google.GoogleOverlay.java
com.dennytech.smartmap.impl.google.GoogleProjection.java
com.dennytech.smartmap.impl.google.myGoogleMapView.java