Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > Community > The Café

Reply
 
LinkBack Thread Tools
Old December 16th, 2006, 10:07 AM   #1
New Member
 

Join Date: Oct 2006
Location: UK
Age: 24
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 blizeH is on a distinguished road
Using Google Maps?

Hi guys!

First of all I apologise if this is in the wrong category, I really wasn't sure where to put it!

I'd love to put a Google map onto my site in this way;



Basically with a few controls, showing the exact location and a bit of information about the page. Or if that's not possible, even just showing the exact location with that 'A' button type thing.

I've tried implementing the map onto the site but it's just showing the address in some very wierd way, and also showing an area in Spain and I've no idea how to change it.

Any advice or ideas please?

Many thanks!
blizeH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 16th, 2006, 10:23 AM   #2
Most Reputable Member
 
spinal007's Avatar
 

Join Date: Mar 2004
Location: Good Ol'London
Age: 24
Posts: 1,684
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Rep Altering Power: 0 spinal007 has a spectacular aura about spinal007 has a spectacular aura about
Re: Using Google Maps?

See this:
http://www.pinesandneedles.com/Chris...ristmas-Trees/
http://www.pinesandneedles.com/Chris...ristmas-Trees/

You can copy the HTML and Javascript used to generate the map....

To get the coordinates to your map, find the point using the Google Maps website, click on 'Link to this page' then get the latitude and longitude coordinates from the url...
__________________
Diego - Web-Developer & London SEO Expert
jQuery Plugins: Multiple File Upload, Star Rating, FCKEditor | NEW: XML to JSON
spinal007 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 16th, 2006, 10:48 AM   #3
New Member
 

Join Date: Oct 2006
Location: UK
Age: 24
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 blizeH is on a distinguished road
Re: Using Google Maps?

Huge thanks for the code! That's perfect; exactly what I'm after!

Having a bit of trouble implementing it though; http://www.thebelfryhotel.co.uk/

Any ideas what I've done wrong please? Also, what is the code with lots of percentage signs? i.e. "%72%6F%6E%"

Thanks again!
blizeH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 16th, 2006, 07:05 PM   #4
Elite Veteran
 
Ryan Fait's Avatar
 

Join Date: May 2006
Location: Las Vegas
Posts: 3,784
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough
Re: Using Google Maps?

The site looks good, spinal. You have really weird zip codes, though.
Ryan Fait is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 17th, 2006, 11:22 AM   #5
New Member
 

Join Date: Oct 2006
Location: UK
Age: 24
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 blizeH is on a distinguished road
Re: Using Google Maps?

^
blizeH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 17th, 2006, 05:10 PM   #6
New Member
 

Join Date: Oct 2006
Location: UK
Age: 24
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 blizeH is on a distinguished road
Re: Using Google Maps?

Sorry to bump this yet again, but if you get a chance to have a quick look that'd be great, thanks!
blizeH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 18th, 2006, 07:57 AM   #7
Most Reputable Member
 
spinal007's Avatar
 

Join Date: Mar 2004
Location: Good Ol'London
Age: 24
Posts: 1,684
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Rep Altering Power: 0 spinal007 has a spectacular aura about spinal007 has a spectacular aura about
Re: Using Google Maps?

fwxAttachEvent(window, "load", function(){ ... });
...is my own script for attaching window events.

You should just use...
window.onload = function(){ ... };

These....
%72%6F%6E
...are encoded HTML.

The site is run by a CMS and the user might end up putting > < ' " in the text used in the label. I encode it so to avoid runtime errors and undefined strings...

Remember to load the google map script...
<script src="http://maps.google.com/maps?file=api&v=2&key=YOUR_KEY_GOES_HERE&" type="text/javascript"></script>

Then all you need is something like...
window.onload = function(){
var GoogleMap1 = new GMap2(document.getElementById("GoogleMap1"));
GoogleMap1.addControl(new GSmallMapControl());
GoogleMap1.addControl(new GMapTypeControl());
GoogleMap1.setCenter(new GLatLng(51.526, -0.191), 15);
var GoogleMap1point = new GLatLng(51.819247, -2.480292);
var GoogleMap1marker = new GMarker(GoogleMap1point, 1);
GoogleMap1.addOverlay(GoogleMap1marker);
GoogleMap1marker.openInfoWindowHtml("Hello world!");
};
__________________
Diego - Web-Developer & London SEO Expert
jQuery Plugins: Multiple File Upload, Star Rating, FCKEditor | NEW: XML to JSON

Last edited by spinal007; December 18th, 2006 at 08:02 AM..
spinal007 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 18th, 2006, 08:04 AM   #8
Most Reputable Member
 
spinal007's Avatar
 

Join Date: Mar 2004
Location: Good Ol'London
Age: 24
Posts: 1,684
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Rep Altering Power: 0 spinal007 has a spectacular aura about spinal007 has a spectacular aura about
Re: Using Google Maps?

Quote:
Originally Posted by ryanfait View Post
The site looks good, spinal. You have really weird zip codes, though.
LOL, Thanks Ryan...

I think London postcodes are great...
W# for west London
N# for North London
S# for South London
and so on....

Never mind the rest of the UK though...
__________________
Diego - Web-Developer & London SEO Expert
jQuery Plugins: Multiple File Upload, Star Rating, FCKEditor | NEW: XML to JSON
spinal007 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 18th, 2006, 08:19 AM   #9
Elite Veteran
 
Ryan Fait's Avatar
 

Join Date: May 2006
Location: Las Vegas
Posts: 3,784
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough
Re: Using Google Maps?

That's cool. We just have five boring numbers. And sometimes you can use a hyphen and add four more if you feel like it. Go figure.
Ryan Fait is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 18th, 2006, 08:41 AM   #10
New Member
 

Join Date: Oct 2006
Location: UK
Age: 24
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 blizeH is on a distinguished road
Re: Using Google Maps?

Huge thanks again for the info and code, I've updated it accordingly (I think I've done it right?) and it's still not showing for some reason

Iv'e obviously gone wrong somewhere, but can't see any errors, hmm!
blizeH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 19th, 2006, 10:30 AM   #11
Most Reputable Member
 
spinal007's Avatar
 

Join Date: Mar 2004
Location: Good Ol'London
Age: 24
Posts: 1,684
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Rep Altering Power: 0 spinal007 has a spectacular aura about spinal007 has a spectacular aura about
Re: Using Google Maps?

This is the problem...
<body onload="load()" onunload="GUnload()">
...causes an error when the page loads and JS execution stops
Just use '<body>'

##############

Wrong element IDs:
var GoogleMap1 = new GMap2(document.getElementById("GoogleMap1"));
<div id="map" style="width: 500px; height: 300px"></div>
__________________
Diego - Web-Developer & London SEO Expert
jQuery Plugins: Multiple File Upload, Star Rating, FCKEditor | NEW: XML to JSON
spinal007 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 20th, 2006, 07:39 PM   #12
New Member
 

Join Date: Oct 2006
Location: UK
Age: 24
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 blizeH is on a distinguished road
Re: Using Google Maps?

What a star!

Thank you so much!
blizeH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 21st, 2006, 11:30 AM   #13
Most Reputable Member
 
spinal007's Avatar
 

Join Date: Mar 2004
Location: Good Ol'London
Age: 24
Posts: 1,684
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Rep Altering Power: 0 spinal007 has a spectacular aura about spinal007 has a spectacular aura about
Re: Using Google Maps?

No worries
Looking good by the way!
__________________
Diego - Web-Developer & London SEO Expert
jQuery Plugins: Multiple File Upload, Star Rating, FCKEditor | NEW: XML to JSON
spinal007 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
google , maps


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
google maps pas2gether .NET 4 October 27th, 2007 02:41 AM
Google Maps Question uqwebdesign HTML, XHTML and CSS 2 May 14th, 2007 12:53 PM
lmao at google maps! bruno89 The Café 12 April 18th, 2007 07:08 AM
Google Maps Question uqwebdesign HTML, XHTML and CSS 2 February 17th, 2007 04:02 AM
Google Maps... craig The Café 1 November 27th, 2006 12:37 PM


Search Engine Optimization by vBSEO 3.2.0 RC8