Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
Untitled

Untitled

Ratings: (0)|Views: 3|Likes:
Published by Gcode Labs

More info:

Published by: Gcode Labs on Jun 19, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

06/19/2011

pdf

text

original

 
DOWNLOAD:GoogleMapAPI-2.5.tar.gzANONYMOUS CVS: (leave password empty)cvs -d :pserver:anonymous@cvs.phpinsider.com:/export/CVS logincvs -d :pserver:anonymous@cvs.phpinsider.com:/export/CVS checkout GoogleMapAPINEWS/CHANGES:NEWSDEMO:demoNAME:GoogleMapAPI - A library used for creating google maps.AUTHOR:Monte Ohrt <monte [AT] ohrt [DOT] com>LATEST VERSION:2.5 - Sep 20th, 2007SYNOPSIS:<?phprequire('GoogleMapAPI.class.php');$map = new GoogleMapAPI('map');// 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 NE68502',"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(); ?><!-- necessary for google maps polyline drawing in IE --><style type="text/css">v\:* {behavior:url(#default#VML);
 
}</style></head><body onload="onLoad()"><table border=1><tr><td><?php $map->printMap(); ?></td><td><?php $map->printSidebar(); ?></td></tr></table></body></html>OUTPUT:View the output of the above example here:http://www.phpinsider.com/php/code/GoogleMapAPI/demo/ DESCRIPTION:GoogleMapAPI - A library used for creating google maps using theGoogle Map public API. Features include multiple map markers, customizableicons, map directions built into info window, and sidebar generation. More information on the Google Map API can be found here: http://www.google.com/apis/maps/ DISCUSSION:-----------Discussions are currently held in the Smarty add-on forum (although Smartyis not necessary to use GoogleMapAPI.)http://www.phpinsider.com/smarty-forum/viewforum.php?f=19 BASE CLASS METHODS:-------------------GoogleMapAPI($map_id = 'map', $app_id = 'MyMapApp')--------------------------------------------------- Class Constructor.The map id is needed only if you have multiple maps on the same page.The App ID is used for the Yahoo GeoCode API, if you use Yahoo for lookups.Use a unique App ID per application. Example: // use defaults$map = new GoogleMapAPI();
 
// set custom map id and app id$map = new GoogleMapAPI('mymap','myapp');setDSN($dsn)------------ Used to set the database DSN. The database is used to cachegeocode lookups (highly recommended!) The PEAR::DB moduleis required for database access. You will need to createthe following database schema (mysql example given): CREATE TABLE GEOCODES (address varchar(255) NOT NULL default '',lon float default NULL,lat float default NULL,PRIMARY KEY (address)); Example: $map->setDSN('mysql://DBUSER:DBPASS@DBHOST/DBNAME');$map->setDSN('mysql://geo:foobar@localhost/GEOCODES'); setAPIKey($key)--------------- Sets the Google Map API Key. This is mandatory, you will needan API Key for your hostname! You can register free here: http://www.google.com/apis/maps/signup.htmlExample: // enter YOUR registered API Key$map->setAPIKey('ABQIAAAAxp5FF-A0RhHOnnTBwrlRbx');setWidth($width)---------------- Sets the width of the map window. This can be either px or %.Default is 500px. Example: $map->setWidth('500px');$map->setWidth('100%'); setHeight($height)------------------ Sets the height of the map window. This can be either px or %.Default is '500px'. Example: $map->setHeight('500px');

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->