<?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>Hodgson Marketing</title>
	<atom:link href="http://www.hodgsonco.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hodgsonco.com</link>
	<description>Organic Marketing, Custom Design, WordPress</description>
	<lastBuildDate>Wed, 28 Dec 2011 16:21:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How SEO is like Politics</title>
		<link>http://www.hodgsonco.com/how-seo-is-like-politics</link>
		<comments>http://www.hodgsonco.com/how-seo-is-like-politics#comments</comments>
		<pubDate>Wed, 28 Dec 2011 16:12:46 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=772</guid>
		<description><![CDATA[I try to wait until people ask what I think about things before I give my opinion&#8230; outside of this blog, of course. I don&#8217;t always manage to wait, usually because most of the time no one asks and my opinions are so damned good, but I do try. So, it was with great glee [...]]]></description>
			<content:encoded><![CDATA[<p>I try to wait until people ask what I think about things before I give my opinion&#8230; outside of this blog, of course. I don&#8217;t always manage to wait, usually because most of the time no one asks and my opinions are <em>so damned good</em>, but I do try. So, it was with great glee and much rubbing of hands together that I read an email from one of my prized clients asking what I thought about search engine optimization (SEO).</p>
<h3>Meta Keywords: The SEO Shake Weight</h3>
<p><img class="alignright size-medium wp-image-773" title="shake-weight-result" src="http://www.hodgsonco.com/wp-content/uploads/2011/12/shake-weight-result-300x225.jpg" alt="" width="300" height="225" />I replied as honestly as I could, and tried not to ham it up too much. I used words like &#8220;snake oil,&#8221; but stopped short of words like &#8220;scam&#8221; and &#8220;frivolous,&#8221; even though the SEO/SEM marketing proposal I was asked to comment on included mention of &#8220;Meta keywords&#8221; which are the online marketing equivalent of the shake weight.</p>
<p>At least with a shake weight you might build up some muscles while you appear to be pleasuring an invisible gentleman. If you&#8217;re seriously employing meta keywords, which are <a href="http://www.mattcutts.com/blog/keywords-meta-tag-in-web-search/">ignored by Google</a>, if not all big league search engines, you&#8217;re merely going through the motions with no hope of pleasuring anyone. Except, of course, for whomever is charging you for the SEO/SEM, I guess. It&#8217;s pure profit to them. </p>
<h3>SEO: Internet Politics</h3>
<p>It occurs to me that they&#8217;re very similar, politics and SEO, in that there are a few very important things you need to do right at the outset in order to have any hope of success. </p>
<ol>
<li><strong>Declare your direction</strong></li>
<p>With SEO, this means it helps to get a domain name that reflects what your site is about. In politics, it means picking a party. Of course, you can always switch either later on, but you&#8217;ll lose any good will you&#8217;ve built up with Google, the electorate, or both.<br />
<img src="http://www.hodgsonco.com/wp-content/uploads/2011/12/179px-Michelle_Obama_official_portrait_headshot.jpeg" alt="" title="179px-Michelle_Obama_official_portrait_headshot" width="179" height="239" class="alignright size-full wp-image-777" />
<li><strong>Get yourself a great title/slogan</strong></li>
<p>In the case of SEO, that&#8217;d be a page title that reflects clearly what your page is about. In politics, you need a slogan that people can identify with, e.g. &#8220;I like Ike&#8221; or &#8220;<a href="http://books.google.com/books?id=gZUNJPsV9i0C&#038;lpg=PA100&#038;ots=NkmFqSNOVA&#038;dq=newts%20family%20is%20like%20your%20family&#038;pg=PA100#v=onepage&#038;q=newts%20family%20is%20like%20your%20family&#038;f=false">Newt&#8217;s family is like your family</a>&#8221;</p>
<li><strong>Be attractive!</strong></li>
<p>In the case of politics, this means actual visual attractiveness. I&#8217;m not saying you can&#8217;t have a life in politics if you&#8217;re hideous, but if you want to go all the way you want to be more Kennedy than Gingrich. More Michelle Obama than, well, pretty much anyone because she&#8217;s the best looking first lady perhaps ever in my opinion. </p>
<p>In the case of SEO, you need to make sure your content is relevant to the links you hope to attract, and not just a bunch of gibberish with keywords sprinkled in. You have to know what you&#8217;re talking about or you might look a bit like a fool. </p>
<p><a href="http://www.youtube.com/watch?v=WW_nDFKAmCo&#038;fmt=18">www.youtube.com/watch?v=WW_nDFKAmCo</a></p>
<p>&nbsp;</p>
<h3>So, why do I think SEO is (mostly) crap?</h3>
<p>Feel free to yell at or correct me if I am wrong, here, but keep in mind that this is only my opinion.</p>
<p>Google have a deeply vested interest in serving up truly relevant links. That&#8217;s how Google gained market share back in their early days. The search options at the time were a minimum viable product (Yahoo, Lycos, AskJeeves et. al.). You got pages upon pages of results that weren&#8217;t even close. Then Google came along with a pile of relevant links for every search and took over the world. Better mousetrap!</p>
<p>If they allowed SEO/SEM to make as big a difference as many people claim, their search results would return whatever marketers wanted them to return, not what the customer wants to see. Thus they&#8217;d be effectively degrading their mousetrap. Google hires the smartest people in the world to make sure this doesn&#8217;t happen&#8230; and then Bing copies them.  </p>
<p>Haha, take that! Aw cheer up, Bing, I&#8217;m only kidding.</p>
<h3>Abandon Hope, Ye Who Continue</h3>
<p>Beyond the important points listed above, though, when you get deep into SEO or politics you&#8217;re entering a whirling fog of jargon, baseless finger-pointing, and grandstanding. On top of which, if you&#8217;re a WordPress user, most of the SEO stuff is handled already for you. If you want to get deep, there&#8217;s a plugin called <a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/">All In One SEO</a> that I hear great things about. </p>
<p>Unfortunately for us as constituents, what is true of SEO is not true of politics. In SEO we have a third party regulatory body called Google, in whose best interests it is to combat disingenuousness. In politics, the professed third party regulatory bodies are motivated to <em>perpetuate</em> disingenuousness. </p>
<p>I&#8217;m looking at you, the media. Also you, actual regulatory oversight committees.</p>
<p>Ah well, that&#8217;s the system, I guess.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/how-seo-is-like-politics/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Vector Icons Pack</title>
		<link>http://www.hodgsonco.com/free-vector-icons-pack</link>
		<comments>http://www.hodgsonco.com/free-vector-icons-pack#comments</comments>
		<pubDate>Tue, 06 Dec 2011 02:08:31 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=752</guid>
		<description><![CDATA[I have an Illustrator file full of vector icons, each on its own layer, that I use to keep all my little drawings in. They get reused a lot, so it&#8217;s nice to have them all in one place. I figured someone out there might want to use them, so I stuck them up on [...]]]></description>
			<content:encoded><![CDATA[<p>I have an Illustrator file full of vector icons, each on its own layer, that I use to keep all my little drawings in. They get reused a lot, so it&#8217;s nice to have them all in one place. I figured someone out there might want to use them, so I stuck them up on SourceForge. Then I got yelled at for using SourceForge, so I moved them to GitHub.</p>
<p><a href="https://github.com/jimhodgson/Hodgsons-Free-Vector-Icons-Pack">Click here to go to the files on Github!</a></p>
<p>Now, mind you, the file contains a bunch of icons for companies that I did not draw, but use a lot. Not sure if I will get in trouble for that or not, but if anyone yells at me for it, I&#8217;ll just apologize and take it down. </p>
<p>Anyway, here are the ones I did draw that are included:</p>
<div>
<img src="http://www.hodgsonco.com/wp-content/uploads/2011/12/alien.jpg" alt="" title="alien" width="300" height="300" class="alignleft size-full wp-image-753" /><br />
<h2> Mr. Alien</h2>
<p>I drew Mr. Alien for some nifty bathroom signs. They were marked &#8220;Alien&#8221; and &#8220;Femalien.&#8221; I also put a bow on top of his head to make him into a girl alien because I am not sure how to tell if an alien is a girl or not. I do know that only girls wear bows on their heads though. I learned that by reading Mark Twain or something.
</p></div>
<p class="clear">&nbsp;</p>
<div>
<img src="http://www.hodgsonco.com/wp-content/uploads/2011/12/dollar.jpg" alt="" title="dollar" width="300" height="300" class="alignright size-full wp-image-754" /><br />
<h2> Dolla Dolla Bill Y&#8217;all</h2>
<p>I pretty much forgot what this sign means because a bunch of bankers broke the economy and then somehow got paid hundreds of billions for their efforts. I&#8217;m not trying to occupy the Internet here, or anything, I&#8217;m just saying the whole thing is kind of retarded.
</p></div>
<p class="clear">&nbsp;</p>
<div>
<img src="http://www.hodgsonco.com/wp-content/uploads/2011/12/heart.jpg" alt="" title="heart" width="300" height="300" class="alignleft size-full wp-image-755" /><br />
<h2>Turn On Your Heart Light</h2>
<p>This is the exact image that I carved out of a piece of wood and then gave to a pretty girl at summer camp. Cut the hell out of my fingers whittling the thing, and she didn&#8217;t even seem to care. </p>
<p>Found out later she and my buddy had been out behind the cabins with one another that whole summer. I&#8217;m still mad at them both 20 years later.
</p></div>
<p class="clear">&nbsp;</p>
<div>
<img src="http://www.hodgsonco.com/wp-content/uploads/2011/12/lock.jpg" alt="" title="lock" width="300" height="300" class="alignright size-full wp-image-756" /><br />
<h2>Lockdown</h2>
<p>I drew this padlock for use in a placard for a client of mine. Of course, I don&#8217;t think that modern locks have a big honkin&#8217; keyhole in the side of them, but that&#8217;s what they call &#8220;Artistic License,&#8221; or so I am told.
</p></div>
<p class="clear">&nbsp;</p>
<div>
<img src="http://www.hodgsonco.com/wp-content/uploads/2011/12/present.jpg" alt="" title="present" width="300" height="300" class="alignleft size-full wp-image-757" /><br />
<h2>A Nice Present</h2>
<p>I think I also drew this present icon for the above client, but it never ended up getting used. How does that make me feel? Still pretty happy, I guess. I like to draw things.
</p></div>
<p class="clear">&nbsp;</p>
<div>
<img src="http://www.hodgsonco.com/wp-content/uploads/2011/12/smiley.jpg" alt="" title="smiley" width="300" height="300" class="alignright size-full wp-image-758" /><br />
<h2>Keep On Smilin&#8217; Buddy</h2>
<p>I drew this for a client&#8217;s web site. The people I did the work for were so happy and friendly that I wanted to make a big bright happy smiley face for them. So, I did. </p>
<p>None of the above is sarcastic. They are really super nice people.
</p></div>
<p class="clear">&nbsp;</p>
<h2>Icon Party Over. Thanks for Coming!</h2>
<p>Well that about wraps it up, folks! Hope you enjoy my vector icons. </p>
<p>As a side note, I often use these in Photoshop via the <a href="http://tv.adobe.com/watch/visual-design-cs5/photoshop-smart-objects/">Smart Objects</a> functionality. If you&#8217;re not using it, check it out. It&#8217;s kind of awesome. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/free-vector-icons-pack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get a Busy Person&#8217;s Attention: Write Them a Sonnet</title>
		<link>http://www.hodgsonco.com/how-to-get-a-busy-persons-attention-write-them-a-sonnet</link>
		<comments>http://www.hodgsonco.com/how-to-get-a-busy-persons-attention-write-them-a-sonnet#comments</comments>
		<pubDate>Thu, 27 Oct 2011 14:53:28 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=736</guid>
		<description><![CDATA[I worked for a couple of weeks on a data visualization of which I am quite proud. The only problem is that I took on that project for a very busy guy. He&#8217;s got a family, is an avid outdoorsman and cyclist from what I gather, and is head of a couple of different business [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_737" class="wp-caption alignright" style="width: 250px"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/FileJohn-milton.jpeg" alt="" title="File:John-milton" width="240" height="229" class="size-full wp-image-737" /><p class="wp-caption-text">Milton also included sonnets with his invoices. </p></div>I worked for a couple of weeks on a <a href="http://www.hodgsonco.com/html5-map-visualization-a-howto" title="HTML5 Map Visualization, a HowTo">data visualization</a> of which I am quite proud. The only problem is that I took on that project for a very busy guy. </p>
<p>He&#8217;s got a family, is an avid outdoorsman and cyclist from what I gather, and is head of a couple of different business ventures, like <a href="http://www.guildquality.com/">Guild Quality</a> and <a href="http://ignitionalley.com">Ignition Alley</a>. I, on the other hand, am a single guy with no kids and only one business. I have plenty of time to come up with silliness.</p>
<p>So, how to get his attention? Hm. Well, why not a sonnet? Never written a sonnet. Off to <a href="http://en.wikipedia.org/wiki/Sonnet">Wikipedia</a> to find out what a sonnet is, exactly. </p>
<h2>Forsooth, What Be A Sonnet?</h2>
<p>Our friendly local Wikipedia had this to say: <em>A sonnet is one of several forms of poetry that originate in Europe, mainly Provence and Italy. A sonnet commonly has 14 lines. The term &#8220;sonnet&#8221; derives from the Occitan word sonet and the Italian word sonetto, both meaning &#8220;little song&#8221; or &#8220;little sound&#8221;.<br />
</em></p>
<p>Okay, that doesn&#8217;t sound too hard. The main themes I want to get across are:</p>
<ol>
<li>I made a sweet visualization, like we talked about</li>
<li>I&#8217;d like you to look at it so that you can also see how sweet it is</li>
<li>I&#8217;d also like to send a sweet little invoice, which will then become bacon that goes into my mouth</li>
</ol>
<p>What I don&#8217;t want to do is sound like I&#8217;m impatient (even though I am). This might be a struggle. Oh well, off we go!</p>
<pre>
O Geoff, ye captain of the Quality Guild,
 Wilt thou not gaze upon my proof of concept?
 For without said look, no man can accept.
 An invoice for these things built.
Besides, without it, where be the Guild?
 With data piled up, but no clear concept
 Of Meaning, or where it's slept.
 So no, the time is now, and request filled,
To gaze and offer notes, perhaps.
 I am proud of the visualization, see,
 And also would like to send an invoice.
I don't mean to be a man who flaps
 His gums. But I'm (again) quite proud, you see
 Of my work. So gaze upon it, for it is choice!
</pre>
<p>I&#8217;ll update this post when (if) I get a response. He may fire me on the spot, of course. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/how-to-get-a-busy-persons-attention-write-them-a-sonnet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeGuard Design Details, The Slideshow Image</title>
		<link>http://www.hodgsonco.com/codeguard-design-details-the-slideshow-image</link>
		<comments>http://www.hodgsonco.com/codeguard-design-details-the-slideshow-image#comments</comments>
		<pubDate>Thu, 13 Oct 2011 19:49:45 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=706</guid>
		<description><![CDATA[Okay, yes, it&#8217;s true. I talk a lot on twitter about CodeGuard and the work I do for them. Why? Well, mostly because I like them. One of the reasons I like them so much is that I&#8217;ve done a lot of design work for them and I feel tremendously invested in their project as [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/CG_shield-90x90.jpg" alt="" title="CG_shield" width="90" height="90" class="alignright size-thumbnail wp-image-707" />Okay, yes, it&#8217;s true. I talk a lot on <a href="http://twitter.com/jimhodgson">twitter</a> about <a href="http://codeguard.com">CodeGuard</a> and the work I do for them. Why? Well, mostly because I like them. </p>
<p>One of the reasons I like them so much is that I&#8217;ve done a lot of design work for them and I feel tremendously invested in their project as a result. In fact, I have openly promised to do bodily harm to any other creatives should they get near the CodeGuard team. I&#8217;m kidding, of course. Mostly. </p>
<p>All I&#8217;m saying is if they got big enough to hire a creative director, I might consider applying for the gig. And that I would challenge any other applicants to combat. That&#8217;s just how design gets done, people. </p>
<p>Anyway, here&#8217;s a small sample of what we&#8217;ve been up to together. </p>
<h2>The Early Days</h2>
<p>When I was lucky enough to land them as a client back in the spring, their site looked like something this:<br />
<div id="attachment_708" class="wp-caption aligncenter" style="width: 610px"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/codeguard1.jpg" alt="" title="codeguard1" width="600" height="504" class="size-full wp-image-708" /><p class="wp-caption-text">Early CodeGuard Screenshot</p></div></p>
<p>The image in the middle was actually a slideshow that rotated through several different ideas along the same lines. It was decided that we could do away with the login block on the right hand side, thereby gaining more real estate for imagery. The image area is still known as &#8220;The Slideshow&#8221; in the filenames, even though it&#8217;s now a static image. </p>
<p>Many iterations later, the site took the form it has today, which, as of this writing, looks like this:<br />
<div id="attachment_713" class="wp-caption aligncenter" style="width: 610px"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/png-21.png" alt="" title="png-2" width="600" height="507" class="size-full wp-image-713" /><p class="wp-caption-text">CodeGuard.com as of Oct 13 2011</p></div></p>
<p>As you can see, the slideshow image takes up the whole space. Note that in the above example the line art comes from the talented folks at <a href="http://epipheo.com">Epipheo</a>, and some of the other details are holdovers from the fine work done by <a href="http://thephuse.com">The Phuse</a>, but most everything has been iterated over and changed by myself and the CodeGuard team. </p>
<p>In the intervening weeks, a parade of images have called the main slideshow area home. Here is a sample of some of the ones the CodeGuard team and I have produced. Note also that when I say that the &#8220;CodeGuard team&#8221; and I produced them, it is truly a team effort. Everyone there has great ideas and gets involved, which I like. </p>
<p>Some creatives <a href="http://hoveringartdirectors.tumblr.com/">get crabby about that kind of thing</a>, but I love it. I believe my work can only improve with other people&#8217;s input. </p>
<h2>Playing it Safe</h2>
<p>When we first started working on new slideshow images, we were discussing ways to get across what CodeGuard had to offer its customers. They back up web sites, so I liked the idea of using a safe. Here&#8217;s a slideshow image that incorporates that idea.</p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/new-slideshow1.jpg" alt="" title="new-slideshow1" width="600" height="241" class="aligncenter size-full wp-image-716" /></p>
<p>You can see here that the corners have been burned with the burn tool. I love that vignette look, probably because I have watched too many episodes of Top Gear, and their video people use this technique on almost everything they film. Here&#8217;s an example, featuring Ken Block driving like a crazy person. Check out how dark the corners are. That&#8217;s no accident, folks.</p>
<p><a href="http://www.youtube.com/watch?v=lFF2bkiHNVQ&#038;fmt=18">www.youtube.com/watch?v=lFF2bkiHNVQ</a></p>
<p>I always apply the vignette by hand, corner by corner, rather than using a filter. You can see it at work in the most recent screenshot above as well. I think it is a subtle way to make an image look slightly more interesting. I originally saw <a href="http://krautstache.com">Kurt Rampton</a> do it, I think, and have been doing it myself since. </p>
<h2>Rise of The Time Machines</h2>
<p>After the safe did a brief stint in the top spot, the CodeGuard team moved more in the direction of using a time machine to emphasize how their service let customers recover from mistakes. That gave rise to many a new image. Perhaps the most popular of these was the DeLorean image, which I turned into vector art using Illustrator&#8217;s live paint and live trace features. </p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/new-slideshow2.jpg" alt="" title="new-slideshow2" width="600" height="241" class="aligncenter size-full wp-image-720" /></p>
<p>As you can see, CodeGuard were starting to get some national press at this time, having just won the TechCrunch Distrupt audience award, so I incorporated the page peel in the lower right to find space for the press logos. In the current site, they have been moved to a whole area of their own because CodeGuard has gotten way too much media attention to fit in a peel. </p>
<p>Nice problem to have, eh?</p>
<p>Here&#8217;s another variation on the time machine theme, this time with a deep space twist. I used some images from the Hubble Deep Field project, but used Photoshop&#8217;s pinch tool to make them appear to be sucking inward in the direction of the logo, as if the logo were a black hole. </p>
<p>There&#8217;s also a subtle nod here to a certain fruit company&#8217;s imagery, which was reflected in the filename for this image: &#8220;tm-fruity.jpg&#8221;</p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/new-slideshow3.jpg" alt="" title="new-slideshow3" width="600" height="241" class="aligncenter size-full wp-image-722" /></p>
<p>Of course, I was too excited about my safe drawing to let it die so easily, having spent a couple of hours in Illustrator on it, so I brought it back for when already-logged-in users visited the home page. </p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/new-slideshow4.jpg" alt="" title="new-slideshow4" width="600" height="241" class="aligncenter size-full wp-image-724" /></p>
<p>So, that&#8217;s a few of the many cool things I&#8217;ve gotten to do for the folks at CodeGuard. I also <a href="http://www.hodgsonco.com/codeguards-hiyah-tee-shirt" title="CodeGuard’s Hiyah Tee Shirt">designed a tee shirt</a> for them which has been very popular. In fact it&#8217;s been stolen a few times from their trade show booths!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/codeguard-design-details-the-slideshow-image/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Map Visualization, a HowTo</title>
		<link>http://www.hodgsonco.com/html5-map-visualization-a-howto</link>
		<comments>http://www.hodgsonco.com/html5-map-visualization-a-howto#comments</comments>
		<pubDate>Thu, 13 Oct 2011 16:48:20 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=682</guid>
		<description><![CDATA[What could be more boring than data? Ever seen a huge long list of numbers, sliding down into infinity? Horrible! Forget about a glass of wine or a sleeping pill, friends. If you are having trouble drifting off, I suggest reading a spreadsheet. Of course, analyzed data can be crucial, but doing the analysis is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/png-300x171.png" alt="" title="png" width="300" height="171" class="alignright size-medium wp-image-683" />What could be more boring than data? Ever seen a huge long list of numbers, sliding down into infinity? Horrible! Forget about a glass of wine or a sleeping pill, friends. If you are having trouble drifting off, I suggest reading a spreadsheet. </p>
<p>Of course, <em>analyzed</em> data can be crucial, but doing the analysis is a complicated process best left to mathematicians locked in a basement with a couple of computers and a prodigious supply of coffee. Even then, the analysis is usually pretty hard to understand.</p>
<p><strong>Every now and then, though, someone comes up with a pretty way to view data, and it can be both informative and fun to look at. </strong></p>
<h2>The Walmart Visualization</h2>
<p>One of those great convergences of data and design came with the <a href="http://projects.flowingdata.com/walmart/">Walmart Visualization</a> by Flowing Data. Click and watch the animation. Pretty neat, huh?</p>
<p>That was forwarded to me by a client of mine with the question &#8220;Can we do this?&#8221;</p>
<p>Unfortunately, in animal kingdom programmer rankings I come in somewhere between an adolescent dachshund and the North American Blue Heron, as depicted in the graphic below. </p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/programmingrank.jpg" alt="" title="programmingrank" width="600" height="271" class="aligncenter size-full wp-image-685" /></p>
<p>I also suffer from high self esteem, however, so I decided to give it a try anyway.</p>
<h2>The first clue, Tile 5</h2>
<p><a href="http://tile5.org"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/png-1-261x300.png" alt="" title="png-1" width="261" height="300" class="alignright size-medium wp-image-698" /></a>As I have <a href="http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto" title="The Great jQuery Interactive Map Saga, a HowTo: Part One">stated previously</a>, I would much rather lie down in traffic than work with Flash. I&#8217;d also probably rather spend a day wearing underpants made of pine cones, but that is neither here nor there.</p>
<p>What is both here and there is that I wanted a HTML 5 way of reproducing the FlowingData visualization. The first clue I had that this could be done came from a library called <a href="http://www.tile5.org/">Tile5</a>, even though I have no idea what Tile5 does. </p>
<p>I did, however, see <a href="http://www.tile5.org/demos/playground/#visualization/walmart">this demonstration</a> on their page which looked a lot like what I was trying to achieve. Unfortunately, the code was too hard for someone of my level to comprehend and I never quite got it to work despite the expert help of Tile5 mastermind, <a href="http://twitter.com/#!/DamonOehlman">Damon Oehlman</a>.</p>
<p>From his example, though, I learned about something called CloudMade, who have what they call a <a href="http://developers.cloudmade.com/projects/show/web-maps-studio">Web Maps Studio</a>.</p>
<h2>The Map Takes Shape</h2>
<p>That&#8217;s when things started to take off. Check out my proof of concept code. Mind you, it has to shovel 10,000 lines of data into memory, so it takes a few seconds to load:<br />
<a href="http://hodgsonco.com/map/poc.html">http://hodgsonco.com/map/poc.html</a></p>
<p>As you can see, I only need two javascript libraries loaded to get going:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>13
14
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">  &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;http://tile.cloudmade.com/wml/latest/web-maps-lite.js&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<p>Then, in the body of the html document, I declare a div with the id mapContainer. There&#8217;s also a div in there with the id &#8220;date&#8221; which I am using to output the date information as the visualization runs.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>33
34
35
36
37
38
39
40
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">  &lt;div id=&quot;mapContainer&quot;/&gt;&lt;div id=&quot;date&quot;&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
&nbsp;
    var cloudmade = new CM.Tiles.CloudMade.Web({key: 'GET YOUR OWN API KEY FROM CLOUDMADE', styleId: 999});
    var map = new CM.Map('mapContainer', cloudmade);
    map.setCenter(new CM.LatLng(37.16, -96.68), 4);
&nbsp;
  &lt;/script&gt;</pre></td></tr></table></div>

<p>That code alone will produce a blank map centered on the US that can be zoomed and dragged just like Google Maps. </p>
<p>Speaking of Google Maps, you might think they&#8217;d have an API for creating cool visualizations like this. You might even be especially disappointed in them when they don&#8217;t have said API <em>and</em> you are a stockholder who desperately wants their stock price to rise. No such luck, lunch meat. </p>
<h2>You want dots? We got dots!</h2>
<p>From there all I had to do was slap some dots on the map. I had a huge list of dates with zipcode information to work with, which are the dates that an email sent by my client was opened. My friend K.C. Young of <a href="http://codeguard.com">CodeGuard</a> helped turn that zipcode data into latitude/longitude data, which Cloudmade can use to place a marker on the map. </p>
<p>I discovered I could also specify my own image to use as a marker, so I made a mostly-transparent white dot for this purpose. In this way, I could mark the events and also show how they clustered up in certain areas. </p>
<p>Here&#8217;s how the code works. First of all, I wanted to step through the huge list of opens (10,000 records) by day. I used <a href="http://www.w3schools.com/jsref/met_win_setinterval.asp">setInterval()</a> to do this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>42
43
44
45
46
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">  &lt;script type=&quot;text/javascript&quot; src=&quot;zipsnlats.js&quot;&gt;&lt;/script&gt;
  <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;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> currentdate <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
  intid <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;stepthrough()&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">250</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>That fires the following function 4 times a second, which we use to gather up all the events for a certain date.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">  <span style="color: #003366; font-weight: bold;">function</span> stepthrough<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">//figure out first date.</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>currentdate <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #006600; font-style: italic;">// we've not been run before</span>
      currentdate <span style="color: #339933;">=</span> opens<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;date&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>currentdate <span style="color: #339933;">==</span> opens<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;date&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      addpoint<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      i<span style="color: #339933;">++;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">//set the date for next iteration</span>
    currentdate <span style="color: #339933;">=</span> opens<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;date&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div#date'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>currentdate<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>i<span style="color: #339933;">&gt;=</span><span style="color: #CC0000;">5000</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">//if (!opens[i][&quot;date&quot;]) {</span>
      console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Clearing interval&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      clearInterval<span style="color: #009900;">&#40;</span>intid<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div#date'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Limited at 5000 records&quot;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Each time the function above finds a matching date, it fires this function to add a point to the map. The end result is that all the points that match display pretty much simultaneously.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>69
70
71
72
73
74
75
76
77
78
79
80
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">  <span style="color: #003366; font-weight: bold;">function</span> addpoint<span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> myMarkerLatLng <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> CM.<span style="color: #660066;">LatLng</span><span style="color: #009900;">&#40;</span>opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;latitude&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;longitude&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;I: &quot;</span> <span style="color: #339933;">+</span> index <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; LAT: &quot;</span> <span style="color: #339933;">+</span> opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;latitude&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; LONG: &quot;</span> <span style="color: #339933;">+</span> opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;longitude&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #003366; font-weight: bold;">var</span> icon <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> CM.<span style="color: #660066;">Icon</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    icon.<span style="color: #660066;">image</span>  <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://hodgsonco.com/map/transdot.png&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #006600; font-style: italic;">//icon.iconSize = new CM.Size(32, 32);</span>
    <span style="color: #006600; font-style: italic;">//icon.iconAnchor = new CM.Point(16, 32);</span>
    <span style="color: #003366; font-weight: bold;">var</span> myMarker <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> CM.<span style="color: #660066;">Marker</span><span style="color: #009900;">&#40;</span>myMarkerLatLng<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span> opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;date&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> icon<span style="color: #339933;">:</span> icon<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    map.<span style="color: #660066;">addOverlay</span><span style="color: #009900;">&#40;</span>myMarker<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>I think the <a href="http://hodgsonco.com/map/poc.html">end result</a> looks nicer this way, but I also let it run as fast as it wanted to a few times and the end result was that my new 17&#8243; MacBook ground to a halt before all 10,000 records were displayed. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/html5-map-visualization-a-howto/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CodeGuard&#8217;s Hiyah Tee Shirt</title>
		<link>http://www.hodgsonco.com/codeguards-hiyah-tee-shirt</link>
		<comments>http://www.hodgsonco.com/codeguards-hiyah-tee-shirt#comments</comments>
		<pubDate>Mon, 03 Oct 2011 20:59:54 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=661</guid>
		<description><![CDATA[One of my best and most favorite-est clients is local Atlanta startup CodeGuard. They&#8217;re great people who have been really easy to work with while still challenging me. When they mentioned that they were interested in a new and different tee shirt design, I knew I wanted to do something cool. Now, I am a [...]]]></description>
			<content:encoded><![CDATA[<p>One of my best and most favorite-est clients is local Atlanta startup <a href="http://codeguard.com">CodeGuard</a>. They&#8217;re great people who have been really easy to work with while still challenging me. When they mentioned that they were interested in a new and different tee shirt design, I knew I wanted to do something cool. </p>
<p>Now, I am a huge fan of <a href="http://mailchimp.com">MailChimp</a>&#8216;s designs and user experience. I took a short tour over there a few weeks ago, given by my friend <a href="http://http://seriousron.com/">Ron Lewis</a>, their creative director. During that tour, I snagged some sweet MailChimp goodies, not least of which being a super comfortable tee shirt with a great off-center design. </p>
<p>That tee, as well as the <a href="http://highgroove.com">Highgroove</a> <a href="http://www.flickr.com/photos/highgroove/5818638789/">tee</a>, inspired and emboldened the CodeGuard team to get a little bit trans-mundane with their tee shirt. So, with excitement in the air and free license to let my imagination run wild, I set to work. </p>
<div id="attachment_665" class="wp-caption alignright" style="width: 210px"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/knight.png" alt="" title="knight" width="200" height="200" class="size-full wp-image-665" /><p class="wp-caption-text">My first attempt, an ASCII knight. He fell on his own sword.</p></div>
<h2>Hokusai can you see</h2>
<p>A lot of the imagery I&#8217;ve used for CodeGuard to date has been either things that represent security, like safes and locks and shields, or the time machine images which stress their ability to restore backups of a web site. I wanted to do something less industrial and with a little more spirit this time. I wanted to use something that had a little more soul. </p>
<p>That&#8217;s why I tried the ASCII knight at first, but I just couldn&#8217;t get it to look quite right. Using too few characters made him obscure, and using too many made the ASCII joke get kind of lost. So I abandoned him. Sorry Mr. Knight. Sometimes my first idea is not the best. </p>
<p>From there I decided to try some Hokusai-style imagery. I&#8217;m a huge fan of &#8220;<a href="http://www.loc.gov/pictures/item/2008660568/">The great wave off shore of Kanagawa</a>,&#8221; with its ubiquitous white-foamed waves dwarfing fishing boats. I say &#8220;ubiquitous&#8221; because you can see those very same white-foamed waves crashing to and fro on nearly any tattooed hipster&#8217;s forearm in Atlanta nearly 200 years after it was painted.</p>
<p>Still, I love the style, so I searched the <a href="http://www.loc.gov/pictures/">Library of Congress&#8217;s images</a>, which are public domain, for something neat. I got lucky and found a samurai image I really liked, so I grabbed it and pumped it through Illustrator&#8217;s Live Trace. Here&#8217;s what I ended up with:<br />
<a href="http://www.hodgsonco.com/wp-content/uploads/2011/10/Hyaaaaah.jpg" rel="lightbox"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/Hyaaaaah-231x300.jpg" alt="" title="Hyaaaaah" width="231" height="300" class="aligncenter size-medium wp-image-670" /></a></p>
<p>He&#8217;s pretty awesome, but he needs a little branding. How about a shield? Perfect, since CodeGuard&#8217;s logo is a shield, but I wanted his shield&#8217;s style to match his overall look. So I drew something that looked suitable:</p>
<p><a href="http://www.hodgsonco.com/wp-content/uploads/2011/10/Hyaaaaah1.jpg" rel="lightbox"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/Hyaaaaah1-231x300.jpg" alt="" title="Hyaaaaah" width="231" height="300" class="aligncenter size-medium wp-image-671" /></a></p>
<p>Now we&#8217;re getting somewhere. From there, I just put him over a red background, whipped up some of those nearly-ubiquitous light rays, then beat them up using various brushes in Photoshop. I also found a pretty cool font that seemed to match the look okay known as <a href="http://www.dafont.com/yama-moto.font">Yama Moto</a>. I used that to add the CodeGuard name on the left, and voila!</p>
<p><a href="http://www.hodgsonco.com/wp-content/uploads/2011/10/hyaaah_tee_vertical.jpg" rel="lightbox"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/hyaaah_tee_vertical.jpg" alt="" title="hyaaah_tee_vertical" width="500" height="647" class="aligncenter size-full wp-image-673" /></a></p>
<p>Everyone liked the design, so it went off to the printers, and was immediately shipped from there to a conference. I&#8217;m told it was a big hit with everyone at the conference. In fact, it&#8217;s so popular someone lifted the display model from CodeGuard&#8217;s booth at the show. <del datetime="2011-10-13T19:50:50+00:00">Worse yet, I haven&#8217;t even gotten my hands on one.</del> </p>
<p>Oh well, at least they are well-received. What more can someone ask for their work than for it to be prized?</p>
<h2>Update!</h2>
<p>I now have my very own Hiyah tee shirt, I&#8217;m proud to say, and it&#8217;s been lifted from yet another trade show display table, though these two facts are unrelated, I promise. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/codeguards-hiyah-tee-shirt/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Great jQuery Interactive Map Saga, a HowTo: Part Two</title>
		<link>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto-part-two</link>
		<comments>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto-part-two#comments</comments>
		<pubDate>Mon, 26 Sep 2011 18:11:12 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=639</guid>
		<description><![CDATA[I am on a quest. Yes, a great and epic quest to construct an interactive map for my client that is both lovely and editable from within WordPress. In Part One I covered the arduous task of using jQuery plugins to make an imagemap do some things it was never designed to do. Now we [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_641" class="wp-caption alignright" style="width: 310px"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Frodo-300x204.jpg" alt="" title="Frodo" width="300" height="204" class="size-medium wp-image-641" /><p class="wp-caption-text">Frodo, delighted upon hearing that he&#039;ll never have to develop Actionscript ever again.</p></div>I am on a quest. Yes, a great and epic quest to construct an interactive map for my <a href="http://lascatalinascr.com">client</a> that is both lovely and editable from within WordPress. In <a href="http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto" title="The Great jQuery Interactive Map Saga, a HowTo: Part One">Part One</a> I covered the arduous task of using jQuery plugins to make an imagemap do some things it was never designed to do. Now we forge onward, and make our content easy to update!</p>
<p>&#8220;But Jim,&#8221; you might be saying, &#8220;how in the name of Frodo are we going to pass information back and forth from WordPress to javascript?&#8221; Still your hearts, friends. We will get there in due course. </p>
<p>It goes without saying that some of the weaker developers will be killed and eaten along the way, but the strong among us will prevail. </p>
<h2>Step One: Getting the correct information from WordPress</h2>
<p>This is going to be kind of specific to my application, but I&#8217;m going to go over it anyway. It&#8217;s specific to me because my client is using the Genesis theme framework from <a href="http://studiopress.com">Studiopress</a>, and the AgentPress child theme on top of that. </p>
<p>So here&#8217;s what I did to get the posts I needed:</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
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    // load WordPress information into an associative array
    var lots = <span style="color: #000000; font-weight: bold;">&lt;?</span>
      <span style="color: #666666; font-style: italic;">// Now make the JS array happen</span>
      <span style="color: #000088;">$lots_query</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category_name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'properties'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'posts_per_page'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$x</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$lots_data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$lots_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$lots_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">/* get custom agentpress data. This is stupefying */</span>
        <span style="color: #000088;">$ap_options</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$n</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">11</span><span style="color: #339933;">;</span><span style="color: #000088;">$n</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$label</span> <span style="color: #339933;">=</span> genesis_get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'features_1_col'</span><span style="color: #339933;">.</span><span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'_'</span><span style="color: #339933;">.</span><span style="color: #000088;">$n</span><span style="color: #339933;">,</span> AP_SETTINGS_FIELD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'_features_1_col'</span><span style="color: #339933;">.</span><span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'_'</span><span style="color: #339933;">.</span><span style="color: #000088;">$n</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> genesis_get_custom_field<span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #666666; font-style: italic;">//print &quot;\n\n&lt;!-- BLARGH $label $name --&gt;\n\n&quot;;</span>
            <span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$label</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
          <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Site:'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Lot Number:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$lots_data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Site:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Lot Number:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #000088;">$lots_data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Site:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Lot Number:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'text'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> get_the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #000088;">$lots_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">75</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span><span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'tipcontent'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>get_the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
      <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lots_data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">?&gt;</span>;</pre></td></tr></table></div>

<p>If you&#8217;re just using regular WordPress, you can get your post info however you like. As you can see from my snarky comment at line 8, I&#8217;m none too pleased with the kludgy nature of this solution, but as someone who learned to write code in PERL, I&#8217;m not <em>that</em> bothered. </p>
<p>The important bit is that I constructed myself a multi-dimensional array in PHP and then used PHP&#8217;s hand-dandy <a href="http://php.net/manual/en/function.json-encode.php">json_encode()</a> function. I didn&#8217;t even know that existed and would totally have constructed a js array by hand had Jon Manuzak not alerted me to it. Thanks Jon!</p>
<p>By the way, do you guys still say &#8220;kludge?&#8221; I&#8217;m 37 years old now. I&#8217;m no longer too hip with what the kids are doing. Clue me in, here, skinny jeans. </p>
<h2>Step Two: Refer to your JSON data in the javascripts</h2>
<p>Now, this <a href="http://www.json.org/">JSON</a> business may sound fancy&#8230; perhaps too fancy for someone who might, say, stare at a computer for a significant portion of the day wearing only his underpants. In truth, it&#8217;s just a fancy name for the javascript version of what I&#8217;d call a <a href="http://en.wikipedia.org/wiki/Hash_table">hash</a> or an <a href="http://en.wikipedia.org/wiki/Associative_array">associative array</a>.</p>
<p>Here&#8217;s what my data looked like:</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> lots <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;5&quot;</span><span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Lot Number 5&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;&lt;img width=<span style="color: #000099; font-weight: bold;">\&quot;</span>75<span style="color: #000099; font-weight: bold;">\&quot;</span> height=<span style="color: #000099; font-weight: bold;">\&quot;</span>75<span style="color: #000099; font-weight: bold;">\&quot;</span> src=<span style="color: #000099; font-weight: bold;">\&quot;</span>http:<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\/</span>lascatalinascr.com<span style="color: #000099; font-weight: bold;">\/</span>wp-content<span style="color: #000099; font-weight: bold;">\/</span>uploads<span style="color: #000099; font-weight: bold;">\/</span>2011<span style="color: #000099; font-weight: bold;">\/</span>09<span style="color: #000099; font-weight: bold;">\/</span>punta-penca-views-150x150.jpg<span style="color: #000099; font-weight: bold;">\&quot;</span> class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tipcontent wp-post-image<span style="color: #000099; font-weight: bold;">\&quot;</span> alt=<span style="color: #000099; font-weight: bold;">\&quot;</span>punta-penca-views<span style="color: #000099; font-weight: bold;">\&quot;</span> title=<span style="color: #000099; font-weight: bold;">\&quot;</span>punta-penca-views<span style="color: #000099; font-weight: bold;">\&quot;</span> <span style="color: #000099; font-weight: bold;">\/</span>&gt;Lot 5, like all Punta Penca lots, is among the most beautiful plots of land in the world. The views will astonish and amaze.&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>&#8230;and here is how I referenced that data:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">     <span style="color: #003366; font-weight: bold;">var</span> lottitle <span style="color: #339933;">=</span> <span style="color: #3366CC;">'Lot Number '</span> <span style="color: #339933;">+</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'alt'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
     <span style="color: #003366; font-weight: bold;">var</span> lotnumber <span style="color: #339933;">=</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'alt'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
     <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>lots <span style="color: #339933;">&amp;&amp;</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>lotnumber<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>lotnumber<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       lottext <span style="color: #339933;">=</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>lotnumber<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
       lottitle <span style="color: #339933;">=</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>lotnumber<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>So I just referred to every level of data with its name in brackets. Such is the magic of JSON. </p>
<h2>All is Bliss on the Intertubes</h2>
<p>So that&#8217;s a wrap for Part Two, friends. Remember, you can always go back to <a href="http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto" title="The Great jQuery Interactive Map Saga, a HowTo: Part One">Part One</a> to see how I built the map to begin with, and you can always get in touch with me if you have questions. </p>
<p>I&#8217;ll probably have wrong answers, but I&#8217;ll give &#8216;em a shot anyways. </p>
<p>Stay tuned for Part Three, in which I add even more areas of information and things get seriously fancy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto-part-two/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin Promiscuity</title>
		<link>http://www.hodgsonco.com/wordpress-plugin-promiscuity</link>
		<comments>http://www.hodgsonco.com/wordpress-plugin-promiscuity#comments</comments>
		<pubDate>Thu, 22 Sep 2011 12:34:08 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=631</guid>
		<description><![CDATA[WordPress&#8217;s plugin capability reminds me a lot of human sexuality. A web site, much like a person, has needs that require cooperation to fill. Sure, a human&#8217;s needs might be a touch more, shall we say, embarrassing than a site&#8217;s need to list its most recent posts, but ultimately there&#8217;s a want that is getting [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_632" class="wp-caption alignright" style="width: 310px"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/IMG_0611-300x224.jpg" alt="" title="IMG_0611" width="300" height="224" class="size-medium wp-image-632" /><p class="wp-caption-text">This power strip is a complete whore. </p></div>WordPress&#8217;s plugin capability reminds me a lot of human sexuality. A web site, much like a person, has needs that require cooperation to fill. Sure, a human&#8217;s needs might be a touch more, shall we say, embarrassing than a site&#8217;s need to list its most recent posts, but ultimately there&#8217;s a want that is getting indulged. </p>
<p>One can take it too far. Sometimes, perhaps drunk on the vapors of pleasure or, more likely, malt liquor, WordPress users install plugin after plugin. </p>
<h2>Have you seen my Barry White albums?</h2>
<p>&#8220;Oh, yes!&#8221; they cry. &#8220;<a href="http://wordpress.org/extend/plugins/jetpack/">Jetpack</a> my stats! <a href="http://wordpress.org/extend/plugins/akismet/">Akismet</a> my spam comments! <a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/">All-in-one</a> my SEO!&#8221;</p>
<p>These three are well known friends to WordPress, but what if temperatures run higher still? Darker, less-supported plugins may get installed. The pleasure could mount endlessly upon itself. It could roll like a great wave, gathering speed, crashing now on the beach again and again! Nirvana! Xanadu! The Jersey Shore!</p>
<p>And that&#8217;s when things grind to a halt, friends: when promiscuousness leads us to that one bad apple. </p>
<h2>At this point on TV some ominous chords would be played, and the screen might go all black and white</h2>
<p>Now don&#8217;t get me wrong. It&#8217;s not the numbers that get you, per se. It is possible to be quite the little strumpet without ever having a problem, but in order to live that life one has to be very careful, and very well-informed. More careful and more well-informed than perhaps most of us are willing to become. </p>
<p>Ryan Imel writes in <a href="http://http://wpcandy.com/thinks/active-plugin-counts-just-dont-matter">WP Candy</a>:</p>
<blockquote><p>&#8230;plugins are arguably the best part of WordPress. To convey that they are dangerous in large numbers is to do a disservice to the community itself.</p></blockquote>
<p>It&#8217;s true, plugins are great when they fill a need, but it&#8217;s also true that the more you have, the more likely you are to have a problem. You won&#8217;t know which one is going to <em>cause</em> that problem until it&#8217;s too late. We don&#8217;t want to go to Too Late Town. We want to stay in Justrightville.</p>
<h2>Keep your hands to yourself!</h2>
<p>Let&#8217;s be careful out there, friends. Let&#8217;s exercise a measure of caution, let&#8217;s keep ourselves informed, and let&#8217;s do our best to keep embarrassing photos of whatever we do get into off the Internet. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/wordpress-plugin-promiscuity/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ATL Beer List</title>
		<link>http://www.hodgsonco.com/atl-beer-list</link>
		<comments>http://www.hodgsonco.com/atl-beer-list#comments</comments>
		<pubDate>Fri, 16 Sep 2011 20:56:42 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=620</guid>
		<description><![CDATA[I spent some time this morning working on my friend Gregg Rothmeier&#8217;s passion project, the ATL Beer List. I like the Google policy of spending 20% of an employees time on stuff they&#8217;re interested in, so I try to work on projects like that myself. I also like beer. I mean I really, really like [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-21.png" rel="lightbox"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-21-300x216.png" alt="Click to embiggen" title="png-2" width="300" height="216" class="alignright size-medium wp-image-629" /></a>I spent some time this morning working on my friend Gregg Rothmeier&#8217;s passion project, the <a href="http://atlbeerlist.com">ATL Beer List</a>. </p>
<p>I like the Google policy of spending 20% of an employees time on stuff they&#8217;re interested in, so I try to work on projects like that myself. I also like beer. I mean I really, <em>really</em> like beer. </p>
<p>Of course, I&#8217;m also interested in getting as much experience as I can working on designs for Ruby on Rails. I&#8217;m getting more and more familiar with how those projects work, I&#8217;m happy to say. In fact, I did a little debugging work on the <a href="http://api.rubyonrails.org/classes/ActiveRecord/Migration.html">migration tables</a> for this one. </p>
<p>It was really easy stuff, mind you. A fish could have done it, if only someone would invent a fin-friendly keyboard. I just checked Google to see if anyone had, by the way. Doesn&#8217;t seem like it. </p>
<p>Anyway, the Beer List is a project that needs a few more little details, but unfortunately I had to break away around lunch to work on some more financially remunerative projects lest I find myself homeless and asking Gregg if I can move in with him for a few weeks. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/atl-beer-list/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Great jQuery Interactive Map Saga, a HowTo: Part One</title>
		<link>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto</link>
		<comments>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto#comments</comments>
		<pubDate>Thu, 15 Sep 2011 19:43:18 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=583</guid>
		<description><![CDATA[One of my amazing clients is in the real estate business, which is great. After all, they say that everyone should get into real estate because there&#8217;s only so much real estate to own. Tell that to those wacky Japanese or the fun lovers in Dubai. Those guys construct islands like I scramble eggs. My [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/04_maps.png" alt="" title="04_maps" width="128" height="128" class="alignright size-full wp-image-584" />One of my <a href="http://lascatalinascr.com">amazing clients</a> is in the real estate business, which is great. After all, they say that everyone should get into real estate because there&#8217;s only so much real estate to own. </p>
<p>Tell that to those wacky <a href="http://en.wikipedia.org/wiki/Kansai_International_Airport">Japanese</a> or the fun lovers in <a href="http://en.wikipedia.org/wiki/Burj_Al_Arab">Dubai</a>. Those guys construct islands like I scramble eggs.</p>
<p>My clients asked what I thought about coming up with an interactive map to show the placement of their home sites. Google <a href="http://maps.google.com/">Maps</a> sprang to mind, but as the development in question is new, and the satellite images for it were taken in the dry season, it wouldn&#8217;t do. After all, it is important to look our best. This is why I campaign tirelessly to have all photos that show my love handles removed from Facebook.</p>
<h2>Death before Flash</h2>
<div id="attachment_588" class="wp-caption alignleft" style="width: 100px"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/noflash-90x90.jpg" alt="" title="noflash" width="90" height="90" class="size-thumbnail wp-image-588" /><p class="wp-caption-text">Hey, instead of using Flash, let&#039;s lie down in the street.</p></div>
<p>For this application I wanted the ability to highlight each property on mouseover, and I wanted to be able to show popups with further information. Above all, I didn&#8217;t want to use Flash. In fact, I&#8217;d rather punch myself directly in the gut than develop a Flash application, and I punch pretty hard. </p>
<p>That left <a href="http://jquery.com/">jQuery</a>. Now, I&#8217;m not much of a programmer, but I think Javascript is painful and annoying, kind of like air travel. Trusty jQuery, though, is like having a cocktail on your flight. You still have to go through some hassle, but it&#8217;s a little easier to bear. </p>
<p>Looking around a bit on yonder Google netted me <a href="http://www.gethifi.com/blog/jquery-vs-flash-for-interactive-map">this article</a> from the fine folks at <a href="http://gethifi.com">GetHifi</a>. It was slick, but not exactly what I wanted. Every other article on the Internet seemed to link back to this one, as well.</p>
<p>So, like countless others before me, I descended into the nerd mines and began a-hackin&#8217;.</p>
<p><a href="http://abhinavsingh.com/blog/2009/03/using-image-maps-in-javascript-a-demo-application/"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-2.54.26-PM.png" alt="" title="Screen shot 2011-09-15 at 2.54.26 PM" width="243" height="291" class="alignright size-full wp-image-595" /></a></p>
<h2>Abhi Singh to the rescue</h2>
<p>The first promising nugget I found was on the web page of <a href="http://abhinavsingh.com/blog/2009/03/using-image-maps-in-javascript-a-demo-application/">Abhi Singh</a>, who had a sweet little map of India that did some map highlighting and had a tooltip as well. Again, it wasn&#8217;t exactly what I wanted, but it was getting close. He also has a little javascript tool that will help you make your AREA coords. </p>
<p>Speaking of AREA coords, even though I have taught a class on Dreamweaver and know that it is as stupefying as any modern software can be, I used Dreamweaver to make my image map, because it&#8217;s installed on my computer for some reason. Hope springs eternal, I guess. </p>
<p>I was punished for that hope.</p>
<h2>Step one: Make an Image Map</h2>
<p>Mind you, it has been many a long year since I even thought of making an image map, but in this case it seemed like the best idea. The properties in question weren&#8217;t square, though, and I wanted the thing to behave nice-like, so I thought that polygon-shaped image maps were the key. </p>
<p>Here are my polygonal image map shapes all laid out in Dreamweaver. The light blue areas are them.<br />
<img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-3.00.29-PM.png" alt="" title="Screen shot 2011-09-15 at 3.00.29 PM" width="614" height="489" class="aligncenter size-full wp-image-597" /></p>
<p>That looks like this in code form:</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
19
20
21
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;puntapenca.jpg&quot; width=&quot;600&quot; height=&quot;477&quot; border=&quot;0&quot; usemap=&quot;#Map&quot; /&gt;
&lt;map name=&quot;Map&quot; id=&quot;Map&quot;&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;522,40,552,54,554,64,547,83,533,84,509,65,514,63,509,56,515,48,515,36&quot; href=&quot;#&quot; alt=&quot;5&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;497,65,522,87,517,89,511,92,506,97,502,103,498,109,493,110,486,106,485,95,484,74,496,66&quot; href=&quot;#&quot; alt=&quot;7&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;459,83,461,83,474,84,477,119,442,114,445,97,460,78&quot; href=&quot;#&quot; alt=&quot;9&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;441,116,475,121,476,135,466,142,457,151,424,134,430,127,438,123,441,116&quot; href=&quot;#&quot; alt=&quot;11&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;421,139,455,156,447,173,420,170,412,159,413,151,422,139&quot; href=&quot;#&quot; alt=&quot;13&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;426,176,447,179,435,209,413,207,414,201,412,193,415,186,419,178,425,179,426,175&quot; href=&quot;#&quot; alt=&quot;15&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;423,219,443,220,425,256,398,239,396,235,398,226,404,222,408,217&quot; href=&quot;#&quot; alt=&quot;17&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;393,242,394,244,397,242,422,256,409,284,377,265,391,242&quot; href=&quot;#&quot; alt=&quot;19&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;374,267,407,286,402,296,404,313,361,289,361,282,367,275,371,272,374,267&quot; href=&quot;#&quot; alt=&quot;21&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;337,341,318,345,299,357,284,321,288,319,298,322,302,319,314,331,326,338,337,340&quot; href=&quot;#&quot; alt=&quot;25&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;307,314,304,300,312,292,289,269,255,284,274,300,283,320,287,318,298,321,302,318,306,314&quot; href=&quot;#&quot; alt=&quot;27&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;315,258,334,250,338,258,354,270,351,277,349,284,349,291,350,297,351,302,352,310,350,318,340,321,324,295,314,258&quot; href=&quot;#&quot; alt=&quot;20&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;340,249,340,252,358,266,369,257,383,235,363,226,357,243,339,249&quot; href=&quot;#&quot; alt=&quot;18&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;376,199,398,210,393,212,390,217,388,220,386,225,385,230,383,234,363,225,376,200&quot; href=&quot;#&quot; alt=&quot;16&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;400,201,378,191,397,157,405,165,407,170,408,174,406,178,402,182,401,185,400,190,400,194,400,200&quot; href=&quot;#&quot; alt=&quot;14&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;440,84,415,80,415,114,426,116,431,112,432,107,433,101,434,96,437,89,441,84&quot; href=&quot;#&quot; alt=&quot;12&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;423,79,428,71,432,64,436,60,441,58,449,54,457,52,462,54,465,57,469,62,471,68,466,67,460,67,455,69,452,72,447,77,447,76,441,83,423,80&quot; href=&quot;#&quot; alt=&quot;10&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;362,291,403,315,402,329,345,340,343,337,349,335,354,332,357,328,361,324,363,319,364,313,364,306,363,301,362,296,362,291&quot; href=&quot;#&quot; alt=&quot;23&quot; /&gt;
&lt;/map&gt;</pre></td></tr></table></div>

<p>And here&#8217;s how Dreamweaver punished me: every time you make a new polygonal image map area thingy, you see this message, which you then have to click on to dismiss. Yeah. Every frickin&#8217; time. </p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-3.04.32-PM.png" alt="" title="Screen shot 2011-09-15 at 3.04.32 PM" width="507" height="212" class="aligncenter size-full wp-image-599" /></p>
<p>Hey, look, I am all about compliance and accessibility, but do I really need to see that message for each and every shape I make? Jeez! OH well, I got through it. </p>
<h2>Step Two: maphilight</h2>
<p>The next phase of this Saga has a name. Yes, a beautiful name, as though from the lips of Venus herself: <a href="http://davidlynch.org/js/maphilight/docs/">maphilight</a>. Okay, I guess it&#8217;s not that fancy, but what it does is. See, it takes your handy-dandy image map you made and <a href="http://davidlynch.org/js/maphilight/docs/demo_usa.html">highlights each AREA</a> in whatever way you tell it to. Impressed? You should be. </p>
<p>All you have to do is download the little js file and load &#8216;er up in your header like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script type='text/javascript' src='/things/n/stuff/jquery.maphilight.min.js?ver=1.1'&gt;&lt;/script&gt;</pre></div></div>

<p>Then tell the magical gnomes that live in your computer that they should use that script on the image map in question like so:</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
19
</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> 
jQuery<span style="color: #009900;">&#40;</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>
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.map'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">maphilight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	strokeColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'00ff00'</span><span style="color: #339933;">,</span>
	strokeWidth<span style="color: #339933;">:</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">,</span>
	neverOn<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
	groupBy<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
	wrapClass<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
	shadow<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
	shadowX<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
	shadowY<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
	shadowRadius<span style="color: #339933;">:</span> <span style="color: #CC0000;">6</span><span style="color: #339933;">,</span>
	shadowColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'000000'</span><span style="color: #339933;">,</span>
	shadowOpacity<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.8</span><span style="color: #339933;">,</span>
	shadowPosition<span style="color: #339933;">:</span> <span style="color: #3366CC;">'outside'</span><span style="color: #339933;">,</span>
	shadowFrom<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span>
	<span style="color: #009900;">&#125;</span><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>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>There are some extraneous options listed above that I used for my purposes which you can ignore, but I&#8217;ll leave them in in case someone else wonders how to use settings other than the defaults. It took me a bit of tinkering, but as I say, I am a crap programmer. </p>
<p>Anyway, the good news is we&#8217;re getting close. Like an old man with gross ears, all we need is a qtip!</p>
<h2>Step Whatever I&#8217;m On Now</h2>
<p>To get the tooltips, I used a plugin called <a href="http://craigsworks.com/projects/qtip/">qTip</a>. The developers of qTip are very smart, and also very excited to make sure we all know that qTip version two is coming out and version one will soon be obsolete. </p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/png2.png" alt="" title="png" width="765" height="260" class="aligncenter size-full wp-image-604" /></p>
<p>Okay, well, I guess I might be willing to test out some experimental software. After all, what could go wrong, right? Oh God!</p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/qtip.jpg" alt="" title="qtip" width="599" height="177" class="aligncenter size-full wp-image-606" /></p>
<p>This being a production site, I just decided to stick with version 1. In the end it worked out really nice like. </p>
<p>Once again, I inserted a bit of code to let my computer gnomes know that they needed to get off their lazy butts and do some work already. I&#8217;m not running a day care center here, after all, you freakin shiftless gnomes.</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
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;example&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> 
<span style="color: #006600; font-style: italic;">// Create the tooltips only when document ready</span>
jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</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>
   <span style="color: #006600; font-style: italic;">// Use the each() method to gain access to each elements attributes</span>
   jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'area'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</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>
      jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">qtip</span><span style="color: #009900;">&#40;</span>
      <span style="color: #009900;">&#123;</span>
         content<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
            text<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&lt;img class=&quot;tipcontent&quot; src=&quot;punta-penca-views-s.jpg&quot;&gt;Punta Penca lots are among the most beautiful parcels of land in the world.'</span><span style="color: #339933;">,</span>
            title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Lot Number '</span> <span style="color: #339933;">+</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'alt'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// Use the ALT attribute of the area map</span>
         <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
         style<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'cream'</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// Give it the preset cream style</span>
            border<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
               width<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> 
               radius<span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span> 
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 
            tip<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span> <span style="color: #006600; font-style: italic;">// Apply a tip at the default tooltip corner</span>
         <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
         hide<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> fixed<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> delay<span style="color: #339933;">:</span> <span style="color: #CC0000;">500</span> <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span><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>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>If you have any questions about the qTip options, just saunter on over to the <a href="http://craigsworks.com/projects/qtip/docs/">qTip documentation</a>. It&#8217;s very well done. Nice work, qTippers!</p>
<h2>Conclusion!</h2>
<p>And that, as they say, or would if you paid them enough, is that. The finished product looks something a little bit like this:</p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-3.37.59-PM.png" alt="" title="Screen shot 2011-09-15 at 3.37.59 PM" width="600" height="476" class="aligncenter size-full wp-image-613" /></p>
<p>Notice that lot number 27 is highlighted, and there&#8217;s a sweet corresponding tooltip looking thing. With the options I have set for qTip, I can even put some clicky links and whatnot in the tip window if I want to. </p>
<p><a href="http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto-part-two" title="The Great jQuery Interactive Map Saga, a HowTo: Part Two"><br />
<h2>Update! Part Two now exists (and is awesome)</h2>
<p>Part Two is now complete</a>. Go forward and see how I hooked all this madness up to WordPress!</p>
<p>Now get back to work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

