<?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>
	<copyright>© Terence Eden. 🄯 CC BY-SA. See https://shkspr.mobi/blog/copyright-and-copyleft/</copyright>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</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[Terence Eden]]></dc:creator>
		<pubDate>Wed, 08 Jul 2009 11:20:38 +0000</pubDate>
		<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>&lt;p&gt;As part of my project to create a &lt;a href="https://shkspr.mobi/blog/2009/07/getting-people-to-the-polling-station/"&gt;mobile polling station locator&lt;/a&gt; site, I've been playing with various mapping APIs.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;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"&gt; - &lt;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"&gt;&lt;/p&gt;

&lt;p&gt;Two things of interest to note.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Secondly, Google maps is &lt;em&gt;less accurate&lt;/em&gt; 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.&lt;/p&gt;

&lt;p&gt;What to do?  Well, as all the cool kids are doing, let's have ourselves a mashup!&lt;/p&gt;

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

&lt;p&gt;&lt;/p&gt;&lt;div id="attachment_242-2" style="width: 250px" class="wp-caption alignnone"&gt;&lt;img aria-describedby="caption-attachment-242-2" 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"&gt;&lt;p id="caption-attachment-242-2" class="wp-caption-text"&gt;Google Map from Yahoo Geo Location&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Hey presto! Better looking than the Yahoo Map and better accuracy than the Google Map.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;This is the sort of data that the UK government should be providing.  The &lt;a href="https://web.archive.org/web/20090609045317/https://openspace.ordnancesurvey.co.uk/openspace/support.html"&gt;Ordnance Survey have an API&lt;/a&gt; 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.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Edit&lt;/em&gt;&lt;/p&gt;

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