Closed (fixed)
Project:
Location
Version:
6.x-3.x-dev
Component:
Location_views
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 May 2010 at 19:22 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hutch commentedInteresting, can you provide examples?
Comment #2
lotyrin commentedI'm using the extents from a GMap to filter a view that I have below the map in an Iframe (so that only pins showing on the map will have related data shown in the iframed view).
When the user is zoomed in too far, the extent of their currently viewed map will be less than a degree wide or tall, so, with truncated ints, that means they'll have no results in the iframe. Additionally, even when zoomed out, map pins near the edges of the map were getting truncated.
I think it would be fairly common to need sub-degree accuracy for any number of other reasons.
Comment #3
hutch commentedWhat I mean is where did you alter code to achieve this? I don't see lats and lons as int anywhere, for instance in
location_views_handler_filter_proximity.inc
a snip of SQL from the above handler in Views
Locations are stored with 6 decimal places, that's roughly 10 centimeters or 4 inches
The SQL here is using accuracy of 1/100 mm
That's a lot more accurate than the resolution of google maps which I would estimate as between 1 and 5 meters at full zoom.
Comment #4
lotyrin commentedI'm not using the proximity filter, but rather separate filters for latitude and longitude.
I've prepared a patch of my changes.
Comment #5
lotyrin commentedMy last file upload seems to be broken? (links to "http://drupal.org/files/issues") trying again.
Comment #6
hutch commentedYes, you are quite right, these fields should be float. The SQL generated in views_handler_filter_numeric.inc uses %d, we need %f here, views_handler_filter_float.inc provides that.
Changing this to bug report
Comment #7
hutch commentedI would like to remind the maintainers of this patch in #5, it makes sense programatically, lat/lon should be of type float. If anyone is in a position to test this please do!
Comment #8
yesct commentedTagging
Comment #9
m0dI tested it, works great for me.
Comment #10
yesct commentedComment #11
rooby commentedGood catch, committed to 6 & HEAD.
http://drupal.org/cvs?commit=429432
http://drupal.org/cvs?commit=429434