Thursday, December 8, 2011

The Hazards of Magic

Designers and people who admire designers have been talking for awhile about this concept of "magic". That is, making a product that feels so magical it doesn't matter that it wasn't the first in it's field or even necessarily the most powerful, but that it brings things together in a way that seem really intuitive, beautiful and magical. This has become so common that I no longer know who generated this theory. Apple is widely held to generally produce magical devices, devices that work really well, are seamlessly integrated, and that are beautiful. The iPod wasn't the first digital music player, but don't tell that to legions of people who think it is the only music player. The iPhone wasn't the first smart phone, or even the most powerful, but it just worked and felt intuitive. Or at least that's what people tell me. To be honest I've always been partial to Android and not just because I'm tribal. But that's not important here.

Google also has that magic in web search or Google Earth. People look at it and just marvel. Old time GIS people are often frustrated by Google Earth, for instance, that they were doing maps and looking at satellite imagery, and if you just downloaded ArcView, and installed....and at that point they've lost the magic. No offense to ESRI products, they make some great stuff and for analysis there is nothing that beats them, but there isn't that easy, intuitive use to it that you find with Google's mapping products.

"Magic" often distracts people from the limitations of a device or site. Apple's products tie you into using iTunes for instance, and lock you into a platform. But people who love iPhones will line up to buy a new white version of the iPhone with little or no feature updates. Just because it's white. I'm not blaming them, it's an amazing job that Apple has done, creating that desire for a white iPhone you never knew that you had.

Netflix had the magic too, right? They have a really amazing recommendation engine, far better at surfacing movies and shows you wanted to see than any other similar site. Amazon, in my view, comes closest and their recommendations for movies and their interface are just terrible compared with Netflix. No one cared that Silverlight was being kept alive by Netflix, and we paid a nice premium to have it on a variety of devices. Ooops, can't view it in Australia, well there's always VPN right? The number of movies available, and free, and in the early days their ability to get you movies sometimes the day after you returned yours was truly magical.

Well, that's gone right? The hazard of magic, I think, is that when you lose it you really lose it. The vehemence that people reacted with was really incredible. There's been a lot of analysis of why this happened. There's an interesting piece on O'Reilly today about What publishers can learn from Netflix's problems. One of the singular moments in the whole thing was, however, when Netflix reassured us that DVDs from Qwikster would still be in the little red envelopes. The Oatmeal had a great comic on that. That was the moment the magic was gone, when people started screaming about that. The distraction, the attempt to get users to focus on things that don't add functionality, to create a mystique around a small aspect of the brand, had failed miserably.

I'm not sure United Airlines ever really had the magic. I fly a lot, and ended up on United flights frequently in the last year. They merged with Continental, and at the beginning of every flight in the last 6 months, they would put up a video with the president of United extolling the virtues of the merger. What were those virtues? Well, they were repainting planes. That's right. Continental planes were being repainted to United planes. By the third time I saw that video, which I couldn't get away from, I wanted to scream. Untied has an aging fleet of planes. Mostly uncomfortable, with TV screens placed above our heads in the ailes instead of in the seat backs, uncomfortable chairs, and food that is usually pretty bad and that you have to pay for. But they are a low cost airline that goes everywhere and has a great frequent flyer program with lots of partners. What I wanted to hear about was their plans for modernizing their fleet, or providing more leg room, or something like that. No magic at all.

OK, so what's the lesson of this? If you've got magic, you can get people excited by surface changes and get them to look away from your problems. If you lose that magic, or never had it, don't focus on the surface, focus on what people care the most about. In Netflix it was the price and then integrated app, DVDs and streaming together, working on fast, easy, and nice delivery of your product, video, to every platform. In United's case, focus on what's working for you and don't keep talking about appearance. People don't care about that as much as you think. 

Wednesday, December 7, 2011

The School of Information's Alumni Day: What I said and wish I'd said

In 2006 I graduated from UC Berkeley's School of Information. One of my professors, Bob Glushko, who runs 202, the Information Organization and Retrieval class, invites alumni to come back every year and discuss what they've done with their education. I thought I'd write it up as a blog post incorporating what I said, my responses to some of the questions, and a few bits I wished I'd said:

Bob wants me to talk about how this class helps me with my work, and I'll certainly be doing that. But I also want to talk about how your two years here will inform the work that you do, since these are probably two of the most important years of your life.

I'm Mano Marks, a Developer Advocate at Google. What that means is I travel the world helping Developers put Google Geographic technologies on the sites, and advocating on their behalf with the engineering teams. People who graduate from the School of Information have gone on to be user experience researchers, designers, coders, policy wonks, product managers, directors, developer advocates, academics, lawyers, and much more. They work at Google, Yahoo!, Microsoft, startups, design firms, consulting firms, nonprofits, think tanks, for the government, and many other places I haven't thought of.

Back in 2004 when I started at what was then the School of Information Management and Systems, or SIMS, we were trying to figure out what the program was. One of my classmates, Benjamin Hill, who taught 290TA the Information Organization Laboratory this semester, ran a survey asking people what their elevator pitch for SIMS would be. The answer that won was something like "Mumble it's interdisciplinary and walk away." SIMS, now the I School, was in search of itself. No one knew exactly what we were doing. But at the same time the professors, and hence the students, were passionate about it. I hope that hasn't changed. The dynamic tension inherent in the exercise of what-are-we-doing drove innovative new approaches and discussions that I still value today.

What does 202 do for you? What it did for me give me a greater sense of the whole picture of organizational practices. We can get lost in the details of a particular system, which database we use, whether to use Python or Ruby, all the fascinating and fun details for geeks. But what 202 got me to do is look at an organization as a system built on top of information flows. How information flows internally but also how it flows in relation to external partners and customers.

This helps me in my daily work, working with external partners who are using Google's mapping products. It helps me see, and hopefully communicate to them, that their maps are not just a map slapped up on a site, but rather a way of communicating information to their partners and customers, and gathering information from them. It is a part of an entire ecosystem of data that their company/organization/loose network uses, consumes, and produces. Our maps (or substitute your own application or document format) don't just have to be artifacts or dead things, but living interaction devices.

But beyond 202, beyond the underlying data and information flows in an organization is a whole context that the organization exists in, a legal and sociological framework that shapes and guides it. That context is what the rest of the I School experience is about. Understanding that context, and how it relates to the core concepts of 202 is what the School of Information is all about. Or at least, that's my proposal. Please challenge that, after all I'd hate for there to be a last word on what the I School is or does.

Thursday, December 1, 2011

Some quick links

Experimenting with different ways of distributing links. Mostly I do it using Google+ but I get concerned I post too much there, so here's some stuff I'm reading today:

WebGL Playground: a great tool for playing with WebGL code, allows you to change things live and see the results.

Hangout-3d: Demo code for using WebGL in a Google+ hangout.

Porting 3D graphics to the web: Opera tutorial. Shows techniques for porting 3D graphics from commonly used 3D graphics programs to JSON to use in WebGL.

These were pulled from Learning WebGL.

Latest imagery updates in Google Earth

NORAD Santa Tracker Coming

Wednesday, November 30, 2011

Thoughts on The Paperless Map

I was reading The paperless book by Todd Sattersten over at O'Reilly, a similar discussion around maps occurred to me.

Sattersten references Stacey Madden who argues that, no offense to e-books, but they aren't "books" and we should reserve that word for a physical medium. Every time I've read that kind of argument on the Internet, as in we should reserve x word to mean only an older meaning of x, the person arguing that has already lost. Hacker/cracker anyone?

I am sure there are those who argued, when maps first came to the web, that they weren't really maps, they were some other medium. However, if they did, you don't hear those voices anymore. Perhaps that's because of the strong history of GIS before the web, or because maps are primarily used for a vehicle to convey information, not generally as a completed composition. Those who know more of the history of cartography, please point me to any debates I may be unaware of.

Sattersten describes an experiment where readers are invited to participate in the compilation of a book by purchasing content as it's developed and adding their comments and feedback. It's actually hard for me to imagine bothering doing that with a book, especially if it's one of fiction, but I can easily imagine contributing to a map. I just actually don't see the need to put an end point on it, as in "this map is done."

Of course, I have had many discussions on the superiority of paper maps over digital maps in certain circumstances, say out in the field where your device may not have a reliable source of power, or where the large format may make it easier to share with others. I wonder if tablets will start to fill the latter use case. And I've admired the bridging technology of the digital pen with GIS.

I think we made the transition with maps a long time ago, thank you CGIS. So while the GIS world got a surprise when we started moving to the web, it didn't immediately dismiss the medium as not a map. In fact, one of the things I've heard from GIS folks that are surprising to non-GIS people is the question "Why would I care about web maps? They're only about making maps."

Wednesday, November 23, 2011

Easy Panorama creation with Ice Cream Sandwich

I was hanging out with +Dan Galpin in China, and he was showing me an Ice Cream Sandwich phone. ICS comes with a panorama capability in it's phone. He took a few photos and sent them to me. I spent a few minutes and pulled them up into custom Street View panoramas.

It was pretty easy to do, but there were a few caveats. The panoramas didn't contain any location EXIF headers. Not sure if that will be part of the final release. My demo didn't require it since I was just using a free floating panorama viewer. Also, the panorama camera didn't always go a full 360 degrees, so the seam between the two ends was a little uneven. The only other issue was figuring out where the center of the panorama was and coding that into the heading of each panorama. Still, it was a nice and easy way to display these panoramas. Oh, and take a look at the full version, it shows the copyright information for Dan that I coded into the panorama.

Saturday, November 19, 2011

Google Developer Day Berlin, start of day

I'm excited to be here in Berlin, at the last Google Developer Day of 2011. It's hard to believe we're on the cusp of 2012, and getting ready for a whole new season of conferences. At Google, we're a little worn out from 2011:

 (Photos from Tel Aviv)
But we're amazed by the turn out here in Berlin, over two thousand. The most of any GDD this year, possibly the biggest single event we've ever thrown, outside of the US. The event is being held at the massive ICC Berlin. It's so big that I'm not going to the keynote, because I'm afraid I wouldn't have enough time to make it to my session which only starts 15 minutes afterwards. Seriously, this place is like the Death Star. We keep expecting to see little robots racing down the halls, and given that it's GDD that's an actual possibility.

One of my complaints about GDDs is that there is so much great content, but I never get to go to the sessions because I'm working. In a tradition going back to the first German GDD, we've got a track devoted to speakers from universities in Berlin speaking about some cutting edge research. I can't wait till the videos go up. But the truth is, I'd rather be talking to developers anyway, I learn so much from you. So if you're here, see you at my session, or in the GTUG area, or exploring some of the sandbox events. For the rest of you, see you on Google+.

Thursday, November 17, 2011


I recently took a break from blogging, mostly due to travel. I've been on the road for almost 4 weeks, traveling around the world. Literally, around the world: San Francisco, Beijing, Shanghai, Sydney, Tel Aviv, Bern, Berlin, and on Sunday I go home to San Francisco. Excited about that actually.

But I'm back to blogging, and feeling reflective. I thought I'd share a couple of things I'm thankful for before next weeks' Thanksgiving festivities in the U.S.

  • I am thankful for my work. I get to travel around the world, meeting really amazing and interesting developers who are doing great projects such as the iOnRoad app developers, or the folks from PointGrab who demoed using Google Earth:

  • I am thankful for the Internet, or rather for the fast connection I enjoy most of the time. While I was in China for about one and a half weeks, the Internet connection was terrible. I didn't really get it, the Great Firewall of China, before. I thought certain sites were blocked, OK, but I could go on with my life normally. Nope. It seems all sites, at least all non-Chinese sites, are filtered, even if they are not blocked. They appear to be checking each site and each bit of content as it loads. Sites of my favorite web comics, for instance, such as PVP, loaded slowly. Yes, PVP is filtered in China. The image of the comic would slowly, pixel by pixel, appear. It was torturous because I didn't know which pages would load and which wouldn't. Most people I talked to used a proxy, a VPN connection to outside of China, but even that was slow because of course you're adding on layers of connection and other servers routing your content. And yet they also told me there is lively debate within China on the net about the GFWC.
So I am thankful for these things. I hope to be writing more about what I'm thankful for in the next week before Thanksgiving.

Friday, October 21, 2011

Memories of Prague

When you go to Prague, people ask you a lot "Is this your first time in Prague?"

In fact, my trip for Google Developer Day in Prague on Tuesday was my fourth, and my third in the last year. My first though was in 1990.

My first visit was in 1990. I was in the midst of my junior year abroad, living in Budapest. I didn't have much money, so I took the train up to Prague, a 9 hour trip if I remember correctly, stayed 16 hours in Prague, and went back that evening. It was a magical place back then, just emerging from the fog of communism. Spared destruction during the Second World War, Prague retains a medieval core, one of the most beautiful and unblemished in Europe, in my opinion. It became the cool center for expats in the early 90s, when English speaking 20-somethings would go to Prague to teach English and drink inexpensive but delicious beer. So many went there, in fact, that a 2002 novel about expats in Budapest in 1990-91 was entitled Prague, as in they missed the boat and went to the wrong Eastern European capital. (I don't regret Budapest, BTW, but Prague did have the cachet back then).

I left my nice camera at home, so took pictures with my Nexus S. I'm particularly happy with this one:

There are plenty more pictures of Prague from last year at GDD in my Picasa albums. Some day I'll scan in all the photos from 1989 and 1990 and post those.

Wednesday, October 19, 2011

Thoughts on vector based mapping

Traditional...wait, I have to put that in quotes..."Traditional" web mapping, as you see in pretty much any web mapping application, relies of raster tiles to convey the base map. The reason for this approach is pretty simple: You can convey a ton of information in a raster image simply by changing the colors of pixels. And it's highly performant. As many pixels in your image is as many points of information you can portray.

But there's been a lot of buzz for awhile about the possibility of vector based mapping. Vector mapping is essentially pushing the underlying data used to build a map to the client, instead of the fully assembled map. By pushing vectors to a client (browser or mobile application) you can push the assembly of the map into the client machine, saving quite a bit of work on the server side. But it also gives you a lot of capabilities that are absent from raster maps. For instance:

  1. Reprojection and restyling on the fly: If you are assembling a map based on vectors, you're just providing the base map data and allowing the local app handle constructing the map. That allows you to do interesting things like reproject and restyle a map in the client and on the fly.
  2. Graduated map drawing: You can draw the map while the user watches, instead of loading it tile by tile.
  3. Perspective changes: You can tilt maps, create 2.5D or 3D maps, do all sorts of things based with the data.
  4. Fluid transitions: Instead of jumping between zoom levels, you can have smoother transitions as you navigate a map.
This comes at a cost to the client of course, you have to have a device of sufficient power to assemble the map. Fortunately, a variety of new technologies in the browser are making that happen. Here's the basic approaches developers are taking:

Google Maps for Android: Google Maps for Android uses vectors to draw the maps. It uses a custom vector format and pushes it down to the application where it runs on the mobile device. If you have an Android phone, chances are you have vector mapping already on that device:

Scalable Vector Graphics (SVG): SVG has been around for awhile, and has even been used by Google for rendering overlays on Google Maps API maps. But it was always held back by the performance in the browser and lack of support by IE. IE9 finally gives support for SVG, and most modern browsers are now performant enough to use it. Polymaps, a JavaScript library, was the first major implementation of vector mapping for the web that I saw. It allows developers to draw maps using SVG and style them using CSS styling. I think SVG is still a little slow, but it is now widely supported and the CSS styling is a great way for developers to style maps.

Canvas: There's been a lot of hall-way talk at conferences like WhereCamps and FOSS4G about using HTML5 Canvas to render vectors, pushed down in a standard format. I haven't seen any great implementations, but Canvas is also widely supported in the browser and generally has good performance.

WebGL: WebGL gives the browser access to a machine's graphics card to do rendering, giving it some tremendous power. Browsers traditionally only had that kind of access through plugins like Flash. Google launched an experiment last week called MapsGL. It's pretty awesome. We've got buildings, smooth transitions, and nice animations of 45 degree imagery. The downside of WebGL is that it isn't widely supported yet in the browser. Currently only Chrome 14 and later versions of Firefox have good enough support for MapsGL. And currently Microsoft has no plans to support it. My hope is that WebGL will take off because of the power that graphics processor gives maps developers.

This isn't meant to be an exhaustive list, feel free to add other approaches you've seen or implemented. I'm really excited by vector mapping and want to see it succeed. I really feel like it's "The Future"

Wednesday, October 5, 2011

How I got to be where I am: part one of many

So yesterday I received an invitation to speak at the The Apps Against Abuse Challenge: San Francisco event, which I'll be at tomorrow. Interestingly, I don't think that the inviter has any idea that I once worked at a rape crisis center and that was how I got into tech. Or, as people not in tech used to say, "into computers." I'm telling the story now because people often ask about it.

I am 42, graduated college in 1992, with a BA in History. In 93, I got an MA in History, and took a year off from the Ph.D. program. I went and worked in Budapest for a year, and never went back to school. That's a story for another post though. Bottom line, I went back home to the SF Bay Area, and got the first job that came along, doing data entry at a non-profit. Back then, it was called the Rape Crisis Center of Contra Costa and Marin Counties, but now it's Community Violence Solutions. It was a caused I believed in, and still do, and I eventually ended up doing a term on the board of the now-defunct National Coalition Against Sexual Assault. Another story for another day.

One day, while working at RCC, one of my colleagues was exasperated, she couldn't make the computer work. I walked over and hit the 'on' switch on the monitor. You have to realize this is 1994, and most people, particularly those who worked in non-profits, didn't have much experience with computers. A couple years later one of the office staff in our Marin office refused to unplug a computer because she was afraid damaging it, necessitating me driving over there to unplug the computer from the power strip and plug it into another power strip, thereby "fixing" it.

So anyway, with that acting of turning on the monitor, I became the computer expert in the building. A few years later, someone would coin the term "accidental techie" to describe what happened to me. I'd always had a computer, fiddled around with it, but never gotten too deep into it. Until then. When you're the computer person at a non-profit in the 90s, you were the computer person. I did everything from database work to hardware troubleshooting, to networking. Eventually we hired a data entry person for me to supervise. I went on to a series of non-profit jobs, eventually back to school, and then to Google. But I will never forget that first moment of turning on the monitor and having people literally turn to me with new found respect in their eyes.

Friday, September 30, 2011

Why do we do it?

Here's a question I get asked a lot: Why does Google do it? Why create things and give them away for free? Why is the Google Maps API free? What does Google get out of Google Earth?

Because it's the right thing to do. The Google Maps API was the world's first monster web mashup platform and is still the most used web API in the world. When we started Google Maps, we thought "Oh great, people can search on maps for directions, and look at satellite imagery." We though we were making a really cool app that people could visit. And we did.

But external developers showed us how it could be used to create mashup, data visualizations that really gave meaning to data. And they could do it without having a geography degree or a certification in GIS software. And they could do it with that then unique slippy map feel that we now expect from Google Maps. So we released the Maps API.

Because we could get sites like HealthMap, or the Ushahidi project. We did it because people wanted to see real estate on maps. We did it because mapping crime alerts was meaningful to people. We did it because people want to share KML files, mark up the earth, and have now created over 1 billion of them. We did it because in a crisis, people can turn to our maps and yours.

Sure, there's a business model behind it, Google makes money on advertising, and the more sites out there, the more people are search. So, yeah. And we do make money from people who want to make the maps private, or offline.

But fundamentally, we do it because it's the right thing to do, we do it because we believe that people want to, that they benefit from using maps as a platform for understanding data.

Saturday, September 24, 2011

Technology: Do you get it?

I give a lot of talks. I talk to developers, engineers, gis people, students, professors, geologists, NGO workers, and many more. And there's one statement that comes up quite often, a statement people make to me all the time. Usually not engineers or developers, but just about anyone else. It is some variation of:

Oh, I'm just not good with technology.

This statement puzzled me for a long time, even though I think I understand what they are trying to say. The truth is, even the remote stone age tribe that hasn't made contact with the rest of the world uses technology. The light switch you flipped on? Technology. The paper you write on? Technology. The radio, car, dish washer, technology. The fork you eat with. Even the fact that you wear clothes. Technology. Anyone who has played Civilization or some other strategy game with a tech tree knows this.

What they are trying to say is that they are not good with computers. But chances are, they email regularly, post on [insert favorite sns], or use some IM client.

So what do they mean? I'm going guess they mean something like this:

I am intimidated by how much you know about geo/programming/mobile phones etc. And I feel I could never learn that much.

This is a much more reasonable proposition. Still likely untrue, but much more reasonable. I generally find that if I work with them, they can learn a surprising amount in a short period of time. My personal theory is that it is fear of failing more than anything that prevents people from actually being able to do something. Once they get past that, they tend to see how easy something can be, at least at the start. I know there are things I've been scared to try for fear of failing or looking bad. That's natural. I think obsession with certain terms, like "technology" in our cultural make it harder for people to start, create a class of things they don't understand. 

I am not saying that everyone can be good at anything, or that some people aren't better at things than others. But one of our jobs as technologists and developers is to make it easier for people to understand what they are already doing, and to learn new things by relating them to things they've already learned. I've taught rudimentary JavaScript programming to people who didn't know what a text editor was, and some of them have gone on to make really amazing maps visualizations, by showing them the basics and relating it to what they already know.

OK related note, some of you have heard this before, but a short story:

A friend of mine, a UNIX systems administrator, told me that he didn't think he was a geek. Oh, he's also a SciFi fan. And I mean he organizes SciFi conventions in his spare time fan. I should say Fan with a capital F. So he says to me, he doesn't think he's a geek.

After a moment of stunned silence on my part, I said "OK. So, let me ask you a question. What's your favorite text editor?"
"Well..." he began and I said "You're a geek." He looked at me and I explained "If your response was anything beyond 'Huh?' or 'You mean like Word?' then you're a geek." He then went on to explain to me why it used to be EMACS because of the capabilities, but was now vi because it existed on any machine he cared about without installing anything extra. My point was made.

Saturday, September 17, 2011

Highlights from FOSS4G

I went to FOSS4G this week, and had a great time. Believe it or not, this was the first time I went to a FOSS4G, and now of course I am hooked.

First let me say that everyone I talked to and every talk I went to really was great. Such a friendly and smart crowd of people. And everyone was working on really interesting problems. I missed several talks because I just got into a conversation with someone and we didn't want to stop!

There were a few things I wanted to call out in particular that I found really compelling. 

CartoSet and CartoDB: Awesome early stage project that draws inspiration from Fusion Tables. Nice functionality, great designers working on it. The folks at Vizzuality are doing great work.

WebGL Earth: A nice 3D globe written entirely in JavaScript. Especially compelling in the developer release of Chrome. From Petr Klokan, of GDAL2Tiles and MapTiler fame.

PostGIS Raster (pg Raster): This year a lot of buzz was around PostGIS Raster, which would as much as possible treat queries on raster data as SQL queries. It is still pretty experimental, but shows a lot of promise, especially attached to the mature PostGIS project. But the other thing that shows is there is a lot of desire for treating rasters as data, not just overlays. Of course, we believe that at Google, which is why we're working on Google Earth Engine. But I'm also glad to see so much desire for it in the FOSS community.

Here's some photos I took at the conference

Thursday, August 25, 2011

Playing with the HTML5 Drag and Drop API

So another thing that inspired me during Sean Maday's talk at Google's Geospatial Awareness Day was his demonstration of using HTML5's drag and drop API to load a KML file into a Google Earth API site. In that sample, he loaded the KML file. The JS then parsed the KML and read it into the plugin. I immediately thought about using it with Maps, and adding in a GroundOverlay. So I wrote a quick sample to do just that. Of course, it doesn't work on older browsers, but if you're using later versions of Chrome, FF, or Safari it works just fine. I haven't tested it on IE9.

The code owes a lot to Riyad Kalla's HTML5 Drag and Drop Upload and File API Tutorial. He does a good job of explaining the API, so I'll leave that part to his post. All mine does is put any image in a GroundOverlay on a map. Drag any image from your computer into the little space at the top and it'll show up in a pre-defined place on the map. Next-up I'll work on a way to stretch and position the image. I'm also thinking I'll try to pull out any positioning in the EXIF headers to make a guess about location.

I'm thinking this would be useful for image upload and positioning sites. Say I want users to place images of old maps or more recent satellite imagery. They could position it on the map and then upload it to my server. Of course this doesn't take care of proper georeferencing or projections. Thoughts for another project.

Here's my code for creating the GroundOverlay:

function handleReaderLoadEnd(evt) {

  var imageBounds = new google.maps.LatLngBounds(
    new google.maps.LatLng(40.716216,-74.213393),
    new google.maps.LatLng(40.765641,-74.139235));
  var oldmap = new google.maps.GroundOverlay(,

Wednesday, August 24, 2011

HTML5 Input Range for a slider

I was at Google's Geospatial Awareness Day today, and Sean Maday did a demo of the new HTML5 input type of range, and I had a palm on forehead moment. Regular readers of the blog know I'm slightly obsessed with sliders, so I came home tonight and did a quick sample using a demo I did in Mexico City at the Esto es Google event. The example uses a FusionTablesLayer to show polygons from Natural Earth Data showing the boundaries of the Mexican states, and colors them using the populations, as found on Wikipedia.

Here's the sample, and here's the code for this sample.

function initialize() {
    var center = new google.maps.LatLng(23.99170847335287, -102.6702973539042);
    map = new google.maps.Map(document.getElementById('map_canvas'), {
      center: center,
      zoom: 5,
      mapTypeId: 'roadmap'
    layer = new google.maps.FusionTablesLayer({
      query: {
        select: 'Shape',
        from: '1231298'
    function showValue(newValue)
      select: 'Shape',
      from: '1231298',
      where:"'2010'>" + newValue
<body onload="initialize()"> 
  <div id="map_canvas" style="height:75%">
  <input type="range" min="600000" max="15000000" value="600000" step="100000" onchange="showValue(this.value)" />
<span id="range">600000</span>

Friday, August 12, 2011

Using gx:altitudeOffset to raise polygons during a KML Tour

During the keynote Tuesday at Esto es Google, I showed a demo in Google Earth demo. In the demo, Polygons showing the boundaries of the states of Mexico were raised to relative heights based on their population. The KML is uploaded here if you want to take a look. Basically, I got the boundaries from Natural Earth Data, and then wrote a quick Python script (it's not worth posting here) that helped me create a KML which updated, over 10.5 seconds, the altitudes of the polygons based on the population. I got the populations from Wikipedia. is a Google extension to KML that allows you to say "Hey, change the altitude of this whole polygon by X meters" without having to update each coordinate in the element. By specifying that the takes place over a period of time, you get a nice raising effect. And since they are extruded to the ground, you get a 3D bar chart effect. I also move the camera around so you can see different perspectives and polygons that might otherwise be hidden. I have 3% battery life, so I won't post a screenshot, but you can see if you open up the KML file and play the tour.

Friday, July 22, 2011

Thoughts on Social Media: Early Days with Google+

OK, because everyone else is doing it, I thought I'd write a post on my experiences using Google+.

First, I'd like to say for the record, I do work for Google, but not on Google+. I work on Google Geo, and specifically helping external developers use Google Geo APIs. I don't know why, but a variety of people have said to me "Now that you're working on Google+..." or something like that. I think I might have shared a post by someone who does and that's why people think that. Or something. And as always, these are my thoughts, not necessarily those of my employer.

Anyway, here's some thoughts:

I Heart Circles
I do feel like they solve an issue that I've had with social media in the last several years. I have a job where I represent a company, Google, and therefore don't want to mix-up my public sharing of photos and link with my private sharing with friends and family. I haven't really had that since getting on Facebook and Twitter and having thousands of people following me. Which basically meant I didn't have a private life online. Many people my age wonder why that's an issue, but I have nieces and nephews who really communicate mostly online, and it is a great way to keep up when you're away. And I travel a lot. I mean 30-50% of the year I think. So I'm often in different time zones, etc.

What I am still trying to figure out
I represent a company. So in some ways, the more people "follow" me, or rather in this case have me in their circles, the better for me. The means sharing a lot of things publicly. But that means everyone I share with sees all of that. And everyone who has put me in their circle. But if I limit what I post to certain circles I've defined, it means people don't see it when looking at whether they want to follow me. So that's interesting. Certainly hashtags and following someone by only certain hashtags would solve that, and I know the team has said they're looking into it.

I Heart Hangouts
Great experience, a really nice feature. I want to start doing some evening "let's have a beer" hangouts with folks. Or perhaps use it while playing video games or something. Anyway, still many use cases that haven't been figured out yet.

Lots of people adding me to circles quickly
I think there's probably a lot of overlap between my Twitter/Facebook followers and my Google+ community. I am already over 1000 people with me in their circles, a number it took a lot longer to reach on Twitter.

Basically, loving it so far. I think that more tools to manage your stream will help a lot.

Saturday, June 4, 2011

Fictional Worlds in Street View

I hope I'm not shocking anyone, but Liberty City isn't a real place. The central location in the video game Grand Theft Auto is a fictional self-contained world, a sandbox in gaming terms where there are missions but you essentially have free reign of the city, not confined to a narrow path like in some other kinds of RPG video games.

So why am I talking about video games, aside from the fact that video games are AWESOME?

Recently, I discovered a map on a fan site for Grand Theft Auto IV. It's actually not the first one, the first one I've seen was on IGN. Both these sites use Custom Projections and map tiles to define a map that shows only Liberty City with no reference to Google Map tiles.

 The new site though has a significant new feature, it uses Custom Street View Panoramas to display the Street View of Liberty City. Go ahead, try it, drop pegman onto the city and check out the panoramas. I'll wait.


Pretty awesome, huh? There's an interesting hack going on too. When you add a custom panorama it doesn't become part of the blue overlay that happens when you grab pegman but before you drop it. Since the designer had access to all the road data, since they designed the map, they were able to create a custom pegman that created their own custom blue overlay that allows you to see where Street View is.

I'm hoping we'll see more of these kind of fictional places in Street View Maps API implementations. The code for it is reasonably simple, creating the actual panoramas is more difficult. I hope this sort of thing inspires people to use the Maps API to show planning projects too, showing interiors of buildings yet to be built, etc.

Friday, June 3, 2011

Hacking Google Earth to show Earth Interiors

At the Smithsonian today I showed off Declan de Paor's classic interior of Mt. Fuji which uses time animation and SketchUp models to show half Fuji sliding out to reveal the interior cone. I mentioned this to Declan and he pointed me to his recent use of Mars in Google Earth to represent the core of the Earth, and building on top of that. Pretty cool. Here's his more complete write-up.

Thursday, June 2, 2011

Working with People

The Humanities are traditionally a lonely profession. While in the hard sciences it's not uncommon to see a long list of names on papers, in Humanities professions there's little reward for multiple people working on a project. Tenure was based on articles you wrote, sole project work. One of the reasons I love digital humanities work is that people are coming together, breaking the restrictive bonds of solitary work. It was the reason I went back to grad school in 2004, tired of being the lone computer guy at a non-profit doing interesting data management work for people who largely didn't understand what I did.

Today I was lucky enough to meet with folks at the Scholar's Lab and the SHANTI at the University of Virginia in Charlottesville. It was inspiring to see the work they're doing by coming together, and building great projects. As David Germano explained it, the early days of DH work were dominated by projects built around individuals. Which mean highly specialized projects that had to be continuously maintained by individuals who also had to fundraise for them. These projects were difficult to bring to other applications. Now, they're trying to build infrastructure projects, or better yet build on top of infrastructure projects to build the capacity for all DH professionals to do powerful projects. And of course, since a huge number of their projects have a geospatial component, they were fans of Google Maps and Earth. But Fusion Tables was pretty new, so I hopefully helped them out there.

Tomorrow, I am meeting with people at the Smithsonian and then hurrying back to Fairfax for THATCamp where I'm leading a self-guided a workshop on Google Geo. Come and join us. And work together to develop projects.

Monday, May 30, 2011

Memories and Ghosts-Berlin then and Now

My first stint in grad school I had a roommate, an air force officer who was getting her masters. One day she showed me a medal she got, as part of the occupation force in Berlin. She was one of the last to get it, having been stationed there in 1990 just before reunification.

I'm in Berlin, my last few hours here actually. People have been asking me a lot "is this your first time in Berlin?" and I say no, and they assume I know my way around. I say "Actually, it's my third, but the last time was 21 years ago." I'm 42, that makes it half my lifetime.

I visited Berlin twice before, in 1989, just after the Berlin Wall opened up. I don't like to say "fell" because the physical wall was in place for weeks afterwards, and in fact they've preserved at least one portion of it for posterity, but in an out of the way place. The second time was the following summer, I came here with my mother.

Walking around Berlin, I feel ghosts. Not actual ghosts of course, but things I catch out of the corner of my mind's eye. Standing in front of the Brandenburg Gate, I remember standing there, looking up at the Wall, looking up at the East German guards still patrolling the Wall, a little confused I'm guessing at why they were still there since other portions had been removed, and the checkpoints open. I remember the French activist - activist for what I'm not sure, just he had a sign and long hair - yelling up at the guards to tear down this portion of the wall, to open the gate. He was very impassioned, but the rest of Berlin was having a party.

I was a hungry student, traveling with three other hungry students. It was cold, and we'd been used to living the East (Budapest) for awhile. Several major companies decided that the opening of the Wall was a great marketing opportunity. Marlboro had people hand cigarettes to East Germans as they drove their Traubants through the checkpoint. Western cigarettes had been greatly prized, and often used for bartering in Eastern Europe. Candy companies got into the act too. We four followed someone from Snickers around, as she handed out candy in front of Brandenburg Gate. We positioned ourselves in front of her, and acted surprised and pleased every time she handed us some. I felt vaguely sick that night from all the sugar, but I had saved a lot of money on food for the day.

There's no trace of the Wall left around the Gate, except for some signs for tourists explaining a little of the history. Walking through the Gate was weird. Greenpeace activists were staging a small anti-nuke demonstration last night. They'd put up big banners on the Gate. And I realized with a start that I had walked from former East Berlin into former West Berlin. Without really realizing I had been in the East. I saw in my mind my mother breaking off pieces of the Wall. Or perhaps I am thinking of the actual picture I have of her doing just that. Funny that my memory might actually be of a picture of the event not the event itself.

The Berlin GTUG meeting yesterday was at c-base. In my talk I discussed Fusion Tables and the Places API. The group is so vibrant and interested. Before hand we discussed different scripting languages that run on the JVM, someone was really excited about Scala. c-base itself is modeled on a crashed space station, if the space station had been designed for a 1970s movie. Very nice space with a great view of the Spree. I drank Czech beer and ate barbecue and looked at the Spree, and forgot about the memories and ghosts of Berlin past. The present in Berlin is so much more beautiful.

Thursday, May 19, 2011

More Ruminations on Place

Back in March, I wrote a post, Ruminations on Place, after a day walking around in Kyoto. I've been in Paris for a few days and I'm thinking more about Place, and what is a Parisian sense of place. Or rather, I should say, what is my sense of Paris as a Place. These are just some random thoughts.

I have passed approximately 50 - or it may be as low as 10 - souvenir shops selling postcards in distinctive black and white or sepia styles. Do an image search on "Paris France" - "Paris" gets you a lot of Paris Hilton stuff - and you'll see examples of it. It's a style that I realized unconsciously made up my sense of Paris as a Place, and made me long for a black and white camera.

Americans, I think, often have the stereotype that Parisians are rude, particularly when you try to speak French. Apparently, this is no longer true. Oh no, I didn't try to speak French, my partner is here with me and has a great accent, though not a lot of vocabulary, and it's be wonderfully fun. And everywhere we go, Parisians have been definitely not rude. I realize this too was part of my sense of the Place that is Paris, and strangely I feel a conflict between my internal sense of the Place and my current experience. At the same time I am of course happy to have that proven wrong.

Like many of my generation, I am used to relying on guide books for travel. My partner had one, which I will no name here, which had much inaccurate information. I am proud to say that the Google Places app on my Android device was really helpful in situations like "Oh, I need a place to eat now that I have time before the concert I just decided to go to." It was not so helpful in finding a breakfast place because breakfast isn't a big deal here like it is in the US. So we found a restaurant nearby, but not one that served crepes, which we wanted. Because apparently Parisians don't do that. But nothing in Places, or an online search, or a guide book would have told me that. So, still work to do.

Speaking of Places, and to earn my keep, the Places API is now open to everyone and has some really cool capabilities, check it out.

Friday, April 29, 2011

Memories: When the Soviets tried to recruit me to be a spy

Dan Morrill on the Android team reminded me today of a story I told him awhile back that is worth sharing.

In 1989 I was on my junior year abroad, in Budapest Hungary. Nice random chance. I had gone into the education abroad program at UCSD and told them "I need to get out of the country!" and they obliged. When I'd applied, it was 1988 and there was maybe some interesting stuff going on in Poland with Solidarity, but no one knew what was coming. I arrived in August of 1989, and a week later the Hungarian government opened the borders, allowing East Germans to leave to Austria. At the time, this was hugely momentous. East Germany and Hungary were part of the Warsaw Pact, an alliance of Soviet backed Socialist states run by the Communist parties and mostly dictated to by Moscow. Travel between those countries was permitted but travel to the West was severely restricted. East Germany (officially known at the time as the Germany Democratic Republic, or it's German abbreviation "DDR") cut off travel to Hungary, but the chain of events that had started (arguably) with the Solidarity strikes in Poland started to cascade. The end result was a very different Europe. But no one knew that at the time.

In fact, I didn't find out about the Hungarian government opening the border for a week. There were few English language news sources at the time (remember, no public Internet) and the faculty of Karl Marx University of Economics, where my program was situated, didn't bother to tell us, perhaps a little scared about what was going on.

Anyway, I was studying to be a historian at the time and historic things were happening so I was in heaven. My mother was a peace activist, and decided to go to Moscow to do work there. She was also an artist and had no real concept of dealing with bureaucratic institutions. She wanted me to visit her for Christmas in Moscow, and since I was in Budapest I thought why not? But to go, I needed an invitation to get a visa. Not an easy process. BTW, still not an easy process. So I asked her to get me an invitation.

My mother responded by saying "I invite you". I told her I needed something written, and she sent me a telegram that went something like this "Here's your invitation. I don't understand why you need this. Seems like you just don't want to spend Christmas with your mother." I may be mis-remembering that last sentence.

Sighing in frustration, and realizing I wasn't going to get anything better out of her, I showed up at the Soviet consulate. Now most embassies have nice neat orderly lines that move people through the place. The Soviet consulate in Budapest, at the time a part of the Soviet embassy, a huge concrete monstrosity, ran things differently. They let people crowd around and push their way to the front of the line. Being a shy retiring type at the time (unlike now) it took me an hour to get to a window. I tried to communicate to the official who just stared at me, and then turned and summoned someone who could speak to me in English. He frowned at me, looked at my passport, this young idealistic many trying to get a visa, glanced at the telegram dismissively, and said only "You come back tomorrow, 12:00".

Dutifully and full of dread, I came back at 12:00 the next day. "Sasha" grilled me for two hours at his desk. What did my father do (episcopal minister, deceased) ? What did my grandfather do (stockbroker)? Why was my mother in Moscow (peace work with the Peace Committee, a known KGB front organization)? What was I studying (History, very interested in Eastern Europe)? Where did I grow up (Berkeley, at the time home of radicalism and Marxism in the US)? Would I like to learn more about the Soviet Union (oh yes of course? and the kicker Would I like to study Russian with his daughter, trade language lessons (Oh yes, of course, sounds great)?

At the time I wasn't a Quaker, so a little lying and stretching the truth wasn't beyond me. He seemed satisfied, and pulled out a ticket, he actually paid for my train ticket to Moscow. How exciting! At the time your ticket came with a separate seating assignment. He gave me the top bunk in a sleeping car. Wow, how generous, thank you! Afterwards I learned that the ticket was about $7 or something, depending on whether you exchanged money officially or on the black market.

So the day finally came, and I get on the train. Top bunk, all the way to Moscow, more than a day of travel. In my mind I remember it as 36 hours, but I'm not sure now. While I was boarding the train, a revolt broke out in Romania. By the time I got off the train Ceau┼čescu, the communist dictator was arrested. He was executed a couple days later. I'm against the death penalty in general, but I certainly didn't mourn his death.

But I didn't find out about the arrest because I was on the train. No phones or Internet in those days, and no one announcing what was happening. And I was the only American in my car, as far as I could tell. My grand mother had sent me a big box of candy, and I learned the value of american candy, so I shared them with those in my cabin. There were six people in my cabin and lo and behold in the bunk across from me there was this beautiful Russian woman who spoke English with just a slight and endearing accent. She engaged me in constant delightful conversation. Turns out her father worked at the embassy, what a coincidence! Now you have to understand that this sort of thing never happens to me. So a clever man of the times, with a slight paranoid bent, I easily put together what was happening. When she gave me her number in Moscow as we got off the train, I wasn't surprised. I never called of course. My mother had her own KGB handler, and I'm sure everything was bugged in my mother's apartment. That's not paranoia, that's just how it was back then.

"Sasha", btw a very common Russian name, short of Aleksandr, wasn't at the embassy when I went back. He had asked me to "report" on what I saw in Moscow. I thought I'd be dutiful about that, thankful for the ticket, and then just not follow-up. But he wasn't there and the embassy staff acted as if they had never heard of anyone named Sasha and it was strange that I would ask and would I please go away. Sorry Sasha, you failed to recruit a spy, but thanks for the ticket!

Thursday, March 31, 2011

NoGIS: Round Two of Neo vs. Paleo Geography?

Can't we all just get along?

I started, apparently, a few days ago with the posting of NoGIS Meetup, and the subsequent blog post, "What Does NoGIS Mean?" by Sean Gorman on the GeoIQ blog. Among other things, Sean said

"For decades, location and geography have been their own special niche, served by GIS technology from a fairly small number of vendors.  As many have pointed out “spatial is no longer special” and as a result location is quickly becoming a feature of many technologies.  As location base apps become ubiquitous the characteristics of geographic data are changing as well.  The data of this new paradigm does not look like the static parcel data, which is stereotypical of much traditional GIS work.  As we saw in the NoSQL characteristics data is now high volume, dynamic and users/developers want to see/query it in real time."

And the usual statement by neogeographers (in one of the comments)

"I’m not inferring that GIS and NoGIS are mutually exclusive..."

James Fee, traditional defender of the Paleo...OK, that's a bit much but let's say a frequent defender of all things Paleo responded in his blog post:

As with anything, everyone is quick to say we’ve all been doing this since the 1960′s so ignore it and move on unless you’ve got one of the following to accomplish:

And then goes on to list the geography industry's equivalent of hipster evils.

And I thought that the Neogeography vs. Paleogeography wars were largely over and we were all getting along. But perhaps it was just a Christmas ceasefire.

That said, I'll be at the NoGIS workshop, should be interesting. No one ever said geographers were boring. Oh, wait, many people have. But they are, of course, wrong.

Tuesday, March 29, 2011

My Slides for CalGIS: What you should be asking us The future of geography, and the hard - and easy - questions that follow

I do a lot of talking in my job. This quarter, January 1-March 31st, by the end of the quarter I'll have given 19 different talks at 16 different events. Many of the talks are the same or similar, targeted to a specific audience but conveying some of the same essentials in terms of content. That's because I'm doing the "spreading the word" part of my job, telling people about new technologies.

Sometimes, though, I like to do new things. I was invited to do a keynote at CalGIS's conference, and decided to write an abstract that was different from what I've been doing, so that I could explore different themes. I talked for the first time in a public talk about Google's on-going work on the Japan Crisis, and how cloud providers can help maintain a web presence for public service agencies - most of the participants were from government agencies - and related topics. I think the slides convey more of a "of course you should go with a cloud provider" then I actually presented, but most of what I was trying to convey was that these are hard choices and here's a place to start.

BTW, I hate the word cloud in this context. It's so market-y. Anyone have recommendations for a real replacement?

Sunday, March 27, 2011

Recent Slides

By the end of March, I'll have done 19 talks this year, at 16 different events. It's been a busy quarter. I'm not going to put all 19 sets of slides in here. Some of them had a lot of similarity. So I thought I'd post a couple of representative ones.

I did a talk on March 1st at the North Capital Area GTUG, at the Google DC office, on Fusion Tables. This was the culmination of a US East Coast tour that took me to College Park Maryland, Boston, and DC. It was video taped, but unfortunately the tape hasn't been digitized yet, I'll post that when I get it.

In Tokyo, at that Yahoo! Japan Geolocation conference, I gave a talk on Fusion Tables and mapping in the cloud.

I then went on to give talks at the Tokyo and Kyoto GTUGs. Here's the slides from Kyoto, largely the same as the Tokyo ones.

Wednesday, March 16, 2011

Tragedy in Japan and how to help

Like everyone, I am horrified by the loss of life and homes in the recent devastation in Japan. The scale is enormous, and as we hear more about it, many of us feel hopeless to help and scared about what it means for the future. Aftershocks and worries about radiation are all over the news, along with calls for donations, and occasional worries about scams, people promising to help, but taking money anyway.

At the same time, I am consistently impressed by the people who jumped in to help. From the first responders, the military, to the nuclear workers working day and night to prevent greater tragedy. There are people on the ground in Japan doing great work, mapping transportation routes, helping people find loved ones, providing food and shelter.
The Google Crisis Response team has been putting together many of these resources here:, including ways for people to donate money, maps of the situation, and links to the Japan Person Finder app.

The Humanitarian OSM Team is also on the ground, with more information here: about how to help with their mapping efforts.

Millions have already been donated. Millions more will be needed. Please help out now. If you want to know more about what Google is doing, follow @earthoutreach on twitter.

If you have other creative ways to contribute, please feel free to leave them in the comments.

Thursday, March 10, 2011

Ruminations on Place

Sunday, I was on a panel with Steve Chase, Hurricane Chase, and Murata Takehiko at the Yahoo! Japan Geolocation Conference (#geoconf). Yahoo! Japan (a distinct entity from Yahoo! Inc. btw), put on an excellent conference, and had announced that they would be contributing data to Open Street Map, in a similar fashion to Bing and MapQuest. There was a lot of excitement in the room, with many OSM participants present (by design I imagine). And there were inevitable questions about Google's future involvement in the project - something I'm interested in personally but can make no commitment to on behalf of Google of course. But more importantly, to this blog post at least, a question came up about whether Google would contribute Street View imagery to OSM, and whether there were any OSM related projects developing open versions of Street View. As a panelist, and someone who can't avoid talking, because I'm just that way, I had to answer of course. My answer went something like this, speaking as myself not foreshadowing a future Google product:

I don't think in the future, Google should have to be driving all the streets in the world. Ideally, we will move toward a time in which everyone is providing data about the world in open formats, in ways that are search-able and crawl-able. What makes Street View so compelling, I think, is that it gives us a sense of place, a sense of the essence, be being-ness of the location we're looking at. And in fact, in places where we don't drive cars, you can still see geolocated photos. Look at Moscow, for instance, with Pegman selected. There are photos all over. Ideally, this is something self-perpetuating, something people want to open up.

That got me to thinking, especially after reading Ed Parson's recent post about a 1930's video of Teddition. He, and the commenters, talks about what can be seen there, and what has stayed the same. Ed ends with this statement:

"We are lucky to have rare video like this for it’s completeness but at the same time it’s disappointing that for future generations Google Street View which could offer a similar resouce has had to be mutilated to accomodate privacy concerns."

Indeed, there is something we miss out on. I am not arguing for doing away with privacy, I'm just ruminating here on pictures and meaning. The word "place" has many meanings in English, but they are interrelated. The reason satellite imagery, and particularly street view imagery is so compelling is that it relates something that standard maps can't, a sense of the place or essence of a location. And that place-ness, that sense that is tied to location, time, people, trees, buildings, smell, sounds, all of that is incredibly powerful, and I think Street View is only starting to touch on what that means to people.

I've been in Japan this last week, and at two GTUG meetings, I did demonstrations of custom Street View. In particular, people were interested in this simple holiday greeting from Digitas. In it, the developers added some panoramas to their Street View application through the API, which of course anyone could do. The panoramas lead off street into the digitas office where employees hold up signs and there are thought and word bubbles around them. This conveys a sense of the place, a sense of celebration and fun and associates it with Digitas. I hope it really is that fun to work there, they seem like really nice folks in the picture!

The point I'm trying to make is that by this simple set of panoramas and a few lines of code, they were able to extend the sense of place that is the city around them, and change it to create a view of the place that is their company.

I know there are lots of academic writings on this subject, but frankly since 1994 I get bored when post-modernism or marxist dialectics get mentioned, so my forays into those studies have been unsuccessful at moving me. I read the works of China Meivelle, or Armistead Maupin instead, each of whom conveys vividly this sense of place

Today, like most days I have free in cities not my own, I walked. I walked around Kyoto. Not to find temples or castles, but to find that sense of place. I walked around, a lot, often going back over the same streets, visiting occasionally the same shops. I tried my extremely limited Japanese, and people graciously helped me out. I walked not just the big streets, but the small ones, gathering into myself my own impressions, my own sense of Kyoto-ness. Of course, this is very different from living here, what the place is like, and especially different from being a native. I tried to take pictures (posting them later) that captured this sense. How will technology solve this? Street View, satellite imagery, they are a start, but I believe augmented reality applications are going to be the best bet for capturing the "-ness" of a place. And I believe at some point, most of us will be involved in that capturing. The popularity of check-in applications, the rise of geotagged photos and videos, providing reviews, Foodspotting, and more are already starting it. It's only been 6 years since Google Earth and the Maps API came out, I wonder what we're going to see in another 6 years.

Friday, March 4, 2011

Private Tables in Fusion Tables: Better privacy for your data

Back in June, I wrote about "Techniques for protecting your data." Yesterday, Google announced another way to protect your data, Protected Map Layers.

Protected map layers, a part of the Google Maps API Premier package, allow you to create a data table in Google Fusion Tables and keep that table private. Maps API Free allows you to use only tables marked Public. Protected map layers are rendered as clickable rasters. You still have to be careful what data you put into the infowindow, make sure it's only what you want public.

Of course, Maps API Premier also allows you to make maps that are password protected, so this will be really useful for enterprises that want to keep their data entirely private but still take advantage of the performance improvements and spatial queries that are allowed by using a FusionTableLayer.

Wednesday, February 9, 2011

JSON in KML Templates

Since Google Earth 5.0, the description balloon has handled pretty close to full JavaScript. There's some interesting things you can do with this. In this example, I'm showing a very basic use of JSON using KML balloon templates.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="">
    <Style id="testStyle">
          <script type="text/javascript">
             function loadData(){
               var foo = $[foo];
               var myObj = foo.myData[1].value;
               document.getElementById("example").innerHTML = myObj;
           <body onload="loadData()">
             <div id="example">test</div>
        <Data name="foo"><value>{"myData":[
        <Data name = "bar"><value>23094</value></Data>

Balloon templates are designed to allow you to use a single <Style> element for all or a set of your <Placemark;gt; elements, and then just insert <Feature> specific data into the template. Named <Data> elements inside a <ExtendedData> element provide name/value pairs. However, this can be a little flat. You can put JSON elements inside the <value> element (a child of <Data>, which gives you a lot more flexibility.

The good folks at Secorra provide ObsKML, an ocean observations format, using this technique.

Saturday, January 29, 2011

Interactivity with FusionTableLayer and mouse clicks

The FusionTablesLayer in the Google Maps API is a bit of a black box. Fusion Tables generates a clickable tile overlay to use place in your Maps API application, but you don't get direct to change anything. If you want to change data, you have to do server side calls. However, the FusionTablesLayer does give you access to row data on click, which allows you to do interesting things server side.

In my sample interactiveftlayer, I use a Fusion Table of Google's corporate addresses. The table has a simple Color column, with values of 0 or 1. In the Fusion Tables map visualization for the table, I configured the Marker Icon such that values of 0 are green, and 1 are blue. The color means nothing of course about the actual office.

In interactiveftlayer, I suppress the InfoWindow by adding a suppressInfoWindows: true option to the layer initialization. I then add an event listener to the layer that captures the click event on the layer. This gives me row information about the feature clicked. I then send a XMLHttpRequest to the server (in this case App Engine) with the other color (1 if the color is 0, 0 if it is 1). After the response from the XMLHttpRequest, I reload the layer.

There's one tricky part, and hopefully we can find a way to improve this on the Maps API end. The FusionTableLayer is cached by the browser. Which means that even if the data has changed, the layer stays the same, at least at zoom levels visited while it was visible. This includes, BTW, not only the images but the row data associated with them. In order to defeat that caching, I append a Where parameter to the layer selecting for a Id greater than a random number from -1000 to 0. Since I know all Ids are greater than 0, I can do this. I'm not proud of that strategy, but it works.

Tuesday, January 25, 2011

Two Thumbed Closure Slider for Time Slider

I've posted a couple of times about sliders - Playing with Closure UI Library: Slider and a basic Basic Time Slider in Closure. My final slider example uses the same data set as the last, and incorporates a Two Thumb slider, meaning you can use the slider to set a range of values, not just a less-than or greater-than value. I also corrected something that impacted performance in the last sample, that is I checked whether the query changed by the different events, and change the query on the map layer when the query changes from the last. This is an artifact of the events that I'm listening form, MOUSEUP, MOUSEOUT, and KEYUP. You may remember in the first sample, I realized that firing off a query change whenever the slider had a CHANGE caused too many queries to hit the overlay server, causing the Map to show the missing overlay error. Listening for mouse and key events caused fewer events to fire, but still more than one per change. The change simply tests to see if the new query is different from the old query, and only re-query the layer server if the query changes.

Sunday, January 9, 2011

It's 2011: Time to think about the future of Geo

It's fairly traditional to start a year with either a retrospective of the previous year, or a look forward. Or, of course, both. In that tradition, I'd like to start the year thinking about some trends that I think are going to be important for Geo this year.

Powerful Easy Analysis Tools

This is the year. In 2005, the Google Maps API and Google Earth broadened the use of geography tools far beyond the traditional GIS crowd, sparking a debate between so-called neo- and paleo-geographers that lasted for years. In the last year or so that debate seems to have calmed down a bit, as traditional GIS tools adapted to the web, and neo-geographers, were everywhere. So there's room for a fresh controversy.

The Google Maps API, followed shortly by a host of other APIs from Yahoo!, Microsoft, OpenLayers and others, allowed developers to easily place maps on their site. But as I pointed out in my Ignite Spatial talk in September, developers and GIS professionals aren't the only ones who want to share spatial data. In fact, I'm guessing the vast majority of spatial data, by volume if not quality, is in tabular form. Geocommons has recognized this for years, providing easy tools for uploading, combining, and sharing spatial data. With the addition of Google Fusion Tables, and easy mapping of spreadsheets and sharing of data, powerful tools for data analysis are in the hands of anyone with a Google account. I won't call them "low-end" tools, though certainly they lack the power of ESRI's tools, or any of a host of other proprietary and open source GIS applications. I predict that this year will see a lot of people migrating to Fusion Tables, and others using the API to back-end store the data. Which leads us to


OK, I almost had to slap myself for saying "Cloud." After all, of all the buzzwords going around, I think it is the least penetrable to people not "in-the-know" and perhaps has the most number of definitions. To make matters worse, Microsoft has diluted the term even more with this wacked commercial campaign.  However, it is being used a lot, so let me be clear, I think this is the year of Cloud Data Hosting.

I predict more and more spatial data will go into "The Cloud." We're already seeing that happening with services like SimpleGeo, Microsoft Azure's support for spatial data, and many other services. Fusion Tables of course has an API which I anticipate will be useful for a number of spatial data storage services.

Cloud Analysis

It's still early days on this. I think that 2011 will be the year of early adoption. In particular, tools like Google Earth Engine will allow you to run high-end analysis in cloud data centers. Some of these tools are already out there, but the introduction of Earth Engine allows you to do things we're used to in the spatial world, namely raster data analysis, but do it faster and cheaper than before.


Well, really, who am I kidding? 2010 was the year of local and location. Facebook's Places and Places API were a very powerful entrance into the location and local scene. Google Places with Hotpot is a big entry into the local market, but it came pretty late in the year. 2010 was about local, 2011 local will become mainstream, such that everyone will have forgotten that it wasn't part of our sites. Remember when there weren't maps everywhere? That was only 6 years ago, now it's taken for granted. Local will get that way by 2012. When of course the world ends, right? That's what the movies tell us anyway.

Prediction posts are fun, because rarely are you held to them. But really they tell you more about where you are now. The things we can't talk about, or don't know about yet, those are the real surprises. Happy New Year everyone.