मैं प्लगइन संस्करण 2.3-RC1
में से देख लेने के (मैं नहीं जानता, जो संस्करण का उपयोग करते हैं)।
/** Initiates the read from the gps device conneted. Use finishReadFromGps and getGpsProgressXml to
* determine when the plugin is done with this operation. Also, use getGpsXml to extract the
* actual data from the device. <br/>
* <br/>
* Minimum plugin version 2.0.0.4
*
* @param deviceNumber {Number} assigned by the plugin, see getDevicesXml for
* assignment of that number.
* @see #finishReadFromGps
* @see #cancelReadFromGps
* @see #getDevicesXml
*/
startReadFromGps: function(deviceNumber) {
this.plugin.StartReadFromGps(deviceNumber);
},
तो यह getGpsXml
उपयोग करता है:
दरअसल वहाँ startReadFromGps
तरीका है। मुझे लगता है कि यह निर्दिष्ट फ़ाइल नाम का उपयोग करता है जो पढ़ा जाता है और विधि फ़ाइल की सामग्री देता है। मेरी पहली सोचा फ़ाइल नाम बदलने के लिए है - यह के साथ संभव है:
/** This the filename that wil contain the gps xml once the transfer is complete. Use with
* setWriteGpsXml to set what the file contents will be. Also, use startWriteToGps to
* actually make the write happen.
*
* @private
* @param filename {String} the actual filename that will end up on the device. Should only be the
* name and not the extension. The plugin will append the extension portion to the file name--typically .gpx.
* @see #setWriteGpsXml, #startWriteToGps, #startWriteFitnessData
*/
_setWriteFilename: function(filename) {
this.plugin.FileName = filename;
},
लेकिन _setWriteFilename
निजी तरीका है। हालांकि द्वारा
startWriteToGps: function(gpsXml, filename, deviceNumber)
और
startWriteFitnessData: function(tcdXml, deviceNumber, filename, dataTypeName)
कहा जाता है अब जब से मैं अगर अपने निर्दिष्ट filename
को पार कर जाएगी फ़ाइल नाम मूल्य स्थायी रूप से और आगे आह्वान के साथ उन तरीकों को बुलाने की startReadFromGps
नई filename
का उपयोग करेगा की जाँच करेगा।
मैं इसका परीक्षण नहीं कर सकता, मैंने इस पुस्तकालय का उपयोग नहीं किया लेकिन आप एक शॉट दे सकते हैं।
क्या आप सिर्फ waypoints का नाम बदल सकते हैं ... gpx फ़ाइल current.gpx पर? या बस इसमें सामग्री जोड़ें? – Dwza
हां, लेकिन बिंदु यह है कि उपयोगकर्ताओं को एक अच्छा सहज अनुभव हो। मैं उपयोगकर्ता से नहीं पूछ सकता, जो केवल अपनी जीपीएस की फाइलों के साथ गड़बड़ शुरू करने के लिए सेमी-कंप्यूटर साक्षर हो सकता है। और उसी में समस्या है। –
@ जुआनस्ट्रॉस स्वचालित नाम बदलने की प्रक्रिया को स्वचालित नहीं कर सकता? –