| |||||||||||
| |||||||||||
Controlling and labelling Google maps via PHP
"Can you use PHP to control what you show on a Google Map?" An inncocent question that lead me off on an interesting exploration when I should (!) have been doing other things - but a very worthwhile couple of hours, and great fun!
How do you do it? 1. Apply for your Google Maps key (you'll need to set up a Google account first if you don't have one) 2. Load their sample Javascript into the head of your web page, and modify it to relect your scale and location. 3. Add in a <div id="map" ... element to your web page Probably a good idea to test at this point! 4. Add in a form for the controls you want, a handler for form inputs, and modify the Javascript to drop in the contents of PHP variables where necessary. And Bob's your uncle! I have an example in use here. And the source code is here. Is there much else I could do? Absolutely! I've just pushed the door open a crack and I see a blinding light shining out. (written 2007-10-13 00:23:56) Associated topics are indexed under H999 - Additional PHP MaterialH115 - Designing PHP-Based Solutions: Best Practice H309 - PHP - Maps, Graphics and Geographics
Some other Articles
First Alternative / what has happened there?Autumnal lighting on a London trip Ordnance Survey Grid Reference to Latitude / Longitude Converting from postal address to latitude / longitude Controlling and labelling Google maps via PHP Well House Manor - a year on Error logging to file not browser in PHP New software product for warmblooded programmers Delegates of all shapes and sizes An email update for past guests and delegates 1690 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 at 50 posts per pageThis is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price. Link to Ezine home page (for reading). Link to Blogging home page (to add comments). |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||