Advertisement:

Author Topic: Looking for help to integrate GOOGLE MAPS+SMF **Demo available  (Read 61261 times)

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #40 on: September 06, 2005, 10:50:26 AM »
LOL

Hmmm... ok on a serious note.... perhaps it needs to be done slightly differently.
Maybe showing 10k at a time is overkill.

Is it possible to add to the map dynamically? by that I mean just zooming in and drawing the pins for the visible area? much like videogames do?


Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #41 on: September 06, 2005, 10:52:50 AM »
I dunno yet, might be worth looking into... btw the max number I would ever do at one time would probally be 1k users.  Takes FF about a min and a half to load it, but it load the page.  As for google earth, it can take the whole load of 10k but its not pretty, so would say 2-5k at end user descression...

Code: [Select]
-rw-r--r--   1 root   root   7.1M Sep  6 10:45 10kUsers
-rw-r--r--   1 root   root   737K Sep  6 10:50 1kUsers
-rw-r--r--   1 root   root   1.5M Sep  6 10:50 2kUsers
-rw-r--r--   1 root   root   2.2M Sep  6 10:49 3kUsers
-rw-r--r--   1 root   root   2.9M Sep  6 10:48 4kUsers
-rw-r--r--   1 root   root   3.6M Sep  6 10:48 5kUsers
-rw-r--r--   1 root   root   4.3M Sep  6 10:47 6kUsers
-rw-r--r--   1 root   root   5.0M Sep  6 10:47 7kUsers
-rw-r--r--   1 root   root   5.7M Sep  6 10:47 8kUsers
-rw-r--r--   1 root   root   6.4M Sep  6 10:46 9kUsers
-rw-r--r--   1 root   root   4.0M Sep  6 10:45 GE10kUsers
-rw-r--r--   1 root   root   402K Sep  6 10:50 GE1kUsers
-rw-r--r--   1 root   root   802K Sep  6 10:50 GE2kUsers
-rw-r--r--   1 root   root   1.2M Sep  6 10:49 GE3kUsers
-rw-r--r--   1 root   root   1.6M Sep  6 10:48 GE4kUsers
-rw-r--r--   1 root   root   2.0M Sep  6 10:48 GE5kUsers
-rw-r--r--   1 root   root   2.4M Sep  6 10:47 GE6kUsers
-rw-r--r--   1 root   root   2.8M Sep  6 10:47 GE7kUsers
-rw-r--r--   1 root   root   3.2M Sep  6 10:47 GE8kUsers
-rw-r--r--   1 root   root   3.6M Sep  6 10:46 GE9kUsers

Incase your wondering the files sizes as the users decreased in number...
« Last Edit: September 06, 2005, 10:55:38 AM by TLM »

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #42 on: September 06, 2005, 11:02:36 AM »
The only problem with streaming in the points to what the user is viewing if possible would be what if there zoomed out to see the world map? How many and who gets shown there?

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #43 on: September 06, 2005, 11:02:41 AM »
Maybe postcode and surrounding areas is the better option? or doing it by so many points long/lat?

Members would then be able to use it as a tool - rather than a 'wow look at the thousands of pretty pins'  ;D

Im sure it would have more practical use that way... otherwise looking at an image of all members would be a waste of resources - even though it might look good.

I guess it could be drawn offline and ftp'd as a non interactive image once a month/week for those that want to see how the whole memberbase spreads out across the world?

Maybe Im talking gibberish :)

Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #44 on: September 06, 2005, 11:06:10 AM »
Here is an idea, use postalcode for over 1k users, bound to be a few repeats, and list them in a bubble per postalcode, and if who is viewing wants to take a closer look, can click a link in the bubble which will zoom in on area/plot pins for a predetermined area around the center?

*edit* think we just both thought of this at the same time, just one of us is a slow typer */edit*

As for drawing every pin on the map and making it a static image, not sure how to go about that one yet...
« Last Edit: September 06, 2005, 11:08:14 AM by TLM »

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #45 on: September 06, 2005, 11:12:08 AM »
Yep - I say go with that... and perhaps let the admins set how many pins to display at a time?

It certainly makes much better sense and better use of resources.

sounds like a plan :)

Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #46 on: September 06, 2005, 11:16:11 AM »
Alrighty, I will get on that, may not get that feature done before I have to leave for class/an appointment this afternoon.

