Opened 11 years ago

Closed 11 years ago

#413 closed improve feature (fixed)

Searchmembers Google map markers -- improve placement

Reported by: matrixpoint Owned by: matrixpoint
Priority: minor Milestone: 0.1.4
Component: BW Search Keywords: google maps markers spacing
Cc: philipp, micha

Description

When multiple members have the same geo-coordinates, their markers are spaced out diagonally to avoid being hidden. This becomes a problem when there are many such members, because the line of markers can stretch far beyond the boundaries of the city they live in.

This could be improved by grouping members together in one marker, or three markers (one for each accommodation type).

Change History (7)

comment:1 Changed 11 years ago by matrixpoint

  • follow_up changed from none to test on alpha

comment:2 Changed 11 years ago by matrixpoint

Moved to alpha in r4084. Couldn't really test on alpha, since I need several members in the same location.

comment:3 Changed 11 years ago by matrixpoint

I had some problems, mostly with the limitations of the google marker pop-up. After some trial and error, I found that the best I could do was to include a 4 row x 3 column grid of member thumbs in the pop-up.

So, as it is now, the 3 different color markers are used for different accommodation types. If there are more than 12 members of any one type, additional markers of that color are used. Multiple markers with the same coordinates are still spaced out diagonally (although I reduced the spacing), but there should be many fewer than before.

To completely eliminate this problem, we would have to engineer our own pop-up, detecting a click event and bypassing the google pop-up mechanism. This is much more work, and may not be worth it considering that we may allow members to change their coordinates in the future, reducing the likelihood of overlapping markers.

Please test on alpha. The best city I found for testing was Berlin.

comment:4 Changed 11 years ago by matrixpoint

Files: htdocs/script/searchmembers.js, templates/apps/searchmembers/ajax.php in r4090, 4092.

comment:5 Changed 11 years ago by micha

  • follow_up changed from test on alpha to release

The changes you made seem to solve the problem for now. Let's move it to production!

I'm not an expert when it comes to Googlemaps, however maybe we should look at these pages to improve things further:

Extending The API To Create Labeled Markers (with numbers for example) http://googlemapsbook.com/2007/01/22/extending-gmarker/

Two nice articles about managing markers and customizing marker windows: http://googlemapsapi.blogspot.com/2007_12_01_googlemapsapi_archive.html

Documenation of the marker manager: http://code.google.com/apis/maps/documentation/reference.html#GMarkerManager

Additional drag-zoom for marker manager: http://googlemapsapi.blogspot.com/2007/08/dragzoom-marker-manager-cluster-zoom.html

Here you can download that stuff:

ExtInfoWindow? (to modify the CSS of the marker-windows) http://gmaps-utility-library.googlecode.com/svn/trunk/extinfowindow/

The MarkerManager? (to automatically group nearby markers) http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/

comment:6 Changed 11 years ago by matrixpoint

  • follow_up changed from release to none

Thanks for the links, Micha.

Moved to production in r4137

comment:7 Changed 11 years ago by philipp

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.