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.
________________
Blog Archive
-
▼
2011
(991)
-
▼
April
(95)
- Mapping the Internet of Things
- The Real-Time Toronto Transit Map
- The YouTube Royal Wedding Map
- The Royal Wedding on Google Maps
- Road Races in Street View
- A Facebook Check-in Button Generator
- Getting a Job with Google Maps
- Design Events on Google Maps
- Zombies Attack the Royal Wedding
- Find Foursquare Deals on Google Maps
- More Sweden on Google Maps
- Panoramas & Vistas on Google Maps
- Google Maps Satellite Views of Chernobyl
- Driving Directions with Street View
- Welcome to the Sounds of Galicia
- 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
- A Tsunami Model on Google Maps
- Red Wins the Inaugural Google Map Attack
- Friday Fun with Google Maps
- Google Offers Open for Subscription
- Ask the Crowd About the Buzz at a Venue
- Taking Geo-Games to the Next Level
- The Royal Wedding on Google Maps
- How to Calculate the Cost of a Car Journey
- Introducing Google Earth Builder
- Canadian Gun Ownership Google Map
- Canadian Elections on Google Maps
- A Google Map of House Price Reductions
- 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
- Japanese Radiation Wind Map
- Google Maps Makes Beautiful Music
- Explore the Great Outdoors
- The Week's Best Google Maps
- A Google Map of the American Civil War
- Helsinki Wins the City Slam
- Boston & London Marathons Mapped
- Real-Time Train Tracking on Google Maps
- Scalextric on Google Maps
- A Google Maps Fence Planning Tool
- The Bourne Identity on Google Maps
- 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
- 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
- Send Your Support to Japan
- This Week's Best Google Maps
- Worldwide Toilet Finder Google Map
- A Google Map of Indian Corruption
- Win an iPad 2 with Your Google Map
- Google Maps Plane, Train & Boat Directions
- Invest in Property with Help of Google Maps
- Google Latitude Does Coupons
- Friday Fun with Google Maps
- California School Funding on Google Maps
- U.S. Cultural Landmarks on Google Maps
- Mapping Nuclear Plants & Earthquake Data
- Where's This Picture From on Google Maps
- What's Going On with Google Maps
- 2012 Olympics on Google Maps
- Track Bike Thieves with Google Maps
- Share a Google Map with Your Group
- Google Maps of Minecraft
- The 1913 Dayton Flood on Google Maps
- Create a Google Map in Seconds
- Play Dangerous or Not With Street View
- There Be Gold ...
- Americas Rock on Twitter
- Historical UK Maps API
- Keep on Running with Google Maps
- The Bay's Data on Google Maps
- The Best Google Maps of the Week
- The Great New Zealand Outdoors Mapped
- Find Your Pictures on Google Maps
- Cricket World Cup Final on Google Maps
- Google Maps Pink Elephants - Updated
- Custom Street Views Brings You Shop View
- Other Mapping News
- Google Maps Removes Buckingham Palace
-
▼
April
(95)
Tuesday, April 19, 2011
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Here again is another (the 11th) roundup of the latest Google Maps Creation (and Viewing) Tools and Resources. I've assemble these list...
-
+ = Google Maps Mashup Roundup Part 1 (of 2) ( See Part 2 here.. ) Google Maps is powering the Web 2.0 craze here in Canada . It is bringi...
-
Boston.com has used the previously mentioned Atlas Google Maps tool to create a map of the recent Mooninite scare in Boston . You might re...
-
Massachusetts contributions to gubernatorial candidates - Faneuil Media dropped by to tell me about a very interesting and eye-opening Goog...
-
Sacramento Crime Tracker - This next mashup is a great example of how media can use Google Maps to display information for those in the com...
0 comments:
Post a Comment