In the interaction of OPenlayers, we often need to load some data. In this actual combat, the demonstration is to load GeoJSON files.
GeoJSON is a format for encoding geographic data structures using JavaScript Object Notation (JSON). In short, GeoJSON provides you with a simple format to represent simple geographic features along with their non-spatial attributes.
renderings
switzerland.geojson used
{
"type": "FeatureCollection",
"features": [
{
"type":</