<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Felice Pollano Blog - WindowsPhone</title>
    <link>http://www.felicepollano.com/</link>
    <description>The official Fatica Labs Blog!</description>
    <language>en-us</language>
    <copyright>Felice Pollano</copyright>
    <lastBuildDate>Wed, 11 Jan 2012 21:00:53 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>felice@felicepollano.com</managingEditor>
    <webMaster>felice@felicepollano.com</webMaster>
    <item>
      <trackback:ping>http://www.felicepollano.com/Trackback.aspx?guid=0b682e55-409d-4459-89f3-2c7b5867f7f9</trackback:ping>
      <pingback:server>http://www.felicepollano.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.felicepollano.com/PermaLink.aspx?guid=0b682e55-409d-4459-89f3-2c7b5867f7f9</pingback:target>
      <dc:creator>Felice Pollano</dc:creator>
      <wfw:comment>http://www.felicepollano.com/CommentView.aspx?guid=0b682e55-409d-4459-89f3-2c7b5867f7f9</wfw:comment>
      <wfw:commentRss>http://www.felicepollano.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0b682e55-409d-4459-89f3-2c7b5867f7f9</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p align="justify">
In the WP7 library there is an interesting utility class: <a href="http://msdn.microsoft.com/en-us/library/system.device.location.civicaddressresolver.aspx" target="_blank">CivicAddressResolver</a>.
This class should help us in doing the so called <a href="http://en.wikipedia.org/wiki/Reverse_geocoding" target="_blank">Reverse
GeoCoding</a>: given a coordinate in term of latitude and longitude we want a readable
address near to that place. Unfortunately there is a bad surprise: as we read in the
documentation, “<em><a href="http://msdn.microsoft.com/en-us/library/system.device.location.civicaddressresolver.resolveaddressasync%28v=VS.92%29.aspx" target="_blank">this
method is not implemented in the current release”</a></em>. So what if we need something
like this, waiting for the fully fledged implementation? Since the class implements
the interface <a href="http://msdn.microsoft.com/en-us/library/system.device.location.icivicaddressresolver%28v=vs.92%29.aspx" target="_blank">ICivicAddressResolver</a>,
we can provide our own implementation, for example <a href="http://code.google.com/apis/maps/documentation/geocoding/" target="_blank">based
on google maps geocoding api</a>. So I created <a href="https://bitbucket.org/Felice_Pollano/gmapcivicaddressresolver/overview" target="_blank">a
little project and a demo application</a>. The main class implementing the resolver
is <a href="https://bitbucket.org/Felice_Pollano/gmapcivicaddressresolver/src/2225c39dbf82/GMapCivicAddressResolver/AddressResolver.cs" target="_blank">GMapCivicAddressResolver.AddressResolver</a>.
You can use it in an application awaiting for the definitive implementation, with
the limitation that this implementation returns something meaningful just in the field <strong>CivicAddress.AddressLine1</strong>.
Another limit is that you can’t call the blocking version of the resolve method,in
any case this should not be a problem since the asynchronous call is the one to prefer.  <a href="https://bitbucket.org/Felice_Pollano/gmapcivicaddressresolver/overview" target="_blank">Please
check out the project here on Bitbucket</a>. Here below a screenshot of the running
app, showing a totally random address in Rome:
</p>
        <p align="justify">
          <a href="http://www.felicepollano.com/public/Windows-Live-Writer/An-implementation-of-ICivicAddressResolv_12F53/cv1_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="cv1" border="0" alt="cv1" src="http://www.felicepollano.com/public/Windows-Live-Writer/An-implementation-of-ICivicAddressResolv_12F53/cv1_thumb.png" width="272" height="484" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=0b682e55-409d-4459-89f3-2c7b5867f7f9" />
      </body>
      <title>An implementation of ICivicAddressResolver for WP7</title>
      <guid isPermaLink="false">http://www.felicepollano.com/PermaLink.aspx?guid=0b682e55-409d-4459-89f3-2c7b5867f7f9</guid>
      <link>http://www.felicepollano.com/2012/01/11/AnImplementationOfICivicAddressResolverForWP7.aspx</link>
      <pubDate>Wed, 11 Jan 2012 21:00:53 GMT</pubDate>
      <description>&lt;p align="justify"&gt;
In the WP7 library there is an interesting utility class: &lt;a href="http://msdn.microsoft.com/en-us/library/system.device.location.civicaddressresolver.aspx" target="_blank"&gt;CivicAddressResolver&lt;/a&gt;.
This class should help us in doing the so called &lt;a href="http://en.wikipedia.org/wiki/Reverse_geocoding" target="_blank"&gt;Reverse
GeoCoding&lt;/a&gt;: given a coordinate in term of latitude and longitude we want a readable
address near to that place. Unfortunately there is a bad surprise: as we read in the
documentation, “&lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.device.location.civicaddressresolver.resolveaddressasync%28v=VS.92%29.aspx" target="_blank"&gt;this
method is not implemented in the current release”&lt;/a&gt;&lt;/em&gt;. So what if we need something
like this, waiting for the fully fledged implementation? Since the class implements
the interface &lt;a href="http://msdn.microsoft.com/en-us/library/system.device.location.icivicaddressresolver%28v=vs.92%29.aspx" target="_blank"&gt;ICivicAddressResolver&lt;/a&gt;,
we can provide our own implementation, for example &lt;a href="http://code.google.com/apis/maps/documentation/geocoding/" target="_blank"&gt;based
on google maps geocoding api&lt;/a&gt;. So I created &lt;a href="https://bitbucket.org/Felice_Pollano/gmapcivicaddressresolver/overview" target="_blank"&gt;a
little project and a demo application&lt;/a&gt;. The main class implementing the resolver
is &lt;a href="https://bitbucket.org/Felice_Pollano/gmapcivicaddressresolver/src/2225c39dbf82/GMapCivicAddressResolver/AddressResolver.cs" target="_blank"&gt;GMapCivicAddressResolver.AddressResolver&lt;/a&gt;.
You can use it in an application awaiting for the definitive implementation, with
the limitation that this implementation returns something meaningful just in the field &lt;strong&gt;CivicAddress.AddressLine1&lt;/strong&gt;.
Another limit is that you can’t call the blocking version of the resolve method,in
any case this should not be a problem since the asynchronous call is the one to prefer.&amp;nbsp; &lt;a href="https://bitbucket.org/Felice_Pollano/gmapcivicaddressresolver/overview" target="_blank"&gt;Please
check out the project here on Bitbucket&lt;/a&gt;. Here below a screenshot of the running
app, showing a totally random address in Rome:
&lt;/p&gt;
&lt;p align="justify"&gt;
&lt;a href="http://www.felicepollano.com/public/Windows-Live-Writer/An-implementation-of-ICivicAddressResolv_12F53/cv1_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="cv1" border="0" alt="cv1" src="http://www.felicepollano.com/public/Windows-Live-Writer/An-implementation-of-ICivicAddressResolv_12F53/cv1_thumb.png" width="272" height="484"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=0b682e55-409d-4459-89f3-2c7b5867f7f9" /&gt;</description>
      <comments>http://www.felicepollano.com/CommentView.aspx?guid=0b682e55-409d-4459-89f3-2c7b5867f7f9</comments>
      <category>CodeProject</category>
      <category>WindowsPhone</category>
    </item>
  </channel>
</rss>