Draw circle overlay in all points in gmap from Radius in a CCK field | Dynamic gmap Macro in Views

· konordo
Lately I needed to add a circle in every marker in a gmap provided by Views. So in order to achieve this, I filled in the Macro textarea of the Style:Gmap settings of the View with the following code. But first, I added the field that contains the Radius value and excluded it from Display, to make the value available in the view result set. This value was in miles, so I made the conversion from km as well. result as $result) { $lat = $result->gmap_lat ; $lon = $result->gmap_lon; $radius = $result->the_cck_field_holding_the radius; $radius = $radius*0.621371192; array_push($circles, "circle=".$lat." ,".$lon." + ".$radius); } print "[gmap ".implode('|', $circles)."]"; ?> However, for this to work, I needed to change the input format of this textarea in order to accept PHP, by editing the gmap.module file. So according to http://drupal.org/node/954384 : I needed to change into