SlideShare una empresa de Scribd logo
1 de 53
Descargar para leer sin conexión
Fast Map Interaction
                               Without Flash
                        Tom MacWright @tmcw from MapBox @mapbox




Wednesday, April 20, 2011
Solutions That Aren’t



Wednesday, April 20, 2011
Flash is a dead end

                    • Hopefully this goes without saying
                    • Maps are especially mobile
                    • We don’t tolerate closed-source
                            components




Wednesday, April 20, 2011
Vectors aren’t there yet
                    • Internet Explorer still owns 45% of the
                            market
                    • Polymaps is working on IE9
                    • Even bleeding-edge browsers are still in
                            early stages of optimization
                    • Passable for points, but rendering
                            OpenStreetMap in-browser?


Wednesday, April 20, 2011
Polygons in-Browser
                    • GeoJSON is nifty but bandwidth-inefficient
                    • Browser APIs are weak (VML?)
                    • Calculating polygon collisions is code-heavy
                            and slow
                    • Simplifying polygons to speed up browsers
                            doesn’t cut it


Wednesday, April 20, 2011
Wednesday, April 20, 2011
Wednesday, April 20, 2011
WMS GetFeatureInfo




Wednesday, April 20, 2011
WMS GetFeatureInfo

                    • Not cacheable: requires a running web
                            server
                    • Hover interaction near-impossible
                    • Just as friendly and great as WMS itself


Wednesday, April 20, 2011
“Designing Around It”

                    • Zooming out makes points disappear?
                    • Clustering for performance reasons?
                    • Restricting panning?


Wednesday, April 20, 2011
Inspiration: Google



Wednesday, April 20, 2011
Wednesday, April 20, 2011
Wednesday, April 20, 2011
Wednesday, April 20, 2011
• Awesome idea!
                    • Undocumented
                    • Only supports points
                    • A single type of data


Wednesday, April 20, 2011
http://bit.ly/utfgrid

                            UTFGrid
Wednesday, April 20, 2011
Wednesday, April 20, 2011
Rasterized Tiles
                           +
                Pixel-Driven Interaction

Wednesday, April 20, 2011
Wednesday, April 20, 2011
Wednesday, April 20, 2011
Wednesday, April 20, 2011
JSON, in the nick of time!




Wednesday, April 20, 2011
where am I, in this tile?




Wednesday, April 20, 2011
Wednesday, April 20, 2011
Wednesday, April 20, 2011
letters are numbers after all




Wednesday, April 20, 2011
Wednesday, April 20, 2011
application-specific formatting




Wednesday, April 20, 2011
Hooray!




Wednesday, April 20, 2011
Size Optimizations

                    • One UTF-8 character per feature
                    • 256px / 256px tiles
                    • 2x2 pixel grid (users aren’t pixel-precise)
                    • gzip

Wednesday, April 20, 2011
Lower bound

                               256 2   1kb
                             (    ) ∗       = 16kb
                                2     1024b
                                    Upper bound

                              256 2   1kb
                            (    ) ∗       ∗ 2 = 32kb
                               2     1024b


Wednesday, April 20, 2011
non-scientific survey of observed file size
                                        (aka, thanks, gzip)

                       3


                  2.25


    #req            1.5


                  0.75


                       0
                             4   5   6   7   8   9   10   11   12   13   14   15   16   17   18

                                                     in kb
Wednesday, April 20, 2011
Wednesday, April 20, 2011
• Grid size is limited by the number of pixel
                            blocks, so zooming out to the US actually
                            can work

                    • The grid also works for points, and
                            lines too




Wednesday, April 20, 2011
13k points




Wednesday, April 20, 2011
Speed
                    • Once you have the grid, the mouse
                            coordinate, and the tile coordinate, there
                            are no loops required to find the grid
                            feature, if any.
                    • Grid computations are typically outweighed
                            by the time taken to display tooltips
                    • Once a grid is generated, it doesn’t need to
                            change. It could be a file sitting on S3.


Wednesday, April 20, 2011
... about that ‘application specific formatting’




                    • Designed to be usable outside of a browser
                    • And much more than just tooltips
                    • You get ‘just data’ from the server, not
                            HTML




Wednesday, April 20, 2011
// Bring your own JavaScript
                            function (options, data) {
                                ...
                                return formatted_output;
                            }




Wednesday, April 20, 2011
function (options, data) {
                if (options.format == 'teaser') {
                    return '<h1>' + data.NAME + '</h1>';
                } else if (options.format == 'full') {
                    return '<h1>' + data.NAME + '</h1>' + data.AREA;
                }
            }




Wednesday, April 20, 2011
“The Implementation”



Wednesday, April 20, 2011
Generating: Mapnik
                                      http://mapnik.org/

                    • Mapnik is everyone’s favorite world-beating
                            open source map renderer
                    • Initially we rendered the map, and then
                            queried a 642 grid. It was slow.
                    • Dane Springmeyer has been writing a grid
                            renderer deep in AGG which is way faster.



Wednesday, April 20, 2011
Parsing: APIs
                              http://github.com/mapbox/wax


                    •       Google Maps API v3
                    • OpenLayers
                    • Modest Maps


Wednesday, April 20, 2011
• (let’s do it!)




Wednesday, April 20, 2011
(sidenote: APIs)

                    • Grids reduce the role of mapping APIs:
                            their parsing task is reduced to <200 lines
                    • Do one thing, and do it well: provide a tiling
                            interface
                    • Thus, for our usage,
                            Modest Maps > OpenLayers.



Wednesday, April 20, 2011
Making Grids:
                                  TileMill
                            http://tilemill.com/


Wednesday, April 20, 2011
Wednesday, April 20, 2011
Wednesday, April 20, 2011
Using Grids
                 TileStream, iPad, & Wax


Wednesday, April 20, 2011
Or, make your own?

                    • Grid implementation in Mapnik core - with
                            bindings to nodejs and Python (LGPL &
                            BSD licensed)
                    • Grid reader implementations in Wax,
                            supporting Google Maps, OpenLayers, and
                            Modest Maps (BSD licensed)



Wednesday, April 20, 2011
• No seriously, it’s open source.




Wednesday, April 20, 2011
URLS!

                    • http://mbtiles.org/ (read the full spec)
                    • http://tilemill.com/
                    • http://github.com/mapbox/


Wednesday, April 20, 2011
Rough Edges!

                    • Can’t highlight features yet
                    • More APIs! (except Bing, because of TOS)
                    • Formatter spec needs security spec -
                            currently relies on trust
                    • Contributions welcome!

Wednesday, April 20, 2011
Thanks!
                                 @mapbox

                            @tmcw Tom MacWright


Wednesday, April 20, 2011

Más contenido relacionado

Similar a Fast Map Interaction without Flash

JavaSE - The road forward
JavaSE - The road forwardJavaSE - The road forward
JavaSE - The road forwardeug3n_cojocaru
 
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011Guillaume Laforge
 
In the land of the blind the squinter rules
In the land of the blind the squinter rulesIn the land of the blind the squinter rules
In the land of the blind the squinter ruleswremes
 
Building Scalable Systems: an asynchronous approach
Building Scalable Systems: an asynchronous approachBuilding Scalable Systems: an asynchronous approach
Building Scalable Systems: an asynchronous approachTheo Schlossnagle
 
PyCon 2011 Scaling Disqus
PyCon 2011 Scaling DisqusPyCon 2011 Scaling Disqus
PyCon 2011 Scaling Disquszeeg
 
Node js techtalksto
Node js techtalkstoNode js techtalksto
Node js techtalkstoJason Diller
 
Java EE and Google App Engine
Java EE and Google App EngineJava EE and Google App Engine
Java EE and Google App EngineArun Gupta
 
Milkyway@home rcos presentation_4_8_2011
Milkyway@home rcos presentation_4_8_2011Milkyway@home rcos presentation_4_8_2011
Milkyway@home rcos presentation_4_8_2011mskmoorthy
 
