码迷,mamicode.com
首页 > Web开发 > 详细

GeoJson

时间:2017-07-27 13:40:49      阅读:301      评论:0      收藏:0      [点我收藏+]

标签:forward   定义   type   using   json格式   popup   base   bsp   poi   

GeoJson格式数据的形式

Using GeoJSON with Leaflet

GeoJSON is becoming a very popular data format among many GIS technologies and services — it‘s simple, lightweight, straightforward, and Leaflet is quite good at handling it. In this example, you‘ll learn how to create and interact with map vectors created from GeoJSON objects.

译:通过Leaflet使用GeoJson。

GeoJSON是一种在GIS工程和服务中变的很流行的数据格式,简单,轻量级,明确,并且Leaflet能很好的处理它。

单个要素数据:

var geojsonFeature = {
"type": "Feature",          //要素类型
"properties": {                //属性
    "name": "Coors Field",
    "amenity": "Baseball Stadium",
    "popupContent": "This is where the Rockies play!"
},
"geometry": {                //要素地理坐标
    "type": "Point", //元素类型
    "coordinates": [-104.99404, 39.75621]  //坐标
}
};

要素集合的定义形式:

var geojsonFeature={
    "type": "FeatureCollection",        //要素集合
    "features": [
        {
            "type": "Feature",        //要素类型
            "id": "6328",
            "properties": {            //属性
                "flag":‘100‘,
                "name": "海西蒙古族藏族自治州",
                "cp": [
                    94.9768,
                    37.1118
                ],
                "childNum": 7
            },
            "geometry": {            //要素地理坐标
                "type": "MultiPolygon",
                "coordinates": [
                    [
                    .........

 

GeoJson

标签:forward   定义   type   using   json格式   popup   base   bsp   poi   

原文地址:http://www.cnblogs.com/tinaluo/p/7244277.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!