Showing posts with label Maps API Blog. Show all posts
Showing posts with label Maps API Blog. Show all posts

Neo Geo Blog

Wednesday, May 28, 2008 at 5:20:00 PM

I have good news and bad news. Let's start with the bad.

The bad: After 2 years, 6 months, and 14 days of dedicated developer community service, the Official Google Maps API Blog is being retired. That's right... the blog you're reading right now, right here, is no more, starting today. No more news will be posted here.

The good: All is not lost! A new blog is taking this blog's place: The Google Geo Developers Blog. Hop on over there to see the first post and get the full story on the change.

So if you're reading this post in an RSS reader, be sure to subscribe to the new blog's feed. And if you're reading this post right on blogger itself, be sure to update your bookmark. Because there will still be plenty of continued Maps API news... you just won't be able to catch it here.

See you all over at the new blog!

App Engine, Local Search, & Maps: Making Static Maps... Interactive?

at 10:50:00 AM

JavaScript and Flash are great for putting Google Maps on your website, but sometimes they just won't do. For mobile browsers or users with dial-up connections, simpler is better. So I wrote an open source non-JavaScript version of Google Maps which is designed to show how easy it is to write an application on App Engine that makes use of two new APIs from Google: The Static Maps API and the Local Search API's REST interface. It doesn't have advanced features like street view and public transportation, but it gives you a searchable map that you can zoom in/out on as well as save locations. It also automatically saves your last map view so that every time you go back to the site it will show you what you were last looking at. Check out the source code.

It uses App Engine to store saved points, the AJAX LocalSearch REST API for search functionality, and the Static Maps API to display maps. App Engine is easy to learn and the data store is useful for this kind of application. The REST API for LocalSearch is also very simple. For more information on it, go here.

