<?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>PC Pro blog &#187; Google Maps</title>
	<atom:link href="http://www.pcpro.co.uk/blogs/tag/google-maps/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pcpro.co.uk/blogs</link>
	<description>Blogging in the real world</description>
	<lastBuildDate>Wed, 08 Feb 2012 16:54:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Displaying a location marker on a Google Map</title>
		<link>http://www.pcpro.co.uk/blogs/2010/12/23/displaying-a-location-marker-on-a-google-map/</link>
		<comments>http://www.pcpro.co.uk/blogs/2010/12/23/displaying-a-location-marker-on-a-google-map/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 12:54:54 +0000</pubDate>
		<dc:creator>Ian Devlin</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Real World Computing]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[google maps api]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.pcpro.co.uk/blogs/?p=29482</guid>
		<description><![CDATA[
One of the most popular features on websites today is a marker pinpointing a location on Google Maps. It&#8217;s incredibly easy to add such a map to a website and I&#8217;m going to show you how.
I said it was easy, and with the recent release of version 3 of the Google Maps JavaScript API, it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.pcpro.co.uk/blogs/wp-content/uploads/2010/12/google-map.jpg" alt="Google Map" /></p>
<p>One of the most popular features on websites today is a marker pinpointing a location on Google Maps. It&#8217;s incredibly easy to add such a map to a website and I&#8217;m going to show you how.</p>
<p>I said it was easy, and with the recent release of version 3 of the Google Maps JavaScript API, it&#8217;s become even easier. With the previous version of this API, you had to register your map to receive an API key, but that&#8217;s now no longer necessary.</p>
<p>Naturally Google provide <a href="http://code.google.com/apis/maps/documentation/javascript/basics.html" target="_new">a comprehensive guide to the Maps API</a>, but I will run through the basics here.</p>
<p><span id="more-29482"></span></p>
<p><strong>Setting up the Map</strong></p>
<p>First of all you need to include the map API in your web page. This is done by adding the following line in the <code>&lt;head&gt;</code> element of your code:</p>
<pre><code>&lt;script
type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false"&gt;
&lt;/script&gt;</code></pre>
<p>You may notice the sensor parameter, which is set to false. This is a required parameter and should be set to &#8220;true&#8221; if the application used to determine the user&#8217;s location has a sensor device (e.g. a GPS locator). That&#8217;s not the case here, so we set it to false as shown.</p>
<p>Naturally, we need to define a map to display, but before we do that we need three things: somewhere on the web page to actually place the map, a default position to use as the map&#8217;s centre, and then some options to define the type of map that we require.</p>
<p>Setting up somewhere on the web page to place the map is a simple case of defining a div with a unique id, and some inline styling. So we have:</p>
<pre><code>&lt;div id="map" style="width:600px;
height:600px; margin-top:10px;"&gt;&lt;/div&gt;</code></pre>
<p>And that&#8217;s all we need.</p>
<p>To define a default position we need a latitude and longitude. There are plenty of websites out there that will convert addresses or places into coordinates for you, and I will centre this particular example on the <em>PC Pro </em>offices at latitude 51.515252 and longitude -0.189852. From these values a Google map position is defined by using the following:</p>
<pre><code>var latlngPos = new google.maps.LatLng(51.515252, -0.189852);</code></pre>
<p>We then set up the map options as follows:</p>
<pre><code>var myOptions = {
   zoom: 10,
   center: latlngPos,
   mapTypeId: google.maps.MapTypeId.ROADMAP
};</code></pre>
<p>Where <code>zoom</code> (naturally) indicates the zoom level of the map (you may want to play about with these to get the value that you want), <code>center</code> is set to the latitude/longitude position that we defined, and <code>mapTypeId</code> is set to the type of map that we wish to display initially. The map types are defined by the Google Maps API and are:</p>
<ul>
<li>MapTypeId.ROADMAP displays the default road map view</li>
<li>MapTypeId.SATELLITE displays Google Earth satellite images</li>
<li>MapTypeId.HYBRID displays a mixture of normal and satellite views</li>
<li>MapTypeId.TERRAIN displays a physical map based on terrain information</li>
</ul>
<p>Note: this simply defines the initial map type to display, the user can change it via a dropdown list that appears on the map itself. You can read more about the different map types over at <a href="http://code.google.com/apis/maps/documentation/javascript/maptypes.html" target="_new">Google</a> should you want to know more.</p>
<p>With these things done, we can now initialise our map as follows:</p>
<pre><code>var map = new google.maps.Map(document.getElementById("map"), myOptions);</code></pre>
<p>This will now cause the map to appear on your web page, contained within the map div (the map itself stays within the boundaries of the div&#8217;s dimensions).</p>
<p><strong>Marking the Location</strong></p>
<p>With the map set up, we can now go about defining the marker on the map that we want displayed. Once again we need to define a position for the Google map using latitude and longitude. I&#8217;m using the same values as above, as I want to place a marker on the <em>PC Pro</em> offices (it&#8217;ll help the staff when they stumble back from their Christmas party).</p>
<pre><code>var markerPos = new google.maps.LatLng(51.515252, -0.189852);</code></pre>
<p>Adding a marker to this location is as simple as:</p>
<pre><code>var marker = new google.maps.Marker({
   position: markerPos,
   map: map,
   title: "PC Pro Offices"
});</code></pre>
<p>(where map is the id of the map div)</p>
<p>As usual I have a <a href="http://www.pcpro.co.uk/blogs/wp-content/uploads/2010/12/google-maps-simple-example.html">simple example</a> so that you can see it in action. (Note: this example also uses some jQuery)</p>
<p><strong>Going further</strong></p>
<p>The Google Map API is very powerful and you can go much further than I have shown here, such as adding pop-up information windows on the map marker.</p>
<p>You can even use the API to convert addresses into latitude/longitude positions and display them on the map. I have included a <a href="http://www.pcpro.co.uk/blogs/wp-content/uploads/2010/12/google-maps-advanced-example.html">more advanced example</a> should you want to take a look at it. It&#8217;s pretty straightforward and I&#8217;ve commented the code in order to make it clearer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pcpro.co.uk/blogs/2010/12/23/displaying-a-location-marker-on-a-google-map/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google and Rich Internet Applications (RIAs)</title>
		<link>http://www.pcpro.co.uk/blogs/2009/09/01/google-and-rich-internet-applications-rias/</link>
		<comments>http://www.pcpro.co.uk/blogs/2009/09/01/google-and-rich-internet-applications-rias/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 11:09:15 +0000</pubDate>
		<dc:creator>Tom Arah</dc:creator>
				<category><![CDATA[Real World Computing]]></category>
		<category><![CDATA[digital design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[ria]]></category>
		<category><![CDATA[rich internet application]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://www.pcpro.co.uk/blogs/?p=7012</guid>
		<description><![CDATA[Generally speaking, I&#8217;m not a fan of Google&#8217;s browser-native approach to web application development. Strategically I can see the advantages (wide and open access) and politically I think it&#8217;s admirable (open standards) but, in design terms, this lowest common denominator approach proves disastrous.
For example in a comparison between the barebones HTML-based Google Docs and the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-7015" src="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/09/blog-google-ria-175x127.png" alt="" width="175" height="127" />Generally speaking, I&#8217;m not a fan of Google&#8217;s browser-native approach to web application development. Strategically I can see the advantages (wide and open access) and politically I think it&#8217;s admirable (open standards) but, in design terms, this lowest common denominator approach proves disastrous.</p>
<p>For example in <a title="Acrobat.com vs Google Docs" href="http://www.pcpro.co.uk/blogs/2009/06/15/the-future-for-acrobat-com/">a comparison</a> between the barebones HTML-based Google Docs and the slick Flash-based Acrobat.com, I&#8217;d reserve the term <a title="Rich Internet Application definition" href="http://en.wikipedia.org/wiki/Rich_Internet_application">RIA</a> (rich internet application) for the latter and dismiss the former as a mere &#8220;web application&#8221; (more importantly I know which one I&#8217;d prefer to use).</p>
<p><a href="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/09/blog-google-ria.png"></a></p>
<p>Recently though I have to admit that Google caused my jaw to drop&#8230; and made me question the distinction.</p>
<p><span id="more-7012"></span></p>
<p>Like most people I&#8217;ve become so used to Google Maps that I now take its extraordinary power for granted. I was forcefully reminded of just how amazing it is however, when I recently went to print out some directions. For the first time I noticed and clicked on the options in the print preview header to show maps and street views for each individual step (see <a title="Google Maps example" href="http://maps.google.co.uk/maps?f=d&amp;source=s_d&amp;saddr=lauriston+castle+edinburgh&amp;daddr=Castle+Hill,+Edinburgh,+EH1+%28Edinburgh+Castle%29&amp;geocode=FV8EVgMdSfjN_yEk5z7Hk_CWEg%3BFcS0VQMdTTDP_yHxfvSglr1XpQ&amp;hl=en&amp;mra=pe&amp;mrcr=0&amp;sll=55.95804,-3.233525&amp;sspn=0.060829,0.194149&amp;ie=UTF8&amp;z=14&amp;layer=c&amp;pw=2">example</a>).</p>
<p>The latter capability in particular is extraordinary (assuming the area that you are interested in is covered by Street View). Being able to almost-instantaneously load in views of each junction that you are going to come across on your journey is breathtaking &#8211; especially as each street view is live and explorable (though thankfully that&#8217;s not generally necessary as Google automatically orientates the view based on the direction you&#8217;re travelling)</p>
<p>It certainly gave me pause for thought. If an application can cause you to say &#8220;oh that&#8217;s good, that&#8217;s really good&#8221; out loud, then surely it deserves to be called &#8220;rich&#8221;? In fact, if Google Maps isn&#8217;t a &#8220;rich internet application&#8221; then what on earth is?</p>
<p>It&#8217;s certainly a useful reminder of just how powerful the browser can be as a platform, but ultimately I think it&#8217;s worth preserving the distinction and reserving &#8220;RIA&#8221; for player-based applications (ie Flash / Silverlight). This isn&#8217;t just on practical grounds so that we know what we&#8217;re talking about. Google is clearly committed to making the browser as rich an environment as it can, but that&#8217;s rich in terms of content and functionality <em>not</em> in terms of design.</p>
<p>Indeed Google clearly prides itself on its cut-down, almost anti-design approach. This minimalist &#8220;anti-Flash&#8221; design works well for Google&#8217;s core applications such as Search and Maps where Google&#8217;s job is to help you get where you want to go as quickly as possible (indeed you could make the case that the street map mini-views are a flashy falling away from this principle).  However for those applications &#8211; the majority &#8211; where you have to spend time consuming or producing content, this barebones approach backfires as it does with Google Docs.</p>
<p>Clearly content and functionality are crucial to the success of any project but ultimately I&#8217;d argue that the &#8220;rich&#8221; in RIA refers to design and that the distinguishing strength of a player-based approach is that it can offer a richer, tighter, more desktop-like user experience than the browser alone. The browser-based Google Maps is brilliant, but a player-based version could be better still.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>PS. A quick practical postscript for web designers: Google recently introduced the ability to <a title="Directins Widget" href="http://maps.google.com/help/maps/gadgets/directions/">add Google Map directions to your own sites</a> . The Directions gadget doesn&#8217;t offer street map views (currently), but it&#8217;s a seriously useful option to add to your How To Find Us pages. And it&#8217;s a great way to get your clients&#8217; jaws dropping with a single line of code.</p>
<p>PPS. A quick impractical postscript: In spite of the directions and street views, I still managed to get hopelessly lost. Google Maps might be brilliant but it&#8217;s no replacement for Sat Nav.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pcpro.co.uk/blogs/2009/09/01/google-and-rich-internet-applications-rias/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Why OpenStreetMap is brilliant</title>
		<link>http://www.pcpro.co.uk/blogs/2009/07/29/why-open-street-map-is-brilliant/</link>
		<comments>http://www.pcpro.co.uk/blogs/2009/07/29/why-open-street-map-is-brilliant/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 11:03:43 +0000</pubDate>
		<dc:creator>Jonathan Bray</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Garmin]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[Open Street Map]]></category>
		<category><![CDATA[OpenCycleMap]]></category>

		<guid isPermaLink="false">http://www.pcpro.co.uk/blogs/?p=6532</guid>
		<description><![CDATA[
We all know about Google Maps and how brilliant it is. It&#8217;s gone from simple online mapping website, to an essential tool for mobile phones, complete with satellite photography, your friend&#8217;s location (Latitude) and, of course, the extremely groovy Street View.
But it&#8217;s not the only free mapping tool around, and not even the best, as [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/07/openstreetmap-google-chrome-29072009-112029.jpg"><img class="alignnone size-full wp-image-6547" src="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/07/openstreetmap-google-chrome-29072009-112029.jpg" alt="Open Street Map" width="428" /></a></p>
<p>We all know about <strong><a title="Google Maps" href="http://maps.google.co.uk">Google Maps</a></strong> and how brilliant it is. It&#8217;s gone from simple online mapping website, to an essential tool for mobile phones, complete with satellite photography, your friend&#8217;s location (Latitude) and, of course, the extremely groovy Street View.</p>
<p>But it&#8217;s not the only free mapping tool around, and not even the best, as I&#8217;ve been finding out over the past few months. <strong><a href="http://www.openstreetmap.org/">The OpenStreetmap</a></strong> is a venture, started in 2004 by Steve Coast, similar to Wikipedia, only with maps.</p>
<p>His idea was that rather than rely on corporations with big budgets and teams of cartographers, or national institutions to generation mapping data, he would get the internet community to build up its own using GPS traces and donated satellite imagery.</p>
<p>I remember looking at it three years ago and being distinctly unimpressed at the level of detail. But, it&#8217;s improved beyond recognition, with maps of London, in particular, that are just as detailed, if not more so, than Google maps. And as time goes on, its accuracy and usefulness can only increase.</p>
<p><span id="more-6532"></span></p>
<p>The really great thing about it though, is that the underlying map data is both free to use and manipulate. It comes under the<strong> <a title="Creative Commons" href="http://en.wikipedia.org/wiki/Creative_Commons">Creative Commons</a></strong> Attribution-Share Alike 2.0 licence, and that approach is gradually beginning to bear fruit in the most wonderful of ways.</p>
<p><a href="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/07/fullscreen-capture-29072009-113724.jpg"><img class="alignnone size-full wp-image-6550" src="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/07/fullscreen-capture-29072009-113724.jpg" alt="OpenRouteService.org" width="428" /></a></p>
<p>There are people working on all manner of projects, all across the world. There&#8217;s the <strong><a title="OpenSeaMap" href="http://www.openseamap.org">OpenSeaMap</a></strong> project, aimed at mapping the shipping lanes and the like. Freemap is being developed for hikers in the UK. <strong><a title="OpenRouteService.org" href="http://www.openrouteservice.org">OpenRouteService.org</a></strong> is aimed at providing routing services, for cars, pedestrians and cyclists.</p>
<p>The most impressive, however, has to be <strong><a title="Open Cycle Map" href="http://www.opencyclemap.org/">OpenCycleMap.org</a></strong>, created by Andy Allan here in the UK. This boasts a cycle-specific view of the standard OpenStreetMap data, overlaying useful stuff such as where national and regional cycle routes are to be found, and where designated quiet routes run. It&#8217;s absolutely invaluable if, like me, you cycle a lot in town and don&#8217;t like sharing your ride with lorries and buses.</p>
<p><a href="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/07/opencyclemaporg.jpg"><img class="alignnone size-full wp-image-6565" src="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/07/opencyclemaporg.jpg" alt="OpenCycleMap" width="428" /></a></p>
<p>The open source nature of the OpenStreetMap and OpenCycleMap.org data means that it&#8217;s not only available online, though. It can also be repackaged and reused offline too.</p>
<p><img class="alignright size-medium wp-image-6571" src="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/07/cf-lg1.jpg" alt="Garmin eTrex" width="179" height="296" /></p>
<p>The data&#8217;s already been re-engineered into Garmin-compatible format, so owners of eTrex and other recreational Garmin GPS units can download maps onto their devices for free. See here for <strong><a title="Free Garmin maps downloads" href="http://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/Download">links to the map files</a></strong>. There are even applications (<strong><a title="mkgmap" href="http://www.mkgmap.org.uk/">mkgmap</a></strong>, for example) that let you generate your own Garmin-compatible maps, direct from the OpenStreetMap data.</p>
<p>And once you&#8217;ve got the maps on your device, there&#8217;s a whole host of other services to help you transfer routes and training data to overlay on the top of the maps. <strong><a title="Bike Route Toaster" href="http://www.bikeroutetoaster.com/">BikeRouteToaster</a></strong> uses OpenCycleMap to let you plan routes and then download those routes directly to your device, while <strong><a title="GPSies" href="http://www.gpsies.com">GPSies</a></strong> focuses more on route-sharing. GPSies offers Google Maps as well as the OpenCycleMap for planning purposes.</p>
<p><a href="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/07/bike-route-toaster-google-chrome-29072009-112540.jpg"><img class="alignnone size-full wp-image-6559" src="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/07/bike-route-toaster-google-chrome-29072009-112540.jpg" alt="" width="428" /></a></p>
<p>I can&#8217;t help but be excited by all of this &#8211; and every week that goes by seems to throw up some another interesting development or avenue to explore. It can&#8217;t be long before some clever clogs somewhere produces a proper turn-by-turn in-car satnav application based on the free mapping data. Perhaps they already have&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pcpro.co.uk/blogs/2009/07/29/why-open-street-map-is-brilliant/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

