4. MapBox & the Modern Web
• Speaks the language of
modern web development
– Stylesheets ( CSS-like )
– Scripting ( JavaScript )
– Well-defined specifications
5. MapBox & the Modern Web
• Shares the same goals of modern web
development
– Separation of concerns
– Service-oriented (RESTful services)
– Platform agnostic
– Offline support
– Well-defined specifications (JSON)
– Open source
… replace with better res photo (hosted image server down: using Google cached version)
my goal today is not to show you how to create things in the MapBox stack (this is not a workshop and there is plenty of online docs about that), but to show you why MapBox is an ideal solution for deploying maps in the modern web
SoC: MVC-like, flexible SOA-like: API-driven Platform = device, OS, browser, service Open = extensible, community-driven
Mapnik preprocessor that interprets CSS-like stylesheet syntax Mapnik + CSS: Mapnik preprocessor that interprets CSS-like stylesheet syntax (vs Mapnik XML) Preprocessor (cf, SASS, 960.gs) Interchangeable: share your experience
Hold for screenshot
metadata: bounds, descriptions tiles: zoom_level, tile row & column, raw binary image -- png or jpg SQLite: small footprint (ideal for mobile devices) -> platform agnostic
server-side JavaScript (client & server speak same language) asynchronous (no blocking) event-driven (message- or input-driven; focus on I/O, not CPU work) efficient memory usage (gets when required; only allocates a placeholder for each connection not everything else --> connections can be open for a very long time with low latency)
map tile resources locations (how client looks up tile by zoom, row and column) Interaction templates: (how client renders non-tile related stuff: legend, interaction, etc)
including super lightweight Modest Maps (10kb min gzip) and Leaflet (21kb min gzip), SVG-based polymaps, as well as well-known GoogleMaps & OpenLayers not an abstraction layer; maps must still be implemented as each service API requires
For the demo we are about to show, one thing that we unfortunately cannot show is how long it took us to do this and that is the beauty behind implementing the MapBox stack ... all in all, this took about 16 hours of work time starting from absolute scratch Set up: locally hosted MBTiles served through local TileStream server google maps justification: readily available terrain data at high resolution scales single API access for not only mapping, but directions and geocoding mature code & good API documentation proof of concept that it can be easy to integrate mapbox into existing projects