Openlayers实战:加载GeoJSON

在OPenlayers的交互中,经常性的我们要加载一些数据,在这个实战中,演示的是加载GeoJSON文件。
GeoJSON 是一种使用JavaScript 对象表示法(JSON) 对地理数据结构进行编码的格式。简而言之,GeoJSON 为你提供了一种简单的格式来表示简单的地理特征以及它们的非空间属性。

效果图

在这里插入图片描述

所用的switzerland.geojson

{
   
    
    
	"type": "FeatureCollection",
	"features": [
		{
   
    
    
			"type":</

猜你喜欢

转载自blog.csdn.net/cuclife/article/details/131763114