博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
leaflet入门(二)GeoJson
阅读量:6968 次
发布时间:2019-06-27

本文共 1404 字,大约阅读时间需要 4 分钟。

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能很好的处理它。在这个例子中,你会学会如何通过GeoJSON对象创建地图矢量并与之交互。

 

单个要素数据:

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": [                    [                    .........

 

转载于:https://www.cnblogs.com/tinaluo/p/7244277.html

你可能感兴趣的文章
冲刺阶段第七天
查看>>
linux下磁盘分区
查看>>
快速获取表的记录数
查看>>
JavaScript_BOM_window
查看>>
Hadoop:The Definitive Guid 总结 Chapter 7 MapReduce的类型与格式
查看>>
WCF 入门之旅(4): 怎样用客户端调用WCF服务
查看>>
oracle12之 多租户容器数据库架构
查看>>
第3章 深入理解盒子模型
查看>>
POJ3061 ZOJ3123 Subsequence【前缀和+二分搜索+尺取法】
查看>>
png库结合zlib库使用出现的一个链接问题的解决
查看>>
对象序列化 输入输出流概念 InputOutStream OutputStream
查看>>
linux shell 基础 使用日志与心得
查看>>
转- prototype
查看>>
Linux下du加强版,灵活快速定位硬盘使用情况,无需安装
查看>>
使用Python批量修改数据库执行Sql文件
查看>>
重载运算符作为成员函数还是非成员函数
查看>>
移动端项目开发小结
查看>>
Gym - 101972B Arabella Collegiate Programming Contest (2018) B. Updating the Tree 树DFS
查看>>
Sass的使用
查看>>
Struts2问题总结
查看>>