Created
November 13, 2010 23:27
-
-
Save danking/675742 to your computer and use it in GitHub Desktop.
I get a "Uncaught TypeError: Cannot read property '__e3_' of undefined" error when I execute "new Sojourn(a, b, c)" Stack trace is unhelpful b/c of maps api. Here's a truncated version beginning just after the event handler: Pd main.js:16
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
function Sojourn(location, map, path) { | |
var marker = createMarker(location, map); | |
path.push(location); | |
this.getLocation = function () { return location; }; | |
this.remove = function () { | |
marker.setMap(null); | |
path.forEach(function (x, i) { | |
if (x.equals(location)) { | |
path.removeAt(i); }});}; | |
console.log("setting remove behavior!"); | |
google.maps.event.addListener(marker, 'click', function(event) { | |
console.log(this); | |
this.remove(); }); } | |
function createSojourn(location, map, path) { | |
new Sojourn(location, map, path); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gist cut off the stack trace:
Pd main.js:16
Nd main.js:19
R.addListener main.js:16
Sojourn maps-test.js:19
createSojourn maps-test.js:24