114.6. サンプル
以下の例では、フランスのパリの緯度と経度を取得しています。
  from("direct:start")
    .to("geocoder:address:Paris, France")
  from("direct:start")
    .to("geocoder:address:Paris, France")
				CamelGeoCoderAddress を含むヘッダーを指定すると、エンドポイントの設定がオーバーライドされるため、デンマークのコペンハーゲンのロケーションを取得するために、次のようなヘッダーを含むメッセージを送信できます。
			
template.sendBodyAndHeader("direct:start", "Hello", GeoCoderConstants.ADDRESS, "Copenhagen, Denmark");
template.sendBodyAndHeader("direct:start", "Hello", GeoCoderConstants.ADDRESS, "Copenhagen, Denmark");緯度と経度の住所を取得するには、次のようにします。
  from("direct:start")
    .to("geocoder:latlng:40.714224,-73.961452")
    .log("Location ${header.CamelGeocoderAddress} is at lat/lng: ${header.CamelGeocoderLatlng} and in country ${header.CamelGeoCoderCountryShort}")
  from("direct:start")
    .to("geocoder:latlng:40.714224,-73.961452")
    .log("Location ${header.CamelGeocoderAddress} is at lat/lng: ${header.CamelGeocoderLatlng} and in country ${header.CamelGeoCoderCountryShort}")どちらがログに記録されますか
Location 285 Bedford Avenue, Brooklyn, NY 11211, USA is at lat/lng: 40.71412890,-73.96140740 and in country US
Location 285 Bedford Avenue, Brooklyn, NY 11211, USA is at lat/lng: 40.71412890,-73.96140740 and in country US"現在" のロケーションを取得するには、次のようにアドレスとして current を使用できます。
  from("direct:start")
    .to("geocoder:address:current")
  from("direct:start")
    .to("geocoder:address:current")