camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] git commit: CAMEL-6431: First spike of camel-geocoder component.
Date Wed, 12 Jun 2013 15:25:21 GMT
Updated Branches:
  refs/heads/master 792dfb2ec -> de9de108b


CAMEL-6431: First spike of camel-geocoder component.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c98b0d8d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c98b0d8d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c98b0d8d

Branch: refs/heads/master
Commit: c98b0d8d1dd4f8083368cd228fddbc3bccbf5258
Parents: 792dfb2
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Jun 12 10:45:52 2013 -0400
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Jun 12 10:45:52 2013 -0400

----------------------------------------------------------------------
 .../org/apache/camel/component/geocoder/GeoCoderConstants.java     | 2 ++
 .../java/org/apache/camel/component/geocoder/GeoCoderProducer.java | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c98b0d8d/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderConstants.java
----------------------------------------------------------------------
diff --git a/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderConstants.java
b/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderConstants.java
index 461ac54..58b7612 100644
--- a/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderConstants.java
+++ b/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderConstants.java
@@ -20,6 +20,8 @@ public final class GeoCoderConstants {
 
     public static final String ADDRESS = "CamelGeoCoderAddress";
     public static final String LATLNG = "CamelGeoCoderLatlng";
+    public static final String LAT = "CamelGeoCoderLat";
+    public static final String LNG = "CamelGeoCoderLng";
     public static final String STATUS = "CamelGeoCoderStatus";
     public static final String REGION_CODE = "CamelGeoCoderRegionCode";
     public static final String REGION_NAME = "CamelGeoCoderRegionName";

http://git-wip-us.apache.org/repos/asf/camel/blob/c98b0d8d/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderProducer.java
b/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderProducer.java
index 23ec0eb..ab10fc5 100644
--- a/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderProducer.java
+++ b/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderProducer.java
@@ -155,6 +155,8 @@ public class GeoCoderProducer extends DefaultProducer {
             // just grab the first element and its lat and lon
             BigDecimal resLat = res.getResults().get(0).getGeometry().getLocation().getLat();
             BigDecimal resLon = res.getResults().get(0).getGeometry().getLocation().getLng();
+            exchange.getIn().setHeader(GeoCoderConstants.LAT, resLat.toPlainString());
+            exchange.getIn().setHeader(GeoCoderConstants.LNG, resLon.toPlainString());
             String resLatlng = resLat.toPlainString() + "," + resLon.toPlainString();
             exchange.getIn().setHeader(GeoCoderConstants.LATLNG, resLatlng);
 


Mime
View raw message