javascript - jQuery array object getting value -


हे सभी मेरे पास निम्न कोड है:

  var items = []; $ (Xml) .find ("placemark")। प्रत्येक (फ़ंक्शन () {var tmp_latLng = $ (this) .find ("coordinates")। पाठ (); tmp_latLng = tmp_latLng.split (","); आइटम धक्का ({name: $ (this) .find ("name")। पाठ (), स्निपेट: $ (this) .find ("snippet")। पाठ (), वर्णन: $ (this) .find ("description ") .text (), lat: tmp_latLng [0], एलएनजी: tmp_latLng [1], दूरी: $ (यह) .फंड (" दूरी ")। पाठ ()});}); Var मार्करनोड = आइटम; अगर (मार्करनोड्स.लाइन और gt; 0) {howManyMarkers = markerNodes.length; के लिए (var i = 0; i & lt; मार्कर नोड्स। लांघ; i ++) {console.log (मार्कर नोड्स [i] .Snippet); Var नाम = मार्कर नोड्स [i] .getAttribute ("स्निपेट"); Var पता = मार्कर नोड्स [i] .getAttribute ("स्निपेट"); Var विवरण = मार्कर नोड्स [i] .getAttribute ("description"); Var distance = parseFloat (मार्कर नोड्स [i] .getAttribute ("दूरी")); Var latlng = नया google.maps.LatLng (पर्सफ्लैट (मार्कर नोड्स [i] .getAttribute ("lat")), पार्सफ़्लोट (मार्कर नोड्स [i] .getAttribute ("lng"))); CreateOption (नाम, दूरी, आई); बनाओ मार्कर (लेटेंग, नाम, पता); bounds.extend (latlng); } Map.fitBounds (सीमा); } और {चेतावनी ('क्षमा करें, आपके स्टोर के करीब कोई दुकान नहीं है। अपने खोज त्रिज्या को बढ़ाने की कोशिश करें।'); }  

त्रुटि console.log पर है (मार्कर नोड्स [i] .nippet); त्रुटि अनक्यूट टाइप एरर है: अपरिभाषित कोई फ़ंक्शन नहीं है

इसके अलावा मार्कर नोड [i] .getAttribute ("स्निपेट") में < Em> Unkaught TypeError: अनिर्धारित एक फ़ंक्शन नहीं है

मुझे क्या याद होगा?

जावास्क्रिप्ट मामले संवेदनशील है। गुण स्निपेट लोअरकेस है, उपयोग

  console.log (मार्करनोड [i] .snippet);  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -