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

Geocoding not working in 3D Tiles Terrain Classification demo #6908

Closed
lilleyse opened this issue Aug 10, 2018 · 1 comment
Closed

Geocoding not working in 3D Tiles Terrain Classification demo #6908

lilleyse opened this issue Aug 10, 2018 · 1 comment

Comments

@lilleyse
Copy link
Contributor

The 3D Tiles Terrain Classification demo uses the geocoder to set the initial view, but no longer works after #6876.

Is there anything that looks wrong about the code below?

var geocoder = viewer.geocoder.viewModel;
geocoder.searchText = 'Vienna';
geocoder.flightDuration = 0.0;
geocoder.search();

@mramato would you have a chance to look into this?

@mramato
Copy link
Contributor

mramato commented Aug 10, 2018

Good catch. This is an easy one to fix. Basically you are calling the geocoder before terrain is ready and we weren't correctly waiting on the ready promise in the new code I added. This would (almost) never happen in normal usage because terrain initializes faster than the user performing a geocode.

I'll open a PR to fix it.

mramato added a commit that referenced this issue Aug 10, 2018
…ready

If you performed a geocode before the terrain became ready, it would
throw an exception.

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

No branches or pull requests

2 participants