Very cool things at Web 2.0 this morning. The first session was on MapStraction and Open StreetMaps. Here's a quick skinny on what we're hearing so far.
MAPSTRACTION: Presented by Andrew Turner
What is MapStraction? Basically it's a common API for most of the Javascript providers out there. Why is it cool? Write your code once, use it many times with any providers like GoogleMaps, VE, Yahoo Maps, Mapquest...you name it. Why it's really cool: You can set up your app to allow users to "swap" between providers on the fly. Why would your users want to do this? Different map providers have different coverages depending on where you're at. It gives total flexibility to your provider model. Oh yeah...and it's FREE.
OK, so what is the functionality included in Mapstraction: It's mostly least common denominator functionality like markers, lines, polygons, overlays, tiles, events, filtering routing, geocoding. What is doesn't do: search, WMS, break terms of service, support every library's niche feature set.
Mapstraction looks really easy to use. Here's the simple Mapstraction recipe for building it out:
Here's a quick Mapstraction sample showing multiple providers on a single page...all from the same code supplied below:
function londonJavascriptNight(map) { // create a lat/lon object var myPoint = new LatLonPoint(51.520832, -0.140133); // display the map centered on a latitude and longitude (Google zoom levels) map.setCenterAndZoom(myPoint, 12); // create a marker positioned at a lat/lon var marker = new Marker(myPoint); // add info bubble to the marker marker.setInfoBubble("Hello London!"); // display marker map.addMarker(marker); } var gmapstraction = new Mapstraction('gmap','google'); londonJavascriptNight(gmapstraction); var ymapstraction = new Mapstraction('ymap','yahoo'); londonJavascriptNight(ymapstraction); var mmapstraction = new Mapstraction('mmap','microsoft'); londonJavascriptNight(mmapstraction); var osmapstraction = new Mapstraction('osmap','openstreetmap'); londonJavascriptNight(osmapstraction); // synchronise center of gmap and mmap with ymap var ycsync = function() { var center = ymapstraction.getCenter(); gmapstraction.setCenter(center); mmapstraction.setCenter(center); osmapstraction.setCenter(center); center = undefined; }; // synchronise zoom of gmap and mmap with ymap var yzsync = function() { var zoom = ymapstraction.getZoom(); gmapstraction.setZoom(zoom); mmapstraction.setZoom(zoom); osmapstraction.setZoom(zoom); zoom = undefined; }; var ymap = ymapstraction.getMap(); YEvent.Capture(ymap, "onPan", ycsync); YEvent.Capture(ymap, "endPan", ycsync); YEvent.Capture(ymap, "endAutoPan", ycsync); YEvent.Capture(ymap, "changeZoom", yzsync);
OPEN STREETMAP: Presented by Steve Coast
Open StreeMap is a way cool project that is building a crowd sourced map of worldwide streets. Totally a grass roots remapping of things. Essentially it uses the general public to build new street maps using GPS traces and public domain imagery. The stuff looks great and it is much more current than any of the other providers right now. Currently it's pretty Euro-centric (seems to be a big hit across the pond). But, they do have US Data from Tiger data that is being updated and corrected as people add new stuff. I even checked out our local digs and it seems that bike paths and some foot paths in Ft. Collins have been mapped.
Currently, there are about 35,000 users of the data, 3,000 editors, and about 35 million objects in the database. Speaking of the database, it's a simple data model with only 3 data types:
Nodes: id, lat, long, user, timestamp, visibility, tags
Way: ID, nodes, user, visibility, timestamp, tags
Relations: id, members, user, timestamp, visibility
The database currently resides on a MySQL instance. You can get your own copy of the database as a file (Planet.osm). It's released weekly, about 4GB compressed. It is the definitive dataset, essenatially it's OpenStreetMap in a file (XML version of entire DB).
Quickly, here's the tech stack for Open Streetmap: MySQL, Ruby on RAILS, API, OpenLayers for rendering, editors, http://svn.openstreetmap.org
API: Built as simple as possible...RESTful, XML, HTTP AUTH
Rendering: Mapnik, Osmarender
So, that's a quick update from Where 2.0. More to come.
Posted in General GIS | NeoGeography | Web Mappping | Where 2.0 |Comments [0]
The content of this site are my own personal opinions and do not represent my employer's view in anyway.
All content on this site © Copyright 2008 Chris Spagnuolo GeoScrum! by Chris Spagnuolo is licensed under a Creative Commons Attribution 3.0 United States License.
Sign In