Start a new topic

JSON Arrary Question?

JSON Arrary Question?
1 Comment


if i change json context  format i want to achieve in mobile device show  details description.des 

example:

 

JSON_DATA.

, "id" : "1", "latitude" : "24.9528802429251", "longitude" : "121.509316013427", "name" : "taipei101" },{ "_id" : ObjectId("528ae48e31bac2f78431d0af"), "altitude" : "110", "description" : , "id" : "1", "latitude" : "24.9528802429251", "longitude" : "121.509316013427", "name" : "HTC" }>

 

I do not know how to modify this section

 

Code:

for (var currentPlaceNr = 0; currentPlaceNr < poiData.length; currentPlaceNr++) {

var singlePoi = {

"_id": poiData._id,

"id": poiData.id,

"latitude": parseFloat(poiData.latitude),

"longitude": parseFloat(poiData.longitude),

"altitude": parseFloat(poiData.altitude),

"title": poiData.name,

*this one==>"description": poiData.description

 

};

 

final i wish singlePoi data can be use to "onMarkerSelected" function

 

 

onMarkerSelected: function onMarkerSelectedFn(marker) {

World.currentMarker = marker;

 

// update panel values

$("#poi-detail-title").html(marker.poiData.title);

//$("#poi-detail-description").html(marker.poiData.description);

 *this one==>$("#poi-detail-description").html(marker.poiData.description);

......

......

}
Login or Signup to post a comment