<?xml version="1.0" encoding="UTF-8"?>
<a:feed xmlns:a="http://purl.org/atom/ns#" xmlns:h="http://www.w3.org/1999/xhtml" version="0.3">
  <a:title>this is aaronland</a:title>
  <a:link href="http://www.aaronland.info/weblog" rel="alternate" title="this is aaronland" type="text/html"/>
  <a:modified>2009-06-05T00:55:38-07:00</a:modified>
  <a:author>
    <a:name>Aaron Straup Cope</a:name>
    <a:url>http://www.aaronstraupcope.com</a:url>
  </a:author>
  <a:info type="application/xhtml+xml" mode="xml">
    <h:div>This is an Atom syndication feed. It is intended to be viewed in a news aggregator or syndicated to another site.  Please visit the <a href="http://intertwingly.net/wiki/pie/">Atom Project</a> for more information.</h:div>
  </a:info>
  <a:tagline type="text/plain">Help! I'm being chased by a bubblegum machine!! (aka “Get a real web-browser, you lazy bum.”)</a:tagline>
  <a:entry>
    <a:link type="text/html" href="http://www.aaronland.info/weblog/2009/06/01/bubblegum#iamhere" rel="alternate"/>
    <a:title>I Am Here Map (with apologies to Simon)</a:title>
    <a:id>http://www.aaronland.info/weblog/2009/06/01/bubblegum#iamhere</a:id>
    <a:issued>2009-06-01</a:issued>
    <a:created></a:created>
    <a:modified>2009-06-01T08:15:12-0700</a:modified>
    <a:content type="text/html" mode="xml">
      <h:div xmlns="http://www.w3.org/1999/xhtml">
                <ins class="content" datetime="2009-06-01T08:15:16-0700">

                    <h1 class="clustr flickr geo iamheremap javascript maps modestmaps shapefiles">I Am Here Map (with apologies to Simon)</h1>

                    <blockquote style="margin-bottom:40px;">
                        <p>I finally got fed up of hunting around for simple
                        latitude/longitude tools when messing around with
                        mapping APIs, so I built my own with a memorable
                        URL.</p>

                        <p style="text-align:right;">— <a href="http://simonwillison.net/2007/Oct/12/latlon/">Simon Willison</a></p>
                    </blockquote>

                    <p><a href="http://simonwillison.net/">Simon</a> will be remembered for many things and I
                    hope one of them is <a href="http://www.getlatlon.com/">getlatlon.com</a>. It's a
                    remarkably simple site — you drag a map around and it
                    displays the latitude and longitude of the center point
                    — but it insanely useful for all kinds of
                    things and no one, before Simon, had managed to put two and
                    two together. It was definitely a <em>Duh!</em> moment for me.</p> 

                    <p>I use it all the time, now, and I needed something like it for
                    a side project I'm working on. My first thought was to clone
                    Simon's work but when <a href="http://www.tom-carden.co.uk/">Tom</a>, from Stamen, told
                    me that they had been working on an
                    (still) experimental <a href="http://modestmaps.mapstraction.com/trac/browser/trunk/js">Javascript branch of the ModestMaps
                    code</a> I decided to try that instead.</p>

                    <p>Most days I still
                    haven't gotten over the initial shock and awe of seeing
                    Google Maps for the first time but at a certain point
                    All-Things-Google-All-The-Time starts to feel like walking
                    on thin ice. They're doing just fine competing on features
                    (a good thing!) but I think it's important we also continue build and
                    support <a href="http://highearthorbit.com/mapstraction-updates/">an
                    infrastructure of tools</a> that people can run and host
                    themselves.</p> 

                    <p>With that in mind, I set out to write my own
                    <q>getlatlon</q> map tool last week. It's called <q>I Am
                    Here Map</q> and on Sunday I finally pushed it out the
                    door.</p> 

                    <ul class="rel">
                        <li>It does basic getlatlon-style lookups</li>
                        <li>It does geocoding using either the Google Maps or
                        Flickr APIs. It's part of the plan to support a variety
                        of other geocoding services soon.</li>
                        <li>It does reverse geocoding, using the Flickr API.</li>
                        <li>It will fetch and display the <a href="http://code.flickr.com/blog/2008/10/30/the-shape-of-alpha/">shapefile</a> for associated with a point,
                        assuming it's been reverse geocoded successfully.</li>
                        <li>It does client-side geolocation/positioning (aka <q><a href="http://code.flickr.com/blog/2009/04/16/changelog-find-my-location-button/">find my location</a></q>) using a
                        variety of third-party services.</li>
                        <li>It allows for an arbitrary number of map tile
                        providers and styles. <span style="font-style:italic;">At the moment, there is only one
                        tile provider: <a href="http://www.cloudmade.com/">CloudMade</a>.</span></li>
                        <li>The whole thing, including core dependencies, is
                        bundled in a single Javascript file and loaded with a
                        couple lines of code.</li>
                    </ul>

                    <p>Like this:</p>

                    <div class="image500">
                        <a href="http://www.flickr.com/photos/straup/3577490589/" title="I Am Here Map                                                                                          (work in progress) by straup, on Flickr"><img src="http://farm3.static.flickr.com/2451/3577490589_089091cb93_o.png" width="611" height="508" alt="I                                                                                          Am Here Map (work in progress)"/></a>

                    </div>

                    <p style="font-style:italic;">(Map data <a href="http://creativecommons.org/licenses/by-sa/3.0/">CCBYSA</a> 2009 <a href="http://openstreetmap.org/">OpenStreetMap.org</a> contributors, because that's an early screenshot before I added proper attribution.)</p>

                    <p>This is what the code to generate that map looks
                    like:</p>

                    <pre>

                        // as in &lt;script src="iamheremap.js"&gt;&lt;/script&gt;
                        // and   &lt;div id="map"&gt;&lt;/div&gt;

                        var args = {
                        	'modestmaps_provider' : 'CloudMade',
                        	'flickr_apikey' : '<a href="http://www.flickr.com/services/api/keys/apply/">YER_FLICKR_APIKEY</a>',
                        	'cloudmade_apikey' : '<a href="http://developer.cloudmade.com/">YER_CLOUDMADE_APIKEY</a>',
                        	'map_style' : <a href="http://www.sensescape.com/2009/02/cloudmade/">999</a>,
                                'map_height' : 480,
                                'map_width' : 640,
                        };

                        window.map = <strong>new info.aaronland.iamhere.Map</strong>('map', args);</pre>

                    <p>You can see a live demo over here, using a different <q>style</q>,
                    specifically <a href="http://magicalnihilism.wordpress.com/2009/04/06/my-first-cloudmade-map-style-lynchian_mid/">Matt Jones' <span style="font-style:italic;">Image of the City</span> tiles</a>:</p>

                    <p style="text-align:center;font-size:large;padding:30px;border:1px dotted #333;border-left:none;border-right:none;margin-top:50px;margin-bottom:50px;"><a href="http://www.aaronland.info/iamhere/#style=2241&amp;latitude=51.525869326502075&amp;longitude=-0.0876895459994738&amp;zoom=14">http://www.aaronland.info/iamhere#style=2241</a></p>

                    <p>The <q>style=</q> stuff isn't part of the default
                    install but it's a simple example of the sort of thing you
                    can do. At the moment there are no standard controls to
                    toggle between <code>n</code> number of map views/tiles but
                    that's obviously a good next step. <a href="http://modestmaps.com/tutorial-actransit/">It's also one of the
                    things that ModestMaps makes really easy!</a></p>

                    <p>I am pleased and excited by all of this. One of the
                    things I talked about at <a href="http://adactio.com/journal/1546/">PaperCamp</a> was the
                    desire to get back to building some of the <em>online</em>
                    tools for Papernet projects. That includes a generic
                    list-map-store style interface for things like <a href="http://www.aaronland.info/weblog/2009/03/14/buckets/#intimacies">geotagging
                    Twitter posts</a>, a new and Moar Bettar version of <a href="http://www.aaronland.info/weblog/2007/08/24/aware/#delmaps_02">deliciousmaps</a> and the Other Thing (with the
                    Stuff).</p>

                    <p>The <q>I Am Here Map</q> is not that toolkit but it's a
                    building block, at least.</p>

                    <div class="image500">
                        <a href="http://www.slideshare.net/straup/taking-a-line-for-a-walk-presentation/28"><img src="/weblog/2009/06/01/bubblegum/papercamp28.jpg" width="500" height="375" alt="list map                                                                      store"/></a>
                    </div>

                    <p>As usual, the code and a list of known-knowns (this has
                    only been tested in Firefox and Safari, for example) is available over on Github:</p>

                    <p style="text-align:center;font-size:large;padding:30px;border:1px dotted #333;border-left:none;border-right:none;margin-top:50px;margin-bottom:50px;"><a href="http://github.com/straup/js-iamheremap/">http://github.com/straup/js-iamheremap/</a></p>
                    
                    <p>Enjoy!</p>

                </ins>
            </h:div>
    </a:content>
  </a:entry>
</a:feed>
