Search/Clustering Functionality

ron_s - June 7, 2008 - 21:42
Project:gProximity
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

As a test, I created a map which references three users; each user has "Birmingham, Alabama, United States" stored as their address. In the database each one has a lat/lon of 33.51952, -86.814743 stored.

These might be two separate issues, but let me note both of them here and you can decide if we should separate them. First, I assumed the clustering functionality, if set up correctly, would provide a different icon/description for the three Birmingham users. Is this correct? I chose to set up the clustering in this way:

View fields: locality (which is city)
Zoom out level: 0
Zoom in level: 10
Info format: locality, state, country

Second, given all these nodes are on the same spot on the map, I would assume it would be necessary to use the search to list them beyond the cluster, or can you zoom in on the cluster and see separation for each item?

If I then perform a search to try to get an inclusive set, I get some odd results. When I enter a search term of "United States", I only get one of the three users. If I enter "Alabama", I only get one of the three users. If I enter "Birmingham", I get all three. I would assume the search should be inclusive rather than exclusive?

#1

ron_s - June 7, 2008 - 21:51

Oh, one other issue that I'm not sure why I didn't notice until now. The search results are showing duplicates. The table in the DB storing the lat/lon values has three records as I would have expected, for nids 21, 200 and 210, and all three nids have the correct lat/lon for Birmingham.

However the gProximity search result lists the following for a search of "Birmingham, AL":
* User A (nid=200)
* User A (nid=200)
* User B (nid=210)

User with nid=21 is not displayed at all, and User A is displayed twice. Hmmm ... that's a problem. :)

#2

greenSkin - June 8, 2008 - 00:18

Hmm, interesting on the duplicate node showing. Definitely something to look into. As for clustering, they are joined by commonality. So if you cluster on city, then one marker will show for that lat/lon.

For the results showing only one at greater distance is because the way gProximity is set up is to show only locations within 50 miles (I believe currently this is hardcoded and needs to be able to be changed via settings). If the closest location is greater than 50 miles, than only the closest node is returned in the results and thusly limited to one. So I'm not sure if changing this to take into account for nodes with identical lat/lon's is worth the effort. Something to discuss I suppose.

#3

ron_s - June 8, 2008 - 10:20

If the closest location is greater than 50 miles, than only the closest node is returned in the results and thusly limited to one.

Well, if all three users are within the United States, and my address search is "United States", why would this only return one? They are all within 50 miles of the US ... in fact they are in it. :)

Also just a general question about your goals with gProximity -- I have been spending the past couple of days also poking around with the Location/GMap modules, and with the Google Client Geocoder (GCG) module. Once the Views module is added into the mix, there seems to be a lot of overlap. Why try to create a new mapping module as opposed to extending what already exists with an add-on module?

 
 

Drupal is a registered trademark of Dries Buytaert.