Join our Community      Check your private messages       Profile       Search       FAQ       Memberlist       Log in

Anyone worked with the Google Maps API ?

 
Post new topic   Reply to topic    NetHosted Community Index -> Web Design
ukcobra Reply with quote
 www.mocgb.net

 

 Joined: 02 Apr 2005
 Posts: 178
 Location: Reading

PostPosted: Sat Jul 07, 2007 10:32 pm    Post subject: Anyone worked with the Google Maps API ?
 
I am finally getting round to trying to plot where our club members are located.

I have the Post Codes, but cannot immediately find how to plot them automatically.

http://www.mocgb.net/mocgb-googlemap2.htm 

I need to do some more research, but was hoping someone here may have already solved the problem for me :-)

Mark
Back to top
View user's profile Send private message Visit poster's website
welcome2 Reply with quote
 NetHosted Customer

 

 Joined: 05 Jun 2005
 Posts: 120
 Location: sandwell

PostPosted: Sun Jul 08, 2007 12:24 pm    Post subject:
 
I had a play with it a couple of years ago, but with 37 points on the map, I got complaints about how slow it was.
I didn't use postcodes, though.
The gadget that plots the points requires lat and long, but there is apparently a function to get these from an address.

I've dug the relevant files out, and put them in wwwDOTnabd.co.uk/googlemap
replist.js contains the info for each point
mapping.js contains the code

I eventually went for a solution creating a map (jpg) on the fly in php - much faster, and zooms enough for it's purpose www.nabd.org.uk/contact/showreps.html 

_________________
Jim
Back to top
View user's profile Send private message Visit poster's website
ukcobra Reply with quote
 www.mocgb.net

 

 Joined: 02 Apr 2005
 Posts: 178
 Location: Reading

PostPosted: Sun Jul 08, 2007 1:27 pm    Post subject:
 
Hi Jim,

Thanks for that, this looks just like the thing I'd like to expand upon.

I have taken a copy of the code, if I can get it working with my data, I'll make sure I leave the copyright/credit in.

Mark
Back to top
View user's profile Send private message Visit poster's website
ukcobra Reply with quote
 www.mocgb.net

 

 Joined: 02 Apr 2005
 Posts: 178
 Location: Reading

PostPosted: Mon Jul 09, 2007 7:54 am    Post subject:
 
It's done, after 8 hours of researching, and debugging.

www.mocgb.net/google_maps_rev1.php 

Before I release this to the masses, I thought I'd post here, as I am a little concerned about performance, I do not want to cause problems on the server.

I ran it a few times last night, and it was OK a few times and very slow at others. This could have been my Virgin Media cable line though.

Mark
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5625
 

PostPosted: Mon Jul 09, 2007 9:47 am    Post subject:
 
First load was quite slow, but when the map appeared I could see why! I'm not sure you can expect much better performance with that amount of detail. It's also browser dependent: it was relatively snappy in Opera and especially Webkit, but quite slow in Gecko. Clicking on a flag produced an empty white box in all cases, not sure if that's what you were wanting?

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
ukcobra Reply with quote
 www.mocgb.net

 

 Joined: 02 Apr 2005
 Posts: 178
 Location: Reading

PostPosted: Mon Jul 09, 2007 10:22 am    Post subject:
 
I was expecting worse performance, and it is not bad considering it has 1200+ points.

The white boxes were designed for future details, but I'm having some feedback from members that they do not want this function, so I need to comment the code out

I was more interested to see if it was having a server impact, as I suspect initially many people will run it, then in time, it will hardly get run.

Mark
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5625
 

PostPosted: Mon Jul 09, 2007 10:24 am    Post subject:
 
As far as I understand it all the processing is done by the users browser and Google so there shouldn't be any major server impact

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
welcome2 Reply with quote
 NetHosted Customer

 

 Joined: 05 Jun 2005
 Posts: 120
 Location: sandwell

PostPosted: Mon Jul 09, 2007 1:56 pm    Post subject:
 
As Andrew says, once the (190+k) page has downloaded, there's just a couple of hits on the Google server, then wait while javascript does it's thing.

Looking at it on a win2k system, FF took around 30 seconds to display (CPU at 100%).
IE6 sent my CPU to 100% for 1 1/2 minutes, and gave a blank page. Hitting refresh took 1 1/2 minutes again, but did show the map.

Re the white boxes, I did find text in a few of them, but most were blank.

_________________
Jim
Back to top
View user's profile Send private message Visit poster's website
UserFriendly Reply with quote
 NetHosted Customer

 

 Joined: 05 May 2005
 Posts: 147
 

PostPosted: Mon Jul 09, 2007 3:02 pm    Post subject:
 
Windows XP SP2 here. It made Firefox hang for around 10 seconds each time it was loaded... a little less with IE7 & Safari. Once up and running it's slow but usable.
Back to top
View user's profile Send private message Visit poster's website
Post new topic   Reply to topic    NetHosted Community Index -> Web Design
Page 1 of 1

User Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

 
Jump to: