hi YII …i have a MySQL database that contains latitude and longitude, how do I call these coordinates to be displayed in the map ?
CREATE TABLE places
(
id
INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
name
VARCHAR( 60 ) NOT NULL ,
address
VARCHAR( 80 ) NOT NULL ,
lat
FLOAT( 10, 6 ) NOT NULL ,
lng
FLOAT( 10, 6 ) NOT NULL
)
this is my DB table
i need show this using MAp
how do this
now i refer this link
https://developers.google.com/maps/articles/phpsqlsearch_v3
have any extention like this…

I like the egmap extension for mapping in Yii: http://www.yiiframew…xtension/egmap/
Assuming your database table "places" has a model associated with it you could get the latitude and longitude like this:
$place = Place::model()->find('id=:placeId', array(':placeId'=>$placeId));
echo "Place: " . $place->name . "<br>";
echo "Latitude: " . $place->lat . "<br>";
echo "Longitude: " . $place->lng . "<hr>;
With that working you can install the egmap extension and follow the instructions from the link above to get started on your map.
thank mr ben i try this code
$Criteria = new CDbCriteria();
$Criteria -> select = sprintf("*,( 3959 * acos( cos( radians(%s) ) * cos( radians( latitute ) ) * cos( radians( longtute ) - radians(%s) ) + sin( radians(%s) ) * sin( radians( latitute ) ) ) ) AS distance",$_GET['lat'],$_GET['lng'],$_GET['lat']);
$Criteria -> order = 'distance';
$Criteria -> having =sprintf("distance <=%s",$_GET['range']);
$models = Places::model()->findAll($Criteria);
it working thank for your kind help