How I integrated Google Maps into my web site to show my office location

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
newclear

Re: How I integrated Google Maps into my web site to show my office location

Post by newclear »

here is a bit explanation about how i integrate the

I using two user defined tags

First tag holds java script include which should stay in header.

the code is

Code: Select all

/**
* Showing 1 point with Phoogle Maps
* class developed by Justin Johnson <justinjohnson@system7designs.com>
*/

if($_GET[page] == 'map'){
require_once 'plugins/phoogle/phoogle.php';
global $map;
$map = new PhoogleMap();
$map->setAPIKey("ABQIAAAALs5pheQFCZ8HwyJ8gRD_YRSdwRFzTB9UbL5b0H6xdF2yKOjZoRS4HpGIiwRcbmb_YtHxrxFLPfZDvQ");
$map->printGoogleJS(); 
}
next tag holds this code that display the map

Code: Select all

global $map;

$map->addGeoPoint('42.770352', '23.320885', 'Sofia, Bulgaria');
$map->addGeoPoint('43.027741', '25.103416', 'Sevlievo, Bulgaria');
$map->addGeoPoint('42.992343', '25.039215', 'Sennik Bulgaria');
$map->addAddress('Sevlievo, Bulgaria', 'Sevlievo'); 
$map->centerMap('42.992343', '25.039215');
$map->showMap();
i am using addGeoPoint because googlemaps has only satelite map.
You can see the methods in the class and there is an example how to do this with easy.
Post Reply

Return to “Tips and Tricks”