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

Uncaught TypeError: Cannot read property 'getBounds' of null #6

Closed
johnd0e opened this issue Apr 29, 2019 · 2 comments
Closed

Uncaught TypeError: Cannot read property 'getBounds' of null #6

johnd0e opened this issue Apr 29, 2019 · 2 comments

Comments

@johnd0e
Copy link

johnd0e commented Apr 29, 2019

var isDisplaying = self._map.getBounds().contains(latlng);
VM12705:1885 Uncaught TypeError: Cannot read property 'getBounds' of null
    at NewClass.removeMarker (<anonymous>:1885:42)
    at NewClass.removeLayer (<anonymous>:1873:18)
    at <anonymous>:20331:21
    at Array.forEach (<anonymous>)
    at Object.removePortal (<anonymous>:20330:27)
    at window.Render.deletePortalEntity (<anonymous>:19154:22)
    at window.Render.clearPortalsOutsideBounds (<anonymous>:18974:12)
    at window.Render.startRenderPass (<anonymous>:18959:8)
    at window.MapDataRequest.refresh (<anonymous>:19710:15)
    at <anonymous>:19634:76
@johnd0e
Copy link
Author

johnd0e commented Apr 30, 2019

It's because we trying to process markers when ornaments layer is not on the map.
I'm not sure if adding/removal should be processed in this case.
If it should than perhaps we need keep _map property even when ornaments layer is turned off (possibly backing it up in mapToAdd property).

@johnd0e
Copy link
Author

johnd0e commented May 3, 2019

We've updated our user code, and this error seems don't occur anymore.
Parent issue: #10.

@johnd0e johnd0e closed this as completed May 3, 2019
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