谷歌地图v3上的loadGeoJson和addGeoJson方法有什么区别? [英] Whats the difference between the loadGeoJson and addGeoJson methods on google map v3?
问题描述
他们似乎以相同的方式工作,但我无法弄清楚其中的差异。
They seem to work much in the same way but I can't figure out the difference.
推荐答案
/ 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屋!