I JSON 节点具有相同的标题,但每个节点中的纬度和经度值不同。我需要检查相同的标题值,然后将纬度和经度值合并到地图 API 的 url 中。我需要它按纬度,经度,纬度,经度等顺序排列......我只是不知道此时该做什么。感谢您的任何帮助或建议。
JS VAR
<img class="detail_map" src="http://open.mapquestapi.com/staticmap/v4/getplacemap?size=320,240&zoom=15&location=' + data.nodes.Latitude + ',' + data.nodes.Longitude + '&imagetype=jpeg&showicon=blue-1">
JSON 对象
var data = fl({
"nodes":[
{"node":{
"title":"180","Address":"555 Market St. San Francisco, CA United States See map: Google Maps","
Latitude":"37.789952","
Longitude":"-122.400158"}},
{"node":{
"title":"180","Address":"Epic Roasthouse (399 Embarcadero) San Francisco, CA United States See map: Google Maps","
Latitude":"37.797677","
Longitude":"-122.394339"}},
{"node":{
"title":"180","Address":"Mason & California Streets (Nob Hill) San Francisco, CA United States See map: Google Maps","
Latitude":"37.791556","
Longitude":"-122.410766"}},
{"node":{
"title":"180","Address":"Justin Herman Plaza San Francisco, CA United States See map: Google Maps","
Latitude":"37.774930","
Longitude":"-122.419416"}},
{"node":{
"title":"180","Address":"200 block Market Street San Francisco, CA United States See map: Google Maps","
Latitude":"37.793133","
Longitude":"-122.396560"}}
]});
});