Home > Framework > Smarty > How to implement google map in smarty?

How to implement google map in smarty?

Hi friends ,

the following script will discuss for how to implement google map in smarty application.

1) Sign up for API key of googlemap


2) Create a google map class.

Googlemap implementation in smarty - Anil kumar panigrahi

Googlemap implementation in smarty - Anil Labs


3) Create a tpl file, and add below code :


$key="Your API Key";
$gm = & new EasyGoogleMap($key);

$city ="baruva";
$country = "india";
$gm->SetInfoWindowText("This is address .");

$gm->SetInfoWindowText("Anil Labs - https://www.anillabs.com");
echo $gm->GmapsKey();
echo $gm->MapHolder();
echo $gm->InitJs();
echo $gm->GetSideClick();
echo $gm->UnloadMap();

You may also like
How to create WordPress widgets with demo
Understanding the basic need of MVC architecture
Events calendar implementation in oscommerce using php code
How to integrate fckeditor in smarty application?

6 Responses

  1. Ipsita

    I know the Google Translate API and done a small application.
    I need smarty plugin for Google Translate API to change the content of my application into the selected language .
    As like there is plug in for Google Map, Google Analytic ; like that I need Google Translate in smarty.
    Can u please help me

  2. Pingback : Smarty Template Engine using PHP | Indian Hot News

  3. Hi,I am getting error “Fatal error: Uncaught exception ‘SmartyException’ with message ‘{php} is deprecated, set allow_php_tag = true to enable’ ”

    Please help me how to solve this.Thanks!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.