<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jappit.com &#187; geocoding</title>
	<atom:link href="http://www.jappit.com/blog/tag/geocoding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jappit.com/blog</link>
	<description>Mobile blog by Alessandro La Rosa</description>
	<lastBuildDate>Wed, 23 Nov 2011 10:38:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>MidMaps: new Google Maps API for J2ME</title>
		<link>http://www.jappit.com/blog/2010/02/25/midmaps-new-google-maps-library-for-j2me/</link>
		<comments>http://www.jappit.com/blog/2010/02/25/midmaps-new-google-maps-library-for-j2me/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 09:13:40 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[cool stuff]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[sample code]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=1313</guid>
		<description><![CDATA[I finally found some time to finish and publish the first release of a tiny library that allow to easily integrate Google Maps in every J2ME application: MidMaps. You can read all the details, download the library together with sample code, and read the full JavaDocs here: MidMaps &#8211; J2ME Google Maps library.]]></description>
			<content:encoded><![CDATA[<p>I finally found some time to finish and publish the first release of a tiny <strong>library that allow to easily integrate Google Maps in every J2ME application</strong>: <a title="MidMaps - J2ME Google Maps API" href="http://www.jappit.com/blog/midmaps-google-maps-java-me-library/">MidMaps</a>.</p>
<p><a title="MidMaps - J2ME Google Maps library" href="http://www.jappit.com/blog/midmaps-google-maps-java-me-library/"><img class="alignnone size-full wp-image-1316" title="MidMaps - J2ME Google Maps library" src="http://www.jappit.com/blog/wp-content/midmaps_shots.png" alt="" width="640" height="289" /></a></p>
<p>You can read all the details, <strong>download the library together with sample code,</strong> and read the <strong>full JavaDocs</strong> here: <a title="MidMaps - J2ME Google Maps API" href="http://www.jappit.com/blog/midmaps-google-maps-java-me-library/">MidMaps &#8211; J2ME Google Maps library</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2010/02/25/midmaps-new-google-maps-library-for-j2me/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Google Maps mobile tutorial is Wiki article of the Month!</title>
		<link>http://www.jappit.com/blog/2008/06/11/google-maps-mobile-tutorial-is-wiki-article-of-the-month/</link>
		<comments>http://www.jappit.com/blog/2008/06/11/google-maps-mobile-tutorial-is-wiki-article-of-the-month/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 12:30:20 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[cool stuff]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[mobile mapping]]></category>
		<category><![CDATA[static maps]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=48</guid>
		<description><![CDATA[I&#8217;m really honored that another article, published on Forum Nokia Wiki, has been selected as Article of the Month! As the previous one, this also is related to Google Maps usage in mobile applications, and you can read it here: How to use Google Maps data in mobile applications. As its name says, It&#8217;s an [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m really honored that <a title="How to use Google Maps data in mobile applications wiki article" href="http://wiki.forum.nokia.com/index.php/How_to_use_Google_Maps_data_in_mobile_applications" target="_blank">another article</a>, published on <a title="Forum Nokia Wiki" href="http://wiki.forum.nokia.com/" target="_blank">Forum Nokia Wiki</a>, has been selected as <strong>Article of the Month</strong>!</p>
<p><img src="http://www.jappit.com/images/blog/uploads/gmaps_article_of_month.jpg" alt="Google Maps article of the month" /></p>
<p>As the <a title="J2ME Google Maps API article of the week blog post" href="http://www.jappit.com/blog/2008/06/09/j2me-google-maps-api-is-article-of-the-week-on-forum-nokia/">previous one</a>, this also is related to <strong>Google Maps usage in mobile applications</strong>, and you can read it here: <a title="How to use Google Maps data in mobile applications Wiki article" href="http://wiki.forum.nokia.com/index.php/How_to_use_Google_Maps_data_in_mobile_applications" target="_blank">How to use Google Maps data in mobile applications</a>.</p>
<p>As its name says, It&#8217;s an introductory article on how to use Google Maps services, in particular the <strong><a title="Google Maps geocoding service" href="http://code.google.com/apis/maps/documentation/services.html#Geocoding" target="_blank">geocoding</a></strong> and <strong><a title="Google Static Maps" href="http://code.google.com/apis/maps/documentation/staticmaps/" target="_blank">static maps</a></strong> ones, from a mobile application, where standard Google Maps API code is not suitable (since it is thought for web based and Ajax&#8217;d apps). Its content does not focus on any particular programming language, but gives <strong>base guidelines</strong> to use those services using <a title="Representational State Transfer" href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target="_blank">REST</a>.</p>
<p>So&#8230; any kind of feedbacks is welcome! <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2008/06/11/google-maps-mobile-tutorial-is-wiki-article-of-the-month/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>J2ME Google Maps API is article of the week on Forum Nokia!</title>
		<link>http://www.jappit.com/blog/2008/06/09/j2me-google-maps-api-is-article-of-the-week-on-forum-nokia/</link>
		<comments>http://www.jappit.com/blog/2008/06/09/j2me-google-maps-api-is-article-of-the-week-on-forum-nokia/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 13:47:11 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[j2me]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[google maps api]]></category>
		<category><![CDATA[map static images]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=47</guid>
		<description><![CDATA[I&#8217;m really happy to announce that my J2ME Google Maps API article on Forum Nokia Wiki has been selected as Article of the Week! And, to celebrate this event, I&#8217;ve added a brand new feature to my article that will allow you to: create larger tiled maps support map scrolling How does it work? You [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m really happy to announce that my <a title="J2ME Google Maps API Wiki article" href="http://wiki.forum.nokia.com/index.php/J2ME_Google_Maps_API" target="_blank">J2ME Google Maps API article</a> on <a title="Forum Nokia Wiki" href="http://wiki.forum.nokia.com/" target="_blank">Forum Nokia Wiki</a> has been selected <img src="file:///C:/DOCUME~1/pit/IMPOST~1/Temp/moz-screenshot.jpg" alt="" />as <strong>Article of the Week</strong>! <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://www.jappit.com/images/blog/uploads/j2me_gMapsAPI_article_week3.jpg" alt="J2ME Google Maps API Article of the Week" /></p>
<p>And, to celebrate this event, I&#8217;ve added a brand new feature to my article that will allow you to:</p>
<ul>
<li>create larger <strong>tiled maps</strong></li>
<li>support <strong>map scrolling</strong></li>
</ul>
<h3>How does it work?</h3>
<p>You start instantiating a GoogleMaps object as usual:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">GoogleMaps gMap <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> GoogleMaps<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;API_KEY&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Then you get your map, for example geocoding a given address:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">double</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> coords <span style="color: #339933;">=</span> gMap.<span style="color: #006633;">geocodeAddress</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Leicester square, London&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003399;">Image</span> mapImage <span style="color: #339933;">=</span> gMap.<span style="color: #006633;">retrieveStaticImage</span><span style="color: #009900;">&#40;</span>
	<span style="color: #cc66cc;">150</span>, <span style="color: #cc66cc;">150</span>,
	coords<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>, coords<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span>,
	<span style="color: #cc66cc;">12</span>, <span style="color: #0000ff;">&quot;png&quot;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Then, let&#8217;s say you want to <strong>scroll your map 100 pixels up</strong>, what you&#8217;ll do is:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">double</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> newCoords <span style="color: #339933;">=</span> gMap.<span style="color: #006633;">adjust</span><span style="color: #009900;">&#40;</span>
	coords<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>, coords<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span>,
	<span style="color: #cc66cc;">0</span>, <span style="color: #339933;">-</span><span style="color: #cc66cc;">100</span>, <span style="color: #cc66cc;">12</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003399;">Image</span> newMapImage <span style="color: #339933;">=</span> gMap.<span style="color: #006633;">retrieveStaticImage</span><span style="color: #009900;">&#40;</span>
	<span style="color: #cc66cc;">150</span>, <span style="color: #cc66cc;">150</span>,
	newCoords<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>, newCoords<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span>,
	<span style="color: #cc66cc;">12</span>, <span style="color: #0000ff;">&quot;png&quot;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As you&#8217;ve seen, the adjust method takes these arguments:</p>
<ul>
<li>the current <strong>latitude</strong> and <strong>longitude</strong></li>
<li>the <strong>deltaX</strong> and <strong>deltaY</strong>, in pixels</li>
<li>the current <strong>zoom </strong>level</li>
</ul>
<p>and returns the new map center latitude and longitude coordinates.</p>
<p>You can check the full updated source code on Forum Nokia Wiki article: <a title="J2ME Google Maps Wiki article" href="http://wiki.forum.nokia.com/index.php/J2ME_Google_Maps_API" target="_blank">J2ME Google Maps API</a>, and a full-featured example, with the scrolling feature, on the emulator page: <a title="J2ME Google Maps API in action" href="http://www.jappit.com/index.php?page=emulator&amp;midlet=google_maps">J2ME Google Maps API in action</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2008/06/09/j2me-google-maps-api-is-article-of-the-week-on-forum-nokia/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to use Google Maps data within your mobile application</title>
		<link>http://www.jappit.com/blog/2008/05/14/how-to-use-google-maps-data-within-your-mobile-application/</link>
		<comments>http://www.jappit.com/blog/2008/05/14/how-to-use-google-maps-data-within-your-mobile-application/#comments</comments>
		<pubDate>Wed, 14 May 2008 08:17:10 +0000</pubDate>
		<dc:creator>pit</dc:creator>
				<category><![CDATA[j2me]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[forumnokia]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[map images]]></category>

		<guid isPermaLink="false">http://www.jappit.com/blog/?p=37</guid>
		<description><![CDATA[Note: You can find this article also on Forum Nokia Wiki: How to use Google Maps data in mobile applications Today we&#8217;ll see how to use Google Maps data within a mobile application. Google Maps offers REST services that allows accessing its data with simple HTTP requests, so we can easily integrate them within our [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: You can find this article also on Forum Nokia Wiki: <a title="How to use Google Maps data in mobile applications Wiki article" href="http://wiki.forum.nokia.com/index.php/How_to_use_Google_Maps_data_in_mobile_applications" target="_blank">How to use Google Maps data in mobile applications</a></em></p>
<p>Today we&#8217;ll see how to use Google Maps data within a mobile application.<br />
Google Maps offers REST services that allows accessing its data with simple HTTP requests, so we can easily integrate them within our mobile apps.</p>
<h3>Signup for a Google Maps API key</h3>
<p>First thing you must do is to signup on this page:<br />
<a title="Google Maps API key signup" href="http://code.google.com/apis/maps/signup.html" target="_blank">http://code.google.com/apis/maps/signup.html</a><br />
Once done, you&#8217;ll get a key (a simple String) you&#8217;ll use for all your query to Google Maps services</p>
<h3>Static maps</h3>
<p>Standard Google Maps code is suited for web applications, since it includes alot of Ajax functionalities, that are not really useful if you&#8217;re building a mobile application. So, the solution is to use static maps service, that will allow us to retrieve single images, easily usable within our apps.</p>
<p>Static maps service supports different image formats (png32, gif, jpg) and customizable image size, so that we can get perfect images for all our needs. As an example, suppose we want to retrieve the location at:</p>
<ul>
<li>latitude: 41.867878</li>
<li>longitude: 12.471516</li>
</ul>
<p>We can simply retrieve this URL with an HTTP GET request:</p>
<pre><a href="http://maps.google.com/staticmap?center=41.867878,12.471516&#038;amp" rel="nofollow">http://maps.google.com/staticmap?center=41.867878,12.471516&#038;amp</a>;
format=png32&amp;zoom=8&amp;size=240x320&amp;key=&lt;API_KEY&gt;</pre>
<p>This way, we&#8217;ll get a PNG32 image, with a width of 240 pixels, and a height of 320, centered at point (41.867878,12.471516), and with a zoom level of 8 (zoom can go from 0 to a maximum level of 19).</p>
<p><img src="http://www.jappit.com/images/blog/uploads/google_staticmap.jpg" alt="Google Maps static image sample" width="240" height="320" /></p>
<h3>Geocode an address</h3>
<p>From Google Maps docs:<br />
<em>Geocoding is the process of converting addresses (like &#8220;1600 Amphitheatre Parkway, Mountain View, CA&#8221;) into geographic coordinates (like latitude 37.423021 and longitude -122.083739)</em></p>
<p>So, let&#8217;s assume we want to build an application that displays the address typed by our user. We should firstly geocode its address to geographics coordinates.<br />
To do this, Google Maps offer another REST service easily accessible with simple HTTP requests.</p>
<p>Let&#8217;s say you want to geocode this address<em> &#8220;Leicester Square, London&#8221;</em>, then you&#8217;ll request this URL:</p>
<pre><a href="http://maps.google.com/maps/geo?q=Leicester%20Square,%20London" rel="nofollow">http://maps.google.com/maps/geo?q=Leicester%20Square,%20London</a>
&amp;output=csv&amp;key=&lt;API_KEY&gt;</pre>
<p>and you&#8217;ll get this output:</p>
<pre>200,6,51.510605,-0.130728</pre>
<p>Where:</p>
<ul>
<li>the first number is a code, that in this case (200) means that geocoding has been successfull (for a full list of status codes you can see here: [1])</li>
<li>the second number gives a measure of geocoding accuracy (from 0 to 9 &#8211; maximum accuracy)</li>
<li>3rd and 4th numbers represent latitude and longitude of the geocoded address, so these are the coordinate we&#8217;ll use to retrieve the map through the static map service we&#8217;ve seen before</li>
</ul>
<p>As you can see, there is an &#8216;output&#8217; parameter within the geocode request, and this means that we can choose the output format we prefer for our needs. Supported formats are:</p>
<ul>
<li>xml</li>
<li>kml (same as xml, but with different Content-Type)</li>
<li>json (not really useful for mobile apps)</li>
<li>csv (comma separated values)</li>
</ul>
<h3>Proxy server, usage limits</h3>
<p>Since your Google Maps API key is bound to a specific URL, to access map services you should setup a proxy server that will receive HTTP requests from your mobile application and forward them to Google Maps REST URLs, giving back Google responses to mobile clients.</p>
<p>Also, be aware that there is a limit to the number of requests (both for static maps and geocode service) you can do each day. For personal uses they&#8217;re more than enough, anyway consider this point if you plan to develop commercial services.</p>
<h3>Google Maps J2ME API and sample application</h3>
<p>Now, you want code right? <img src='http://www.jappit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here it is:</p>
<p><img src="http://www.jappit.com/images/blog/uploads/j2me_google_maps.jpg" alt="Google Maps sample application screenshot" width="475" height="280" /></p>
<ul style="text-align: left;">
<li style="text-align: left;">a J2ME class to access Google Maps REST services: <a title="Google Maps J2ME API" href="http://wiki.forum.nokia.com/index.php/J2ME_Google_Maps_API">http://wiki.forum.nokia.com/index.php/J2ME_Google_Maps_API</a></li>
<li style="text-align: left;">a sample application using Google Maps data: <a title="J2me Google Maps sample application" href="http://www.jappit.com/index.php?page=emulator&amp;midlet=google_maps">http://www.jappit.com/index.php?page=emulator&#038;midlet=google_maps</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.jappit.com/blog/2008/05/14/how-to-use-google-maps-data-within-your-mobile-application/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

