forked from cutting-room-floor/wax
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make google interaction code usable via wax.
- Loading branch information
Young Hahn
committed
Feb 25, 2011
1 parent
91b84df
commit ca11b78
Showing
8 changed files
with
7,998 additions
and
357 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
// Google Maps Interaction Example | ||
var map; | ||
$(window).load(function() { | ||
map = new google.maps.Map( | ||
document.getElementById("google-canvas"), { | ||
center: new google.maps.LatLng(0, 0), | ||
zoom: 2, | ||
mapTypeControlOptions: { | ||
mapTypeIds: [google.maps.MapTypeId.ROADMAP] | ||
} | ||
} | ||
); | ||
|
||
// Create an assign the new maptype | ||
map.mapTypes.set('mapbox', new wax.g.MapType()); | ||
map.setMapTypeId('mapbox'); | ||
|
||
wax.g.Interaction(map); | ||
wax.g.Legend(map); | ||
$(function() { | ||
var map = ['@group', | ||
['@new wax.g.Controls', | ||
['@group', | ||
['@new google.maps.Map', | ||
['@call document.getElementById', 'google-canvas'], | ||
{ | ||
center: ['@new google.maps.LatLng', 0, 0], | ||
zoom: 2, | ||
mapTypeId: [ '@literal google.maps.MapTypeId.ROADMAP' ] | ||
} | ||
], | ||
['@inject mapTypes.set', 'mb', ['@new wax.g.MapType']], | ||
['@inject setMapTypeId', 'mb'] | ||
] | ||
], | ||
['@chain Interaction'], | ||
['@chain Legend'] | ||
]; | ||
wax.Wax.reify(map); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters