Jump to content

Google Map On Gc Profile - Howto


lakeuk

Recommended Posts

I've been asked to post how you go about adding a google map with your last cache finds marked on your gc.com profile page like the one I've got, so here goes :-

 

I'll cover how to use the code I wrote for your own markers.

 

What do I need :-

 

Details of your caches, minimum lon/lat location requeried

Webspace (I've used googlepages) to host the following files:-

http://david.j.whitehead.googlepages.com/myfinds_gp.htm

http://david.j.whitehead.googlepages.com/myfinds.xml

http://david.j.whitehead.googlepages.com/mm_20_shadow.png

http://david.j.whitehead.googlepages.com/mm_20_yellow.gif

http://david.j.whitehead.googlepages.com/mm_20_green.gif

 

1- Download/grab the files above

 

2- On your local drive open myfinds_gp.htm in IE6 or Firefox, if you can see a google map with markers then you're half way there

 

3- In myfinds_gp.htm on line 40 change the latitude, longitude and zoom level so the google map best centres on your cache finds - test in browser

 

map.setCenter(new GLatLng(54.13, -2.76947), 9);

map.setCenter(new GLatLng(lat, lon), zoom);

 

4- Open myfinds.xml in a text editor and edit for your own cache finds, minimum that needs to be entered is lat/lon, but try to fill in a much as possible, recommend you keep it to no more than 20 markers - IE plots the markers slower than Firefox. If you've done 3 + 4 ok then in the browser you should now be able to see your markers on a google map

 

<marker dd='19' mm='03' yyyy='2006' waypoint='GCTJAB' lat='54.2354' lon='-2.708133' found='Y'><![CDATA[Motorway Mayhem M6 J36 - South Lakes TB Gateway]]></marker>

 

5- Have details of the website your going to host your map at to hand and goto http://www.google.com/apis/maps/signup.html to obtain a free API Key,

On the sign up screen enter the web address where you're going to host your map, so if your address will be http://myaddress.net/myfinds_gp.htm then enter http://myaddress.net/

 

click the generate key button and you'll be presented with a key with similar length to the following :-

 

ABQIAAAAI20vOK0RHCX94CysBlR4PxRKaPlfiN9YbH421Gw7KodG2Vuk1hSXvvVKz4-n0AAS8gir_VC-5k03FA

 

in myfinds_gp.htm replace

http://maps.google.com/maps?file=api&v=2&k...dBYRbVZI-ieHa4g

with the key you obtained

http://maps.google.com/maps?file=api&v=2&key=YOUR_API_KEY

 

6- In myfinds_gp.htm replace all the

http://david.j.whitehead.googlepages.com/

with your website address

ie http://myaddress.net/

 

7- Upload the following local files to your website ie http://myaddress.net/

myfinds_gp.htm

myfinds.xml

mm_20_shadow.png

mm_20_yellow.gif

mm_20_green.gif

 

Launch http://myaddress.net/myfinds_gp.htm in your browser, if you can see your markers then your 95% there

 

8- On your GC.com profile page make sure 'My profile details are written in HTML format' is ticked and paste the following in the Latest News section

 

<iframe src="http://my_web_address_here/myfinds_gp.htm" width="750" height="600"></iframe>

 

Click 'Update Account' and you should now be finished

 

If you make any improvements/additions to your maps then please post links to your myfinds_gp.htm page so others can see what you've done

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...