Examples of Placemark


Examples of com.google.gwt.maps.client.geocode.Placemark

        GWT.log("Successfully loaded directions.", null);

        // A little exercise of the route API
        List<Route> routes = result.getRoutes();
        for (Route r : routes) {
          Placemark start = r.getStartGeocode();
          GWT.log("start of route: " + start.getAddress(), null);
          Placemark end = r.getEndGeocode();
          GWT.log("end of route: " + end.getAddress(), null);
        }
      }
    });
  }
View Full Code Here

Examples of com.google.gwt.maps.client.geocode.Placemark

      public void onFailure(int statusCode) {
        Window.alert("Sorry, we were unable to geocode that address");
      }

      public void onSuccess(JsArray<Placemark> locations) {
        Placemark place = locations.get(0);
        Marker marker = new Marker(place.getPoint());
        map.addOverlay(marker);
        String message = place.getAddress() + "<br>" + "<b>Country code:</b> "
            + place.getCountry();
        info.open(marker, new InfoWindowContent(message));
      }
    });
  }
View Full Code Here

Examples of com.google.gwt.maps.client.geocode.Placemark

                + StatusCodes.getName(statusCode));
          }

          public void onSuccess(JsArray<Placemark> locations) {
            for (int i = 0; i < locations.length(); ++i) {
              Placemark location = locations.get(i);
              StringBuilder value = new StringBuilder();
              if (location.getAddress() != null) {
                value.append(location.getAddress());
              } else {
                if (location.getCity() != null) {
                  value.append(location.getCity());
                }
                if (location.getAdministrativeArea() != null) {
                  value.append(location.getAdministrativeArea() + ", ");
                }
                if (location.getCountry() != null) {
                  value.append(location.getCountry());
                }
              }
              int ordinal = (i + 1);
              panel.add(new Label("  " + ordinal + ") " + value.toString()));
            }
View Full Code Here

Examples of com.google.gwt.maps.client.geocode.Placemark

    }

    @Override
    public void onSuccess(JsArray<Placemark> locations) {
      if (locations.length() > 0) {
        Placemark placemark = locations.get(0);
        LatLng p = placemark.getPoint();
        String name = URL.encode(_query);
        String lat = URL.encode(Double.toString(p.getLatitude()));
        String lon = URL.encode(Double.toString(p.getLongitude()));
        Window.Location.replace("set-default-location.action?name=" + name
            + "&lat=" + lat + "&lon=" + lon);
View Full Code Here

Examples of com.google.gwt.maps.client.geocode.Placemark

  @Override
  public void onSuccess(JsArray<Placemark> placemarks) {

    for (int i = 0; i < placemarks.length(); i++) {
      Placemark mark = placemarks.get(i);
      Place place = getPlacemarkAsPlace(mark);
      _addresses.add(place);
      System.out.println("address=" + place);
    }
View Full Code Here

Examples of com.google.gwt.maps.client.geocode.Placemark

    @Override
    public void onSuccess(JsArray<Placemark> locations) {

      if (locations.length() > 0) {

        Placemark placemark = locations.get(0);
        LatLng p = placemark.getPoint();

        String name = placemark.getAddress();
        double lat = p.getLatitude();
        double lon = p.getLongitude();

        UserContext context = UserContext.getContext();
        context.setDefaultSearchLocationForCurrentUser(name, lat, lon, false,
View Full Code Here

Examples of com.google.gwt.maps.client.geocode.Placemark

      _from = from;
    }

    public void onSuccess(JsArray<Placemark> locations) {
      if (locations.length() == 1) {
        Placemark mark = locations.get(0);
        LatLng point = mark.getPoint();
        if (_from) {
          _fromPoint = point;
        } else {
          _toPoint = point;
        }
View Full Code Here

Examples of com.google.gwt.maps.client.geocode.Placemark

    public void onSuccess(JsArray<Placemark> placemarks) {

      List<Placemark> inBounds = new ArrayList<Placemark>(placemarks.length());

      for (int i = 0; i < placemarks.length(); i++) {
        Placemark mark = placemarks.get(i);
        System.out.println("  " + mark.getAddress());
        if (_view == null || _view.containsLatLng(mark.getPoint()))
          inBounds.add(mark);
      }

      if (inBounds.size() == 0) {
        _listener.setNoQueryLocations();
      } else if (inBounds.size() == 1) {
        Placemark mark = inBounds.get(0);
        LatLng point = mark.getPoint();
        _listener.setQueryLocation(point);
      } else {
        _listener.setTooManyQueryLocations(inBounds);
      }
    }
View Full Code Here

Examples of com.google.gwt.maps.client.geocode.Placemark

    }

    public void onSuccess(JsArray<Placemark> placemarks) {

      for (int i = 0; i < placemarks.length(); i++) {
        Placemark mark = placemarks.get(i);
        addPlace(new PlacemarkPlaceImpl(mark));
      }

      handleResult(false);
    }
View Full Code Here

Examples of com.googlecode.libkml.Placemark

    Point point = factory.CreatePoint();
    point.set_id("pt0");
    point.set_coordinates(coordinates);

    // <Placemark id="pm123"><name>my place</name>...
    Placemark placemark = factory.CreatePlacemark();
    placemark.set_name("my placemark");
    placemark.set_id("pm123");
    placemark.set_geometry(point);

    // <kml>...
    Kml kml = factory.CreateKml();
    kml.set_feature(placemark);
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.