Skip to content

Instantly share code, notes, and snippets.

@danking
Created November 13, 2010 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danking/675742 to your computer and use it in GitHub Desktop.
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
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); }
@danking
Copy link
Author

danking commented Nov 13, 2010

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment