Author: buildbot Date: Thu Jun 6 06:22:38 2013 New Revision: 864621 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/geocoder.html Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/geocoder.html ============================================================================== --- websites/production/camel/content/geocoder.html (original) +++ websites/production/camel/content/geocoder.html Thu Jun 6 06:22:38 2013 @@ -104,7 +104,7 @@ geocoder:latlng:latitude,longitude[?opti <h3><a shape="rect" name="Geocoder-Options"></a>Options</h3> <div class="confluenceTableSmall"><div class="table-wrap"> -<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Property </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>language</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>en</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The language to use. </td></tr></tbody></table> +<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Property </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>language</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>en</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The language to use. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>headersOnly</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether to only enrich the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> with headers, and leave the body as-is. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>clientId</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="conflue nceTd"> To use google premium with this client id </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>clientKey</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"> To use google premium with this client key </td></tr></tbody></table> </div> </div> @@ -112,14 +112,19 @@ geocoder:latlng:latitude,longitude[?opti <h3><a shape="rect" name="Geocoder-Exchangedataformat"></a>Exchange data format</h3> -<p>Camel will deliver the body as a <tt>com.google.code.geocoder.model.GeocodeResponse</tt> type.</p> +<p>Camel will deliver the body as a <tt>com.google.code.geocoder.model.GeocodeResponse</tt> type.<br clear="none"> +And if the address is <tt>"current"</tt> then the response is a String type with a JSON representation of the current location.</p> + +<p>If the option <tt>headersOnly</tt> is set to <tt>true</tt> then the message body is left as-is, and only headers will be added to the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>.</p> <h3><a shape="rect" name="Geocoder-MessageHeaders"></a>Message Headers</h3> <div class="confluenceTableSmall"><div class="table-wrap"> -<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Header </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderStatus</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Status code from the geocoder library. If status is <tt>GeocoderStatus.OK</tt> then additional headers is enriched </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderAddress</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The formatted address </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderLatlng</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The latitude and longitude of the location. Separated by comma. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderCountryLong</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The country long name. M ay only be available in latlng mode. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderCountryShort</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The country short name. May only be available in latlng mode. </td></tr></tbody></table> +<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Header </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderStatus</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Mandatory. Status code from the geocoder library. If status is <tt>GeocoderStatus.OK</tt> then additional headers is enriched </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderAddress</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The formatted address </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderLatlng</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The latitude and longitude of the location. Separated by comma. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderCity</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The city long name. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderRegionCode</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The region code. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderRegionName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The region name. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderCountryLong</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The country long name. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelGeoCoderCountryShort</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The country short name. </td></tr></tbody></table> </div> </div> +<p>Notice not all headers may be provided depending on available data and mode in use (address vs latlng).</p> + <h3><a shape="rect" name="Geocoder-Samples"></a>Samples</h3> <p>In the example below we get the latitude and longitude for Paris, France</p> @@ -151,6 +156,14 @@ template.sendBodyAndHeader(<span class=" <pre class="code-java"> Location 285 Bedford Avenue, Brooklyn, NY 11211, USA is at lat/lng: 40.71412890,-73.96140740 and in country US </pre> +</div></div> + +<p>To get the current location you can use "current" as the address as shown:</p> +<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> +<pre class="code-java"> + from(<span class="code-quote">"direct:start"</span>) + .to(<span class="code-quote">"geocoder:address:current"</span>) +</pre> </div></div></div> </td> <td valign="top">