What's New
in Google Geo APIs
Mano Marks, Senior Developer Advocate, Google
Google DevFest, Saint Petersburg
May 25, 2011
Mano Marks, Senior Developer Advocate, Google
Google DevFest, Saint Petersburg
May 25, 2011
Maps API v3
Earth API
Maps API for Flash
Static Maps API
Native SDKs for Android and iOS
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
.....
| Browser Support | |
|---|---|
| Desktop | Mobile |
| Internet Explorer 7+ | Android |
| Firefox 3+ | Safari (iOS) |
| Safari 4+ | Blackberry 6 |
| Chrome | Dolfin 2+ |
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
map.setTilt(45); //map.setTilt(0) map.setHeading(90); //0, 90, 180, 270
var mapOptions = {
//center: ...
//zoom: ...
overviewMapControl: true,
overviewMapControlOptions: {
opened: true
}
};
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
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
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);
});
}
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js ?v=3&sensor=false &libraries=panoramio,geometry,adsense,places"></script>
google.maps.geometry.spherical
computeAreacomputeDistanceBetweencomputeHeadingcomputeLengthcomputeOffsetinterpolategoogle.maps.geometry.encoding
encodePathdecodePathgoogle.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);
google.maps.places
Autocomplete
PlacesSearchServiceOpen source libraries available at
google-maps-utility-library-v3.googlecode.com
| Microsoft Windows 2000, XP, Vista |
Apple Mac OS X 10.4+ Intel and PowerPC |
|---|---|
| Google Chrome | Google Chrome |
| Internet Explorer 6+ | Safari 3.1+ |
| Firefox 3.0+ | Firefox 3.0+ |
Demo
tableId and an optional query
layer = new google.maps.FusionTablesLayer({
query: {
select: 'shape',
from: 198945,
where: 'average_age > 40',
},
heatmap: true
});
layer.setMap(map);
http://maps.googleapis.com/maps/api/elevation/json
?sensor=false
&path=0,0|0,10
&samples=3
{
"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
} ]
}
| 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
optimize:true to your waypoint listwaypoint_order fieldhttp://maps.googleapis.com/maps/api/directions/json
?sensor=false
&origin=Los+Angeles
&waypoints=optimize:true|Dallas|Seattle|Akron|Phoenix
&destination=New+York
mode=bicycling to your request URLshttp://maps.googleapis.com/maps/api/directions/json
?sensor=false
&origin=Oak+St+Santa+Monica+CA
&destination=Hollywood+CA
&mode=bicycling
maps.googleapis.comhttps://maps.googleapis.com/maps/api/geocode/json
?sensor=false
&address=Sydney+Australia
<img> tag to your pagehttp://maps.googleapis.com/maps/api/staticmap
?sensor=false
&size=512x512
¢er=Australia
&markers=Sydney|Melbourne|Perth|Adelaide|Alice+Springs
scale to URL, pixel size changes automaticallyhttp://maps.googleapis.com/maps/api/staticmap
?sensor=false
&size=512x512
¢er=Sydney
&scale=2
style parametershttp://maps.googleapis.com/maps/api/staticmap
?sensor=false
&size=512x512
¢er=San+Francisco
&style=feature:road|hue:0x00aaff
code.google.com/apis/maps/
@googlemapsapi
@GoogleFT
@ManoMarks