I get bounding_box
of map SW, NE which gives me array of 4 coordinates or lt/ln. I want to pass this to SetFilterFloatRange()
.
Purpose of doing this is, I want to get filtered results only which fall in this bounding box area or from visible portion of map.
I have below questions
How to pass it to SetFilterFloatRange()
because it accepts only 2 params of lt/ln
Ref : http://php.net/manual/en/sphinxclient.setfilterfloatrange.php
I think I need to convert these coordinates to radians before passing to above method. Correct me, if wrong.
How to pass it to SetFilterFloatRange() because it accepts only 2 params of lt/ln
I assume you have 2 attributes:
in your index and you have an array of 4 lt/ln corner coordinates of the area you want to filter by. And you want to find only those documents that are inside you box area. Then you first need to convert the array to 4 values:
and then set 2 filters:
I need to convert these coordinates to radians before passing to above method
If you have the indexed coordinates in radians - yes, the function itself doesn't care about radians/degrees, it's just that the indexed values and values you pass to the fuction should be compatible.