Don't like the adverts?  Click here to remove them

User Map (help needed)

Crispin

Administrator
Staff member
Guru
Joined
Feb 24, 2010
Messages
6,052
Country Flag
great_britain
Anyone any good at making custom gmaps?
I have this which I wrote and used on the from old forum :http://www.landcruiserclub.net/view_user_location.php
Problem is that it is slow (bit of brute-force method I used) and some what ugly. There are tons of ways to use gmaps in some nice ways to show density or heat maps.
If anyone is handy at rolling php and gmaps shout.

Basics: I have the user location (based on user's profile location) and from that I use the gmap API to look up the lat and long. With that I then get the gmap and pass in all the lats and longs for users.

Problem is that it reloads them each time, is slow, and just looks fugly.

Any takers? :pray:
 
I don't have time to mess with it at the moment but if you don't get any other offers I'll have a go at some point.
 
Thanks Jon. Not the biggest necessity out, falls into the "funky" category I think.
 
That looks pretty cool, worth a look when someone fiddles with it :icon-smile:
 
Don't like the adverts?  Click here to remove them
Very cool. The mouse scroll wheel doesn't work for zooming in and out ...
 
Yup, not sure why that is. There is also a weirdness with how they cluster which I want to work out.
It's also only showing abut 300 people who have locations in their profiles. :(
 
Looks like you need a map.enableScrollWheelZoom(), docs say it's disabled by default.
 
Might need to add a bit of jitter to the location so e.g. 2 people in Stourbridge still show as 2 markers when zooming in enough?
 
yup, was actually going to ask you about that.
As it is, I am just setting markers based on the lat/lng I get from google. There are lots of overlaps (Tony and the same as well)

I see two options, neither of which I could get working. The first, (best?) is to fan the markers out when at the lowest level. I am sure I have seen that done before. Cannot for the life of me find it though. It still kept the points in the same place but the markers fanned out allowing you to see them all.

The second option was to shift duplicate people by 50-100m if there are duplicates. This will be coming messy when there are a few people as you would end up drawing a line. Putting anything else in to either wrap them or manually fan them in a circle seems overkill (if you have code... ;) )

I was reading this last night: http://gis.stackexchange.com/questi...a-latitude-longitude-by-some-amount-of-meters
Better way?
 
a line wouldn't be so bad for a few but how many do you want it to cope with? Concentric circles, spiral, grid, random displacement, lots of options but more effort. I don't have code, I'd have to make it up as I went if it's php or js, not something I normally use.
 
How about just moving them left or right by n meters for now? When getting the result from Google I'll cache it as-is and then shift on the way out.

Sent from my GT-P7510 using Tapatalk 2
 
How about just moving them left or right by n meters for now? When getting the result from Google I'll cache it as-is and then shift on the way out.

Sent from my GT-P7510 using Tapatalk 2
I think that should be a good compromise.
 
Back
Top