Skip to content
Browse files

Merge pull request #11 from nikebot/patch-1

Fix UICGTravelModeWalking travel mode.
  • Loading branch information...
2 parents 706a4fa + 7520303 commit 308cfaf2618a827d745cfd81a1eeec9429a32a58 @kishikawakatsumi committed Aug 12, 2013
Showing with 18 additions and 2 deletions.
  1. +18 −2 api.html
View
20 api.html
@@ -10,10 +10,25 @@
var map;
var gdir;
var geocoder;
-
+ var container = document.getElementById ("messageContainer");
+ window.onload = function (){
+ var textNode = container.firstChild;
+ if (textNode.addEventListener) {
+ textNode.addEventListener ('DOMSubtreeModified', OnCharacterModified, false);
+ }
+ }
+
+ function OnCharacterModified (event) {
+ var currentValue = event.newValue;
+ if (currentValue != event.target.data) {
+ currentValue = event.target.data;
+ }
+ alert (currentValue);
+ }
+
function initialize() {
if (GBrowserIsCompatible()) {
- gdir = new GDirections(null, null);
+ gdir = new GDirections(null, container);
geocoder = new GClientGeocoder();
GEvent.addListener(gdir, "load", onGDirectionsLoad);
@@ -72,5 +87,6 @@
</script>
</head>
<body onload="initialize()" onunload="GUnload()">
+ <div id="messageContainer"></div>
</body>
</html>

0 comments on commit 308cfaf

Please sign in to comment.
Something went wrong with that request. Please try again.