RepRap Presentation UJEP
RepRap Presentation UJEPRepRap Presentation UJEP
RepRap Presentation UJEPJosef Průša
 
Gaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume LaforgeGaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume LaforgeGuillaume Laforge
 
Intro to HTML5 Game Programming
Intro to HTML5 Game ProgrammingIntro to HTML5 Game Programming
Intro to HTML5 Game ProgrammingJames Williams
 
Webinar Mobile ECM Apps with Nuxeo EP
Webinar Mobile ECM Apps with Nuxeo EPWebinar Mobile ECM Apps with Nuxeo EP
Webinar Mobile ECM Apps with Nuxeo EPNuxeo
 
DCI - Data, Context and Interaction @ Jug Genova April 2011
DCI - Data, Context and Interaction @ Jug Genova April 2011DCI - Data, Context and Interaction @ Jug Genova April 2011
DCI - Data, Context and Interaction @ Jug Genova April 2011Fabrizio Giudici
 

Similar a Fast Map Interaction without Flash (20)

GeoLinkedData
GeoLinkedDataGeoLinkedData
GeoLinkedData
 
Geolinkeddata 07042011 1
Geolinkeddata 07042011 1Geolinkeddata 07042011 1
Geolinkeddata 07042011 1
 
JavaSE - The road forward
JavaSE - The road forwardJavaSE - The road forward
JavaSE - The road forward
 
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
 
In the land of the blind the squinter rules
In the land of the blind the squinter rulesIn the land of the blind the squinter rules
In the land of the blind the squinter rules
 
Building Scalable Systems: an asynchronous approach
Building Scalable Systems: an asynchronous approachBuilding Scalable Systems: an asynchronous approach
Building Scalable Systems: an asynchronous approach
 
PyCon 2011 Scaling Disqus
PyCon 2011 Scaling DisqusPyCon 2011 Scaling Disqus
PyCon 2011 Scaling Disqus
 
Web heresies
Web heresiesWeb heresies
Web heresies
 
Godoggo
GodoggoGodoggo
Godoggo
 
Node js techtalksto
Node js techtalkstoNode js techtalksto
Node js techtalksto
 
Web Storage
Web StorageWeb Storage
Web Storage
 
Java EE and Google App Engine
Java EE and Google App EngineJava EE and Google App Engine
Java EE and Google App Engine
 
Milkyway@home rcos presentation_4_8_2011
Milkyway@home rcos presentation_4_8_2011Milkyway@home rcos presentation_4_8_2011
Milkyway@home rcos presentation_4_8_2011
 
RepRap Presentation UJEP
RepRap Presentation UJEPRepRap Presentation UJEP
RepRap Presentation UJEP
 
Gaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume LaforgeGaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume Laforge
 
Intro to HTML5 Game Programming
Intro to HTML5 Game ProgrammingIntro to HTML5 Game Programming
Intro to HTML5 Game Programming
 
Hadoop at Nokia
Hadoop at NokiaHadoop at Nokia
Hadoop at Nokia
 
Webinar Mobile ECM Apps with Nuxeo EP
Webinar Mobile ECM Apps with Nuxeo EPWebinar Mobile ECM Apps with Nuxeo EP
Webinar Mobile ECM Apps with Nuxeo EP
 
DCI - Data, Context and Interaction @ Jug Genova April 2011
DCI - Data, Context and Interaction @ Jug Genova April 2011DCI - Data, Context and Interaction @ Jug Genova April 2011
DCI - Data, Context and Interaction @ Jug Genova April 2011
 
Stardog talk-dc-march-17
Stardog talk-dc-march-17Stardog talk-dc-march-17
Stardog talk-dc-march-17
 

Más de Development Seed

Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019Development Seed
 
Cartography with TileMill, PostGIS, and OpenStreetMap
Cartography with TileMill, PostGIS, and OpenStreetMapCartography with TileMill, PostGIS, and OpenStreetMap
Cartography with TileMill, PostGIS, and OpenStreetMapDevelopment Seed
 
