Start a new topic

How I can filter the POI´s with a select option.

How I can filter the POI´s with a select option.


Hi 

I want to filter de POI´s with a select option by categories like "Food, Movies, Parks, etc.". I used an switch statement like this:

var poiSelected = "data from select"

switch (poiSelected) {

  case "val 1":

   World.loadPoisFromJsonData("Array1");

   break;

  case "val 2":

   World.loadPoisFromJsonData("Array2");

   break;

  case "val 3":

   World.loadPoisFromJsonData("Array3");

break;

}

 

But when i change the code with the switch statement the POI´s not showing.

 



Photo with select option.

Hi there!

Filtering an array accordingly is not part of the Wikitude AR part, but more of a general JavaScript question.

Please use e.g. stackoverflow for that kind of questions.

Kind regards,
Andreas
Login or Signup to post a comment