Radius search Geocode option

rackem

Well-Known Member
The new Geocode option in the Radius Search is really neat! I just had a couple things to note.

1) The Geocode map is cut off in the list filter when the option is selected. Interestingly enough, the map is displayed correctly if the radius search ?Active? status is toggled in the front end after the Geocode option is selected. Here is a link: http://www.mypoolstats.com/player-ratings. I am using the horizontal filter layout as described in the wiki but it also is this way for the default list layout.

2) Is there a way to set the default starting location for the Geocode map? This is relatively minor but I think it would be more obvious / user friendly how to use it if it didn't start in the Atlantic ocean off the west coast of Africa.

3) The "Clear Filters" button for the list does not clear the Geocode search box values. Once again, pretty minor but I thought I'd mention it.
 
1) It's not doing it on my site, although I have seen it do that here. Just nto whenever I try and fix it!

2) I just committed changes to let you set a default.

3) Haven't had time to look at this yet.

-- hugh
 
1) It's not doing it on my site, although I have seen it do that here. Just nto whenever I try and fix it!

2) I just committed changes to let you set a default.

3) Haven't had time to look at this yet.

-- hugh
 
1) Weird, it happens all the time on my site using IE, Chrome, and FF. No errors that I can see. I wonder what could be different?

2) Will check it out! :)

3) OK
 
1) It is always broken at your first session but after you switch to "geocode" mode and toggle the active/inactive, it will work. I was able to "re-break" it again by switching to "place" mode and toggle the active/inactive again. The problem seems to be the "height" attribute. When it is working it is 277px but when it is broken it is only 101px, for me anyways. I can "fix" it when it happens using Chrome developer tools by switching the attribute off.

2) Confirmed, thanks! Just to note, the tip says two styles are available: a "lattitude,longitude" as well as "(lattitude,longitude):zoom" without the quotes of course. The first style works fine, the second style only works if you don't include the parenthesis so "lattitude, longitude:zoom"

3) As your time allows.
 
1) I'm still trying to reproduce the size thing. I noticed when I was testing that occasionally the size would be wrong, but I could never reproduce it. I just tried for five minutes, all permutations of reloading the page, switching modes, filtering, etc. Can't get it to misbehave. Does this happen for you in both "under heading" and normal mode?

2) Strange. Works for me, with either format. I just added a tiny tweak to strip any spaces out, as I noticed you said "(lat, long):zoom", not "(lat,long):zoom" (no spaces, as per the tooltip), although that only affects early versions of PHP 5.1.x, afaik, that don't like converting strings with with preceding spaces into floats. Try grabbing latest github, see if that makes any difference.

3) OK. I'll have a quick look now, but you'll prolly have to bump it a few times.

-- hugh
 
1) I'm still trying to reproduce the size thing. I noticed when I was testing that occasionally the size would be wrong, but I could never reproduce it. I just tried for five minutes, all permutations of reloading the page, switching modes, filtering, etc. Can't get it to misbehave. Does this happen for you in both "under heading" and normal mode?
I switched to the default template with filters "above" and the problem still occurs. Radius search is not compatible with "under heading" filter. I have two lists with this. Here is one with the default template: http://www.mypoolstats.com/locations and here is one with horizontal filters: http://www.mypoolstats.com/player-ratings. You said you weren't able to reproduce - did you try it on my site or a test site of your own?

2) Strange. Works for me, with either format. I just added a tiny tweak to strip any spaces out, as I noticed you said "(lat, long):zoom", not "(lat,long):zoom" (no spaces, as per the tooltip), although that only affects early versions of PHP 5.1.x, afaik, that don't like converting strings with with preceding spaces into floats. Try grabbing latest github, see if that makes any difference.
Formatting now works for me using (lat,long):zoom as noted in the tooltip.:)

3) The "Clear Filters" button for the list does not clear the Geocode search box values. Once again, pretty minor but I thought I'd mention it.

Friendly bump as your time allows.

I'd also like to post a *friendly bump* to this Silver thread: http://fabrikar.com/forums/showthread.php?t=31220&page=2 as I can't post there. I think the issues in this thread and that one are closely related and we both are looking to have things working.
 
Radius search is not compatible with "under heading" filter.
this one should be fixed now.
I've had a go at re-working the interface so it opens in a popup window. It was getting too large for the standard filter area and even more so when displayed under headings.

The map should also display correctly - mental note to self "do not hide anything containing a map - it will wreck its logic - instead offset it off the page to make it appear hidden!"
 
I tested this locally and found the same issues Joit noted in this thread: http://fabrikar.com/forums/showthread.php?t=31220&page=2.

The popup window opens but there is no map displayed for the Geocode option. Also, the Place option autocomplete did not work. So I was unable to actually try a search. I preferred the previous version but if this new way is easier for you than that is fine. If you stick with the popup window, then perhaps the active/inactive can be removed seeing as how you need to click the button to bring up the window anyway. Just a thought.
 
Same here - no map in Chrome or IE, only FF.

Seeing if I can spot why.

I'm kind of undecided about the popup thing. I think we might be on the right track.

-- hugh
 
Well that was entertaining!

After much blundering around, it seems that the problem is the !important on the initial style for the geocode div:

PHP:
		$style = $type[0] == 'geocode' ? '' : 'position:absolute;left:-10000000px !important';

It seems that when a style attribute has !important, in Chrome and IE it then cannot be changed by the setStyles() method, as used in the JS to show the geocode:

PHP:
			c.getElement('.radius_search_geocode').setStyles({'position': 'relative', 'left': 0});

So that line will change the 'position', but not the 'left'.

I've removed the !important in the PHP and committed that. So the map will now appear in Chrome and IE. I don't see any side effects form removing the !important.

However, I can't actually get the filter to apply. Is there supposed to be a button inside the popup to run the filter, or is the standard Go button (in the normal filters box) supposed to apply it? If so, it's not.

-- hugh
 
Just out of interest, I googled round about this issue, and it looks like if we really do need to have the !important on the original div build, we might be able to override it by being "more specific" in the JS ... although I haven't tested ...

http://www.w3.org/TR/CSS2/cascade.html#specificity

... i.e. trying to make the selector in the JS have a higher "specificity" than the original style declaration.

And of course, although the setProperty() method allows you to specify !important, it isn't implemented in IE. :)

-- hugh
 
Sorry, I was away for most of last week and this week has been crazy catching up.

I did a quick test on my local machine. The map now shows up fine in the separate window using Chrome. However, I still wasn't able to get any filter results in my list using either the geocode or place options. The map marker would shift appropriately when I clicked the search button in geocode but my results would not filter. The place option autocomplete would think but never find a match so it was not useful.

But now that I think about it, I don't think I cleared my browser cache after updating. I will give that a shot and also check to see if there are any error messages.
 
OK, more info. Clearing the cache didn't make any difference. I didn't see any errors on the page. It looks like when you use place autocomplete, the options are showing up behind the window. It isn't clear what you are supposed to do when you make a selection though there or in the geocode. Is there a "Go" button missing?
 
We are in need of some funding.
More details.

Thank you.
Back
Top