Nonprofit Mapping at Net2DC Meetup
Nonprofit Mapping at Net2DC MeetupNonprofit Mapping at Net2DC Meetup
Nonprofit Mapping at Net2DC MeetupDevelopment Seed
 
Tilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit MapsTilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit MapsDevelopment Seed
 
Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011Development Seed
 
Tech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMillTech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMillDevelopment Seed
 
ReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build PlanReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build PlanDevelopment Seed
 
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationIBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationDevelopment Seed
 
Offline Mapping: International Crisis
Offline Mapping: International CrisisOffline Mapping: International Crisis
Offline Mapping: International CrisisDevelopment Seed
 
Aegir one drupal to rule them all
Aegir one drupal to rule them allAegir one drupal to rule them all
Aegir one drupal to rule them allDevelopment Seed
 
Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2Development Seed
 
For every site a make file
For every site a make fileFor every site a make file
For every site a make fileDevelopment Seed
 
Go real time with pubsubhubbub and feeds
Go real time with pubsubhubbub and feedsGo real time with pubsubhubbub and feeds
Go real time with pubsubhubbub and feedsDevelopment Seed
 
Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:Development Seed
 

Más de Development Seed (18)

Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019
 
Cartography with TileMill, PostGIS, and OpenStreetMap
Cartography with TileMill, PostGIS, and OpenStreetMapCartography with TileMill, PostGIS, and OpenStreetMap
Cartography with TileMill, PostGIS, and OpenStreetMap
 
Nonprofit Mapping at Net2DC Meetup
Nonprofit Mapping at Net2DC MeetupNonprofit Mapping at Net2DC Meetup
Nonprofit Mapping at Net2DC Meetup
 
Famine Mapping with USAID
Famine Mapping with USAIDFamine Mapping with USAID
Famine Mapping with USAID
 
Tilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit MapsTilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit Maps
 
Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011
 
Transparency camp
Transparency campTransparency camp
Transparency camp
 
Tech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMillTech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMill
 
ReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build PlanReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build Plan
 
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationIBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
 
Offline Mapping: International Crisis
Offline Mapping: International CrisisOffline Mapping: International Crisis
Offline Mapping: International Crisis
 
Aegir one drupal to rule them all
Aegir one drupal to rule them allAegir one drupal to rule them all
Aegir one drupal to rule them all
 
Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2
 
For every site a make file
For every site a make fileFor every site a make file
For every site a make file
 
Go real time with pubsubhubbub and feeds
Go real time with pubsubhubbub and feedsGo real time with pubsubhubbub and feeds
Go real time with pubsubhubbub and feeds
 
Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:
 
Open Atrium
Open Atrium Open Atrium
Open Atrium
 
Opening Large Data Sets
Opening Large Data SetsOpening Large Data Sets
Opening Large Data Sets
 

Último

Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 

Último (20)

Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 

