You are here

function leaflet_widget_geojson_feature_collection in Leaflet Widget for Geofield 7

Same name and namespace in other branches
  1. 7.2 leaflet_widget.module \leaflet_widget_geojson_feature_collection()
1 call to leaflet_widget_geojson_feature_collection()
leaflet_widget_widget_prepare_items in ./leaflet_widget.module

File

./leaflet_widget.module, line 246

Code

function leaflet_widget_geojson_feature_collection($features, $properties = array()) {
  if (!is_array($features)) {
    $features = array(
      $features,
    );
  }
  return array(
    'type' => 'FeatureCollection',
    'features' => $features,
  );
}