Yii Framework Forum: Google Map - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Google Map Rate Topic: -----

#1 User is offline   mini_nan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 29-March 13

Posted 29 March 2013 - 06:24 AM

Hi am a student and now i do my final project.but i have problem about google map
i try to do that

this code
<?php
Yii::import('application.extensions.EGMap.*');
$gMap = new EGMap();

$gMap->setWidth(512);
// it can also be called $gMap->height = 400;
$gMap->setHeight(400);
$gMap->zoom = 8;

// some stops on the way
$phuket = new EGMapCoord(8.017076,98.334503);
$phuket_campus = new EGMapCoord(7.894983,98.352098);

// Initialize GMapDirection
$direction = new EGMapDirection($phuket,$phuket_campus);
$renderer = new EGMapDirectionRenderer();
$renderer->panel = "direction_pane";
$renderer->setPolylineOptions(array('strokeColor'=>'#FFAA00'));

$direction->setRenderer($renderer);

$gMap->addDirection($direction);

$gMap->renderMap();
?>
<div id="direction_pane"></div>

this ok but if i don't know longtitude,latitude. is there any way to plot map

thank you
0

#2 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 2,085
  • Joined: 16-February 11
  • Location:Japan

Posted 29 March 2013 - 10:00 AM

/* Moved from "Yii-powered Applications" to "Extensions" */
0

#3 User is offline   mini_nan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 29-March 13

Posted 29 March 2013 - 11:24 PM

i don't understand but i will try
thank you
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users