To use the Static Maps API, you just need to create a URL with the proper parameters for your desired map view. Keep in mind that you need to set the zoom level (unless you are specifying multiple points — then it's calculated for you). In the vast majority of cases, this is completely fine. In my case, though, I needed to know what the zoom level was, so that I could give the user the option to zoom in/out. That meant coming up with calculations of the zoom both for the multiple points and single point case, and that was the trickiest part of the app.

If you use the AJAX Local Search and it returns one result then there will be a viewport object returned with it. This viewport contains the Northeast and Southwest latitude/longitude bounds that are optimal for displaying this point. However, Static Maps only accept zoom levels and center points. Here's the Python to generate that information:

viewport = json['responseData']['viewport']
mercator_projection = MercatorProjection(18) # Checkout the MercatorProjection class
southwest = [float(viewport['sw']['lat']),float(viewport['sw']['lng'])]
northeast = [float(viewport['ne']['lat']),float(viewport['ne']['lng'])]
bounds = [southwest, northeast]
zoom_level = mercator_projection.CalculateBoundsZoomLevel(bounds, MAP_SIZE)
At this point you will have everything you need to construct the map: the center point (the Local Search point), zoom level, marker point.

Then there's the case where you have multiple points returned by the AJAX Local Search. Since we will have a collection of latitudes and longitude points that we want to display we can just find the min/maxes, do some rounding, and voilĂ  you get a bounding box. With a bounding box and a calculated center point, you can repeat the same steps as before.

mercator_projection = MercatorProjection(18)
bounds = CalcBoundsFromPoints(lats, lngs)
center_point = CalcCenterFromBounds(bounds)
zoom_level = mercator_projection.CalculateBoundsZoomLevel(bounds, MAP_SIZE)

From line 121 to about 285 you'll find all the necessary functions for the situations described above. Try using this code to create your own interactive version of Static Maps, and let us know in the forum if you have questions or just want to show off your nifty app.

geo search 2.0: Data In, Data Out

Thursday, May 22, 2008 at 10:05:00 AM

Last week during the geo madness of Where2.0 and WhereCamp, we announced two enhancements in geo search to make it both easier for developers to get their data into our geo search index and easier for developers to get data back out of the index:

  • Geo Sitemaps: Sitemaps are a protocol that bots use to index content from websites. Last year, we announced the ability to include KML/GeoRSS files in regular sitemaps just like a normal web resource. This year, we announce a special extension for sitemaps that adds geo-specific tags and makes it easier for us to index. To get your geo content indexed as fast as possible, just submit the sitemap to Google Webmaster Central. For more information on creating a KML file to include in a sitemap, read this article in the KML documentation. An example geo sitemap listing a KML and a GeoRSS file is shown below:
  • <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
            xmlns:geo="http://www.google.com/geo/schemas/sitemap/1.0">
    <url>
       <loc>http://www.example.com/download?format=kml</loc>
       <geo:geo>
           <geo:format>kml</geo:format>
       </geo:geo>
    </url>
    <url>
       <loc>http://www.example.com/download?format=georss</loc>
       <geo:geo>
           <geo:format>georss</geo:format>
       </geo:geo>
    </url>
    </urlset>
    
  • Geo search in the API: The Local Search API has traditionally been used to return business listings and address geocodes. As of last week, it can now be used to retrieve any of the content we have in our geo index. There are a couple different ways to do this, depending on how you use the API. If you're using the LocalSearchControl, here's some sample code (and live example) that will return blended results:
  • var options = {
      listingTypes : GlocalSearch.TYPE_BLENDED_RESULTS
    }
    map.addControl(new google.maps.LocalSearch(options));
    
    If you're using the Local Search API from Javascript, here's some sample code to return only results from indexed geo files:
    var ls = new GlocalSearch();
    ls.setRestriction(GSearch.RESTRICT_TYPE, GlocalSearch.TYPE_KMLONLY_RESULTS);
    
    And finally, if you're using the Local Search API from somewhere other than Javascript - for example, with our new nifty Maps API for Flash - here's some sample AS3 code (and live example) to return only results from indexed geo files PLUS add a site restrict operator to limit it to results from platial.com:
    service.url = 'http://ajax.googleapis.com/ajax/services/search/local';
    service.request.q = "site: platial.com" + " " +  address.text;
    service.request.mrt = "kmlonly";
    service.addEventListener(ResultEvent.RESULT, onServerResponse);
    service.send();
    

There are (atleast) two really cool consequences of this news: 1) you'll be able to enable users of your mashups to instantly find international results where previously none existed, and to be able to find results for non-standard searches (e.g. "dog parks"), and 2) by indexing your content, waiting a few weeks, and then using the local search with a "site:yourdomain.com" appended to the query, you get to leverage the power of google search on your own content with barely any code of your own.

So what are you waiting for? Give us your geo sitemap, use our API calls, and let us know what you think in the Maps API, KML, or AJAX API forums.

libkml Marches On!

Monday, May 19, 2008 at 5:04:00 PM

Google has released version 0.2 of libkml, an open source library for serializing and deserializing KML files. libkml now uses a memory management scheme based on "smart pointers", and has deprecated the use of SCons. On Linux and Mac OS X it now use the traditional automake, and on Windows Microsoft Visual Studio. The "smart pointer" scheme presently restricts support for some alternate language bindings, so libkml 0.2 can only be called from C++, Java, and Python. Version 0.1 also supported PHP, Perl, and Ruby, and is still available in the subversion repository if you're interested. We plan on restoring the those bindings as soon as we can.

Check out the User Guide, and particularly the future development list.

Here's an example of what the code looks like:

// createkml.cc
// This program uses the KmlFactory to create a Point Placemark and
// prints the resultant KML on standard output.

#include 
#include 
#include "kml/dom.h"

// libkml types are in the kmldom namespace
using kmldom::CoordinatesPtr;
using kmldom::KmlPtr;
using kmldom::KmlFactory;
using kmldom::PlacemarkPtr;
using kmldom::PointPtr;

