Canvas Bar Charts
In the last couple of weeks I've been experimenting with using the canvas element of HTML5 with Google Maps. The canvas element allows for dynamic, scriptable rendering of 2D shapes on a web page, so I thought it would be perfect for creating data visualisations with Google Maps.
This example map presents the populations of the American states by using the canvas element to draw a bar graph for each state. To view a state's population on the map just mouse-over the state on the map.
With the canvas element it is also possible to animate shapes. This example tweens between the different bar charts as you roll over the states. I didn't particularly like the effect so I gave up on it - hence it will only work for some of the eastern states.
Of course much more complex animations are possible. Tim Poon has created a great particle animation with canvas. When I saw his animation I thought it would look great with Google Sky as a background. And it does.
In my example I have used z-index to overlay the canvas element over the map canvas. The disadvantage of doing this is it makes the map inaccessible so you can't interact with the map. The answer is to add the canvas element as an overlay on the map.
The excellent Mapnificent does this to visualise travel distances on Google Maps. Adding the canvas element as an overlay on the map means that on Mapnificent you can still interact with the map.
Another great use of the canvas element is to create dynamic markers. Using the canvas element to draw the markers rather than using static images means that you can change the size of markers to reflect the size of something you wish to represent.
Monocubed did this with their map of the London Bike Hire scheme. The map used markers drawn in canvas to show the number of bikes being hired by each bike station. The size of each marker represented the number of bikes hired from that station (unfortunately the map no longer seems to work).
If you want to use canvas for your markers a good place to start would be Paul Kinlan's tutorial Using Canvas to Create Beautiful Custom Markers in Google Maps.
________________
Tuesday, April 19, 2011
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2011
(983)
-
▼
April
(159)
- Vidéo : Portal 2 dans Minecraft
- Wallpaper : Minecraft out of this world
- Mapping the Internet of Things
- The Real-Time Toronto Transit Map
- The YouTube Royal Wedding Map
- The Royal Wedding on Google Maps
- SORTEIO MINECRAFT
- Novo Link
- Servidor Online
- Road Races in Street View
- A Facebook Check-in Button Generator
- Getting a Job with Google Maps
- Design Events on Google Maps
- Lego Minecraft #2
- Ovelha trepando no chão do Diario pt 5
- Beta 1.6 Terra e Mapas
- Minecraft 1.6 : Carte / Mini-map
- Wallpaper : Creeper & Free Hugs
- Zombies Attack the Royal Wedding
- Find Foursquare Deals on Google Maps
- Musique "Popcorn" dans Minecraft
- More Sweden on Google Maps
- Panoramas & Vistas on Google Maps
- Google Maps Satellite Views of Chernobyl
- Driving Directions with Street View
- Pas de Mod Piston pour Minecraft 1.6
- Hotdogs dans Minecraft 1.6
- Welcome to the Sounds of Galicia
- Forum Brasil-Minecraft
- Sumario de Vídeos
- Angry Bird Eggs on Google Maps
- World's Nuclear Reactors on Google Maps
- The Most Addictive Google Maps Game Yet
- The Best Google Maps of the Week
- The Singapore Election on Google Maps
- Boucles d'oreilles Minecraft
- A Tsunami Model on Google Maps
- Server Brasil Minecraft ON !
- Servidores Minecraft de VOLTA!
- Let's play Minecraft [Multiplayer] - Ep.2
- Red Wins the Inaugural Google Map Attack
- Quelles nouveautés pour Minecraft 1.6 ?
- Friday Fun with Google Maps
- Google Offers Open for Subscription
- Ask the Crowd About the Buzz at a Venue
- Tuto : rail booster et rail détecteur Minecraft 1.5
- Taking Geo-Games to the Next Level
- The Royal Wedding on Google Maps
- How to Calculate the Cost of a Car Journey
- Lego Minecraft
- Introducing Google Earth Builder
- Dúvidas? Parceria? Espaço do Internauta? Converse ...
- Canadian Gun Ownership Google Map
- Canadian Elections on Google Maps
- A Google Map of House Price Reductions
- Minecraft Karaoké : Mad World
- Minecraft Beta 1.5
- Let's play Minecraft Ep.3 - Reconstruindo ! - Giba
- Minecraft Beta 1.5 Direto do Forno ;D ! (atualizad...
- Sortie de Minecraft Beta 1.5
- Introducing Street Mosaic
- Using Canvas with Google Maps
- Google Map Maker Comes to the USA
- Instant Search for Street View
- Boston Marathon Live Google Map
- Milk Prices on Google Maps
- Plan Your Vacation with Google Maps
- Construction Minecraft : Université de Moscou
- Vidéo : Minecraft sur Xbox 360 et PS3
- Japanese Radiation Wind Map
- IndustrialCraft - NUKE!!
- Google Maps Makes Beautiful Music
- DuduMassari Offline
- Explore the Great Outdoors
- The Week's Best Google Maps
- A Google Map of the American Civil War
- Let's play Minecraft ep.2 - Procurando uma caverna !
- Helsinki Wins the City Slam
- Maison d'Architecte Minecraft
- Boston & London Marathons Mapped
- Real-Time Train Tracking on Google Maps
- Rails en Or dans Minecraft 1.5
- Scalextric on Google Maps
- Vidéo : Minecraft Beta 1.5
- Retour d'absence
- A Google Maps Fence Planning Tool
- The Bourne Identity on Google Maps
- 1.5 Próxima semana!!!
- US Citizens Living Near Nuclear Plants
- New 45° Imagery on Google Maps
- A New Styled Map Wizard for Google Maps
- American Civil War on Google Maps
- Let's play Minecraft-Recomeço
- Find a Parking Spot with Google Maps
- The World's Geocaching on Google Maps
- The Geography of Music on Google Maps
- Gigs on Google Maps with Video Previews
- Google Maps Turns the World on Its Head
- Radiation Readings on Google Maps
- Spanish Gas on Google Maps
-
▼
April
(159)
0 comments:
Post a Comment