<?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>Stiern &#187; Web Design</title>
	<atom:link href="http://stiern.com/tag/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://stiern.com</link>
	<description>Web design, graphic design, Photoshop, CSS, etc</description>
	<lastBuildDate>Thu, 17 May 2012 09:38:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Should Comment Forms Have More Fields?</title>
		<link>http://stiern.com/articles/should-comment-forms-have-more-fields/</link>
		<comments>http://stiern.com/articles/should-comment-forms-have-more-fields/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 23:41:43 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Comments]]></category>
		<category><![CDATA[Discussion]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=879</guid>
		<description><![CDATA[Often, when you visit a website, you&#8217;ll want to leave a comment there. To do that, you&#8217;ll of course write some text in a comment form. But most comment forms, regardless of their design, look the same. Sure, some do add that hated captcha field, but still, most comment forms are the same. But should<a href="http://stiern.com/articles/should-comment-forms-have-more-fields/" class="read-more">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>Often, when you visit a website, you&#8217;ll want to leave a comment there. To do that, you&#8217;ll of course write some text in a comment form. But most comment forms, regardless of their design, look the same. Sure, some do add that hated captcha field, but still, most comment forms are the same.</p>
<p><span id="more-879"></span></p>
<p>But should they be? This post is in not an answer, it is an introduction to discussion—and hopefully reflection.</p>
<p>So, which comment fields do we see in comment forms today?</p>
<h3>Name</h3>
<p>Name is pretty obvious. We need a name to know who writes the comment.</p>
<h3>E-mail</h3>
<p>Is the e-mail field necessary? Well, many websites uses an e-mail field in the fight against spam. But is that really necessary? Most spam bots can figure out how to put an &#8216;@&#8217; between two words in order to cheat. Still, it&#8217;s better to have a little security than none at all.</p>
<h3>Website</h3>
<p>In this field, the user can put the URL to their website—if they have one. Most people that visit my website don&#8217;t have a website—at least they don&#8217;t write the URL in the website field.</p>
<h3>Comment</h3>
<p>This field is of course obvious, as it is the comment itself.</p>
<p>So, these four fields are the basics of a standard comment form. But what could we else be needing? Let&#8217;s look at where we might be able to improve.</p>
<h3>Headlines</h3>
<p>Why not give your users the possibility to give their comment a headline? It, of course, depends on each website, but headlines can be a good way to summarize a comment, and help people find the comment they are looking for a lot faster.</p>
<h3>Age</h3>
<p>Depending on your site&#8217;s topic, age might be a good field to add. It might even replace the name field in case the site is based on the anonymity of the user.</p>
<h3>Gender</h3>
<p>Like with age, a site allowing you to be anonymous would be a good place to use a gender field in your comment section.</p>
<h3>Social media</h3>
<p>Social media is here to stay. Whether it&#8217;s <a title="Facebook" href="http://facebook.com">Facebook</a>, <a title="Twitter" href="http://twitter.com">Twitter</a>, <a title="Flickr" href="http://flickr.com">Flickr</a>, etc., social media connects people. And even though the primary function of a comment section on a website is not to connect people, I don&#8217;t see why we can&#8217;t add to social media by letting our users link to their social media accounts in a comment form.</p>
<p>Let your users write the URL to their Facebook account, their Flickr user name, their Last.fm account, whatever! Still, you shouldn&#8217;t let it get too clumsy by filling the comments up with way too much information. If there&#8217;s no need to let them write it, don&#8217;t give them the option.</p>
<p>If those reading the comment find one comment particularily interesting, it is very easy to get in touch with the person who wrote it, as the e-mail address isn&#8217;t public.</p>
<h3>Category</h3>
<p>You might want your users to give different categories of comments, such as review, support, criticism, etc. The comments can be styled in different colors or within tabs. A great example of this is <a title="The Idea Shower" href="http://www.ideashower.com/ideas/launched/css-text-wrapper/">The Idea Shower</a>, as seen in the picture below.</p>
<p><a class="lightbox postimg" title="Example from The Idea Shower" href="http://stiern.com/site/wp-content/everything/comment_example.png"><img class="alignnone size-full wp-image-885" title="Example from The Idea Shower" src="http://stiern.com/site/wp-content/everything/comment_example.png" alt="" width="500" height="575" /></a></p>
<h3>Final Thoughts</h3>
<p>Remember, before everything, that you shouldn&#8217;t add a field if there is no use for them. The most important part of the comment is the comment itself—<em>don&#8217;t confuse your visitors with too much information</em>; you still want your comments to be readable.</p>
<p>This was my thoughts about adding new fields to a comment form. What do you think? Do you think it should stay the way it is or should we take advantage of being able to make every comment form different? Please write you comment in the standard comment form below…</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/articles/should-comment-forms-have-more-fields/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to Use Directions with Google Maps API V3</title>
		<link>http://stiern.com/tutorials/how-to-use-directions-with-google-maps-api-v3/</link>
		<comments>http://stiern.com/tutorials/how-to-use-directions-with-google-maps-api-v3/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 08:20:59 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=801</guid>
		<description><![CDATA[Google Maps are more fun when you can get directions. And now you can! The recent release of the Google Maps API adds two new classes in order to enable directions. In this article I will show you how to add an input field in an infobox and use that to render a route.]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE: This article is old, and the methods to insert directions have changed — this probably won&#8217;t work.</strong></p>
<p>Google Maps are more fun when you can get directions. And now you can! The recent release of the Google Maps API adds two new classes in order to enable directions. In this article I will show you how to add an input field in an infobox and use that to render a route.</p>
<p><span id="more-801"></span></p>
<p>But before that, here&#8217;s how it looks when it is done:</p>
<div class="iframe-wrapper">
  <iframe src="http://dl.getdropbox.com/u/32709/googlemaps_dir/index.html" frameborder="0" style="height:300px;width:500px;">Please upgrade your browser</iframe>
</div>
<p>Because of the size at the page here the infobox gets a scroll bar, but just ensure to make your map large enough, then it will not happen.</p>
<h3>Overview</h3>
<ul>
<li><a href="#whatsnew">What&#8217;s New?</a></li>
<li><a href="#corrections">Corrections</a></li>
<p><a href="#corrections"> </a></p>
<li><a href="#directions">The Directions</a></li>
<li><a href="#calcRoute">Calculating the Route</a></li>
<li><a href="#conclusion">Conclusion</a></li>
<p><a href="#conclusion"> </a></ul>
<p><a href="#conclusion"> </a></p>
<h3><a id="whatsnew">What&#8217;s New?</a></h3>
<p>Since my <a title="Adding Custom Google Maps to Your Website" href="http://stiern.com/tutorials/adding-custom-google-maps-to-your-website">last article</a> a couple of new features have been added to the API, as you can also read about in the <a title="Google Maps API V3 changelog" href="http://code.google.com/p/gmaps-api-issues/wiki/JavascriptMapsAPIv3Changelog">changelog</a>. The most important, in my opinion, is of course the support of directions, and that&#8217;s the only function I will discuss here. Worthy to note, though — you do not have to use an API code anymore.</p>
<p>The support for directions is possible via two new classes, <code>DirectionsRenderer</code> and <code>DirectionsService</code>. <code>DirectionsRenderer</code>… Well… Renders the directions, and <code>DirectionsService</code> computes the actual directions. But the big question is — how do we use them?</p>
<h3><a id="corrections">Corrections</a></h3>
<p>Before we rush into the new code, we should make some corrections in our excisting code. If you haven&#8217;t read my article <a title="Adding Custom Google Maps to Your Website" href="http://stiern.com/tutorials/adding-custom-google-maps-to-your-website">Adding Custom Google Maps to Your Website</a>, do yourself a favor and do so before continuing on this one.</p>
<p>[ad#ad]</p>
<p>Next, look in your code where you define your markers and ensure that your values follow these rules:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> companyImage <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">MarkerImage</span><span style="color: #009900;">&#40;</span>’images<span style="color: #339933;">/</span>logo.<span style="color: #660066;">png</span>’<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Size</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span><span style="color: #CC0000;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// (width, height)  new google.maps.Point(0,0),  new google.maps.Point(50,50) // (width/2, height) ); var companyShadow = new google.maps.MarkerImage(’images/logo_shadow.png’,  new google.maps.Size(130,50), // (width, height)  new google.maps.Point(0,0),  new google.maps.Point(65,50) // (width/2, height) );</span></pre></div></div>

<p>Dividing the image&#8217;s width by 2 ensures that it&#8217;s the bottom center point of the image that&#8217;ll be used for the marker. Thanks to <a title="JM" href="http://stiern.com/tutorials/adding-custom-google-maps-to-your-website/comment-page-2#comment-2663">JM</a> for this solution.</p>
<h3><a id="directions">The Directions</a></h3>
<p>So, first we have to call the <code>DirectionsService</code> constructor. Before your <code>initialize()</code>, create a new variable:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> directionsService <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">DirectionsService</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Next, we have to create the renderer. Right before the variable you just created, define a new variable <code>directionDisplay</code>. This variable is going to contain the renderer.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> directionDisplay<span style="color: #339933;">;</span></pre></div></div>

<p>In your <code>initialize()</code> function, right after the <code>latLng</code> variable, set the <code>directionDisplay</code> variable to this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">directionsDisplay <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">DirectionsRenderer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Further down in your code, find the <code>map</code> variable (right after the <code>settings</code> variable. Write this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">directionsDisplay.<span style="color: #660066;">setMap</span><span style="color: #009900;">&#40;</span>map<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This renders the marker on the specified map, which in this case is <code>map</code>. Next, let&#8217;s define what we want to write in our infobox by expanding the <code>contentString</code> variable:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	<span style="color: #003366; font-weight: bold;">var</span> contentString <span style="color: #339933;">=</span> <span style="color: #3366CC;">'
&lt;div id=&quot;content&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;div id=&quot;siteNotice&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'&lt;/div&gt;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;h1 id=&quot;firstHeading&quot; class=&quot;firstHeading&quot;&gt;Høgenhaug&lt;/h1&gt;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;div id=&quot;bodyContent&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&nbsp;
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
&nbsp;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&nbsp;
Find your way here from:
&nbsp;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;form action=&quot;index.html&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;input id=&quot;start&quot; type=&quot;text&quot; value=&quot;prinsensgade 5, 9000&quot; /&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;input type=&quot;submit&quot; value=&quot;Find directions&quot; /&gt;&lt;/form&gt;
&nbsp;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'&lt;/div&gt;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'&lt;/div&gt;
'</span><span style="color: #339933;">;</span></pre></div></div>

<p>Let&#8217;s look a bit into the <code>form</code> used to ask the user for an address:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	<span style="color: #3366CC;">'
&lt;form action=&quot;index.html&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;input id=&quot;start&quot; type=&quot;text&quot; value=&quot;prinsensgade 5, 9000&quot; /&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;input type=&quot;submit&quot; value=&quot;Find directions&quot; /&gt;&lt;/form&gt;
&nbsp;
'</span><span style="color: #339933;">+</span></pre></div></div>

<p>First, we write &#8220;index.html&#8221; in our <code>action</code> attribute. This path should be to the file where your map is placed. In <code>onsubmit</code> we call the function <code>calcRoute()</code> (which we will define later), and next we write <code>return false</code> to prevent the site from reloading when the user submits the form. The next two lines should be pretty self-explainable. If you want the user to be able to enter both addresses, you can just add an extra input field called <code>end</code>. The value of the <code>start</code> field can be empty or you can write a pre-defined address.</p>
<h3><a id="calcRoute">Calculating the Route</a></h3>
<p>At the very end of the <code>initialize()</code> function, write the following:</p>
<p>In the <code>form</code> we called the function <code>calcRoute()</code>. That&#8217;s the one we are defining here. The first thing to do is define the two variables <code>start</code> and <code>end</code>. If you inserted an extra input field before write <code>document.getElementById("end").value;</code> in <code>end</code> instead of the coordinates.</p>
<p>Next, define the variable <code>request</code>. The attributes of this one are fairly logical, but let&#8217;s explain them just in case. We define the <code>origin</code> of the route to our variable <code>start</code>, and the destination to <code>end</code>. Also, we define a travelmode —. This can be either <code>DRIVING</code> or <code>WALKING</code>.</p>
<p>Lastly, insert this code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">directionsService.<span style="color: #660066;">route</span><span style="color: #009900;">&#40;</span>request<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>response<span style="color: #339933;">,</span> <span style="color: #000066;">status</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">status</span> <span style="color: #339933;">==</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">DirectionsStatus</span>.<span style="color: #660066;">OK</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		directionsDisplay.<span style="color: #660066;">setDirections</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This issues the actual search request, and completes the <code>initialize()</code> function.</p>
<h3><a id="conclusion">Conclusion</a></h3>
<p>With very little effort you can show your visitor how to get to your address directly from your website, instead of sending them to Google Maps or some other place. I hope you enjoyed the tutorial — please let me know if you have questions or suggestions. You are of course free to download the <a title="The source files" href="http://dl.dropbox.com/u/32709/googlemaps_dir/googlemaps_directions.zip">source files</a>.</p>
<p>While you are here, why don&#8217;t you <a title="Follow me on Twitter" href="http://twitter.com/pshoeg">follow me on Twitter</a> or subscribe to the <a title="Subscribe to the RSS feed" href="http://feeds.feedburner.com/stiern">RSS feed</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/tutorials/how-to-use-directions-with-google-maps-api-v3/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Adding Custom Google Maps to Your Website</title>
		<link>http://stiern.com/tutorials/adding-custom-google-maps-to-your-website/</link>
		<comments>http://stiern.com/tutorials/adding-custom-google-maps-to-your-website/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 22:56:47 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=626</guid>
		<description><![CDATA[Maps are often placed on a company website to help customers find their way there. For that, Google Maps is excellent. But wouldn&#8217;t it be nice to add your company logo, parking lots, train stations, etc. to the map, to help the customer even more? It is very simple, and in this article I am<a href="http://stiern.com/tutorials/adding-custom-google-maps-to-your-website/" class="read-more">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>Maps are often placed on a company website to help customers find their way there. For that, Google Maps is excellent. But wouldn&#8217;t it be nice to add your company logo, parking lots, train stations, etc. to the map, to help the customer even more? It is very simple, and in this article I am going to show you how.<br />
<span id="more-626"></span></p>
<p>Before we start, check out what we are going to create:</p>
<div class="iframe-wrapper">
  <iframe src="http://dl.getdropbox.com/u/32709/googlemaps/index.html" frameborder="0" style="height:300px;width:500px;">Please upgrade your browser</iframe>
</div>
<p>Now, here is an overview:</p>
<h3>Overview</h3>
<ul>
<li><a href="#google_api">Google Maps API</a></li>
<li><a href="#coordinates">Getting the Coordinates</a></li>
<li><a href="#adding_the_map">Adding the Map to Your Website</a></li>
<li><a href="#adding_markers">Adding Markers</a></li>
<li><a href="#custom_markers">Customizing the Markers</a></li>
<li><a href="#infobox">Adding Infoboxes</a></li>
<li><a href="#download">Download</a></li>
</ul>
<h3><a id="google_api">Google Maps API</a></h3>
<p>The Google Maps API allows you to embed maps directly into your website. All it takes is a little JavaScript, and for beautifying&#8212;a little CSS. <a title="Google Maps API V3" href="http://code.google.com/apis/maps/documentation/v3/">Version 3</a> of the Google Maps API has just been released, and of course, that is what we will be using here. You can read the entire documentation over at <a title="Google Labs" href="http://code.google.com/intl/en-EN/apis/maps/documentation/v3/">Google Labs</a>, and while you are there, be sure to get an <a title="Google Maps API key" href="http://code.google.com/intl/en-EN/apis/maps/signup.html">API key</a>.</p>
<h3><a id="coordinates">Getting the Coordinates</a></h3>
<p>As I do not expect you to know the precise coordinates of your location, I will explain a very quick way Google has provided to do this. When you know the exact address, you can put it in an URL of this form:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">http<span style="color: #339933;">:</span><span style="color: #006600; font-style: italic;">//maps.google.com/maps/geo?q=1+Infinite Liip,+Cupertino,+CA+95014,+USA&amp;output=csv&amp;oe=utf8&amp;sensor=false&amp;key=your_google_maps_api_key</span></pre></div></div>

<p>When you enter this in your address bar, you will see this:</p>
<div id="attachment_653" class="wp-caption alignnone" style="width: 255px"><a class="lightbox"  title ="The coordinates of Apple's head quarter in Cupertino" href="http://stiern.com/site/wp-content/everything/apple_coordinates.png"><img src="http://stiern.com/site/wp-content/everything/apple_coordinates.png" alt="The coordinates of Apple&#039;s head quarter in Cupertino" title="The coordinates of Apple&#039;s head quarter in Cupertino" width="245" height="28" class="size-full wp-image-653" /></a><p class="wp-caption-text">The coordinates of Apple's head quarter in Cupertino</p></div>
<p>The first number is the <a href="http://code.google.com/intl/da-DK/apis/maps/documentation/geocoding/index.html#StatusCodes" title="Status Codes">status code</a>, and 200 means that everything is okay. The second number shows how <a href="http://code.google.com/intl/da-DK/apis/maps/documentation/geocoding/index.html#GeocodingAccuracy" title="Accuracy">accurate</a> the address is&#8212;in this case the number is 8, which is good. The last two numbers are latitudes and longitudes, which are the numbers we need.</p>
<h3><a id="adding_the_map">Adding the Map to Your Website</a></h3>
<p>There&#8217;s no need to hesitate – let&#8217;s add that map to your website! Open your favorite HTML editor and create a standard HTML file with UTF-8 encoding. First of all, we have to create the viewport and tell our HTML file to get the JavaScript file from Google Code. Add these lines between <code>&lt;head&gt; and &lt;/head&gt;</code>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;viewport&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;initial-scale=1.0, user-scalable=no&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://maps.google.com/maps/api/js?sensor=false&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<p>After the URL, you will notice <code>sensor=false</code>. As we do not use any sensor, such as a GPS, to locate the location, this is set to false.</p>
<p>Just below what we have just inserted, write the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
	<span style="color: #003366; font-weight: bold;">function</span> initialize<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> latlng <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">LatLng</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">57.0442</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">9.9116</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> settings <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
			zoom<span style="color: #339933;">:</span> <span style="color: #CC0000;">15</span><span style="color: #339933;">,</span>
			center<span style="color: #339933;">:</span> latlng<span style="color: #339933;">,</span>
			mapTypeControl<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
			mapTypeControlOptions<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>style<span style="color: #339933;">:</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">MapTypeControlStyle</span>.<span style="color: #660066;">DROPDOWN_MENU</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
			navigationControl<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
			navigationControlOptions<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>style<span style="color: #339933;">:</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">NavigationControlStyle</span>.<span style="color: #660066;">SMALL</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
			mapTypeId<span style="color: #339933;">:</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">MapTypeId</span>.<span style="color: #660066;">ROADMAP</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Let&#8217;s split this up to ensure that we understand it fully. In line 2 we create the function <code>initialize()</code>. Inside this function we are going to define the basic settings of the map. In line 3 we create a new variable, <code>latlng</code>. <code>latlng</code> stands for latitudes and longitudes. The variable contains the coordinates we&#8217;re going to use as the center of our map.<br />
After that, we create the variable <code>settings</code>. You have a lot of options here.</p>
<p><code>zoom</code> specifies&#8212;you guessed it&#8212;how far the map will be zoomed in. Play around with the number to get it to fit your location.</p>
<p><code>center</code> specifies our center. By writing <code>latlng</code>, we refer to the variable we created earlier, and the coordinate inside that will be used.</p>
<p>The last code changes the layout of the map to a bit more minimalistic look in my opinion. The controls in the upper right corner (Map, Satellite, Terrain) are changed to a drop down menu, and the scaling/navigation controls in the left size are changed to small controls.</p>
<p><code>mapTypeId: google.maps.MapTypeId.ROADMAP</code> defines that our map should be of the type <code>ROADMAP</code> – you can change this to either <code>SATELLITE</code>, <code>HYBRID</code> or <code>TERRAIN</code>.</p>
<p>Below the previous code, write this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> map <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Map</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;map_canvas&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> settings<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This code creates the variable <code>map</code>, and defines that the map should use the settings we just created.</p>
<p>Write</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<p> to end the function, and move to <code>&lt;body&gt;</code>, and write this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">onload</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;initialize()&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;map_canvas&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width:800px; height:500px&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></pre></td></tr></table></div>

<p>By doing this we are telling our site to execute the <code>initialize()</code> function when the site is loaded, and insert a <code>&lt;div&gt;</code> with the size we want our map to be.</p>
<p>Try to view your site now. Cool, isn&#8217;t it?</p>
<h3><a id="adding_markers">Adding Markers</a></h3>
<p>Now we have to add some markers. Let&#8217;s start by creating a standard marker&#8212;we&#8217;ll customize it in a moment.</p>
<p>Right below</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> map <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Map</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;map_canvas&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> settings<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p> insert the following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">  <span style="color: #003366; font-weight: bold;">var</span> companyPos <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">LatLng</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">57.0442</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">9.9116</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> companyMarker <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Marker</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
      position<span style="color: #339933;">:</span> companyPos<span style="color: #339933;">,</span>
      map<span style="color: #339933;">:</span> map<span style="color: #339933;">,</span>
      title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Some title&quot;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Try to update your page, and watch the magic. So, what have we done?</p>
<p>First, we create the variable <code>companyPos</code>, where we specify the position of the marker. Next, we create the marker itself using the variable <code>companyMarker</code>. You can add more settings than these, but we will get to that later. These settings are fairly logical, so I won&#8217;t go into more depth with them.</p>
<h3><a id="custom_markers">Customizing the Markers</h3>
<p>Even though this could be enough to show your customer how to find you, we can still make it a lot nicer. Create an image in Photoshop with the size 100&#215;50 pixels, and create something similar to this:<br />
<div id="attachment_660" class="wp-caption alignnone" style="width: 110px"><a class="lightbox" title="Create your logo" href="http://stiern.com/site/wp-content/everything/logo.png"><img class="size-full wp-image-660" title="Create your logo" src="http://stiern.com/site/wp-content/everything/logo.png" alt="Create your logo" width="100" height="50" /></a><p class="wp-caption-text">Create your logo</p></div></p>
<p>Next, create a shadow for your image:</p>
<div id="attachment_663" class="wp-caption alignnone" style="width: 140px"><a class="lightbox" title="The logo shadow" href="http://stiern.com/site/wp-content/everything/logo_shadow.png"><img class="size-full wp-image-663" title="The logo shadow" src="http://stiern.com/site/wp-content/everything/logo_shadow.png" alt="The logo shadow" width="130" height="50" /></a><p class="wp-caption-text">The logo shadow</p></div>
<p>To add these images as a marker instead of the standard marker, change the marker code to this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> companyLogo <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">MarkerImage</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'images/logo.png'</span><span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Size</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span><span style="color: #CC0000;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Point</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Point</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">50</span><span style="color: #339933;">,</span><span style="color: #CC0000;">50</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> companyShadow <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">MarkerImage</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'images/logo_shadow.png'</span><span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Size</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">130</span><span style="color: #339933;">,</span><span style="color: #CC0000;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Point</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Point</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">65</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">50</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> companyPos <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">LatLng</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">57.0442</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">9.9116</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> companyMarker <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Marker</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	position<span style="color: #339933;">:</span> companyPos<span style="color: #339933;">,</span>
	map<span style="color: #339933;">:</span> map<span style="color: #339933;">,</span>
	icon<span style="color: #339933;">:</span> companyLogo<span style="color: #339933;">,</span>
	shadow<span style="color: #339933;">:</span> companyShadow<span style="color: #339933;">,</span>
	title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Company Title&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>What we have done here is also really simple. The variable <code>companyImage</code> points to the name of the logo image. Then it defines the size of the image, the origin of the image, and the tip of the image (where the image will be attached to the coordinate). Next, we do the exact same thing for the shadow in the variable <code>companyShadow</code>. In our <code>companyMarker</code> variable we add <code>icon</code> and <code>shadow</code>, and that is basically it.</p>
<p>Now, if you refresh your site, you will se that the marker has changed into your own logo with an added shadow to it as well. To add more markers, you just follow the same method (remember to change the names of the variables).</p>
<p>If you have two markers very close to each other, you might want to add some z-index. The marker with the highest z-index, is the one on top:</p>
<div id="attachment_674" class="wp-caption alignnone" style="width: 157px"><a class="lightbox" title="Adding zIndex allows you to choose which marker should be on top" href="http://stiern.com/site/wp-content/everything/zindex.png"><img class="size-full wp-image-674" title="Adding zIndex allows you to choose which marker should be on top" src="http://stiern.com/site/wp-content/everything/zindex.png" alt="Adding zIndex allows you to choose which marker should be on top" width="147" height="87" /></a><p class="wp-caption-text">Adding zIndex allows you to choose which marker should be on top</p></div>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> companyMarker <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Marker</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	position<span style="color: #339933;">:</span> companyPos<span style="color: #339933;">,</span>
	map<span style="color: #339933;">:</span> map<span style="color: #339933;">,</span>
	icon<span style="color: #339933;">:</span> companyImage<span style="color: #339933;">,</span>
	shadow<span style="color: #339933;">:</span> companyShadow<span style="color: #339933;">,</span>
	title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Høgenhaug&quot;</span><span style="color: #339933;">,</span>
	zIndex<span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3><a id="infobox">Adding Infoboxes</a></h3>
<p>To add a description of your company when the visitor clicks on the logo we can add a infobox. With the Google Maps API it&#8217;s peace of cake.</p>
<div id="attachment_677" class="wp-caption alignnone" style="width: 510px"><a class="lightbox" title="Clicking your company logo will bring up an infobox" href="http://stiern.com/site/wp-content/everything/infobox.png"><img class="size-full wp-image-677" title="Clicking your company logo will bring up an infobox" src="http://stiern.com/site/wp-content/everything/infobox.png" alt="Clicking your company logo will bring up an infobox" width="500" height="398" /></a><p class="wp-caption-text">Clicking your company logo will bring up an infobox</p></div>
<p>Paste this code right after you define the <code>map</code> variable:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> contentString <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div id=&quot;content&quot;&gt;'</span><span style="color: #339933;">+</span>
    <span style="color: #3366CC;">'&lt;div id=&quot;siteNotice&quot;&gt;'</span><span style="color: #339933;">+</span>
    <span style="color: #3366CC;">'&lt;/div&gt;'</span><span style="color: #339933;">+</span>
    <span style="color: #3366CC;">'&lt;h1 id=&quot;firstHeading&quot; class=&quot;firstHeading&quot;&gt;Høgenhaug&lt;/h1&gt;'</span><span style="color: #339933;">+</span>
    <span style="color: #3366CC;">'&lt;div id=&quot;bodyContent&quot;&gt;'</span><span style="color: #339933;">+</span>
    <span style="color: #3366CC;">'&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&lt;/p&gt;'</span><span style="color: #339933;">+</span>
    <span style="color: #3366CC;">'&lt;/div&gt;'</span><span style="color: #339933;">+</span>
    <span style="color: #3366CC;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> infowindow <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">InfoWindow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    content<span style="color: #339933;">:</span> contentString
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The code here is fairly straight-forward, and you are of course not limited to headlines and paragraphs – there is room for images as well. To make the infobox appear when your logo is clicked, simply add this code right before the last <code>}</code> in the <code>initialize()</code> function:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">event</span>.<span style="color: #660066;">addListener</span><span style="color: #009900;">&#40;</span>companyMarker<span style="color: #339933;">,</span> <span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  infowindow.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>map<span style="color: #339933;">,</span>companyMarker<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>To make the infobox just a little more pretty, add some styles in your stylesheet file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Helvetica<span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">10pt</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>And there you have it. One piece of fine-looking Google Map to include on your company website, your travel blog, etc.</p>
<h3><a id="download">Download</a></h3>
<p>If you&#8217;d like to download the sample files, you can get &#8216;em <a href="http://dl.getdropbox.com/u/32709/googlemaps.zip" title="Download the example files">right here</a>. Be sure to leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/tutorials/adding-custom-google-maps-to-your-website/feed/</wfw:commentRss>
		<slash:comments>394</slash:comments>
		</item>
		<item>
		<title>Enhancing Your Site with WebKit</title>
		<link>http://stiern.com/tutorials/enhancing-your-site-with-webkit/</link>
		<comments>http://stiern.com/tutorials/enhancing-your-site-with-webkit/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 14:00:36 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=366</guid>
		<description><![CDATA[WebKit is an open source browser engine. Apple uses WebKit in Safari, Mail, and other applications. Google's Chrome browser, along with the S60 browser and the iPhone browser, is also built on WebKit. Some of the cool features of WebKit is transitions and transforms. With purely CSS you can create stunning animations. Your site will still work in other browsers, but the users with WebKit browsers will just get a slightly better experience.]]></description>
			<content:encoded><![CDATA[<p><a href="http://webkit.org/">WebKit</a> is an open source browser engine. <a title="Apple" href="http://apple.com/">Apple</a> uses WebKit in Safari, Mail, and other applications. <a title="Google Chrome" href="http://www.google.com/chrome">Google&#8217;s Chrome</a> browser, along with the S60 browser and the iPhone browser, is also built on WebKit. Some of the cool features of WebKit is transitions and transforms. With purely CSS you can create stunning animations. Your site will still work in other browsers, but the users with WebKit browsers will just get a slightly better experience.</p>
<p><span id="more-366"></span></p>
<p>Take for example Elliot Jay Stocks&#8217; new website, elliotjaystocks.com. It is in it self a very beautiful website, but if you open it in e.g. Safari 4, it&#8217;s even more beautiful. When you hover your mouse over the images, the border will slowly fade into a lighter color. In non-WebKit browsers, it&#8217;ll just be a very sudden transition. This done solely by CSS.</p>
<div id="attachment_368" class="wp-caption alignnone" style="width: 510px"><a href="http://elliotjaystocks.com"><img class="size-full wp-image-368" title="elliotjaystocks" src="http://stiern.com/site/wp-content/everything/Billede-4.png" alt="Elliot Jay Stocks' new website" width="500" height="385" /></a><p class="wp-caption-text">Elliot Jay Stocks&#39; new website</p></div>
<p>Another example is <a href="http://www.atebits.com/">Atebits&#8217;</a> website. Atebits is the company behind the Twitter app <a title="Tweetie for Mac" href="http://www.atebits.com/tweetie-mac/" class="broken_link">Tweetie</a>. Let&#8217;s have a look at their front page:</p>
<div id="attachment_372" class="wp-caption alignnone" style="width: 510px"><a href="http://atebits.com/"><img class="size-full wp-image-372" title="Atebits' website" src="http://stiern.com/site/wp-content/everything/Billede-5.png" alt="Atebits' website" width="500" height="345" /></a><p class="wp-caption-text">Atebits&#39; website</p></div>
<p>That&#8217;s just beautiful, huh? Well, let&#8217;s dive into how we easily can add similar function to our own site.</p>
<p>The first property we have to learn is <code>-webkit-transition</code>. The <code>-webkit-transition</code> property is a shortcode for the three properties <code>-webkit-transition-property</code>, <code>-webkit-transition-duration</code> and <code>-webkit-transition-timing-function</code>.</p>
<p>We&#8217;ll probably learn this the best by having a look at an example, so here goes: We want to create a div that, when hovered, fades into another color. Here&#8217;s the code:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div <span style="color: #00AA00;">&#123;</span>
  -webkit-transition<span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">color</span> 0.4s linear<span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777777</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
div<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#999999</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>And here&#8217;s the example:</p>
<div class="webkitarticle">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
<p>This wasn&#8217;t so hard, was it? Now let&#8217;s move on to using the <code>-webkit-transform</code> property. It allows you to scale, rotate, translate, and skew the object. It even allows you to use matrices for advanced transformations. Let&#8217;s try to rotate and skew the div from before:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div <span style="color: #00AA00;">&#123;</span>
  -webkit-transition<span style="color: #00AA00;">:</span> all 0.4s linear<span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777777</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
div<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  -webkit-transform<span style="color: #00AA00;">:</span> scale<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">1.3</span><span style="color: #00AA00;">&#41;</span> skew<span style="color: #00AA00;">&#40;</span>3deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#999999</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div class="webkitarticle2">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
<p>This is just a little glimpse into what you can do with WebKit. Hopefully, you&#8217;ll find it useful.</p>
<p><span style="color: #ffffff;">i55iqj8amt</span></p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/tutorials/enhancing-your-site-with-webkit/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Great Designers to get Inspired by</title>
		<link>http://stiern.com/articles/great-designers-to-get-inspired-by/</link>
		<comments>http://stiern.com/articles/great-designers-to-get-inspired-by/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 22:57:50 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Graphic Design]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=256</guid>
		<description><![CDATA[When I first started out doing web design, and other types of design, I looked for people to get inspired by. I'm not only inspired by their graphical work, but also by their methods of working and acting on the Internet. I've tried to collect a list of people I get inspired by. These guys are amongst the greatest artists out there right now, so you should have a look at their work. For each person, I've collected some great interviews that I hope you'll enjoy reading.]]></description>
			<content:encoded><![CDATA[<p>When I first started out doing web design, and other types of design, I looked for people to get inspired by. I&#8217;m not only inspired by their graphical work, but also by their methods of working and acting on the Internet. I&#8217;ve tried to collect a list of people I get inspired by. These guys are amongst the greatest artists out there right now, so you should have a look at their work. For each person, I&#8217;ve collected some great interviews that I hope you&#8217;ll enjoy reading.</p>
<p><span id="more-256"></span></p>
<h2><strong>Nick La</strong></h2>
<p><strong></strong>Nick is the owner of <a href="http://www.webdesignerwall.com/">Web Designer Wall</a>, and runs <a href="http://www.ndesign-studio.com/">N.Design Studio</a> and <a href="http://bestwebgallery.com/">Best Web Gallery</a>. He has been around for many years, and has apart from a lot of great articles on Web Designer Wall also gotten tutorials posted in magazines.</p>
<p><img class="alignnone size-full wp-image-277" title="Web Designer Wall" src="http://stiern.com/site/wp-content/everything/webdesignerwall.png" alt="webdesignerwall" width="500" height="100" /></p>
<ul>
<li><a style="text-decoration: none;" href="http://www.designinterviews.com/interviews/Nick-La-Read-Experiment-and-Follow-the-Big-Designers">Interview with Nick at Web Designer&#8217;s Interviews</a></li>
</ul>
<h2><strong>Collis Ta’eed</strong></h2>
<p>Collis is the CEO of the <a href="http://envato.com/">Envato network</a> (if you haven&#8217;t heard of that, something&#8217;s gone wrong). The network contains <a href="http://psd.tutsplus.com/">Psdtuts+</a>, <a href="http://net.tutsplus.com/">Nettuts+</a>, and other sites you should have subscribed to in your feed reader already. Collis is a great example of what hard work and making the right decisions can do for your business. As an example, Psdtuts+ has over 50.000 subscribers.</p>
<p><img class="alignnone size-full wp-image-294" title="Envato" src="http://stiern.com/site/wp-content/everything/envato1.png" alt="Envato" width="500" height="100" /></p>
<ul>
<li><a href="http://www.fuelyourcreativity.com/interview-with-collis-taeed/">Interview with Collis at Fuel Your Creativity</a></li>
<li><a href="http://www.retireat21.com/interview/interview-with-collis-taeed-founder-of-freelanceswitch-dot-com">Interview with Collis at Retire@21</a></li>
<li>Interview with Collis at WalkMyBusiness</li>
<li><a href="http://twitter.com/collis">Follow Collis at Twitter</a></li>
<li><a href="http://thenetsetter.com">The Netsetter</a></li>
</ul>
<h2>Jacob Cass</h2>
<p><strong></strong>Jacob is an amazing designer, running the blog <a href="http://justcreativedesign.com/">Just Creative Design</a>. He writes some very inspirational blog posts, and also is a <a href="http://justcreativedesign.com/portfolio/">very talented designer</a>. One of his very interesting projects is the <a rel="bookmark" href="http://justcreativedesign.com/2008/02/17/5000-dollar-prize-giveaway-graphic-design-group-writing-project/">Graphic Design Group Writing Project</a>, which you should definitely check out.</p>
<p><img class="alignnone size-full wp-image-296" title="Just Creative Design" src="http://stiern.com/site/wp-content/everything/justcreative1.png" alt="Just Creative Design" width="500" height="100" /></p>
<ul>
<li><a href="http://abduzeedo.com/interview-jacob-cass">Interview with Jacob at Abduzeedo</a></li>
<li><a href="http://inspiredology.com/jacob-cass-interview/">Interview with Jacob at Inspiredology</a></li>
<li><a href="http://www.myinkblog.com/interview-with-jacob-cass/">Interview with Jacob at My Ink Blog</a></li>
<li><a href="http://colorburned.com/meet_jacob_cass_from_just_crea/">Interview with Jacob at Colorburned</a></li>
<li><a href="http://twitter.com/justcreative">Follow Jacob at Twitter</a></li>
</ul>
<h2>Chris Spooner</h2>
<p><strong><span style="font-weight: normal;">Chris is an extremely talented designer with some very thorough tutorials. His <a href="http://www.blog.spoongraphics.co.uk/">blog</a> is</span><span style="font-weight: normal;"> very exciting to read as his tutorials are very different from each other. Also, you should check out his <a href="http://www.chrisspooner.com/">personal website</a>, which is a &#8220;self-updating social homepage&#8221;, as he puts it &#8211; a great idea for an online business card. You should also pay a visit to his <a href="http://spoongraphics.co.uk/">portfolio site</a>.</span></strong></p>
<p><img class="alignnone size-full wp-image-292" title="SpoonGraphics" src="http://stiern.com/site/wp-content/everything/spoon1.png" alt="SpoonGraphics" width="500" height="100" /></p>
<ul>
<li><a href="http://vandelaydesign.com/blog/design/interview-with-chris-spooner/">Interview with Chris at Vandelay Design</a></li>
<li><a href="http://inspiredology.com/chris-spooner-interview/">Interview with Chris at Inspiredology</a></li>
<li><a href="http://justcreativedesign.com/2008/11/09/designer-in-the-spotlight-chris-spooner/">Interview with Chris at Just Creative Design</a></li>
<li><a href="http://twitter.com/chrisspooner">Follow Chris at Twitter</a></li>
</ul>
<h2><strong>Chris Coyier</strong></h2>
<p><strong><span style="font-weight: normal;">Chris is the founder of <a href="http://css-tricks.com/">CSS-Tricks</a>, a blog that touches many more subjects than just CSS tricks&#8230; Chris makes some amazing screencasts, that you should definitely consider <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=273881728">subscribing</a> to. <a href="http://aremysitesup.com/">Are My Sites Up?</a> is another great project of Chris&#8217;. The concept is very simple &#8211; add your site, and receive a notification whenever your site (or your client&#8217;s) is down. Also, Chris is behind <a href="http://scriptandstyle.com/">Script &amp; Style</a>, a link sharing service for design-related articles and ressources.</span></strong></p>
<p><img class="alignnone size-full wp-image-298" title="Script &amp; Style" src="http://stiern.com/site/wp-content/everything/scriptstyle1.png" alt="Script &amp; Style" width="500" height="100" /></p>
<ul>
<li><a href="http://net.tutsplus.com/articles/interviews/chatting-with-chris-coyier/">Interview with Chris at Nettuts+</a></li>
<li><a href="http://designm.ag/interviews/chris-coyier/">Interview with Chris at DesignM.ag</a></li>
<li><a href="http://www.snap2objects.com/2008/01/31/chris-coyier-the-guy-who-showed-us-how-beautiful-html-codes-looks-like/">Interview with Chris at Snap2Objects</a></li>
<li><a href="http://twitter.com/chriscoyier">Follow Chris at Twitter</a></li>
</ul>
<p>Who inspires you the most and why? Please share in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/articles/great-designers-to-get-inspired-by/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Character Entity Chart PDF</title>
		<link>http://stiern.com/downloads/character-entity-chart-pdf/</link>
		<comments>http://stiern.com/downloads/character-entity-chart-pdf/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 18:45:18 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Character Entity Chart]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=86</guid>
		<description><![CDATA[When I make websites, I often need to know character and numeric entities. I remember the most common, such as &#38; and &#169;, but what if I need other characters? I found a wonderful article over at Roselli.org, where Adrian Roselli has made a complete list of character and numeric entities. But I'd like to have those tables in a single PDF that I can view offline. So I made one, and you can download it completely free!]]></description>
			<content:encoded><![CDATA[<p>When I make websites, I often need to know character and numeric entities. I remember the most common, such as <code>&amp;amp;</code> and <code>&amp;copy;</code>, but what if I need other characters? I found a <a title="Character charts" href="http://roselli.org/adrian/articles/character_charts.asp">wonderful article</a> over at <a title="Adrian Roselli" href="http://roselli.org/adrian/">Roselli.org</a>, where Adrian Roselli has made a complete list of character and numeric entities. But I&#8217;d like to have those tables in a single PDF that I can view offline. So I made one, and you can download it completely free!</p>
<p>Thanks to Adrian Roselli for making the job easy!</p>
<p><a class="download" title="Download Character Entity Chart PDF" href="https://dl.getdropbox.com/u/32709/character_entity_chart.pdf">Get the PDF</a> (124 KB)</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/downloads/character-entity-chart-pdf/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 7/13 queries in 0.238 seconds using disk: basic
Object Caching 456/456 objects using disk: basic

Served from: stiern.com @ 2012-05-17 21:52:43 -->