int main() {
  // Get the factory singleton to create KML elements.
  KmlFactory* factory = KmlFactory::GetFactory();

  // Create .
  CoordinatesPtr coordinates = factory->CreateCoordinates();
  // Create -122.0816695,37.42052549
  coordinates->add_point2(-122.0816695,37.42052549);

  // Create  and give it .
  PointPtr point = factory->CreatePoint();
  point->set_coordinates(coordinates); 

  // Create  and give it a  and the .
  PlacemarkPtr placemark = factory->CreatePlacemark();
  placemark->set_name("Cool Statue");
  placemark->set_geometry(point);

  // Create  and give it .
  KmlPtr kml = factory->CreateKml();
  kml->set_feature(placemark);

  // Serialize to XML
  std::string xml = kmldom::SerializePretty(kml);

  // Print to stdout
  std::cout << xml;
}

The engineers who worked on it put a lot of thought into making it fast and light weight. However, it is an alpha release. We really would love to have comments and feedback on it, both in the KML Developer Support forum and in the libkml issue tracker.

Love My Maps? Use its Line and Shape Editing in your API Apps!

Friday, May 16, 2008 at 4:30:00 PM

When we launched the map editing tools in Google Maps, the reaction of developers was "This is cool, but how can I use it on my own site?" As someone who was originally drawn to Google in part because of the Maps API and the great developer community around it, I committed to making the My Maps tools useful for developers on their own sites.

Today, I'm pleased to announce that our user interface functionality for editable polylines and polygons is now part of the Maps API.

Say, for example, that you have a GPolygon you want users to be able to edit. Simply call GPolygon.enableEditing() and the poly will have draggable edit control vertices when the user mouses over it. To later make it non-editable, call GPolygon.disableEditing().

We've also exposed additional events for GPolygon and GPolyline so that you can easily mimic the MyMaps behavior (in mashups or Mapplets) by calling enableEditing on "mouseover" and disableEditing on "mouseout". To find out when the user makes an edit, listen for the "lineupdated" event. And if you want users to be able to draw a new GPolyline completely from scratch, just use enableDrawing as shown below:

var polyline = new GPolyline([]);
map.addOverlay(polyline);
polyline.enableDrawing();

Every click on the map will add a new vertex to the polyline until the user double-clicks or clicks again on the last vertex. You can also call enableDrawing to lets users append vertices to either end of an existing polyline. And just because everyone likes pretty colors, we exposed methods to let you change the style of a polyline or polygon: setStrokeStyle and setFillStyle. Have fun, and let us know what you think in the forum.

View example in its own window.

Introducing the Google Maps API for Flash

Wednesday, May 14, 2008 at 5:40:00 AM

Here at Google, we receive a lot of feature requests - and it feels great every time we fulfill one of them. The ability to utilize the power of Google Maps from Flash is one of those requests that has been popping up on blog posts and other forums since the beginning of time (or more accurately, the beginning of the Javascript Maps API). Over the past few hours, I've had the enjoyment of finally seeing this particular feature request - a Maps API for Flash - come to fruition. Tiredness will grab me soon, no doubt. If you're one of the first readers of this post, rest assured that I'm unlikely to still be awake: long hours have been worked; pre-launch nerves have jangled. Now it's time to let our baby loose into the world and see how the developer community will embrace it.

So, what do I like about the API for Flash? Smoothness and speed are a big part of it. We've designed it so that Flash graphics can be used for each tile layer, marker and info window - opening up possibilities like dynamic shading, shadowing, animation, and video. When the user zooms the map, magnification changes happen smoothly and place names fade in. After the user drags a marker, it gently bounces to a halt. Generally, Flash allows for much greater embellishment, and, well... "flashiness." I get excited just thinking about the creative ways developers might take advantage of having a Flash API for Google Maps.

What was one of our main design decisions for this project? We knew that version 1 of any software project is not perfect, so we opted to split the interface and implementation. As a result, you can build against the current version of the API, and as we add enhancements and tweaks, your website benefits automatically from each update. When you wish to take advantage of new API functions, only then do you need to download the latest API and rebuild.

What does it look like? We've played with it, thrown our ideas in, and also worked with outside companies to see how they use the API. It's been a pleasure to see some of the demos that have come back. Here's one from AFComponents that shows some of the possibilities:

When I first joined Google in Sydney, I got to hear about the experience of the Maps team when they first watched the traffic and the buzz build for the launch of Google Maps. Well, now I'm ready to experience that with this new API. Do send us feedback, we're looking forward to it.

What remains? Over to you.

Upcoming Events

Friday, May 09, 2008 at 1:49:00 PM


There's four big Geo events in the San Francisco Bay Area this month, and Mano and I will be at all of them. Here's the details:

Where2.0: May 12-14th

Sharing Your Content on the Google Maps API

In this session, you'll roll up your sleeves and learn about publishing and sharing using the Maps API. Then we’ll hear from Google partners about what constitutes “great” content and how they expose it.

Searching the Geoweb: Exposing Your Geo Data to Search Engines

Have you been wondering how to drive traffic to that cool maps mashup you created recently? We’ll show you how to get your maps mashup crawled and indexed, and how best to optimize your content for user discovery via search using KML.

WhereCamp: May 17-18th

No sessions planned! This is an unconference - that means the participants do the session planning on the spot. So if there's a Maps API or KML topic you want to talk about, come on by and propose it! (And stay for the slumber party, there'll be lots of hacking and coffee). And, it'll be at the Googleplex! And it's free!

Web 2.0 Mapping and Social Networks Group: May 20th

Communities + Google Maps: Harder, Better, Faster, Stronger

Pamela Fox will talk about the various ways of using Google Maps & the Maps API to create user-contributed maps, covering the spectrum from no-coding solutions to full custom databases and code, and showing examples of sites successfully using each technique.

Google I/O: May 28-29th

There's lots of Geo sessions at Google I/O, here's just 3:

Harnessing StreetView, Static Maps, and other New Additions to the Google Maps API:

Ben Appleton will review some of the recent additions to the Maps API including how to use Static Maps for fast page loads and printable maps, and how to incorporate Street View imagery in your app.

Hosting Your Geo Data, an Overview of Design Options:

Mano Marks will discuss the various options for hosting your Geo data, including Google App Engine, and explain how to choose the right data model for your project.

The World's Information in Context:

Michael T. Jones will discuss new product directions and key trends of importance to geo developers.

Be sure to visit the Google I/O website to see the complete list of sessions and to register. For those coming from out of town, we've arranged discounted room rates at nearby hotels. Read the details on the website to take advantage of the discount, but move fast because the hotel discount ends May 13th.

We're looking forward to seeing you at some of these events soon.

Armageddon Pills and KML in Google Earth

Wednesday, May 07, 2008 at 5:47:00 PM

I’m Matt Brown, a kml developer and designer at concept3D in Boulder, Colorado.

Google Earth has provided a new group of developers with the opportunity to build virtual ‘geowebsites’ specific to vertical markets. Armageddon Pills, a travel book by John Higham, combines this power of Google Earth and a printed book to illustrate the tale of one family’s journey around the globe in 52 weeks.

After creating numerous kml files, he asked us (concept3d) to create a browser look and feel while in Google Earth. We attempted to simplify the Google Earth experience for a broader audience, focusing on its on-screen and balloon navigation systems.

When opening the file, you will find a main menu, or in this case the table of contents, of on-screen buttons. This menu is broken down into chapter groupings that contain sub-menus of icons related to the book. This allows the reader to find ‘where they are’ in the book, and gives them the ability to ‘read’ the kml from start to finish. Each balloon along the traveled path offers an interesting snippet and sometimes a photo or video associated with their locations. Navigation arrows were added to each balloon to allow the information to be chronologically documented and experienced by the end user, and a “home” button to get back to the main menu. Additionally, there are “menu” placemarks scattered around the globe that will help you find the main menu if you are lost in space.

We rely on feature anchors for navigating between balloons and a very high altitude (12680000 meters) to create the effect of a menu. You can download our full KML here.

A big thanks to Mano Marks for his insight and for taking interest in this project. If you have any questions or comments, please email me at matt.brown@concept3d.com.

Shout it from the Rooftops!

Thursday, May 01, 2008 at 9:04:00 AM

Today, we're happy to introduce rooftop geocoding in the Google Maps API. This new service delivers pinpoint results for more than 50 million US addresses. The accuracy gains are impressive — and useful. Now, users can distinguish between locations on one side of the street versus the other and can identify specific addresses even in densely built environments.

Check it out for yourself below, starting with the geocode for the Google "house":

Static Maps Have Never Looked This Good!

Tuesday, April 29, 2008 at 3:09:00 PM

Do you ever find yourself using our Static Maps API, wishing you could cover your maps with markers of all sorts of colors, sizes, and letters, or that you could draw lines all over the map? Well, today is your lucky day. Check out these new features in the Static Maps API (and the kind of output you can get from it!) below:

  • More marker options: You can now specify 4 different sizes (from normal to tiny), and 8 different colors (and for half of the sizes, you can specify a letter as well).
  • Paths: You can specify a path of up to 50 points, along with color, weight, and alpha.
  • Image formats: You can specify PNG, JPG, or GIF output.
  • Transliterated tiles: You can explicitly specify a language, if you'd like transliterated tiles (for Greece or Japan, for example).

Feel free to play around with the options in the updated Static Map Wizard or read through the documentation. As usual, please post questions or comments in the forum. We'd love to see how developers are using this API and its newest features.

Google Developer Days: Meet the Google Geo Engineers

Wednesday, April 23, 2008 at 10:48:00 PM

Google Developer Days 2008, a set of one-day developer events, are back and will take place in locations around the world. We've designed these events for developers with strong coding backgrounds, so that we can discuss our APIs, developer tools and applications.

We'll host Google Developer Days in these locations:

  • Yokohama, Japan (June 10)
  • Beijing, China (June 12)
  • Taipei, Taiwan (June 14)
  • Sydney, Australia (June 18)
  • Mexico City, Mexico (June 23)
  • Sao Paulo, Brazil (June 27)
  • London, UK (Sept 16)
  • Paris, France (Sept 18)
  • Munich, Germany (Sept 23)
  • Madrid, Spain (Sept 25)
  • Milan, Italy (Oct 21)
  • Prague, Czech (Oct 23)
  • Moscow, Russia (Oct 28)
If you're based in the US, we encourage you to come to Google I/O, on May 28-29 in San Francisco.

At Google Developer Day, our Maps and KML engineers will share their inside knowledge on our developer tools and APIs, including the Google Maps API and KML. In many locations we'll do deep dives into code and conduct hands-on codelabs. If you come to Yokohama and Mexico City, say hi to me and Pamela Fox.

We've posted detailed information for our early dates and will be adding more information for other locations soon. If you're a developer, we encourage you to sign-up for a Google Developer Day at a nearby location. I hope to see you there.

Streetview in the Wild: A Flourishing Species

Tuesday, April 22, 2008 at 5:58:00 PM

Several weeks ago, we announced the official release of Street View in the Maps API and invited developers to post examples of their Street View mashups. We crossed our fingers and hoped that we'd made the classes flexible and functional enough for developers to work with, and soon enough the examples started flowing in.

Here are some of my favorites:

DualMaps: For a given location, displays the Street View, Birds Eye View, and Google aerial map view simultaneously and lets you embed or share the result
Povo: A local reviews site specially for Boston. Displays street view in a lightbox for each location, and has made a Street View tour especially for the recent Boston Marathon.
StreetView Adventure Game: In the spirit of the classic interactive fiction games like Zork, this demo lets you play a short game that begins with chasing a guy trying to climb out a window in San Francisco.

Also check out VegasVision, Ong Map V2 (Alpha), VPike, FlyRig, Street View Gadget, LotView, Street View SF Tour, RealBird, Glotter and a Street View Tour Gadget. And if you loved Trulia's implementation (announced on Google LatLong last week), check out this demo that shows how to angle a street view panorama towards the side of the street that a building is on. (It involves math, but don't worry, we've done it for you.)

