<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<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>mashup &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/mashup/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Tue, 08 Jul 2025 08:03:58 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>mashup &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Mashed Up Maps]]></title>
		<link>https://shkspr.mobi/blog/2009/07/mashed-up-maps/</link>
					<comments>https://shkspr.mobi/blog/2009/07/mashed-up-maps/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 08 Jul 2009 11:20:38 +0000</pubDate>
				<category><![CDATA[voteuk]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[mashup]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=241</guid>

					<description><![CDATA[As part of my project to create a mobile polling station locator site, I&#039;ve been playing with various mapping APIs.  As a base experiment, I passed the postcode of a polling station (GU22 7DT) to both Google Maps and Yahoo Maps.  Here are the results.   -   Two things of interest to note.  Firstly, Google has a specific &#34;Mobile&#34; call in the API, it reformats the map image to be more readable on…]]></description>
										<content:encoded><![CDATA[<p>As part of my project to create a <a href="https://shkspr.mobi/blog/2009/07/getting-people-to-the-polling-station/">mobile polling station locator</a> site, I've been playing with various mapping APIs.</p>

<p>As a base experiment, I passed the postcode of a polling station (GU22 7DT) to both Google Maps and Yahoo Maps.  Here are the results.</p>

<p><img class="size-full wp-image-243" title="ymaps1" src="https://shkspr.mobi/blog/wp-content/uploads/2009/07/ymaps1.gif" alt="Yahoo! Maps" width="240" height="240"> - <img class="size-full wp-image-244" title="gmaps1" src="https://shkspr.mobi/blog/wp-content/uploads/2009/07/gmaps1.gif" alt="Google Maps" width="240" height="240"></p>

<p>Two things of interest to note.</p>

<p>Firstly, Google has a specific "Mobile" call in the API, it reformats the map image to be more readable on the mobile - I think you'll agree that Google edges out Yahoo here.</p>

<p>Secondly, Google maps is <em>less accurate</em> than Yahoo! Maps.  Severely so.  While maps.google.com is highly accurate when passed a postcode, the API seems only to look at the first part and discard the rest.  Yahoo on the other hand is unnervingly precise.</p>

<p>What to do?  Well, as all the cool kids are doing, let's have ourselves a mashup!</p>

<p>We can call Yahoo Maps to get the Latitude and Longitude of a postcode thusly
<code>http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&amp;zip=gu227dt&amp;state=uk</code>
This will return
<code>&lt;Latitude&gt;51.318691&lt;/Latitude&gt;</code>
<code>&lt;Longitude&gt;-0.543540&lt;/Longitude&gt;</code>
<code>&lt;Address/&gt;</code>
<code>&lt;City&gt;Woking, GU22 7DT&lt;/City&gt;</code>
<code>&lt;State&gt;United Kingdom&lt;/State&gt;</code>
<code>&lt;Country&gt;GB&lt;/Country&gt;</code>
We take the Latitude and Longitude and pass it to Google Maps like so
<code>http://maps.google.com/staticmap?center=<span style="color: #ff0000;">$lat</span>,<span style="color: #ff0000;">$long</span>&amp;markers=<span style="color: #ff0000;">$lat</span>,<span style="color: #ff0000;">$long</span>,tiny&amp;zoom=14&amp;size=240x240&amp;maptype=mobile&amp;key=&amp;sensor=false</code>
Which nets us this map.</p>

<p></p><div id="attachment_242" style="width: 250px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-242" class="size-full wp-image-242" title="gmap2" src="https://shkspr.mobi/blog/wp-content/uploads/2009/07/gmap2.gif" alt="Google Map from Yahoo Geo Location" width="240" height="240"><p id="caption-attachment-242" class="wp-caption-text">Google Map from Yahoo Geo Location</p></div><p></p>

<p>Hey presto! Better looking than the Yahoo Map and better accuracy than the Google Map.</p>

<p>The geocoding prescision of the Google Maps API is very poor for UK postcodes.  There really shouldn't need to be this need sort of work around.</p>

<p>This is the sort of data that the UK government should be providing.  The <a href="https://web.archive.org/web/20090609045317/https://openspace.ordnancesurvey.co.uk/openspace/support.html">Ordnance Survey have an API</a> but it seems restricted to JavaScript which isn't very useful for most mobile phones.  Nevertheless I'll have a play with it and see if it's more useful.</p>

<p><em>Edit</em></p>

<p id="line1">I am now using <a href="https://web.archive.org/web/20140208154955/http://ernestmarples.com/blog/">Ernest Marples' Postcode Latitude/Longitude Lookup API </a>which has much greater accuracy than either Google or Yahoo.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=241&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2009/07/mashed-up-maps/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
