cesium icon indicating copy to clipboard operation
cesium copied to clipboard

GeocoderViewModel.search command not executed when user clicks a suggestion

Open ggetz opened this issue 7 years ago • 16 comments

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.

ggetz avatar Mar 06 '18 15:03 ggetz

please assign it to me !

tharun323 avatar Mar 08 '18 07:03 tharun323

@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

mramato avatar Mar 08 '18 13:03 mramato

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

hibaAkroush avatar Mar 13 '18 09:03 hibaAkroush

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.

ggetz avatar Mar 13 '18 14:03 ggetz

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

hibaAkroush avatar Mar 13 '18 14:03 hibaAkroush

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 avatar Mar 13 '18 14:03 ggetz

@ggetz can you still reproduce this? Everything works for me.

mramato avatar Apr 20 '18 17:04 mramato

@mramato I can still reproduce, it's specifically only when clicking a suggestion (and not hitting enter or the search button) that it happens.

ggetz avatar Apr 20 '18 18:04 ggetz

Was this issue fixed?

damienmajer avatar Jul 02 '18 15:07 damienmajer

@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 avatar Jul 02 '18 15:07 hpinkos

@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 avatar Jul 02 '18 15:07 damienmajer

@damienmajer yes, it seems to work correctly for me

hpinkos avatar Jul 02 '18 16:07 hpinkos

I can still reproduce.

var viewer = new Cesium.Viewer('cesiumContainer');

viewer.geocoder.viewModel.search.beforeExecute.addEventListener(function () {
    console.log('Searched!');
});
  1. Type some text in the search box and hit enter. The camera will move and the search event will fire.
  2. 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.
  3. 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.

ggetz avatar Jul 02 '18 16:07 ggetz

I get the same problem, exactly as ggetz describes it.

SFraissTU avatar Aug 17 '18 13:08 SFraissTU

I'm from JTC and would like to work on this. Thanks!

Patsnoop avatar Aug 26 '24 23:08 Patsnoop

@Patsnoop Go for it!

ggetz avatar Aug 26 '24 23:08 ggetz