Skip to content
  • 首页
  • GIS理论
  • 二次开发
    • deck.gl
    • Current Page Parent leaflet
    • openlayers
    • mapboxgl
    • 百度地图开发
    • ArcPy
    • ArcEngine
    • geotools
    • QGIS
    • cesium
    • ArcGIS
      • arcgis api for javascript
        • ArcGIS API For JavaScript官方文档
        • 3.x
        • 4.x
      • ArcGISServer
  • 算法
    • GDAL
    • PROJ
    • OGR
    • Geotrellis
  • GIS前沿
    • GIS+BIM
    • GIS人工智能
    • GIS大数据
    • GIS新闻
  • 数据分析
  • 前端
    • JavaScript
    • vue
    • es6
    • CSS
    • html5
  • 后端
    • C#
    • Java
    • redis
    • nodejs
    • Python
      • Python教程
      • Scrapy教程
      • Python数据分析
      • pyspider
  • 操作系统
    • windows
    • centos
    • ubuntu
    • macos
  • 数据库
    • PostGreSQL
    • MongoDB
    • Oracle
      • oraclespatial
    • MySQL
  • GIS数据
    • 数据源
    • ArcMap
    • CAD
    • GeoServer
  • 精选专区
  • 开发工具
  • GIS分析
  • GIS软件
  • 数据中心
  • 源码
  • 登录
  • 注册
  • 版权说明

GIS开发者

gis,openlayers,leaflet,gis应用,geoai,geoserver,cesium,python,arcpy,arcmap,webgis,gis可视化

  • 首页
  • GIS理论
  • 二次开发
    • deck.gl
    • Current Page Parent leaflet
    • openlayers
    • mapboxgl
    • 百度地图开发
    • ArcPy
    • ArcEngine
    • geotools
    • QGIS
    • cesium
    • ArcGIS
      • arcgis api for javascript
        • ArcGIS API For JavaScript官方文档
        • 3.x
        • 4.x
      • ArcGISServer
  • 算法
    • GDAL
    • PROJ
    • OGR
    • Geotrellis
  • GIS前沿
    • GIS+BIM
    • GIS人工智能
    • GIS大数据
    • GIS新闻
  • 数据分析
  • 前端
    • JavaScript
    • vue
    • es6
    • CSS
    • html5
  • 后端
    • C#
    • Java
    • redis
    • nodejs
    • Python
      • Python教程
      • Scrapy教程
      • Python数据分析
      • pyspider
  • 操作系统
    • windows
    • centos
    • ubuntu
    • macos
  • 数据库
    • PostGreSQL
    • MongoDB
    • Oracle
      • oraclespatial
    • MySQL
  • GIS数据
    • 数据源
    • ArcMap
    • CAD
    • GeoServer
  • 精选专区
  • 开发工具
  • GIS分析
  • GIS软件
  • 数据中心
  • 源码
  • leaflet

Object.defineProperties()使用方法

by giser · 2019-04-03


Object.defineProperties()使用方法

var book={};
Object.defineProperties(book,{
    _year:{
        writable:true,
        value:2004
    },
    edition:{
        writable:true,
        value:1
    },
    year:{
        get:function(){
            return this._year;
        },
        set:function(newValue){
            if(newValue>2004){
                this._year=newValue;
                this.edition+=newValue-2004;
            }
        }
    }
});
book.year=2005;
console.log(book.edition);//2

转载自:https://blog.csdn.net/yangyuqingabc/article/details/82873568

Tags: leafletObject.defineProperties()使用方法

  • Next story OpenLayers调用WMS服务
  • Previous story 百度地图API开发:大量坐标点进行分组聚合

You may also like...

  • 移动端click事件

    2019-04-03

  • leaflet动态添加路线–L.Polyline.AntPath

    2019-04-02

  • 使用osmdroid6.0.2加载谷歌、高德、天地图等瓦片地图

    2019-04-03

公众号

微信群

人数过多只能拉人进群;

加我好友yu389741

微信小程序

GIS开发者
京ICP备 18040113号
  • CSDN
  • GeoAI
  • 中国程序员
  • 博客园
  • 站点地图
  • 吾爱地理
  • 地理导航

GIS开发者 © 2026. All Rights Reserved.

Powered by WordPress. Theme by Alx.