Multiple address google map???

Hi guys,

       thanx in advance

I m using php5.0 , yii6.0

For google map multiple location we are using multiplot extension but locations are not comimg in our map??

Steps are as follows

1-We have table tbl_address( id int autoincrement PRIMARY KEY,

                                               	  region_id int,


                                                       advertiser_id,


                                                       address varchar(500),


                                                        city  varchar(100),


                                                         postcode varchar(100)


                                                        )

One advertiser can have multiple addresses

In a view file we tried as given in tutorial http://pastebin.com/YXZSZyrp

We extracted extension in protected/extension/ folder

Code of our view file is as follows:


 $businessId=13;

		$locations = Address::model()->findAll('advertiser_id=:advertiser_id', array(':advertiser_id'=>$businessId));

		

		/*echo'<pre>';

		print_r($position);

		echo'</pre>';exit;*/

$this->widget('application.extensions.gmapmultiplot.GMapMultiplot', array(

    	'id' => 'gmap',//id of the <div> container created

    	'label' => 'Rohit', //text written in the text bubble

    	'address' =>  $locations,  // We feed the array of 'location' objects to the extension

	));

But in map location is not comig. I have checked data is coming in $location. address(lady,harding college ,New Delhi,India).

Map is showing me all world map

Hi guys ,

Finally i got the solution of google map mutiplot.I have done few mistakes.

1- The table structure supported by extension is

CREATE TABLE tbl_location (id int NOT NULL PRIMARY KEY,address1 varchar(200), address2 varchar(200) , city varchar(200),zip int);

earlier my column names were different.

2- When i grappled more with inside extension i found gmap.js is calling some gmap API function , which returns lat./lang. value corresponding to given address.

these values are returned as string. we need to change them in numerical value by applying "eval()" , function of javascript.

Now for me map is coming correctly .

Thanx to Yii development team specially Antonio for this wonderful extension :stuck_out_tongue: