如何从 url 获取 JSON 数据并在 Google 地图上放置标记?

How to get JSON data from a url and place markers on Google Maps?

我想知道如何从 URL 中获取 JSON 数据并将坐标(纬度、经度)作为标记添加到 Google 地图中 android工作室(3.1.1).

我不知道该怎么做。

Link: https://opendata.brussels.be/api/records/1.0/search/?dataset=parkings

你可以试试这个代码

JSONObject jsonobj = new JSONObject(response);
JSONArray jsonArr = jsonobj.getJSONArray(jsonobj.getString("records"));

有关更多信息,请查看此内容

https://www.androidhive.info/2012/01/android-json-parsing-tutorial/

dropMarker = map.addMarker(new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.map_drop)).position(new LatLng(latitude, longitude)).可拖动(假));