谷歌地图v3上的loadGeoJson和addGeoJson方法有什么区别? [英] Whats the difference between the loadGeoJson and addGeoJson methods on google map v3?

查看:496
本文介绍了谷歌地图v3上的loadGeoJson和addGeoJson方法有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

他们似乎以相同的方式工作,但我无法弄清楚其中的差异。

They seem to work much in the same way but I can't figure out the difference.

推荐答案

b

  • loadGeoJson从

    / javascript / reference#Datarel =nofollow>文档 $ b

    from the documentation


    loadGeoJson ( url:string,options?:Data.GeoJsonOptions,callback?:function(Array))

    返回值:无

    从URL加载GeoJSON,

    loadGeoJson(url:string, options?:Data.GeoJsonOptions, callback?:function(Array))
    Return Value: None
    Loads GeoJSON from a URL, and adds the features to the collection.




    $ b


    • addGeoJson需要GeoJSON

    • 来自文档


      addGeoJson (geoJson :Object,options?:Data.GeoJsonOptions)

      返回值:Array

      A dds GeoJSON功能集合。 为此方法分析JSON。返回导入的功能。如果无法导入GeoJSON,则抛出异常。

      addGeoJson(geoJson:Object, options?:Data.GeoJsonOptions)
      Return Value: Array
      Adds GeoJSON features to the collection. Give this method a parsed JSON. The imported features are returned. Throws an exception if the GeoJSON could not be imported.

      这篇关于谷歌地图v3上的loadGeoJson和addGeoJson方法有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