Thanks to all you developers for sharing your work with us, and as always, please post your examples or questions in the forum.

Our first Google Geo Developer series is over...but the YouTubes will last a lifetime!

Wednesday, April 16, 2008 at 10:36:00 AM

Two months ago, we announced the start of the Google Geo Developer series on this blog. The point of the series was to bring together local geo developers for intimate talks/discussions around Maps/KML topics, and then let all developers watch the events on YouTube. It was a bit of an experiment - would we find enough topics for talks every week? Would anyone watch the videos? Well, I'm happy to say it was a successful experiment. Besides having 6 great talks and more than 20,000 YouTube video views, we also met a bunch of local developers working on geo projects (thanks for always showing up, you guys), and even met some folks from far away through the mailing list. Hopefully we'll get to hold another of these series in the falls, so subscribe to the mailing list if you want to find out about future events.

Here's a roundup of the talks that went down, with links to videos. Click "More info" on the YouTube description and you'll often find a link to slides/materials.

  • Quick & Dirty KML Creation: With Mano Marks, Pamela Fox, and Christiaan Adams
    A demonstration of creating KML visually in Google Earth & Google Maps, and using Spreadsheet Mapper 2.0
  • Creating Custom Maps: With John Coryat
    A comparison of various ways of overlaying data in the Maps API and an in-depth explanation of creating tile layers and custom map types
  • GigaPan In-Depth: With Randy Sargent & Ted Morse
    A demo of the GigaPan panorama-browsing website and KML files, plus a technical explanation of PhotoOverlay
  • Dynamic KML: With Mano Marks & Brian Hamlin
    An exploration of using dynamic queries from KML, using the NetworkLink, httpQuery, and viewFormat elements, plus a demo of a PostGIS-generated NetworkLink
  • Mars, Moon, and Sky Map Types: With Noel Gorelick
    A talk introducing the non-Earth Maps API map types, plus cool demos of other types of projections used with planetary imagery
  • Mapping the Votes: With Michael Geary
    A whirlwind tour of what it took to create the Elections 2008 Map/Mapplet/Gadget, including SHPfile conversion, Javascript optimization, centroid calculations, Twitter updates collection, Mapplet API tricks, and more.
  • Google API Talks - Android, KML, Google Maps, Gadgets
    A series of 5-minute talks by various developers and Googlers given before Geary's presentation, including an intro to Gadgets/Mapplets.

KML is now an open standard

Monday, April 14, 2008 at 1:32:00 PM

The Google Geo APIs are all about building powerful tools to share geo information with the world. We've been really interested in seeing the way that KML has been used all across the web to express geographic content, and today we're very excited to announce that the Open Geospatial Consortium has announced its acceptance of KML 2.2 as an official OGC Standard. That means that KML is not just a Google Earth standard, it's not even just a Google standard. It is now an official standard for presenting geographic data. Read more about this great news on the LatLong blog.

Text images without (much) coding

Wednesday, April 02, 2008 at 8:48:00 PM


Valery Hronusov has created a cool visual interface for his Text to Image service. This service allows you to easily create a text image, control its color, add shadow effects, and then place it on directly a map. It outputs to KML, Maps API JavaScript code, or just a plain URL to an image. This is really useful to creating, for instance, road labels or text based ScreenOverlays. All you have to do is copy the output into your own code. The interface is pretty simple:

Here's a sample of the KML output:

<GroundOverlay>
  ...
     <Icon>
             <href>http://text2image.ning.com/TextToImage.php?text=San+Francisco%2C+here+we+come%21&LabelType=2&FontSize=24&casing=asis&alignment=1&font=arial&fontStyle=bold&LabelLocation=topleft&dX=11&dY=0&FontColor=00ff00f9&ShadowColor=00000000&depth=3&effect=0&LabelHeight=35&LabelWidth=438&IconHeight=18&IconName=http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png</href>
     </Icon>

Here's a sample of the JavaScript code it creates:

var pointCenter = new GLatLng(37.775196,-122.419204);
var map = new GMap2(document.getElementById("map"));
map.setCenter(pointCenter, 10);

var pointSW = new GLatLng(37.741743,-122.470044);
var pointNE = new GLatLng(37.786659,-122.272387);

var groundOverlay = new GGroundOverlay(
   "http://text2image.ning.com/TextToImage.php?text=San+Francisco%2C+here+we+come%21&LabelType=2&FontSize=24&casing=asis&alignment=1&font=arial&fontStyle=bold&LabelLocation=topleft&dX=11&dY=0&FontColor=00ff00f9&ShadowColor=00000000&depth=3&effect=0&LabelHeight=35&LabelWidth=438&IconHeight=18&IconName=http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png", 
   new GLatLngBounds(pointSW, pointNE));

map.addOverlay(groundOverlay);

And here's what it looks like:

We're Going to Google I/O!

Monday, March 31, 2008 at 3:44:00 PM

I'm getting excited about Google I/O May 28th & 29th in San Francisco. The reason I'm excited is that many of you will be there too, and it will be a great chance to meet. Google I/O is like the Google Developer Day we had last year, which in turn was based on Google Geo Developer Day, which we had two years ago. This year, there will be a whole track on Maps & Geo, including KML, Maps, and Mapplets. There will, of course, be other tracks, AJAX, APIs & Tools, Social, and Mobile. Both Pamela and I will be there, along with all the Google Geo stars.

The event won’t be limited to just Google APIs and developer tools. There is a lot of knowledge about web development in general at Google, and we’d like to share that expertise so that all applications on the web get better. And of course, we're focusing a lot on Open Source tools, like the new libkml (more about that in a later post).

Over the two days of Google I/O, Google engineers and other leading software developers will share their knowledge in breakout sessions, hands-on Code Labs, and Q&A Fireside Chats. That's your chance to sit down with Google engineers and ask all the questions you've ever wanted to, as well as meet each other.

Visit the Google I/O website to learn more and register. Space is limited, so be sure to make plans to attend now.

And after Google I/O, we'll be doing other developer days all over the world, so if you can't make it to SF, hopefully you can make it to one closer to you.

Street View in the API (or, How I Spent My Summer "Vacation")

Thursday, March 27, 2008 at 10:57:00 AM

For the past three months I have had the great pleasure of working as an intern with the Google Maps API team in Sydney. Unfortunately my time is now up and I must head back to the mundane life of a undergraduate scholar, but before I do I'm ecstatic to announce that my intern project is FINALLY complete: Street View is now in the Google Maps API!

Many of you will already have seen Street View as part of maps.google.com. If you haven't, click this link to give it a go. Street View allows users to view 3D panoramas of various locations around the world and to navigate around neighborhoods as if they were (almost) really there.

We've worked hard to ensure that Street View in the API gives developers the power and control they need to embed this functionality in their own websites in whatever way they wish. The API allows you to embed one or multiple panoramas in any location on a site and move, remove, hide and unhide them as necessary. Panoramas can also be easily integrated with the rest of the Google Maps API to allow synchronization between the map and the panorama viewer. The blue tile layer overlays which show where Street View data is available can be added to your own maps using the GStreetviewOverlay class. The following example mimics the Google Maps functionality with the tile layer and rotating Street View icon:

By far the coolest feature (in my opinion) is the ability to control the embedded viewer using Javascript functions on the GStreetviewPanorama object. The panTo function changes the current point of view by performing a smooth animation between the current and target view. An example of this is the app below which does a 360 degree pan around the current location (for all you people too lazy to use your mouse):

There's a whole lot more functionality available in the API than I could ever cover in one blog post, so check out the documentation, reference, demos, and start experimenting! Once you're done, post a link to your experiment in the forum. We'll check them out, post the most fun and practical demos in a blog post and our demo gallery, and send the authors some nifty Google schwag.

