Open GoogleCodeExporter opened 9 years ago
I double this request, it's quite bad that after I filter one option I cannot
go back
thank you!
Original comment by jalab...@gmail.com
on 11 Oct 2012 at 2:07
Original comment by rshap...@google.com
on 18 Oct 2012 at 10:35
I triple this request
Original comment by bluffdal...@gmail.com
on 14 Dec 2012 at 7:01
I managed to find a workaround by doing something like this example below.
Basically, it will do an IF SearchString has a Value, then do the original
query code, ELSE then it will simply show all
--------- HIGH LEVEL ----------
from:
[original code]
I edited it to:
if(searchString){
[original code]
}
else
{[original code] but minus the search query
}
--------- SAMPLE CODE ----------
function changeMapl0() {
var searchString = document.getElementById('search-string-l0').value.replace(/'/g, "\\'");
if(searchString)
{
layerl0.setOptions({
query: {
select: "'col9'",
from: '1DPt-0Nd4SORHIdW6_T_If67brMmWBfKh8sp1X_E',
where: "'SearchColumn' = '" + searchString + "'"
}
});
}
else
{
layer.setOptions({
query: {
select: locationColumn,
from: tableId }
});
}
}
Original comment by rafaelau...@gmail.com
on 5 Apr 2013 at 12:21
I tried implementing this workaround, but it didn't work. I tried it as is,
then replaced locationcolumn and tableid with the values for my table and it
didn't work either.
I don't understand how the code that follows else is supposed to make it show
all...
Original comment by Hamilton...@gmail.com
on 9 May 2013 at 8:11
Found a work-around.
In the definitions of the changemap function, add the following after var
searchString=.....
var whereQuery = "'Category' = '" + searchString + "'";
if (searchString == "All") whereQuery = "";
Then add an "All" option into your select lists with the following:
<option value="All">All</option>
You can also put a Hide All by using the following:
<option value="">Hide All Actions</option>
This tells it to search for and display something that doesn't exist (assuming
you don't have any empty cells in the column you're searching) and so it will
essentially hide everything
Original comment by Hamilton...@gmail.com
on 23 May 2013 at 8:38
Original issue reported on code.google.com by
mattmar...@gmail.com
on 6 May 2012 at 12:23