Offline Ride

  • Jr. Member
  • **
  • Posts: 185
  • Gender: Male
    • Southern California Snowboarding Forum
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #47 on: September 06, 2005, 03:30:30 PM »
I like the ability for users to place them pin.  That way it's up to them how accurate they want to be with where they live.  I know for a fact it is possible to dynamically load the info but have no idea how.

Offline vdubbia

  • Jr. Member
  • **
  • Posts: 145
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #48 on: September 06, 2005, 09:57:43 PM »
a different app, but check out www.clustrmaps.com to see how they address multiple 'pins' in close proximity.

You can see it in action on my blog: www.vertiblog.com in the upper right hand corner.

Google maps is the way to go, though, and I think to represent every user might in fact be overkill unless you can limit it to the state/province/local level.  Maybe have a different color pin to represent density?

They do create a static image and update it for retrieval daily.
« Last Edit: September 06, 2005, 10:02:18 PM by wowzer »

Offline vdubbia

  • Jr. Member
  • **
  • Posts: 145
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #49 on: September 06, 2005, 10:01:43 PM »
I like the ability for users to place them pin.  That way it's up to them how accurate they want to be with where they live.  I know for a fact it is possible to dynamically load the info but have no idea how.

But then you'd have people wishing they were in Hawaii or Jamaica and posting pins where they don't really belong. 

Offline Gobalopper

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,132
  • Gender: Male
  • I Like Dirt
    • FED2k
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #50 on: September 06, 2005, 10:14:58 PM »
TLM one thing you could do to reduce the javascript size is assign things like this to variables:
Code: [Select]
                    icon.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png";
                    icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";

They are just strings and repeated all over the place.

The best way to limit the number of pins shown may be to show an "area" of pins. So for example store the co-ordinates of Japan and have a dropdown that users select to just see the pins from that area.

For the world view instead of showing each pin do it by density marked out by grids. That would help load times.

Or just show less data about the user... or if its possible use the same technology Google Maps uses to dynamically load the user details into the bubble.

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #51 on: September 06, 2005, 10:32:40 PM »
TLM one thing you could do to reduce the javascript size is assign things like this to variables:
Code: [Select]
                    icon.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png";
                    icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";

They are just strings and repeated all over the place.
You know I started down that path but I dunno why I did not finish that up...  I have like it is for gender purposes but could easily change that some and it would be much better..

*edit* Think I got it a bit more simplified but one of my testers says it does not load now in IE so time to chase that down... */edit

The best way to limit the number of pins shown may be to show an "area" of pins. So for example store the co-ordinates of Japan and have a dropdown that users select to just see the pins from that area.

For the world view instead of showing each pin do it by density marked out by grids. That would help load times.

Or just show less data about the user... or if its possible use the same technology Google Maps uses to dynamically load the user details into the bubble.
Well on my site that is certainly possible seeing how for part of the site is using a continent as to help trim a list of xfire names, maybe I could use same thing to help control the pins like your saying.

I was just looking thru the api some more and looked at where the google code apparently can phrase a xml file of lat/long cord.  Only question I have is if it supports data as well.
« Last Edit: September 06, 2005, 10:50:34 PM by TLM »

Offline Ride

  • Jr. Member
  • **
  • Posts: 185
  • Gender: Male
    • Southern California Snowboarding Forum
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #52 on: September 06, 2005, 10:58:29 PM »
I like the ability for users to place them pin.  That way it's up to them how accurate they want to be with where they live.  I know for a fact it is possible to dynamically load the info but have no idea how.

But then you'd have people wishing they were in Hawaii or Jamaica and posting pins where they don't really belong. 

They could do the same thing with zip code.  I see your point though.

Offline vdubbia

  • Jr. Member
  • **
  • Posts: 145
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #53 on: September 06, 2005, 11:40:15 PM »
I like the ability for users to place them pin.  That way it's up to them how accurate they want to be with where they live.  I know for a fact it is possible to dynamically load the info but have no idea how.

But then you'd have people wishing they were in Hawaii or Jamaica and posting pins where they don't really belong. 

They could do the same thing with zip code.  I see your point though.

Actually you're right.  How about the pins resolving by IP?

Offline Ride

  • Jr. Member
  • **
  • Posts: 185
  • Gender: Male
    • Southern California Snowboarding Forum
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #54 on: September 07, 2005, 12:01:09 AM »
I like the ability for users to place them pin.  That way it's up to them how accurate they want to be with where they live.  I know for a fact it is possible to dynamically load the info but have no idea how.

But then you'd have people wishing they were in Hawaii or Jamaica and posting pins where they don't really belong. 

They could do the same thing with zip code.  I see your point though.

Actually you're right.  How about the pins resolving by IP?


I think we are getting off track here.  Let's get the core of the code working first.  Resolving by IP is very general and usually not very acurate.

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #55 on: September 09, 2005, 04:05:43 PM »
Well on my test server I am playing with loading the pins via XML now.  The live site I have been giving you guys still has old way.  I am running into same limitations with XML, so many then browser lockup.

So right now I would say its functional for a test on other than my site.  Unfortantly I stink at making a mod package, anyone of us want to do that for me?

(This version wont be release but instead tested by us that have posted in this thread already)
« Last Edit: September 09, 2005, 04:08:50 PM by TLM »

Offline Ride

  • Jr. Member
  • **
  • Posts: 185
  • Gender: Male
    • Southern California Snowboarding Forum
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #56 on: September 09, 2005, 04:43:42 PM »
Well on my test server I am playing with loading the pins via XML now.  The live site I have been giving you guys still has old way.  I am running into same limitations with XML, so many then browser lockup.

So right now I would say its functional for a test on other than my site.  Unfortantly I stink at making a mod package, anyone of us want to do that for me?

(This version wont be release but instead tested by us that have posted in this thread already)

If you want to send me the files that have been modified this is something I can do.  I'd like to test it out too.  I have 3 different testing servers all with different configurations.  You can email me at ride[at]fracturedmedia.com

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #57 on: September 10, 2005, 02:54:36 PM »
May have an idea for kind of a fake stream of data.  Currently looking at the API documentation, it appears I could get the bounds of whats being viewed.  With that, I could use the xml method of data, produced by a php script with a "limitation window".  Where js would query the script with the bounds to query from the db, and hard cap at say 500 pins max viewable.  Of course the pins would probally be a random choosing from the whole.  If it is indeed possible which I think it is, the only thing left would be geocoding for those to layze to go place there pins, and from what it sounds like you guys already have that done.

Sorry Ride, got carryed away in Guild Wars since last post till now, and well....

* TLM wanders back to the code, to see if the idea can be done.

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #58 on: September 10, 2005, 03:07:43 PM »
I have attached my UK SQL data for postcode/long/lat lookups :)

I havent done anything with the USA  side of things  - so dont have zipcode - But I think Ride might have ?

Hope that helps,

Tony
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Looking for help to integrate GOOGLE MAPS+SMF
« Reply #59 on: September 10, 2005, 05:49:05 PM »
Well it certanly looks possible, managed to figure out how the code returns its bounds and I have come up with a small little table or so of how the reloading of data should go.  Want a little input on that from you guys...

ZoomIf zoom changeDescription
17UhhThe entire world multiple times...
16Random Pins up to 250(?)/Base/StartThe entire world
15Use from previous levelThe entire world minus a little bit
14Reload to within bounds, 250(?)A continent at best.
13Use from previous level, unless change greatA bit closer to the continent
12Reload to +10 of bounds, 250(?)A large section of the area
11Use from previous levelA section of the area
10Relaod to +5 of bounds, 250(?)State size
9Use from previous levelSection of state size
8Reload to +2 of bounds, 250(?)Larger than a city
7Use from previous levelA city
6Use from previous levelMajor roads in a city
5Use from previous levelStart to see indivdual streets
4Use from previous levelCan ident indivdual streets
3Use from previous levelCan ident indivdual streets
2Use from previous levelCan ident indivdual streets
1Use from previous levelCan ident indivdual streets
0Use from previous levelCount the cars...

Rough refrencing is provide below, starting at 16...
http://maps.google.com/maps?q=Detroit&spn=167.668829,562.429688&hl=en
Its not a great refrence due if you are using a high resolution.  I really produced table on my site but that code will change before people read it.
« Last Edit: September 10, 2005, 05:55:06 PM by TLM »