Fast Map Interaction without Flash

  • 1. Fast Map Interaction Without Flash Tom MacWright @tmcw from MapBox @mapbox Wednesday, April 20, 2011
  • 3. Flash is a dead end • Hopefully this goes without saying • Maps are especially mobile • We don’t tolerate closed-source components Wednesday, April 20, 2011
  • 4. Vectors aren’t there yet • Internet Explorer still owns 45% of the market • Polymaps is working on IE9 • Even bleeding-edge browsers are still in early stages of optimization • Passable for points, but rendering OpenStreetMap in-browser? Wednesday, April 20, 2011
  • 5. Polygons in-Browser • GeoJSON is nifty but bandwidth-inefficient • Browser APIs are weak (VML?) • Calculating polygon collisions is code-heavy and slow • Simplifying polygons to speed up browsers doesn’t cut it Wednesday, April 20, 2011
  • 9. WMS GetFeatureInfo • Not cacheable: requires a running web server • Hover interaction near-impossible • Just as friendly and great as WMS itself Wednesday, April 20, 2011
  • 10. “Designing Around It” • Zooming out makes points disappear? • Clustering for performance reasons? • Restricting panning? Wednesday, April 20, 2011
  • 15. • Awesome idea! • Undocumented • Only supports points • A single type of data Wednesday, April 20, 2011
  • 16. http://bit.ly/utfgrid UTFGrid Wednesday, April 20, 2011
  • 18. Rasterized Tiles + Pixel-Driven Interaction Wednesday, April 20, 2011
  • 22. JSON, in the nick of time! Wednesday, April 20, 2011
  • 23. where am I, in this tile? Wednesday, April 20, 2011
  • 26. letters are numbers after all Wednesday, April 20, 2011
  • 30. Size Optimizations • One UTF-8 character per feature • 256px / 256px tiles • 2x2 pixel grid (users aren’t pixel-precise) • gzip Wednesday, April 20, 2011
  • 31. Lower bound 256 2 1kb ( ) ∗ = 16kb 2 1024b Upper bound 256 2 1kb ( ) ∗ ∗ 2 = 32kb 2 1024b Wednesday, April 20, 2011
  • 32. non-scientific survey of observed file size (aka, thanks, gzip) 3 2.25 #req 1.5 0.75 0 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 in kb Wednesday, April 20, 2011
  • 34. • Grid size is limited by the number of pixel blocks, so zooming out to the US actually can work • The grid also works for points, and lines too Wednesday, April 20, 2011
  • 36. Speed • Once you have the grid, the mouse coordinate, and the tile coordinate, there are no loops required to find the grid feature, if any. • Grid computations are typically outweighed by the time taken to display tooltips • Once a grid is generated, it doesn’t need to change. It could be a file sitting on S3. Wednesday, April 20, 2011
  • 37. ... about that ‘application specific formatting’ • Designed to be usable outside of a browser • And much more than just tooltips • You get ‘just data’ from the server, not HTML Wednesday, April 20, 2011
  • 38. // Bring your own JavaScript function (options, data) { ... return formatted_output; } Wednesday, April 20, 2011
  • 39. function (options, data) { if (options.format == 'teaser') { return '<h1>' + data.NAME + '</h1>'; } else if (options.format == 'full') { return '<h1>' + data.NAME + '</h1>' + data.AREA; } } Wednesday, April 20, 2011
  • 41. Generating: Mapnik http://mapnik.org/ • Mapnik is everyone’s favorite world-beating open source map renderer • Initially we rendered the map, and then queried a 642 grid. It was slow. • Dane Springmeyer has been writing a grid renderer deep in AGG which is way faster. Wednesday, April 20, 2011
  • 42. Parsing: APIs http://github.com/mapbox/wax • Google Maps API v3 • OpenLayers • Modest Maps Wednesday, April 20, 2011
  • 43. • (let’s do it!) Wednesday, April 20, 2011
  • 44. (sidenote: APIs) • Grids reduce the role of mapping APIs: their parsing task is reduced to <200 lines • Do one thing, and do it well: provide a tiling interface • Thus, for our usage, Modest Maps > OpenLayers. Wednesday, April 20, 2011
  • 45. Making Grids: TileMill http://tilemill.com/ Wednesday, April 20, 2011
  • 48. Using Grids TileStream, iPad, & Wax Wednesday, April 20, 2011
  • 49. Or, make your own? • Grid implementation in Mapnik core - with bindings to nodejs and Python (LGPL & BSD licensed) • Grid reader implementations in Wax, supporting Google Maps, OpenLayers, and Modest Maps (BSD licensed) Wednesday, April 20, 2011
  • 50. • No seriously, it’s open source. Wednesday, April 20, 2011
  • 51. URLS! • http://mbtiles.org/ (read the full spec) • http://tilemill.com/ • http://github.com/mapbox/ Wednesday, April 20, 2011
  • 52. Rough Edges! • Can’t highlight features yet • More APIs! (except Bing, because of TOS) • Formatter spec needs security spec - currently relies on trust • Contributions welcome! Wednesday, April 20, 2011
  • 53. Thanks! @mapbox @tmcw Tom MacWright Wednesday, April 20, 2011