Examples of GeoLocation


Examples of com.google.api.ads.adwords.axis.v201406.cm.GeoLocation

    GeoLocationSelector selector = new GeoLocationSelector();
    selector.setAddresses(new Address[] {address});

    // Get geo location.
    GeoLocation[] geoLocationResult = geoLocationService.get(selector);
    GeoLocation geoLocation = geoLocationResult[0];

    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(geoLocation.getAddress());
    locationExtension.setGeoPoint(geoLocation.getGeoPoint());
    locationExtension.setEncodedLocation(geoLocation.getEncodedLocation());
    locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

    // You can optionally provide these field(s).
    locationExtension.setCompanyName("Google");
    locationExtension.setPhoneNumber("650-253-0000");
View Full Code Here

Examples of com.google.api.adwords.v201008.cm.GeoLocation

    GeoLocationSelector selector = new GeoLocationSelector();
    selector.setAddresses(new Address[] {address});

    // Get geo location.
    GeoLocation[] geoLocationResult = geoLocationService.get(selector);
    GeoLocation geoLocation = geoLocationResult[0];

    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(geoLocation.getAddress());
    locationExtension.setGeoPoint(geoLocation.getGeoPoint());
    locationExtension.setEncodedLocation(geoLocation.getEncodedLocation());
    locationExtension.setCompanyName("Google");
    locationExtension.setPhoneNumber("650-253-0000");
    locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

    // Create campaign ad extension.
View Full Code Here

Examples of com.google.api.adwords.v201306.cm.GeoLocation

      GeoLocationSelector selector = new GeoLocationSelector();
      selector.setAddresses(new Address[] {address});

      // Get geo location.
      GeoLocation[] geoLocationResult = geoLocationService.get(selector);
      GeoLocation geoLocation = geoLocationResult[0];

      // Create location extension.
      LocationExtension locationExtension = new LocationExtension();
      locationExtension.setAddress(geoLocation.getAddress());
      locationExtension.setGeoPoint(geoLocation.getGeoPoint());
      locationExtension.setEncodedLocation(geoLocation.getEncodedLocation());
      locationExtension.setCompanyName("Google");
      locationExtension.setPhoneNumber("650-253-0000");
      locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

      // Create campaign ad extension.
View Full Code Here

Examples of com.google.gwt.geolocation.client.Geolocation

    public void getCurrentPosition(final LocationCallback callback) {
        GoogleMapBootstrapper.whenReady(new Runnable() {

            @Override
            public void run() {
                Geolocation geolocation = Geolocation.getIfSupported();
                if (geolocation != null) {
                    geolocation.getCurrentPosition(new Callback<Position, PositionError>() {

                        @Override
                        public void onSuccess(Position result) {
                            callback.onSuccess(convertResult(result));
                        }
View Full Code Here

Examples of com.google.gwt.geolocation.client.Geolocation

    public void watchPosition(final LocationCallback callback) {
        GoogleMapBootstrapper.whenReady(new Runnable() {

            @Override
            public void run() {
                Geolocation geolocation = Geolocation.getIfSupported();
                if (geolocation != null) {
                    geolocation.watchPosition(new Callback<Position, PositionError>() {
                        @Override
                        public void onSuccess(Position result) {
                            callback.onSuccess(convertResult(result));
                        }
View Full Code Here

Examples of com.google.gwt.geolocation.client.Geolocation

  @Inject
  protected Event<GeoLocationEvent> geoLocationEventSource;

  @PostConstruct
  public void init() {
    Geolocation geolocation = Geolocation.getIfSupported();
    if (geolocation != null) {
      geolocation.watchPosition(new Callback<Position, PositionError>() {
        @Override
        public void onFailure(PositionError reason) {
          //TODO handle error
        }
View Full Code Here

Examples of com.google.gwt.geolocation.client.Geolocation

  public void getCurrentPosition(final LocationCallback callback) {
    GoogleMapBootstrapper.whenReady(new Runnable() {

      @Override
      public void run() {
        Geolocation geolocation = Geolocation.getIfSupported();
        if (geolocation != null) {
          geolocation.getCurrentPosition(new Callback<Position, PositionError>() {

            @Override
            public void onSuccess(Position result) {
              callback.onSuccess(convertResult(result));
            }
View Full Code Here

Examples of com.google.gwt.geolocation.client.Geolocation

  public void watchPosition(final LocationCallback callback) {
    GoogleMapBootstrapper.whenReady(new Runnable() {

      @Override
      public void run() {
        Geolocation geolocation = Geolocation.getIfSupported();
        if (geolocation != null) {
          geolocation.watchPosition(new Callback<Position, PositionError>() {
            @Override
            public void onSuccess(Position result) {
              callback.onSuccess(convertResult(result));
            }
View Full Code Here

Examples of com.matussek.geo.GeoLocation

    public static String getSatelliteStateJSON()
    {
  long now = System.currentTimeMillis() - timeDifference;
  extSat.setTime(now);
  GeoLocation groundPoint = extSat.getGroundPoint();
  // feed.ISS [{"key":"ISS","points":[{"latitude":42.362512004571265,"longitude":-71.07954331157089,"altitude":10}]}]
  StringBuilder sb = new StringBuilder();
  sb.append("[{\"key\":\"ISS\",\"points\":[[0.0,");
  sb.append(NF3.format(Math.toDegrees(groundPoint.getLat())));
  sb.append(",");
  sb.append(NF3.format(Math.toDegrees(groundPoint.getLon())));
  sb.append(",");
  sb.append(NF0.format(extSat.getAltitude() * 0.001D));
  sb.append("]]}]");
  return sb.toString();
    }
View Full Code Here

Examples of com.matussek.geo.GeoLocation

/*     */
/*     */   public String getSatelliteStateJSON()
/*     */   {
/* 116 */     long now = System.currentTimeMillis() - this.timeDifference;
/* 117 */     this.extSat.setTime(now);
/* 118 */     GeoLocation groundPoint = this.extSat.getGroundPoint();
/* 119 */     StringBuilder sb = new StringBuilder();
/* 120 */     sb.append('[');
/* 121 */     sb.append(now / 1000L);
/* 122 */     sb.append(',');
/* 123 */     sb.append(NF3.format(Math.toDegrees(groundPoint.getLon())));
/* 124 */     sb.append(',');
/* 125 */     sb.append(NF3.format(Math.toDegrees(groundPoint.getLat())));
/* 126 */     sb.append(',');
/* 127 */     sb.append(NF0.format(this.extSat.getAltitude() * 0.001D));
/* 128 */     sb.append(',');
/* 129 */     sb.append(NF0.format(this.extSat.getSpeed()));
/* 130 */     sb.append(']');
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.