GeocoderViewModel.search command not executed when user clicks a suggestion
Brought up on the forum here: https://groups.google.com/forum/#!topic/cesium-dev/IH6VTxePo3o
The search command executes when the user types a search and hits enter or clicks the search button, and also when selecting a suggestion form the drop down list with the arrow keys and enter, but not when clicking a suggestion with the mouse.
please assign it to me !
@tharun323 there's no need for us to officially assign anything to you. If you would like to work on this, please be our guest. See our contributing guide for help on preparing your first pull request: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/CONTRIBUTING.md#getting-started-contributing
hi @ggetz and @mramato
Im not sure what the problem is I tried to use the mouse instead of enter or clicking and it works i have been trying this in your helloworld example here :
https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases
in the google forum link @ggetz added this one: https://groups.google.com/forum/#!topic/cesium-dev/IH6VTxePo3o the issue is about the globe rotating
can you please explain the problem again or close the issue if it was fixed thanks
Hi @hibaAkroush
Here's a code snippet:
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.geocoder.viewModel.search.afterExecute.addEventListener(function(){
console.log('Search event fired');
});
You'll see the event fires when the user selects a suggestion from the drop-down with the arrow keys and clicks enter, but not when clicking a suggestion with the mouse.
Hi @ggetz Im sorry I still cant find the snippet these are the steps i did: 1- cloned this https://github.com/AnalyticalGraphicsInc/cesium 2- run npm install and npm start and its working properly 3- tried to search all files couldnt find the snippet
so i think maybe the thing you want fixed in not in this repo? im confused
if it is in the repo can you give me the path
im sorry about the delay thanks in advance for help
You can run the above sample in Sandcastle to demonstrate the issue.
You can also run this against your cloned repo by running:
npm run build
npm start
And navigating to localhost:8080.
You'll most likely make changes to fix in Source/Widgets/Geocoder/GeocoderViewModel.js.
@ggetz can you still reproduce this? Everything works for me.
@mramato I can still reproduce, it's specifically only when clicking a suggestion (and not hitting enter or the search button) that it happens.
Was this issue fixed?
@ggetz everything seems to work fine for me too. Can you still reproduce this? If you can, can you post specific step-by-step instructions for how to reproduce? Typing in a location and clicking on of the auto-complete suggestions in the dropdown worked for me.
@hpinkos so, with the globe automatically rotating, you are able to type in the search box and click on a suggested location, which zooms to that location and stops the globe spinning?
@damienmajer yes, it seems to work correctly for me
I can still reproduce.
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.geocoder.viewModel.search.beforeExecute.addEventListener(function () {
console.log('Searched!');
});
- Type some text in the search box and hit enter. The camera will move and the search event will fire.
- Type some text in the search box, use the arrow keys to select a suggestion, and hit enter. The camera will move and the search event will fire.
- Type some text in the search box, and use the mouse to click a suggestion. The camera will move, but the search event will not fire.
I get the same problem, exactly as ggetz describes it.
I'm from JTC and would like to work on this. Thanks!
@Patsnoop Go for it!