What's New
in Google Geo APIs

Mano Marks, Senior Developer Advocate, Google
Google DevFest, Saint Petersburg May 25, 2011

@ManoMarks

User-facing APIs

Maps API v3

Earth API

Maps API for Flash

Static Maps API

Native SDKs for Android and iOS

Supporting APIs & developer tools

Location, location, location

Latitude API
Panoramio API
Picasa API
YouTube API
Buzz API
News Search API
Calendar API
Transit Feed Specification
Earth Builder
Earth Enterprise
Earth Engine
Refine
BigQuery
.....

Maps API v3

Browser Support
Desktop Mobile
Internet Explorer 7+ Android
Firefox 3+ Safari (iOS)
Safari 4+ Blackberry 6
Chrome Dolfin 2+

Maps API v3: Features

Map
SSL Support
Road, Terrain, Satellite and Hybrid maps
Satellite and 45° Imagery
Styled Maps
Custom Tile Support
Markers
Info Windows
Polylines + Polygons
Ground overlays
Custom overlays
Layers
Draggable Directions
Street View
Directions service
Geocoding service
Elevation service
Libraries

45° imagery

45° imagery

map.setTilt(45);  //map.setTilt(0)
map.setHeading(90); //0, 90, 180, 270

OverviewMapControl

OverviewMapControl

var mapOptions = {
  //center: ...
  //zoom: ...
  overviewMapControl: true,
  overviewMapControlOptions: {
    opened: true
  }
};

Markers: Marker animations

Markers: Marker animations

marker = new google.maps.Marker({
  map: map,
  draggable: true,
  animation: google.maps.Animation.DROP, //DROP animation
  position: new google.maps.LatLng(...)
});

marker.setAnimation(google.maps.Animation.BOUNCE); //BOUNCE animation

marker.setAnimation(null) // clear animation

Layers

Layers

kmlLayer = new google.maps.KmlLayer('path_to_kml');
geoRssLayer = new google.maps.KmlLayer('path_to_georss');
trafficLayer = new google.maps.TrafficLayer();
bikeLayer = new google.maps.BicyclingLayer();

panoramioLayer = new google.maps.panoramio.PanoramioLayer();
panoramioLayer.setTag('tag_to_filter_by');
panoramioLayer.setUserId('user_id_to_filter_by');

layer.setMap(map); //Add layer to the map
layer.setMap(null); //Remove layer from the map

Draggable directions

Draggable directions

var rendererOptions = {
  draggable: true
};
var directionsDisplay = new google.maps.DirectionsRenderer(rendererOptions);;
var directionsService = new google.maps.DirectionsService();
var map;

var location = new google.maps.LatLng(-25.274398, 133.775136);

function initialize() {
  var myOptions = {
    zoom: 7,
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    center: location
  };
  map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  directionsDisplay.setMap(map);
  directionsDisplay.setPanel(document.getElementById("directionsPanel"));

  google.maps.event.addListener(directionsDisplay, 'directions_changed', function() {
    doSomething(directionsDisplay.directions);
  });
}

Street View

Street View: Overlays

Street View: Custom Street View

Libraries

<script type="text/javascript"
  src="http://maps.googleapis.com/maps/api/js
  ?v=3&sensor=false
  &libraries=panoramio,geometry,adsense,places"></script>

Libraries: Geometry

google.maps.geometry.spherical

Libraries: Geometry

google.maps.geometry.encoding

Libraries: AdSense

google.maps.adsense

var adUnitDiv = document.createElement('div');
var adUnitOptions = {
  format: google.maps.adsense.AdFormat.HALF_BANNER,
  position: google.maps.ControlPosition.TOP_CENTER,
  publisherId: 'your_publisher_id',
  map: map,
  visible: true
};
adUnit = new google.maps.adsense.AdUnit(adUnitDiv, adUnitOptions);

Libraries: AdSense

Libraries: Places

google.maps.places

Utility libraries

Open source libraries available at
google-maps-utility-library-v3.googlecode.com

Earth API

Earth API

Earth API: Historical Imagery

Fusion Tables

Fusion Tables

Demo

Fusion Tables: FusionTablesLayer in v3

Fusion Tables: FusionTablesLayer in v3

layer = new google.maps.FusionTablesLayer({
  query: {
    select: 'shape',
    from: 198945,
    where: 'average_age > 40',
  },
  heatmap: true
});
layer.setMap(map);

What is a web service?

Elevation

http://maps.googleapis.com/maps/api/elevation/json
    ?sensor=false
    &path=0,0|0,10
    &samples=3

Elevation JSON response

{
  "status": "OK",
  "results": [ {
    "location": {
      "lat": 0.0000000,
      "lng": 0.0000000
    },
    "elevation": -5002.7587891
  }, {
    "location": {
      "lat": 0.0000000,
      "lng": 5.0000000
    },
    "elevation": -3738.8530273
  }, {
    "location": {
      "lat": 0.0000000,
      "lng": 10.0000000
    },
    "elevation": 33.7777786
  } ]
}

Distance matrices

San Francisco Sacramento
LA 382 mi, 6 hrs 18 mins 384 mi, 6 hrs 22 mins
San Diego 502 mi, 8 hrs 17 mins 505 mi, 8 hrs 21 mins
http://maps.googleapis.com/maps/api/distancematrix/json
    ?sensor=false
    &origins=Los+Angeles|San+Diego
    &destinations=San+Francisco|Sacramento

Route optimization

http://maps.googleapis.com/maps/api/directions/json
    ?sensor=false
    &origin=Los+Angeles
    &waypoints=optimize:true|Dallas|Seattle|Akron|Phoenix
    &destination=New+York

LA to New York via Dallas, Seattle, Akron, and Phoenix

Bicycling directions

http://maps.googleapis.com/maps/api/directions/json
    ?sensor=false
    &origin=Oak+St+Santa+Monica+CA
    &destination=Hollywood+CA
    &mode=bicycling

Bicycling directions example

SSL for everyone

https://maps.googleapis.com/maps/api/geocode/json
    ?sensor=false
    &address=Sydney+Australia

Static Maps API

http://maps.googleapis.com/maps/api/staticmap
    ?sensor=false
    &size=512x512
    &center=Australia
    &markers=Sydney|Melbourne|Perth|Adelaide|Alice+Springs

Static map example

High-resolution static maps

http://maps.googleapis.com/maps/api/staticmap
    ?sensor=false
    &size=512x512
    &center=Sydney
    &scale=2

High-resolution example: 1x scale

High-resolution example: 2x scale

Custom static map styles

http://maps.googleapis.com/maps/api/staticmap
    ?sensor=false
    &size=512x512
    &center=San+Francisco
    &style=feature:road|hue:0x00aaff

Custom style example: before

Custom style example: after

Summary

Thank You! - Q&A

code.google.com/apis/maps/
@googlemapsapi
@GoogleFT
@ManoMarks