我正在使用usaLow.js地图构建地图.在map init上,我调用一个返回此数据的json方法:
[{latitude: "40.4258686",longitude: "-86.9080655"}]
Run Code Online (Sandbox Code Playgroud)
有了这些数据,我就用这个添加到地图的数据提供者(mapData):
mapData.images = [];
for(var i = 0; i < resp.length; ++i){
mapData.images.push({
type: "circle",
color:"#FF0000",
latitude: parseFloat(resp[i].latitude),
longitude: parseFloat(resp[i].longitude)
});
}
map.validateData();
Run Code Online (Sandbox Code Playgroud)
不使用世界地图时是否需要转换纬度/经度坐标?如果是这样,怎么办呢?
编辑:修正了JSON字符串错误