以下例子取自
https://lbs.amap.com/demo/loca-v2/demos/cat-scatter/sz-road
黄色呼吸点的使用
从官网复制代码时用的是他自带的geojson,用自己的数据是需要将url换成data
var geoLevelE = new Loca.GeoJSONSource({
// data: [],
url: 'https://a.amap.com/Loca/static/loca-v2/demos/mock_data/sz_road_E.json',
});
打开后发现里面的格式是这样的(内容较长,只截取部分)
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [113.806374, 22.764264]
},
"properties": {
"name": "大兴二路与向兴路路口",
"value": 22.36232917,
"level": "B",
"month": 202005
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [113.80241, 22.748657]
},
"pro