Posted:
Hey Earth API developers, have you visited the Developer's Guide recently? If not, you're missing out on some great new content and sample code! We've recently revamped the Developer's Guide in some very big ways: A special thanks goes out to Michael Jeffrey on the Earth API team for writing the new Developer's Guide. Thanks Mike!

Once you're done checking out the new Developer's Guide, click over to the Articles section of the documentation to read two new Earth API articles that shed some more light on the KML Document Object Model in the Earth API: The first article briefly discusses DOM concepts and motivations, while the second article jumps into code that uses the GEarthExtensions Earth API utility library to simplify common tasks in the Earth API.

I hope you all enjoy reading through the new articles and Developer's Guide! If you find any bugs, feel free to file them in the Earth API issue tracker or post to the discussion group.

Posted:

Hi,I am Nianwei Liu, a web developer located in Charlotte, North Carolina that enjoy workings with various flavors of theGoogle Maps APIs.

A few weeks ago, Google announced 3D/perspective capability in the Flash API. If you would like to try out this functionality, but you're not ready to fully commit to AS3 yet, you may find this open source library helpful: Map Bridge.

The concept is very simple: programing a flash component with JavaScript, similar to what you do with GStreetViewPanorama. This library exposes all core classes in the Flash API and packages them in an easy to use way. You can write a simple Map3D application like this:

 
var map;
function init() {
  MapBridge.createMap(document.getElementById('map_canvas'), function(mp, brg) {
    map = mp;
    map.addEventListener('mapevent_mappreinitialize', onMapPreinitialize);
    map.addEventListener('mapevent_mapready', onMapReady);
  });
}
            
function onMapPreinitialize(e) {
  var myMapOptions = new MapOptions({
    zoom: 12,
    center: new LatLng(40.756054, -73.986951),
    mapType: MapType.NORMAL_MAP_TYPE(),
    viewMode: View.VIEWMODE_PERSPECTIVE(),
    attitude: new Attitude(20, 30, 0)
  });
  map.setInitOptions(myMapOptions);
}
            
function onMapReady(e) {
  map.enableContinuousZoom();
  map.enableScrollWheelZoom();
  map.addControl(new NavigationControl());
  map.addControl(new MapTypeControl());
}
       

Here is an example that uses Map3D and driving directions for a fly-over.

For more information, check out more examples, how-to, and reference.

Posted:

Every December, an astonishing 15,000 geoscientists gather in San Francisco for the American Geophysical Union's Fall Meeting. One of the best-attended sessions at the conference is the Virtual Globes session, returning for its fourth year (previous sessions 2006, 2007, 2008). It provides a forum for scientists, educators, developers, and GIS specialists to meet and discuss developments in the use of geobrowsers. Presenters in previous years included the authors of some of the most popular geoscience KML files on the web, as well as many well-known geo bloggers and industry developers. The session includes both talks and interactive demonstrations, with the latter involving large plasma screens, poster board displays and high-speed internet for each presenter.

This year's AGU Fall Meeting is December 14-18, and the deadline for submitting abstracts is September 3, which is coming up fast! We encourage all scientists, educators, developers, and GIS specialists to submit abstracts relating to uses of GeoWeb technologies for better scientific understanding, public outreach and education about our "real" world. The Virtual Globes session is even going to be webcast this year, which means that talks will reach more than just the live audience at the conference!

The Virtual Globes website has details of how to submit your abstract and links to more info on the rest of the AGU conference. Those interested in attending can register online. We'll post a full schedule of the Virtual Globes talks and demonstrations in mid-October.

Posted:

Two years ago, we announced the Static Maps API. This API allowed developers to generate images that represented maps with markers and paths, and to embed those images in webpages. Developers embraced this API as a way to put lightweight thumbnails on their site (like Glotter) and as a way to create non-Javascript versions of their websites (like LonelyPlanet and Orbitz), and they clamored for more features to extend the functionality of their sites.

Now, in order to support the top requested features and to make it easy to fulfill future requests, we've rewritten the API and are launching the new interface as Static Maps API v2. The main new features are:

  • Paths can be specified as encoded polylines. (Issue 205)
  • Paths can be filled and rendered as polygons. (Issue 792)
  • Locations (in center, markers, or path parameters) can now be specified as addresses instead of latitude/longitude coordinates.
  • Colors can now be specified as any 24-bit or 32-bit color.

To show off the new stuff (and my recent vacation in Japan), I've developed a Secret Treasures of Kyoto" mobile-friendly website. You can use it to visit a park where monkeys roam free in Arashiyama (using a filled path), to walk from our hotel to a restaurant with the most delicious deep fried roast beef sandwiches (using a path), or to stalk a creepy looking soft-shelled turtle (using a turtle-colored marker). Check out the iframed website below, or in your mobile browser:


All of the old features are supported in the new API but some of the URL parameters have changed, so if you're a developer that's already using the old API, please refer to the upgrade guide. (That also means that Static Maps v1 is being deprecated - but don't worry, there's plenty of time to upgrade).

If you're a developer that wants to take advantage of the new features, read through our developer guide. To play around with everything right now, try the new Static Maps v2 Wizard.


Posted:

Back in May, we launched the Maps Data API, a programmatic way to interact with map data using Google's GData infrastructure. At the time, we offered a basic HTTP protocol and a Java library. The Java client library for the Maps Data API allows you to create robust Maps data applications without the need to manage raw HTTP requests. Instead, you can create an inherently more scalable application in Java, which handles all of the HTTP requests and responses for you. We're happy to announce that we've updated the Java client library to add better Maps Data support, and have published an accompanying Java Developer Guide to get you started. The sample code within the developer guide is also included within the sample code available within the gdata-java-client library. What did we add? In specific we added several helper methods which should make creating features easier:

The Javadoc reference contains full reference materials on all public methods in the API. We're actively adding more support to the Java client library and support for additional programming languages, so check back with us in the future. As always, check out the Maps Data API group to discuss the API and let us know what features you'd like to see added to it.

Posted:
September 3rd, 2009, from 11 to 6, Google is hosting a hackathon for our Google Geo APIs in our Seattle offices. At the hackathon, you can code on our Google Geo APIs, with the guidance of Google Engineers. We'll provide you with suggested codelabs, or you can just work on your own projects. You can work on the following APIs: The Google Maps API for JavaScript V2and V3, the Google Maps API for Flash, the Google Earth API, KML, and the Google Maps Data API.

So bring your laptops, and your brains, and be prepared to code.

Space is limited, so register now!

Posted:

I'm Simon, and I work as a Site Reliability Engineer at Google. One of the benefits of working here is that I get to choose interesting 20% projects to work on. Recently, I worked with Project Vulcan at Purdue University to create a map that visualized greenhouse gas emissions. I chose to visualize that data by coloring countries depending on the values associated with them. This technique is called chloropleths, or thematic maps.

Google APIs made most of the map creation tasks quite easy, but fine-tuning thematic maps still required a lot of work. I wanted to load a dataset and make a single library call to calculate the color gradients, but at the same time I wanted to be able to express complex rules, like "draw all negative values with a red-yellow gradient, then draw the bottom 50% of the positive values with a yellow-orange gradient, and the rest with a orange-red gradient".

Developer Bjørn Sandvik created the great Thematic Mapping library using the Google Earth API and Google Visualization APIs in JavaScript, but while it supports a large number of thematic map types, it can only draw a gradient between two colors. So, to satisfy my needs for multi-colored gradients and more control, I wrote a library for the Maps API for Flash called GradientControl.

Here's a simple example of using GradientControl, with just a three-color gradient, from green to yellow to red:

You can drag the slider under the map to change the position of the middle color and immediately see the results. Click on a country to see the value associated with it. You can also try out a larger version of this example, with two middle colors and three sliders.

The color gradient configuration can be either constructed with Actionscript function calls, or moved into an external XML file. The complex example that I wanted to write would look like this:

<gradientRuleList> 
  <gradientRule> 
    <gradient> 
      <minColor>0x0000ff</maxColor> 
      <maxValue>0</minValue> 
    </gradient> 
   </gradientRule> 
   <gradientRule> 
     <gradientRuleList> 
       <gradientRule> 
         <gradient> 
           <minColor>0xff0000</minColor>     
           <maxColor>0xff8000</maxColor> 
           <maxPercent>50</maxPercent> 
         </gradient> 
       </gradientRule> 
       <gradientRule> 
         <gradient> 
           <minColor>0xffff00</minColor>
           <maxColor>0x00ff00</maxColor> 
         </gradient> 
      </gradientRule> 
    </gradientRuleList> 
  </gradientRule> 
 </gradientRuleList>

This is verbose, of course, but still much easier than writing custom code.

To get started using the library, check out the source, read the documentation, and post in the forum if you're having issues (or simply to show off what you've made). If you're interested in improving this control or making it work better with existing standards or APIs, please join the utility library forum. Enjoy!