Features can be added in a number of ways through the interface. To directly add them in the map array, they must go into a specific Vector layer. Example of layer with features:
'feature_example' => array( 'id' => 'feature_example', 'type' => 'Vector', 'name' => t('Default Vector'), 'options' => array(), 'events' => array(), 'features' => array( 'feature_1' => array( 'wkt' => 'POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2, 3 2, 3 3, 2 3,2 2))', 'attributes' => array( 'name' => 'A Polygon with a hole in it', 'date' => 'December 24, 2004', 'author' => 'Santa Claus', ), 'style' => array( 'fillColor' => '#aa4400', 'fillOpacity' => '0.7', ), ), 'feature_2' => array( 'lat' => '40.123', 'lon' => '-20.123', 'attributes' => array( 'name' => 'A point', 'date' => 'December 24, 2004', 'author' => 'Rudolf', ), 'style' => array( 'externalGraphic' => 'http://openlayers.org/dev/img/marker.png', 'graphicWidth' => 21, 'graphicHeight' => 25, 'graphicXOffset' => 10, 'graphicYOffset' => 10, ), ), ), ),
array( 'feature_1' => array( .. ), 'feature_2' => array( .. ), )
array( 'name' => t('A Polygon with a hole in it'), 'author' => t('Santa Claus'), ),
array( 'fillColor' => '#AA4400', 'fillOpacity' => '0.7', ),