Map Mashups Peterson’s Chapter 10
Map Mashups What’s mashup? “melding of web resources and information” “combines tools and data from multiple online sources” Data and data-manipulation tools/functions Map rendering and analysis What are APIs? Application programming interface Protocol to accessing web tools and data Difference from traditional software libraries Web 2.0
Some of the Characteristics of Web 2.0 O’Reilly (2005) argues that the following are characteristics: Web is a platform for development Harnesses collective intelligence Data is the next Intel End of the software release cycle Lightweight programming models Software above the level of a single device Rich user experiences
Mapping APIs Various mapping APIs with slight variations Difference Similar objects, properties, and methods Difference The rendering of the base map Speed of map/tile delivery APIs Google Map, MS Bing, MapQuest, Nokia Here, OpenStreetMap, Leaflet, Baidu, AutoNavi, Mapstraction
Google Maps API More than just mapping Examples Various Web services Geocoding, Directions, Distance Matrix, Navigation, … Examples 10.1, .2, .3 Some changes on those example code show how the code works
Google Maps API A simple reference http://www.w3schools.com/googleAPI/google_maps_ref.asp The map object new google.maps.Map(HTMLElement,MapOptions) Methods Properties Events http://www.w3schools.com/googleAPI/ref_map.asp A comprehensive tutorial and reference https://developers.google.com/maps/documentation/javascript/tutorial
Bing Maps API Example 10.7
OpenStreetMap (OSM) API Volunteered geographic information (crowd sourcing) Free download of the vector data OSM code is longer and more complicated than other mapping APIs
Leaflet API Designed for mobile devices by Vladimir Agafonkin (2013) Much small than other APIs (28 kb JS code) Code is simpler and more readable Examples 10.24—population density mapping OSM tiles tile.osm.org; tiles.mapbox.com; tile.cloudmade.com
Mapstraction Each API varies JS code for one API can not be used for other APIs Common API for various mapping services Standard API? Objects, properties, and methods Example 10.27, 10.28