Examples of GeocoderRequest


Examples of com.google.code.geocoder.model.GeocoderRequest

        if (latlng == null) {
            latlng = endpoint.getLatlng();
        }

        if (latlng != null) {
            GeocoderRequest req = new GeocoderRequest();
            req.setLanguage(endpoint.getLanguage());

            String lat = ObjectHelper.before(latlng, ",");
            String lng = ObjectHelper.after(latlng, ",");
            req.setLocation(new LatLng(lat, lng));

            LOG.debug("Geocode for lat/lng {}", latlng);
            GeocodeResponse res = geocoder.geocode(req);
            LOG.debug("Geocode response {}", res);

            if (res != null) {
                extractGeoResult(res, exchange);
            }
        } else if (address != null) {

            // is it current address
            if ("current".equals(address)) {
                processCurrentLocation(exchange);
            } else {
                LOG.debug("Geocode for address {}", address);
                GeocoderRequest req = new GeocoderRequest(address, endpoint.getLanguage());
                GeocodeResponse res = geocoder.geocode(req);
                LOG.debug("Geocode response {}", res);

                if (res != null) {
                    extractGeoResult(res, exchange);
View Full Code Here

Examples of com.google.code.geocoder.model.GeocoderRequest

            address.append(" ").append(nodeWrapper.getProperty("j:country").getString());
        }
        if (!nodeWrapper.isNodeType("jnt:location") && !nodeWrapper.isNodeType("jmix:geotagged")) {
            nodeWrapper.addMixin("jmix:geotagged");
        }
        GeocoderRequest geocoderRequest = new GeocoderRequestBuilder().setAddress(address.toString()).getGeocoderRequest();
        GeocodeResponse geocoderResponse = geocoder.geocode(geocoderRequest);
        List<GeocoderResult> results = geocoderResponse.getResults();
        if (results.size() > 0) {
            nodeWrapper.setProperty("j:latitude", results.get(0).getGeometry().getLocation().getLat().toString());
            nodeWrapper.setProperty("j:longitude", results.get(0).getGeometry().getLocation().getLng().toString());
View Full Code Here

Examples of com.google.maps.gwt.client.GeocoderRequest

  }

  private void buscaSitio(final String address) {
    haysol = true;

    GeocoderRequest GReq = GeocoderRequest.create();
    String aux = address + ", "
        + ciudades.getValue(ciudades.getSelectedIndex());
    GReq.setAddress(aux.toUpperCase().trim());
    geocoder.geocode(GReq, new Geocoder.Callback() {

      @Override
      public void handle(JsArray<GeocoderResult> a, GeocoderStatus b) {
        // while (!(esCoordEspa�ola(coord))) {
View Full Code Here

Examples of com.googlecode.maps3.client.auto.GeocoderRequest

        float lon = Float.parseFloat(split[1]);
        final LatLng point = LatLng.newInstance(lat, lon);
       
        map.getMapJSO().panTo(point);
       
        GeocoderRequest request = GeocoderRequest.newInstance();
        request.setLatLng(point);
       
        GWT.log("Geocoding " + point, null);
       
        Geocoder geocoder = Geocoder.newInstance();
        geocoder.geocode(request, new GeocoderCallback() {
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.