Google Maps APIs are great, but you need to have longitude/latitude data of locations that you want to display. That’s the problem for me and for many others. Well in order to fix that I created what I call Phoogle Maps. Phoogle (pronounced like foogle) Maps is a PHP class that uses the nusoap libraries [...]
Google Maps APIs are great, but you need to have longitude/latitude data of locations that you want to display. That’s the problem for me and for many others. Well in order to fix that I created what I call Phoogle Maps.
Phoogle (pronounced like foogle) Maps is a PHP class that uses the nusoap libraries to connect to the geocoder.us service to create an array that can be passed to the Google Maps API. What does this mean? It’s a PHP script that can map whatever address you pass it. The address can be from a database or hardcoded.
update Nov 21: VERSION 2.0 RELEASED. VISIT www.systemsevendesigns.com/phoogle/ FOR ALL THE INFO
About the class
–For more information about the project, go to http://www.systemsevendesigns.com/phoogle/–
The class is very easy to use it requires that you have the nusoap libraries (which is just a simple php file that I’ll link to in a moment) and PHP running on your server. (Note: This has been developed on PHP 4.3, if someone wants to check it out on version 5.0 and give me some feedback that would be great.) You’ll also need a so that you can pass data to the Google Maps API server.
Once you include the class file you can display a customized map in less than 10 lines of code. I’m offically calling this release a Beta release. On my final release I plan on having error checking, more custimization of the actual map, customization of what’s displayed in the info window on the map, generation of multiple points on a map, and the ability to just return an array of Geodata.
How to Use the Class
1. You’ll need these files: phoogle maps (note: I take no credit for nusoap.php it is an open source project)
2. phoogle.php and nusoap.php need to be in the same directory
3. Open template.php and change the following lines:
- Line 3: Change the include path for the Phoogle Class
- Line 9: key=12345 –change 12345 to your Google Maps API Key
- Line 17: change the $myAddress variable to your data. (This can be static or from a database)
I’ll provide as much source as I can for these files. If you notice any bugs or would like to suggest improvements, please post in the comments or email me directly.
Enjoy.
Update: July 11 2005, 9:15 AM
Special thanks to for linking to this blog post. Thanks guys! You rock.
7 Responses
Whre can I find out more information about this topic?
http://www.katesoriginals.com
katesoriginals.com
Kate, you can find more information about Phoogle maps at http://www.systemsevendesigns.com/phoogle
Would you be interested in turning this into a phpbb mod (or allowing someone else to use this class as a base for a mod)? I am using a very rough Google map mod (based on the ver 1 API) on my forum now, and don’t like it very much – and no-one seems to be developing a new one.
Ya a phpbb mod would be excellent. There isn’t a fully developed one yet and its badly needed. Would get you an awful lot of exposure to be honest.
I’d be willing to make a donation
Later
Mark
http://www.photographyireland.net
Thanks for Phoogle!
My problem is that I am using it inside of a SPRY/AJAX snippet that divides the page into 5 panels of which I’d like the Google maps to be in one container – not just under the header. (I’ve also got a Smarty template running, but that’s another story and I seem to have that part figured out.) In an effort to contain the google maps window I have assigned the $map->showMap(); to a variable and placed that variable inside my AJAX container (no good) and cut/pasted the window.onload = showmap; line into the divisional AJAX container as well (still no good). I’ve searched and found no info on this subject. I was wanting to keep your Phoogle program together since it has so much to offer with regards to changing the map options and to plug in mySQL results. Is there something simple I’m missing here? (It feels like it, but the hours are a wasting – it’s almost time to cut and run). Any help would be greatly appreciated!
Thanks again
Hello I would be in huge debt to anyone who may be able to e-mail me and help me with my situation. I am a stupid person when it comes to almost anything computer related, however I am a sales rep and would love a way to plug multiple addresses in to some kind of program and be able to find the most advantageous rout to take for around 15 stops. I’m sorry I’m just stumped and can not find anything without a high price tag.