Sunday, October 09, 2005

Google map for website

google map of wray area, still in beta testing stage, please have a look and tell me if it works in your browser, just leave a comment and state which browser you are using. I know it works fine in firefox...Once it is tested we can have it on the wray site and put pins in it for sites of local interest.
Chris

5 Comments:

At 8:26 pm, Blogger chris said...

lots more tips about google mapping and other stuff on http://broadband-uk.coop
the site for all the latest news wifi.

 
At 8:31 pm, Blogger chris said...

good instructions from Phil at CBN forum:

If you wish to use a Google mapping tool in some way on your website there are a number of steps.



First is to get a Gmail (now Googlemail in the UK) account which is necessary in order to get an "API key" for your site. If you need an invite send me a PM or email phil at yarwell.demon.co.uk



Then get an API Key for the domain on which you intend to use the maps, for example an API for http://www.google.com/ would work on any sub-directories of that domain but would not work on http://www.google.net/




To develop and test your maps you need to run them on a live server with the URL as per the API key, otherwise you need two keys and will have to change the key when moving from test to production server. Note that the key is just a humongous text string inserted at the top of the HTML file.



Next you need to know how to FTP HTML files onto your webspace. I strongly recommend that you edit the initial files as plain text (eg with Notepad) and upload them with FTP rather than using any fancy web authoring software or publishing wizards that leave you in the dark about what is actually happening. Make sure you save as type "all files" to prevent .txt being appended to the filename. Don't use Word or another word processor which will mess up the headers and break your map.



If you've got this far, the first thing to try is to copy someone else's work



Go to this example and view the source file using View Source in your browser. Cut and paste the whole source code into a text file, change the API key to your own and save it as yourfilename.html then upload to your server to see if it works so far - if not come back here for help.



The API key is the string between &key= and " type= in the header block of the HTML page. The usual source of trouble is saving the HTML from the browser rather than cutting and pasting, this tends to overwrite the important headers.



To personalise the map find your latitude and longitude with the online tool and try different values of latitude and longitude for the map centre in the statement



map.centerAndZoom(new GPoint(-0.42, 52.57), 4);



you can try different zoom levels by replacing the 4 with a bigger number to zoom out or a smaller one to zoom in.



if you don't like the controls for moving around or for the type of map remove them by editing out one or both of the lines



map.addControl(new GSmallMapControl());

map.addControl(new GMapTypeControl());





That's probably enough for now. If you want to do something specific post here with your ideas / wishlist for future explanations.



Phil

 
At 8:41 pm, Blogger chris said...

Use the wray map if the link in Phils post doesn't work, see original post

 
At 8:47 am, Blogger PhilT said...

Good Luck !

When you've got some points of interest marked up we can have a go at pop-up balloons with further information about each point.

Phil

 
At 9:02 am, Blogger chris said...

That would be great, we could put contact details in the pop up balloons for all the local businesses and opening times etc. Good idea. thanks Phil!

 

Post a Comment

<< Home