Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setMap: not an instance of Map #9

Open
Messier82 opened this issue Apr 25, 2017 · 1 comment
Open

setMap: not an instance of Map #9

Messier82 opened this issue Apr 25, 2017 · 1 comment

Comments

@Messier82
Copy link

Messier82 commented Apr 25, 2017

Hello! I'm trying to use this library but cannot even initialize it. It's dropping me InvalidValueError: setMap: not an instance of Map; and not an instance of StreetViewPanorama error.

var canvasLayerOptions = {
  map: this.map,
  animate: false
};

var canvasLayer = new CanvasLayer(canvasLayerOptions);

return canvasLayer.canvas.getContext('2d');

That's the code, that I'm using to initialize it. this.map is not undefined and instanceof google.maps.Map on it returns true

@Messier82
Copy link
Author

Okay. I assume I fixed it by initializing only after map is loaded. But there's another problem: updateHandler and resizeHandler is not calling. At all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant