Wednesday, July 11, 2007

[Gdev] YouTube Mapplet

| More

Google Code - Featured Projects: YouTube Mapplet

YouTube Mapplet Screenshot
Google APIs used:
GeoMashup YouTube videos using the newly released Mapplets


[Gd] v2.84 Changes: GGeoXML Methods, GDraggableObject Events, & Geodesic Polylines

| More

Official Google Maps API Blog: v2.84 Changes: GGeoXML Methods, GDraggableObject Events, & Geodesic Polylines

GGeoXML Methods:

When we released GGeoXML, the class used for overlaying KML/GeoRSS files on API maps, we promised we'd continually improve it and add more features. The engineers added support for Ground Overlays and Network Links soon thereafter, and now they've given developers GGeoXML functions to make loading and viewing files easier. GGeoXML now comes with a callback function that's entered once the file has loaded, plus a number of utility functions: hasLoaded(), loadedCorrectly(), getDefaultCenter(), getDefaultSpan(), getDefaultBounds(), and gotoDefaultViewport().

Here's some quick code showing you how you'd use a couple of these functions to automatically center the map on a loaded KML file:

 var geoxml = new GGeoXML("", function() {   if (geoxml.loadedCorrectly()) {     geoxml.gotoDefaultViewport(map);   } }); map.addOverlay(geoxml); 

Below, I've redone the original example of the GGeoXML loader to use similar code, so I no longer need to hard-code the viewport for each file. I've also chosen to show a "Loading..." indicator while the GGeoXML file is being loaded, as some files can take longer than others to load.

Link to GGeoXML Loader Example
GDraggableObject Events:

In this release, we've also given you more control over GDraggableObjects with 6 new events: mousedown, mouseup, click, drag, dragstart, dragend. Why? Because everybody loves draggable objects, and the more you know about what the user's doing to your draggable object, the better! Below is a simple example that lets you drag the Google Maps logo around while it shows you the current event:

Link to GDraggableObject Events Example Geodesic Polylines:

And now for something completely different... We've added an optional parameter to GPolyline to let you create geodesic polylines (aka "Great Circles"). A geodesic line is the shortest route between two points on the surface of the earth, and often resembles the path that airplanes take to get you to your destination in the most efficient manner. Check out this example using the new geodesic option, created by Finnish Developer Esa.


[Gd] Mapplets Launched - Add Your Mapplet to the Growing Gallery of Maps Plugins

| More

Official Google Maps API Blog: Mapplets Launched - Add Your Mapplet to the Growing Gallery of Maps Plugins

Looking to drive more traffic to your Maps API site? Mapplets have now been launched on Google Maps and are a great way to reach users with your geospatial data. You can create your whole mashup inside a Mapplet, or you can use it as a teaser that gives users a taste of your data and sends them to your Maps API based site for the full version.

Here's a YouTube Mapplet that I created last week. It plots recently uploaded YouTube videos on the globe based on the location that the user set when they uploaded the video. It was very easy to put this Mapplet together since the Mapplets API is very similar to our Maps API. The Mapplets API docs will help you get started on your own Mapplet.

Here are some videos that show how users can add Mapplets and My Maps to their maps:

Here are some articles on the Mapplets launch:

Reuters - Eric Auchard
"Google Inc. will introduce on Wednesday a new feature that lets users create personalized maps which plot the locations of everything from cheap gas locally to the latest earthquakes worldwide."

CNET - Elinor Mills
"Google is really pushing the mapping envelope."

AP - Mike Liedtke
"It's a really powerful innovation," said John Hanke, Google's director of maps. "It's like combining chocolate and peanut butter. They're good by themselves, but the combination is much more valuable than when they are served in isolation."

Have fun coding!


Monday, July 9, 2007

[Gdev] Telekinesis iPhone Remote

| More

Google Code - Featured Projects: Telekinesis iPhone Remote

iPhone Remote Screenshot
Remotely access your Mac through a collection of mini web apps on your iPhone.


[Gd] Looking for stability in life/mashups? Try out v2.s!

| More

Official Google Maps API Blog: Looking for stability in life/mashups? Try out v2.s!

Here at Google, the engineers love to add new features to the Maps API. In order to get these features in your eager coding hands as fast as we can, we currently update the Maps API about every two weeks. This breakneck pace is ideal for those of you that want the latest and greatest enhancements that we can offer. But some of you may prefer a version of the API that changes less frequently, so that you can be sure that newly introduced features don't affect the behavior of your maps application in unexpected ways.

Starting this week, we are offering a "stable" version of the Maps API that will be set to a version of the API that has been thoroughly tested over the past several weeks. You can point your application to the stable version to avoid the biweekly updates we do with the standard Maps API versions (v=2, v=2.x). We'll then update the stable version every few months to another version that is also well-tested, but includes the new features that have been launched. Once we release a new stable version, your application will automatically begin loading the updated set without making any changes to your code. But don't worry, we'll pre-announce any updates to the stable version so that you have adequate time for testing.

In order to use the stable version, you can simply change your API call from &v;=2 (which accesses the current version of the API) to &v;=2.s (the stable version). For example, your javascript source tag would look like:

<script src=";=2.s&key=ABCD" type="text/javascript"></script>

The stable version is currently set to 2.73, which was released earlier this year. Please be aware that version 2.73 doesn't include some of the latest features such as driving directions, KML/GeoRSS overlays and the traffic layer. For more information on the changes that have been made since version 2.73, please see the list on the Google Maps API Group page: