GIS, Maps & Mapping Mashups Brian Lewis Semantic Web Technologies April 17, 2006
Overview What is a "mashup"? Examples GIS, Map, and Mapping Mashups Geospatial basics Mashup characteristics Predictions Creating mashups
What is a "mashup"? Website or web application that combines content from more than one source Application hybrids created by third parties by accessing public APIs Lightweight web services
Examples http://upcoming.org/event/61489 http://www.mashupcoming.com/upmap.htm http://www.programmableweb.com http://www.mashupfeed.com http://googlemapsmania.blogspot.com/ http://gpsvisualizer.com/examples/ http://developer.yahoo.net/maps/applications.html http://ace.engin.umich.edu/gmaps/ pierpont_arrivals.php
Mashup framework Berlind, 2006, January 27
GIS, Map & Mapping Mashups Just a mashup that involves GIS data GIS - Geographic Information System Geospatial - "information about the geographic location of an entity (Mitchell, 2005)" Terms: spatial data, geographic data, geographic information system data, map data, coordinate data, and spatial geometry data (Mitchell, 2005)
Geospatial basics Not just maps Geospatial data analysis Different methods of describing geospatial data Two types of geospatial data - raster and vector
Why all the fuss? Mapping and analysis is not new Combining and sharing GIS data is also not new Geospatially focused hardware and software… not new
What is new GPS receivers are commonplace Costs are low Visibility is high (google maps) Technology is accessible Potential is extensive (fun and useful)
What is new Dynamic lightweight models for combining content Zero footprint Visibility is high (mainstream press) Network effects
Opportunities No central control Low technical barriers to entry Free data! Not geographically limited No ads!
Challenges No central control Low technical barriers to entry Free data? Not geographically limited No ads! Others?
Other viability issues Consistency issues Legal issues Revenue issues Competition issues Trust issues Others?
How Semantic is it? Not Very No UDDI - Not machine discoverable Overlay or combination of data - Not understood in any real way So why is it in this class? A stepping stone to web services Web as a platform Opening APIs Use of standards (SOAP, XML) Demonstrates the usefulness of sharing data Others?
Predictions Universal registry for mashup APIs Mashup tools arrive Disruptive effects will affect slow adopters RSS becomes the mashup protocol of choice Intellectual property issues persist
Creating a mashup Get an application ID (API key) Look for the APIs (168 as of 03/05/2006) http://www.programmableweb.com/apis http://www.mashupfeed.com Get an application ID (API key) Sometimes not necessary Often free Read the documentation Limits of the service (rate limit, location limit, use) How to structure your query Mash away!
Creating a mashup: APIs Provides an interface and a set of rules that make it easier to extract data from a website. Simple or (relatively) complicated Many tools to build maps w/o coding Submit data to a URL via GET or POST - returns XML Access methods via a scripting language Utilize different technologies JavaScript PHP Flash (+ JavaScript, ActionScript) Java More… Different restrictions Not for profit only Maximum time-based request limit Limits on the data source Others…
A Simple Example Request a Google Maps API Key (http://www.google.com/apis/maps) Returns a page with your key, a path for which URLs are valid, and sample code to work with. Copy this information somewhere (paste into a text file) <script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAA…blahblah…6w" type="text/javascript"></script> … <div id="map" style="width: 500px; height: 400px"></div> <script type="text/javascript"> //<![CDATA[ var map = new GMap(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4); //]]> </script>
Read the documentation http://www.google.com/apis/maps/documentation/ How to locate Google's JavaScript file identifies you to Google through the key ID <script src="http://maps.google.com/maps?file=api&v=1& key=ABQIAA…blahblah…6w" type="text/javascript"></script> Where the map will appear on your page <div id="map" style="width: 500px; height: 400px"></div>
Read the documentation Draws the map Instantiates the map and assigns it to the div Adds the controls Centers the map and sets the zoom level <script type="text/javascript"> //<![CDATA[ var map = new GMap(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4); //]]> </script>
Results
Dig in Change the center point of the map and the zoom level map.centerAndZoom(new GPoint(-97.739868, 30.280935), 2); Add an overlay marker at a specific location var marker = new Gmarker(new Gpoint(-97.738452, 30.281269)); map.addOverlay(marker); Add an info window text bubble thingie marker.openInfoWindow(document.createTextNode( "Text here")); View your results (Based from Joshua Siler's tutorial and Google's API Documentation)
Dig in deeper Note: This is not a (real) mashup But it does introduce you to the API. Play. This could be done w/o code using map builder which IS a mashup Google's API provides much more functionality than this More Tutorials http://www.programmableweb.com/howto http://www.theurer.cc/blog/2005/11/03/how-to-build-a-maps-mash-up/ Jon Udell's screencast Java for Google Maps Mashups Charlottetown Transit Map explanation (php) http://www.flickrmap.com/tutorials/google_earth.php
References Berlind, D. (2006, February 1). Rethinking BPM in a mashup-based SOA world. Retrieved March 4, 2006, from ZDNet Web site: http://blogs.zdnet.com/BTL/?p=2517 Berlind, D. (2006, January 27). Mashup ecosystem poised to explode. ZDNet. Retrieved February 27, 2006, from http://blogs.zdnet.com/BTL/?p=2484 Butler, D. (2006, January 5). Mashups mix data into global service. Retrieved March 4, 2006, from http://www.nature.com/nature/journal/v439/n7072/full/ 439006a.html Farber, D. (2006, February 20). Mashups and the law. Retrieved March 4, 2006, from ZDNet Web site: http://blogs.zdnet.com/BTL/?p=2614 Hinchcliffe, D. (2006, Feb 20). Some predictions for the coming 'mashosphere'. Retrieved April 9, 2006, from ZDNet Website: http://blogs.zdnet.com/Hinchcliffe/?p:13 Hinchcliffe, D. (2006, Feb 5). The Web 2.0 mashup ecosystem ramps up. Retrieved March 20, 2006, from Web 2.0 journal: http://www.web2journal.com/read/179109.htm
References MacManus, R. (2006, March 2). Mashups: who's really in control? Retrieved March 4, 2006, from ZDNet Web site: http://blogs.zdnet.com/web2explorer/?p=128 Mitchell, T. (2005, May 11). Demystifying geospatial - the basics. Retrieved March 5, 2006, from O'Reilly Digital Media Web site: http://www.oreillynet.com/digitalmedia/blog/2005/05/ demystifying_geospatial_the_ba.html Musser, J. (2005, August). programmableweb. Retrieved February 22, 2006, from http://www.programmableweb.com My Vision for TheMashup.com. (n.d.). Retrieved March 2, 2006, from http://www.themashup.com/7/my-vision-for-themashupcom.htm Schofield, J. (2006, February 2). It's all in the mix. Retrieved March 4, 2006, from Guardian Unlimited Web site: http://technology.guardian.co.uk/weekly/story/0,,1699502,00.html
Questions to think about Where are mashups going? Hype or a compelling new future for software? Which view is more accurate: the optimistic or pessimistic view?
Questions ?