Codota Logo
GeoPoint.<init>
Code IndexAdd Codota to your IDE (free)

How to use
com.google.android.maps.GeoPoint
constructor

Best Java code snippets using com.google.android.maps.GeoPoint.<init> (Showing top 15 results out of 315)

  • Common ways to obtain GeoPoint
private void myMethod () {
GeoPoint g =
  • Codota Iconnew GeoPoint(int1, int2)
  • Smart code suggestions by Codota
}
origin: ybonnel/TransportsRennes

public GeoPoint toGeoPoint() {
  return new GeoPoint((int)(x*1.0E6), (int)(y*1.0E6));
}

origin: ybonnel/TransportsRennes

public GeoPoint toGeoPoint() {
  return new GeoPoint((int)(x*1.0E6), (int)(y*1.0E6));
}

origin: org.robolectric/shadows-maps

@Implementation
public com.google.android.maps.Projection getProjection() {
 if (projection == null) {
  projection = new Projection() {
   @Override public Point toPixels(GeoPoint geoPoint, Point point) {
    if (point == null) {
     point = new Point();
    }
    point.y = scaleDegree(geoPoint.getLatitudeE6(), realView.getBottom(), realView.getTop(), mapCenter.getLatitudeE6(), latitudeSpan);
    point.x = scaleDegree(geoPoint.getLongitudeE6(), realView.getLeft(), realView.getRight(), mapCenter.getLongitudeE6(), longitudeSpan);
    return point;
   }
   @Override public GeoPoint fromPixels(int x, int y) {
    int lat = scalePixel(y, realView.getBottom(), -realMapView.getHeight(), mapCenter.getLatitudeE6(), latitudeSpan);
    int lng = scalePixel(x, realView.getLeft(), realMapView.getWidth(), mapCenter.getLongitudeE6(), longitudeSpan);
    return new GeoPoint(lat, lng);
   }
   @Override public float metersToEquatorPixels(float v) {
    return 0;
   }
  };
 }
 return projection;
}
origin: ybonnel/TransportsRennes

public void addOverlay(IStation station) {
  int latitude = (int) (station.getLatitude() * 1.0E6);
  int longitude = (int) (station.getLongitude() * 1.0E6);
  StationOverlay overlay =
      new StationOverlay(new GeoPoint(latitude, longitude), String.valueOf(station.getBikesAvailables()),
          String.valueOf(station.getSlotsAvailables()));
  mOverlays.add(overlay);
  stations.add(station);
  populate();
}
origin: org.robolectric/shadows-maps

@Override public GeoPoint fromPixels(int x, int y) {
 int lat = scalePixel(y, realView.getBottom(), -realMapView.getHeight(), mapCenter.getLatitudeE6(), latitudeSpan);
 int lng = scalePixel(x, realView.getLeft(), realMapView.getWidth(), mapCenter.getLongitudeE6(), longitudeSpan);
 return new GeoPoint(lat, lng);
}
origin: ybonnel/TransportsRennes

float longitudeLineDistance = result[0];
GeoPoint leftGeo = new GeoPoint((int) (latitude * 1e6), (int) ((longitude - accuracy
    / longitudeLineDistance) * 1e6));
projection.toPixels(leftGeo, left);
origin: GeoODK/collect

@Override
public void onLocationChanged(Location location) {
  if (mCaptureLocation) {
    mLocation = location;
    if (mLocation != null) {
      // Bug report: cached GeoPoint is being returned as the first value.
      // Wait for the 2nd value to be returned, which is hopefully not cached?
      ++mLocationCount;
      InfoLogger.geolog("GeoPointMapActivity: " + System.currentTimeMillis() +
           " onLocationChanged(" + mLocationCount + ") lat: " +
           mLocation.getLatitude() + " long: " +
           mLocation.getLongitude() + " acc: " +
           mLocation.getAccuracy() );
      if (mLocationCount > 1) {
        mLocationStatus.setText(getString(R.string.location_provider_accuracy,
            mLocation.getProvider(), truncateFloat(mLocation.getAccuracy())));
        mGeoPoint =
          new GeoPoint((int) (mLocation.getLatitude() * 1E6),
              (int) (mLocation.getLongitude() * 1E6));
        mMapController.animateTo(mGeoPoint);
        if (mLocation.getAccuracy() <= mLocationAccuracy) {
          returnLocation();
        }
      }
    } else {
      InfoLogger.geolog("GeoPointMapActivity: " + System.currentTimeMillis() +
           " onLocationChanged(" + mLocationCount + ") null location");
    }
  }
}
origin: ybonnel/TransportsRennes

  int latitude = (int) (cursor.getDouble(cursor.getColumnIndex("latitude")) * 1.0E6);
  int longitude = (int) (cursor.getDouble(cursor.getColumnIndex("longitude")) * 1.0E6);
  GeoPoint geoPoint = new GeoPoint(latitude, longitude);
  if (latitude < minLatitude) {
    minLatitude = latitude;
mc.animateTo(new GeoPoint((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));
mc.setZoom(14);
origin: ybonnel/TransportsRennes

  maxLongitude = Math.max(longitude, maxLongitude);
  minLongitude = Math.min(longitude, minLongitude);
  OverlayItem item = new OverlayItem(new GeoPoint(latitude, longitude), portion.getFromName(), null);
  itemizedOverlay.addOverlay(item);
  mapOverlays.add(itemizedOverlay);
maxLongitude = Math.max(longitude, maxLongitude);
minLongitude = Math.min(longitude, minLongitude);
OverlayItem item = new OverlayItem(new GeoPoint(latitude, longitude), portion.getToName(), null);
itemizedOverlay.addOverlay(item);
mapOverlays.add(itemizedOverlay);
mapOverlays.add(lineItemizedOverlay);
mc.animateTo(new GeoPoint((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));
origin: ybonnel/TransportsRennes

  int latitude = (int) (parkRelai.latitude * 1.0E6);
  int longitude = (int) (parkRelai.longitude * 1.0E6);
  GeoPoint geoPoint = new GeoPoint(latitude, longitude);
  if (latitude < minLatitude) {
    minLatitude = latitude;
mc.animateTo(new GeoPoint((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));
mc.setZoom(14);
origin: ybonnel/TransportsRennes

    minLongitude = longitude;
  OverlayItem item = new OverlayItem(new GeoPoint(latitude, longitude), portion.getFromName(), null);
  itemizedOverlay.addOverlay(item);
  mapOverlays.add(itemizedOverlay);
  minLongitude = longitude;
OverlayItem item = new OverlayItem(new GeoPoint(latitude, longitude), portion.getToName(), null);
itemizedOverlay.addOverlay(item);
mapOverlays.add(itemizedOverlay);
mapOverlays.add(lineItemizedOverlay);
mc.animateTo(new GeoPoint((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));
origin: GeoODK/collect

if ( intent.hasExtra(GeoPointWidget.LOCATION) ) {
  double[] location = intent.getDoubleArrayExtra(GeoPointWidget.LOCATION);
  mGeoPoint = new GeoPoint((int) (location[0] * 1E6), (int) (location[1] * 1E6));
origin: ybonnel/TransportsRennes

  int latitude = (int) (pointDeVente.latitude * 1.0E6);
  int longitude = (int) (pointDeVente.longitude * 1.0E6);
  GeoPoint geoPoint = new GeoPoint(latitude, longitude);
  if (pointDeVente.longitude > -2.0) {
    if (latitude < minLatitude) {
mc.animateTo(new GeoPoint((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));
mc.setZoom(14);
origin: ybonnel/TransportsRennes

  int latitude = (int) (parkRelai.latitude * 1.0E6);
  int longitude = (int) (parkRelai.longitude * 1.0E6);
  GeoPoint geoPoint = new GeoPoint(latitude, longitude);
  if (latitude < minLatitude) {
    minLatitude = latitude;
mc.animateTo(new GeoPoint((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));
mc.setZoom(14);
origin: ybonnel/TransportsRennes

mc.animateTo(new GeoPoint((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));
mc.setZoom(14);
com.google.android.mapsGeoPoint<init>

Popular methods of GeoPoint

  • getLatitudeE6
  • getLongitudeE6
  • destinationPoint
  • equals
  • hashCode

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now