//比如我在上海市,拿到的数据
plus.geolocation.getCurrentPosition(function(p) {
console.log(p);
});
//打印结果为:
{"coordsType":"gcj02","address":{"cityCode":"021","province":"上海市","district":"普陀区","poiName":"上海市好粥道","street":"曹杨路","city":"上海市","country":"中国"},"addresses":"上海市普陀区曹杨路靠近上海市好粥道","coords":{"latitude":31.244324,"longitude":121.409374,"accuracy":83,"altitude":0,"heading":null,"speed":0,"altitudeAccuracy":0},"timestamp":1472709859896}
我需要结果里面的 province ,city , district 字段,
如果在湖北省的:仙桃市、潜江市、天门市,神农架林区,这些都是省直辖县,这三个字段拿到的分别是什么呢?
0 个回复