Before I sign off, I'd like to thank the entire Google Maps team for their help in getting this project complete. I had a fantastic time interning with Google and learnt a phenomenal amount.


Cheers,
(former) Intern: James McGill

MapIconMaker 1.0: The Easy Way to Make Your Markers Meaningful

Tuesday, March 25, 2008 at 6:00:00 PM

In the talk I gave last fall about Maps Mashups Usability, I mentioned that one way to make your map more informative at first glance is to use the color and size of a marker to indicate categorical or density information. Previously, that would mean using an image editing program or server-side image generation script to create all the various marker icons needed. Now, with the introduction of MapIconMaker v1.0 into the open-source utility library, all that's needed is a Javascript include and a bit of code. For example, the simple demo shows how the following line of code creates a GIcon that's 64 by 64 pixels and has a green fill.

var newIcon = MapIconMaker.createMarkerIcon({width: 64, height: 64, primaryColor: "#00ff00"});

Behind the scenes, that line of code constructs the URLs for the various GIcon properties by using a special output of the Chart API to generate marker icon images. But don't worry about that - just use our nifty MarkerIconOptions wizard to preview various settings, and then copy the generated code into your own mashup.

We loved the dynamic icons so much that we couldn't wait to start using them - so some of you might have already seen them in use for Google's Decision 2008 mapplet/map (screenshot below). At the zoomed out view, the map contains dynamically sized and colored markers for each state. The color represents the candidate that got the most votes, and the size represents the relative number of votes that candidate received. When you zoom into the state, the map then contains markers for each voting precinct representing the same data. It's a great way to quickly understand the population density and voting habits of a region.

We hope you enjoy MapIconMaker as much as we do. Please look through the reference and examples, and let us know if you have any questions in the forum.

MarkerTracker 1.0: "Which way did he go, George?"

Monday, March 17, 2008 at 4:25:00 PM

Hi everyone, my name is Dan Rummel and I've been hacking Google Maps out of the San Francisco area for a couple years now. Recently I have been working hard on a start-up with a couple of college buddies: Seero.com (Putting live video on the map). In our UI, we want people to interact and explore using maps as much as possible, something we like to call GeoSurfing. However, sometimes after dragging and zooming a few times, one can quickly get lost in the middle of nowhere and unable to get back to the original viewport. So at the Google Javascript Hackathon, I started working on MarkerTracker, which is kind of like radar for 'important' markers. It's a simple and customizable tool that utilizes GPolyline to display directional indicators for markers that are out of view. Check out this simple example:

And to prove that the MarkerTracker can be used for something more advanced -- and to wish everyone a happy St. Patrick's Day -- here's a leprechaun chasing game:

A big thanks to Pamela Fox and all the developers who have contributed to the Google Maps Open Source utility library, it is a fantastic resource. Of course if you want to learn more about MarkerTracker check out the class reference and more examples. As always, please report any issues you find in the developer forum.

Put down your language learning books, we've got transliterated tiles in the API!

Thursday, March 13, 2008 at 2:30:00 PM

Due to the usage of non-latin characters in languages like Russian, and our decision to label countries and cities in their native tongue, I've always found browsing foreign countries in Google Maps to be quite the educational experience. How else would I have discovered that other languages have such pretty swirly letters? Unfortunately, it's also quite a frustrating experience when you're actually trying to find some place in those countries ("Tokyo! SHOW ME TOKYO!! aRrrgghghH!"). Well, thankfully the Google Maps team has now made it easier to have both an educational and satisfying experience with the recent introduction of transliterated tiles for Russia, Greece, Japan, and Thailand.

For users with a browser setting for the native languages of those countries, they'll continue seeing the tiles with just the labels in that language. But for everyone else, they'll see tiles with both the labels in the native character set and in the latin character set below it. You can trust the language setting to get that effect in the Maps API, or if you'd like, you can force a particular output in both the Javascript and Static Maps API by appending the"hl" parameter to the script src or image src with the desired language value. Experiment with the various language/country combinations in the example below to see this in action in both the Static and Javascript APIs: