Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在网上搜索了我的问题的答案,不幸的是我没有找到解决方案。我想读取一个 json 文件以获取要在地图上绘制的点。我还想添加 3 个复选框作为过滤器。
我遇到了 2 个示例,但它们似乎不是从 json 读取,而是从 xml 文件读取。希望有人可以提供一个例子。
您将需要一个 JSON 解析器。有关更多信息,请参见http://www.json.org/js.html。
在解析方式不同(JSON vs. XML)之后,剩下的代码应该是一样的。
祝你好运!