I have attached here the class and a test file so you can see how it works.
I plan to develop this class in the future that’s why it requires a Google Maps API key.
I plan to develop this class in the future that’s why it requires a Google Maps API key.
Here is the test file for it, just to make an impression on how it looks like :
PHP
- <?php
- //include our class
- //your Google Maps API key (you can get one for free from http://code.google.com/apis/maps/signup.html)
- $apiKey = ‘API_KEY_HERE’;
- //init our object
- $obj = new googleHelper($apiKey);
- //get coordinates and print the debug info
- $address = ‘Danmark, Sjælland, Hørve, Dragsholm Alle 4534′;
- print ‘<pre>’;
- ?>