---
title: "(ES) checkValidFeatureCollection()"
canonical: "https://onesaitplatform-es.refined.site/space/DOC/2216692579/(ES)%20checkValidFeatureCollection()"
format: markdown
---
> ℹ️ **Información**
> ℹ️ 
> ℹ️ Versión de implementación: beta 1.07

# Descripción

Comprueba si el objeto con la colección de entidades para puntos, líneas, polígonos y mapas de calor es correcta.

# Invocación

```javascript
checkValidFeatureCollection(
	data
)
```

# Parámetros de entrada

## data

Parámetro con el objecto de colección de entidades.

# Ejemplos de uso

Comprobar la validez de una variable con JSON llamado "datosEspaciales":

```javascript
checkValidFeatureCollection(
	datosEspaciales
)
```

Comprobar la validez de un objecto JSON:

```javascript
checkValidFeatureCollection(
	{
	type: 'FeatureCollection',
	name: 'points single',
	features: [
		{
			type: 'Feature',
			properties: {
				billboardDefault: 'img/icon_cctv_gray.svg',
				billboardSelected: 'img/icon_cctv_color.svg',
				billboardScale: 0.8,
				buildingName: 'Library',
				deviceTypeId: 'Salto',
				deviceTypeName: 'Door',
				floor: 0,
				id: 'CAET_005',
				name: 'CAET_005',
				weight: 1
			},
			geometry: {
				type: 'Point',
				coordinates: [-15.4351, 28.1195]
			}
		},
		{
			type: 'Feature',
			properties: {
				billboardDefault: 'img/icon_cctv_gray.svg',
				billboardSelected: 'img/icon_cctv_color.svg',
				billboardScale: 0.8,
				buildingName: 'Park',
				deviceTypeId: 'Salto',
				deviceTypeName: 'Door',
				floor: 1,
				id: 'CAET_001',
				name: 'CAET_001',
				weight: 5
			},
			geometry: {
				type: 'Point',
				coordinates: [-15.3767, 28.4755]
			}
		},
		{
			type: 'Feature',
			properties: {
				billboardDefault: 'img/icon_cctv_gray.svg',
				billboardSelected: 'img/icon_cctv_color.svg',
				billboardScale: 0.6,
				weight: 1
			},
			geometry: {
				type: 'Point',
				coordinates: [-15.3767, 28.4747]
			}
		},
		{
			type: 'Feature',
			properties: {
				billboardDefault: 'img/icon_cctv_gray.svg',
				billboardSelected: 'img/icon_cctv_color.svg',
				billboardScale: 0.8,
				buildingName: 'Supermarket',
				deviceTypeId: 'Jump',
				deviceTypeName: 'Camera',
				floor: 2,
				id: 'CAET_011',
				name: 'CAET_011',
				weight: 10
			},
			geometry: {
				type: 'Point',
				coordinates: [-15.3770, 28.4755]
			}
		}
	]
	}
)
```