PHP GoogleMapAPI 2.2 review
Download
|
|
GoogleMapAPI is a library used for creating google maps using the Google Map public API.
Here are some key features of "PHP GoogleMapAPI":
auto-geocode lookups
geocode caching
map directions
adding markers and polylines by address or geocoordinates
sidebar generation
...and many more.
SYNOPSIS:
< ?php
require('GoogleMapAPI.class.php');
$map = new GoogleMapAPI();
// setup database for geocode caching
$map->setDSN('mysql://USER:PASS@localhost/GEOCODES');
// enter YOUR Google Map Key
$map->setAPIKey('YOURGOOGLEMAPKEY');
// create some map markers
$map->addMarkerByAddress('621 N 48th St # 6 Lincoln NE 68502','PJ Pizza','< b>PJ Pizza< /b>');
$map->addMarkerByAddress('826 P St Lincoln NE 68502','Old Chicago','< b>Old Chicago< /b>');
$map->addMarkerByAddress('3457 Holdrege St Lincoln NE 68502',"Valentino's","< b>Valentino's< /b>");
?>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
< html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" >
< head>
< ?php $map->printHeaderJS(); ?>
< ?php $map->printMapJS(); ?>
< /head>
< body onload="onLoad()">
< table border=1>
< tr>< td>
< ?php $map->printMap(); ?>
< /td>< td>
< ?php $map->printSidebar(); ?>
< /td>< /tr>
< /table>
< /body>
< /html >
What's New in This Release:
The Google geo lookup has been updated to use the official Google geocode API.
geoGetDistance() has been added for looking up the distance between two coordinates using the great circle distance formula.
PHP GoogleMapAPI 2.2 search tags